Boost logo

Boost :

Subject: [boost] BOOST_NO_CXX11_CONSTEXPR and msvc-14.0
From: Peter Dimov (lists_at_[hidden])
Date: 2015-07-21 16:48:07


I see that BOOST_NO_CXX11_CONSTEXPR is no longer being defined for
msvc-14.0. Even the RTM version has spotty support for constexpr though; the
techniques in my metaprogramming article, for example, don't work. One
simple example that fails is

#include <type_traits>

template< int I > struct X
{
};

template<class... T> constexpr int f( T... t )
{
    return 1;
}

template< class... T > struct Y: X< f(std::is_same<T, void>::value...) >
{
};

Y<void, void, void> y;

int main()
{
}

Another is

#include <type_traits>

template< class... T > struct X
{
    static constexpr bool v[] = { std::is_same<T, void>::value... };
};

int main()
{
}


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