Qt 5 provides a macro for this context which expands to either 'const' or
'constexpr' depending on whether cxx_constexpr is available, and another
macro which expands to either 'const' or 'constexpr' depending on whether
cxx_relaxed_constexpr is available.
Thinking of it, since C++14 constexpr
Jean-Michaël Celerier wrote:
Qt 5 provides a macro for this context which expands to either 'const' or
'constexpr' depending on whether cxx_constexpr is available, and another
macro which expands to either 'const' or 'constexpr' depending on whether
cxx_relaxed_constexpr is available.
I'm referring to the const used after methods (struct { int f() const; }).
Here is an example : https://ideone.com/C28SMn
Best regards :)
On Mon, Aug 3, 2015 at 7:20 PM, Stephen Kelly steve...@gmail.com wrote:
Jean-Michaël Celerier wrote:
Qt 5 provides a macro for this context which
Hello,
At the ned of this mail is a patch that adds generation of a macro for
the relaxed (c++14) constexpr in WriteCompilerDetectionHeader.
This is intended for compilers that support c++11 constexpr (with
everything on a single return statement) like GCC-4.9 and the upcoming
MSVC, but not
Jean-Michaël Celerier wrote:
I think there should be a test for the different allowed contexts of the
${prefix_arg}_RELAXED_CONSTEXPR and ${prefix_arg}_CONSTEXPR macros. Could
you extend Tests/Module/WriteCompilerDetectionHeader with a test for that?
For sure, I'll do this asap.
Jean-Michaël Celerier wrote:
Hello,
At the ned of this mail is a patch that adds generation of a macro for
the relaxed (c++14) constexpr in WriteCompilerDetectionHeader.
Thanks for working on this.
I have some thoughts for archival purposes on the mailing list. These aren't
things you
I think there should be a test for the different allowed contexts of the
${prefix_arg}_RELAXED_CONSTEXPR and ${prefix_arg}_CONSTEXPR macros. Could
you extend Tests/Module/WriteCompilerDetectionHeader with a test for that?
For sure, I'll do this asap.
constexpr foo = ...;
If I read
Stephen Kelly wrote:
* A method marked constexpr will fail to compile with a compiler which
does not support relaxed constexpr if the method uses language which
requires relaxed mode (such as a for loop), even if the method is
evaluated in a non- constant expression. I tested GCC and Clang.