This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

numeric_limits<array type> generates a compiler error


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]