#include <type_traits>
template< typename T >
using cond =
std::conditional_t<
std::is_void< T >::value ,
std::true_type ,
std::false_type
>::value;
static_assert( cond< void > , "" );
int main() {}
missing 'typename' prior to dependent type name 'std::conditional_t::value, std::true_type, std::false_type>::value'
Why is it missing a typename
as it isn't a type at all?
If I add the typename
it throws this at me:
error: typename specifier refers to non-type member 'value' in 'std::integral_constant<bool, true>'
Isn't it the same thing as in here? How do I resolve this?