diff --git a/common/misc.hh b/common/misc.hh index f6ae8a63d3cd1d70f3c5ebd5f72172cb3edbe639..d6126c6a1acf33b09224d66db1448c051cd9ca33 100644 --- a/common/misc.hh +++ b/common/misc.hh @@ -13,6 +13,14 @@ template <bool flag> class CompileTimeChecker; template <> class CompileTimeChecker<true> { }; +//! Map an integer value to a type +//! This comes in handy if one tries to emulate member function specialization. +//! The idea how to do it is presented in "Modern C++ Design" by Alexandrescu. +template <int N> +struct Int2Type { + enum { value = N }; +}; + namespace Dune { /** @addtogroup Common