A little weird way to get the result as compile-time const for those of us who don't have "constexpr":
#include
namespace
{
template
struct helper
{
enum
{
value = V
};
};
template
auto get_size(T(&)[Size]) -> helper < Size >
{
return helper < Size >() ;
}
template
struct get_value
{
enum
{
value = T::value
};
};
}
int main()
{
std::cout << get_value::value;
}