template< typename T >
struct add_const { typedef T const type; };

template< typename T >
struct add_const< T const > { typedef T const type; };

template< typename T >
struct add_const< T & > { typedef T const & type; };

template< typename T >
struct add_const< T const & > { typedef T const & type; };