Boost logo

Boost :

Subject: Re: [boost] [config] Rethinking feature macros?
From: Peter Dimov (lists_at_[hidden])
Date: 2017-11-06 03:09:57


Niall Douglas wrote:
> >> VS2017 also supports them.
> >
> > It does? Which macros does VS2017 define?
>
> The ones in the latest SD-6 proposal. And only those, not the ones which
> used to be in there.

That's not what I'm seeing here. VS2017 supports structured bindings but
__cpp_structured_bindings is not defined.

#include <iostream>

struct X
{
    int a, b;
};

int main()
{
    X x{ 1, 2 };
    auto [a, b] = x;

#ifdef __cpp_structured_bindings

    std::cout << "__cpp_structured_bindings: " << __cpp_structured_bindings
<< std::endl;

#else

    std::cout << "__cpp_structured_bindings: not defined" << std::endl;

#endif
}


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