1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
template <typename T, typename S>
struct Decl
{
};

template <>
struct Decl<int, int>
{
    typedef int Type;
};

template <>
struct Decl<double, int>
{
    typedef double Type;
};

template <>
struct Decl<int, double>
{
    typedef double Type;
};

template <>
struct Decl<double, double>
{
    typedef double Type;
};