Added specialisation for void

This commit is contained in:
jwellbelove 2014-11-19 18:41:20 +00:00
parent 8c281d1507
commit c2717696ae

View File

@ -40,7 +40,7 @@ SOFTWARE.
//*****************************************************************************
///\defgroup integral_limits integral_limits
/// A set of templated compile time constants.
/// A set of templated compile time constants that mirror some of std::numeric_limits funtionality.
///\ingroup utilities
//*****************************************************************************
@ -48,11 +48,25 @@ namespace etl
{
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <typename T>
struct integral_limits;
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<void>
{
static const int min = 0;
static const int max = 0;
static const int bits = 0;
static const bool is_signed = false;
};
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<signed char>
{
@ -64,6 +78,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<unsigned char>
{
@ -75,6 +90,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<char>
{
@ -86,6 +102,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<short>
{
@ -97,6 +114,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<unsigned short>
{
@ -108,6 +126,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<int>
{
@ -119,6 +138,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<unsigned int>
{
@ -130,6 +150,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<long>
{
@ -141,6 +162,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<unsigned long>
{
@ -152,6 +174,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<long long>
{
@ -163,6 +186,7 @@ namespace etl
//***************************************************************************
///\ingroup integral_limits
//***************************************************************************
template <>
struct integral_limits<unsigned long long>
{