John Maddock wrote:
Folks, I think I'm looking to add a new C++11 defect macro, but don't know what the feature is called, nor can I see a way of detecting it with clang's __has_feature function.
The code I want to enable involves function overloading based on a decltype return type as in:
auto integrate(args...) -> decltype(expression1); auto integrate(args...) -> decltype(expression2);
where expression1 and expression2 are two mutually exclusive options (the conceptual requirements of args means that only one of these 2 will ever be satisfied).
This works fine in msvc-14 and later and gcc-4.8 and later, but I don't see any current config macros which cover this case, nor can I figure out what this trick should be called.
This is in principle just a combination of BOOST_NO_CXX11_DECLTYPE, BOOST_NO_CXX11_TRAILING_RESULT_TYPES and BOOST_NO_SFINAE_EXPR, although depending on `expression1`, BOOST_NO_CXX11_DECLTYPE_N3276 may also be relevant. That's without taking into account bugs, of course.