If I write this in my header file:
then right click on myFunction, choose Refactor -> Add definition in cpp file, code that is generated in cpp file is:
The noexcept specifier is missing, which leads to compile error.
It would be great to also add support for cases when entire noexcept expression is present and even in case a macro is used instead of noexcept specifier, for example:
where NOEXCEPT_EXCEPT_BADALLOC evaluates to noexcept on platforms that have full overcommit enabled (i.e. where malloc cannot return NULL, e.g. Android or iOS) and to nothing on platforms that do not have full overcommit enabled (windows and some linux distributions).
So in this case, I would expect QtCreator to generate following code in my cpp file: