Boost logo

Boost :

Subject: [boost] [config] What Feature is this??
From: John Maddock (jz.maddock_at_[hidden])
Date: 2017-07-23 18:50:26


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.

Alternatively, if anyone has a better way of differentiating between
unary and binary functions I'm happy to hear about it ;)

Thanks, John.

---
This email has been checked for viruses by AVG.
http://www.avg.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk