numeric_limits<array type> generates a compiler error

Andy Venikov avenikov@google.com
Wed Feb 6 18:03:00 GMT 2013


I thought that numeric_limits were supposed to work for any type, not
just arithmetic types.
The following program, when compiled with gcc 4.7.2, gives a compiler error.

#include <limits>

int main(int, char**)
{
   bool b = std::numeric_limits<char[10]>::is_integer;
}

/limits:309:7: error: function returning an array

The function in question is min()

Is this a problem? Or is it expected?

Thanks,
     Andy.



More information about the Libstdc++ mailing list