blob: ae2c71ab8faea55b7f9f8d152ccea37fdeb471e2 [file] [log] [blame]
#ifndef RDESTL_INT_TO_TYPE_H
#define RDESTL_INT_TO_TYPE_H
namespace rde
{
/**
* Sample usage:
* void fun(int_to_type<true>) { ... }
* void fun(int_to_type<false>) { ... }
* template<typename T> void bar()
* {
* fun(int_to_type<std::numeric_limits<T>::is_exact>())
* }
*/
template<int TVal>
struct int_to_type
{
enum
{
value = TVal
};
};
} // namespaces
#endif // #ifndef RDESTL_INT_TO_TYPE_H