Program Listing for File converters.hpp

Return to documentation for file (/tmp/ws/src/ecl_core/ecl_mpl/include/ecl/mpl/converters.hpp)

/*****************************************************************************
** Ifdefs
*****************************************************************************/

#ifndef ECL_MPL_CONVERTERS_HPP_
#define ECL_MPL_CONVERTERS_HPP_

/*****************************************************************************
** Namespaces
*****************************************************************************/

namespace ecl {

/*****************************************************************************
** Signed to Unsigned Template MetaConversions
*****************************************************************************/

template <typename Signed> struct Unsigned {};

template <> struct Unsigned<char> { typedef unsigned char type;  };
template <> struct Unsigned<short> { typedef unsigned short type; };
template <> struct Unsigned<int> { typedef unsigned int type; };
template <> struct Unsigned<long> { typedef unsigned long type; };
template <> struct Unsigned<long long> { typedef unsigned long long type; };

template <> struct Unsigned<unsigned char> { typedef unsigned char type;  };
template <> struct Unsigned<unsigned short> { typedef unsigned short type; };
template <> struct Unsigned<unsigned int> { typedef unsigned int type; };
template <> struct Unsigned<unsigned long> { typedef unsigned long type; };
template <> struct Unsigned<unsigned long long> { typedef unsigned long long type; };

} // namespace ecl

#endif /* ECL_MPL_CONVERTERS_HPP_ */