On Saturday, 29 April 2017 19:14:54 -03 Mat Sutcliffe wrote: > It also controls whether Q_DECL_CONSTEXPR expands to constexpr or nothing. > But I don't think that should alter whether or not a function is inline, > because functions declared with Q_DECL_CONSTEXPR should already be inline > anyway.
All constexpr functions are by definition inline. The question is whether MSVC 2017 mangles them especially because of that fact. With the simple attached testcase, I compiled with MSVC 2017. The resulting symbols were: ?normal_inline@Foo@@QEAAHXZ ; Foo::normal_inline ?constexpr_inline@Foo@@QEAAHXZ ; Foo::constexpr_inline The mangling QEAAHXZ expands to: Q public E __far64 / __ptr64 A no cv-qualification A __cdecl H return type: int X parameter list: void Z throw list: ... [unused, all functions end in Z] -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
class __declspec(dllexport) Foo { public: inline int normal_inline() { return 42; } constexpr int constexpr_inline() { return 42; } };
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development