How can I lazy evaluate second arg in std::conditional?
#include \"stdafx.h\"
#include
struct Null{};
struct _1{enum {one = true,two = fal
The usual technique for this is to have the std::conditional
choose between two metafunctions:
template
struct false_case {
typedef typename std::conditional::type type;
};
struct always_null {typedef Null type;};
template
struct X :
std::conditional::value,
always_null,
false_case
>::type::type { ... };
Note the two ::type
s after std::conditional
now.