This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
numeric_limits<array type> generates a compiler error
- From: Andy Venikov <avenikov at google dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Wed, 6 Feb 2013 13:03:34 -0500
- Subject: 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.