generates distinct type for each integer. Here is an example where it may help us: More...
#include <base.hpp>
Public Types | |
enum | { value = t } |
generates distinct type for each integer. Here is an example where it may help us:
template <typename T, bool b> class A { private: void function(T*, int_to_type<true>) { } void function(T*, int_to_type<false>) { // implementation if b == false // note that here can be illegal code for b == true // but compilation will pass as compiler will check only the // syntax } public: void function(T* t) { function(t, int_to_type<b>()); } };