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]

[Patch] Do not include <limits>


Hi,

this patch started when I noticed that in the entire library most of times we were using only numeric_limits<>::min and numeric_limits<>::max for integer types, provided as compile time constants in ext/numeric_traits.h too! Since <limits> is pretty big, about 33 KB preprocessed data, I decided to try not using it *at all*. In order to do that, is_signed and digits for integer types are also necessary, but come free in ext/numeric_traits.h together with __glibcxx_signed and __glibcxx_digits, __digits10 and __max_exponent10 for floating point types are the only real additions.

All in all, we can remove about 30 KB of unused stuff from each standard header (besides tr1::cmath, which waits a few adjustments noticed earlier today). I think the improvement is worth a bit of duplication of numeric_limits facilites in ext/numeric_traits.h, but I'm also ok with placing the additional bits elsewhere...

Tested x86/x86_64-linux, without PCHs.

Paolo.

PS: then I promise to really move to something else, for now ;)

/////////////////////
2007-04-13  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/numeric_traits.h: Do not include <limits>.
	(__numeric_traits_integer::__is_signed, __digits): Add.
	(__numeric_traits_floating::__digits10, __max_exponent10): Add.
	* src/istream.cc (ignore<char>(streamsize, int_type), operator>>
	(basic_istream<char>&, char*), ignore<wchar_t>(streamsize,
	int_type)): Use the latter.
	* src/compatibility.cc (ignore<char>(streamsize),
	ignore<wchar_t>(streamsize)): Likewise.
	* include/ext/vstring_util.h (__vstring_utility<>::_S_compare):
	Likewise.
	* include/bits/stl_memory.h (__get_temporary_buffer): Likewise.
	* include/bits/stl_algobase.h (lexicographical_compare(const char*,
	const char*, const char*, const char*)): Likewise.
	* include/bits/locale_facets.tcc (num_get<>::_M_extract_int(_InIter,
	_InIter, ios_base&, ios_base::iostate&, _ValueT&),
	num_put<>::_M_insert_int(_OutIter, ios_base&, _CharT, _ValueT),
	num_put<>::_M_insert_float(_OutIter, ios_base&, _CharT, char,
	_ValueT), collate<>::do_hash(const _CharT*, const _CharT*)): Likewise.
	* include/bits/basic_string.h (basic_string<>::_S_compare): Likewise.
	* include/bits/istream.tcc (operator>>(short&), operator>>(int&),
	ignore(streamsize), ignore(streamsize, int_type), operator>>
	(basic_istream<>&, _CharT*)): Likewise.
	* include/bits/stl_bvector.h (vector<bool>::max_size): Likewise.
	* include/tr1/functional_hash.h (struct hash<long double>): Likewise.
	* include/tr1/cmath: Include <limits>.
	* testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise.
Index: src/istream.cc
===================================================================
--- src/istream.cc	(revision 123715)
+++ src/istream.cc	(working copy)
@@ -152,11 +152,12 @@
 			  __c = __sb->snextc();
 			}
 		    }
-		  if (__n == numeric_limits<streamsize>::max()
+		  if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
 		      && !traits_type::eq_int_type(__c, __eof)
 		      && !traits_type::eq_int_type(__c, __delim))
 		    {
-		      _M_gcount = numeric_limits<streamsize>::min();
+		      _M_gcount =
+			__gnu_cxx::__numeric_traits<streamsize>::__min;
 		      __large_ignore = true;
 		    }
 		  else
@@ -164,13 +165,14 @@
 		}
 
 	      if (__large_ignore)
-		_M_gcount = numeric_limits<streamsize>::max();
+		_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
 
 	      if (traits_type::eq_int_type(__c, __eof))
 		__err |= ios_base::eofbit;
 	      else if (traits_type::eq_int_type(__c, __delim))
 		{
-		  if (_M_gcount < numeric_limits<streamsize>::max())
+		  if (_M_gcount
+		      < __gnu_cxx::__numeric_traits<streamsize>::__max)
 		    ++_M_gcount;
 		  __sb->sbumpc();
 		}
@@ -204,7 +206,7 @@
 	      // Figure out how many characters to extract.
 	      streamsize __num = __in.width();
 	      if (__num <= 0)
-		__num = numeric_limits<streamsize>::max();
+		__num = __gnu_cxx::__numeric_traits<streamsize>::__max;
 
 	      const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
 
@@ -532,11 +534,12 @@
 			  __c = __sb->snextc();
 			}
 		    }
-		  if (__n == numeric_limits<streamsize>::max()
+		  if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
 		      && !traits_type::eq_int_type(__c, __eof)
 		      && !traits_type::eq_int_type(__c, __delim))
 		    {
-		      _M_gcount = numeric_limits<streamsize>::min();
+		      _M_gcount =
+			__gnu_cxx::__numeric_traits<streamsize>::__min;
 		      __large_ignore = true;
 		    }
 		  else
@@ -544,13 +547,14 @@
 		}
 
 	      if (__large_ignore)
-		_M_gcount = numeric_limits<streamsize>::max();
+		_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
 
 	      if (traits_type::eq_int_type(__c, __eof))
 		__err |= ios_base::eofbit;
 	      else if (traits_type::eq_int_type(__c, __delim))
 		{
-		  if (_M_gcount < numeric_limits<streamsize>::max())
+		  if (_M_gcount
+		      < __gnu_cxx::__numeric_traits<streamsize>::__max)
 		    ++_M_gcount;
 		  __sb->sbumpc();
 		}
Index: src/compatibility.cc
===================================================================
--- src/compatibility.cc	(revision 123715)
+++ src/compatibility.cc	(working copy)
@@ -51,6 +51,7 @@
 #include <fstream>
 #include <sstream>
 #include <cmath>
+#include <ext/numeric_traits.h>
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
@@ -96,10 +97,11 @@
 			  __c = __sb->snextc();
 			} 
 		    }
-		  if (__n == numeric_limits<streamsize>::max()
+		  if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
 		      && !traits_type::eq_int_type(__c, __eof))
 		    {
-		      _M_gcount = numeric_limits<streamsize>::min();
+		      _M_gcount =
+			__gnu_cxx::__numeric_traits<streamsize>::__min;
 		      __large_ignore = true;
 		    }
 		  else
@@ -107,7 +109,7 @@
 		}
 
 	      if (__large_ignore)
-		_M_gcount = numeric_limits<streamsize>::max();
+		_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
 
 	      if (traits_type::eq_int_type(__c, __eof))
 		__err |= ios_base::eofbit;
@@ -161,10 +163,11 @@
 			  __c = __sb->snextc();
 			}
 		    }
-		  if (__n == numeric_limits<streamsize>::max()
+		  if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
 		      && !traits_type::eq_int_type(__c, __eof))
 		    {
-		      _M_gcount = numeric_limits<streamsize>::min();
+		      _M_gcount =
+			__gnu_cxx::__numeric_traits<streamsize>::__min;
 		      __large_ignore = true;
 		    }
 		  else
@@ -172,7 +175,7 @@
 		}
 
 	      if (__large_ignore)
-		_M_gcount = numeric_limits<streamsize>::max();
+		_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
 
 	      if (traits_type::eq_int_type(__c, __eof))
 		__err |= ios_base::eofbit;
Index: include/ext/vstring_util.h
===================================================================
--- include/ext/vstring_util.h	(revision 123715)
+++ include/ext/vstring_util.h	(working copy)
@@ -165,12 +165,12 @@
       {
 	const difference_type __d = difference_type(__n1 - __n2);
 
-	if (__d > std::numeric_limits<int>::max())
-	  return std::numeric_limits<int>::max();
-	else if (__d < std::numeric_limits<int>::min())
-	  return std::numeric_limits<int>::min();
+	if (__d > __numeric_traits_integer<int>::__max)
+	  return __numeric_traits_integer<int>::__max;
+	else if (__d < __numeric_traits_integer<int>::__min)
+	  return __numeric_traits_integer<int>::__min;
 	else
-	  return int(__d);	
+	  return int(__d);
       }
     };
 
Index: include/ext/numeric_traits.h
===================================================================
--- include/ext/numeric_traits.h	(revision 123715)
+++ include/ext/numeric_traits.h	(working copy)
@@ -37,7 +37,6 @@
 
 #pragma GCC system_header
 
-#include <limits>
 #include <bits/cpp_type_traits.h>
 #include <ext/type_traits.h>
 
@@ -62,6 +61,11 @@
       // Only integers for initialization of member constant.
       static const _Value __min = __glibcxx_min(_Value);
       static const _Value __max = __glibcxx_max(_Value);
+
+      // NB: these two also available in std::numeric_limits as compile
+      // time constants, but <limits> is big and we avoid including it.
+      static const bool __is_signed = __glibcxx_signed(_Value);
+      static const int __digits = __glibcxx_digits(_Value);      
     };
 
   template<typename _Value>
@@ -71,17 +75,52 @@
     const _Value __numeric_traits_integer<_Value>::__max;
 
   template<typename _Value>
+    const bool __numeric_traits_integer<_Value>::__is_signed;
+
+  template<typename _Value>
+    const int __numeric_traits_integer<_Value>::__digits;
+
+#undef __glibcxx_signed
+#undef __glibcxx_digits
+#undef __glibcxx_min
+#undef __glibcxx_max
+
+#define __glibcxx_floating(_Tp, _Fval, _Dval, _LDval) \
+  (std::__are_same<_Tp, float>::__value ? _Fval \
+   : std::__are_same<_Tp, double>::__value ? _Dval : _LDval)
+
+#define __glibcxx_max_digits10(_Tp) \
+  (2 + __glibcxx_floating(_Tp, __FLT_MANT_DIG__, __DBL_MANT_DIG__, \
+			  __LDBL_MANT_DIG__) * 3010 / 10000)
+
+#define __glibcxx_digits10(_Tp) \
+  __glibcxx_floating(_Tp, __FLT_DIG__, __DBL_DIG__, __LDBL_DIG__)
+
+#define __glibcxx_max_exponent10(_Tp) \
+  __glibcxx_floating(_Tp, __FLT_MAX_10_EXP__, __DBL_MAX_10_EXP__, \
+		     __LDBL_MAX_10_EXP__)
+
+  template<typename _Value>
     struct __numeric_traits_floating
     {
       // Only floating point types. See N1822. 
-      static const int __max_digits10 =
-	2 + std::numeric_limits<_Value>::digits * 3010/10000;
+      static const int __max_digits10 = __glibcxx_max_digits10(_Value);
+
+      // See above comment...
+      static const int __digits10 = __glibcxx_digits10(_Value);
+      static const int __max_exponent10 = __glibcxx_max_exponent10(_Value);
     };
 
   template<typename _Value>
     const int __numeric_traits_floating<_Value>::__max_digits10;
 
   template<typename _Value>
+    const int __numeric_traits_floating<_Value>::__digits10;
+
+  template<typename _Value>
+    const int __numeric_traits_floating<_Value>::__max_exponent10;
+
+  template<typename _Value>
     struct __numeric_traits
     : public __conditional_type<std::__is_integer<_Value>::__value,
 				__numeric_traits_integer<_Value>,
@@ -90,9 +129,9 @@
 
 _GLIBCXX_END_NAMESPACE
 
-#undef __glibcxx_signed
-#undef __glibcxx_min
-#undef __glibcxx_max
-#undef __glibcxx_digits
+#undef __glibcxx_floating
+#undef __glibcxx_max_digits10
+#undef __glibcxx_digits10
+#undef __glibcxx_max_exponent10
 
 #endif 
Index: include/bits/stl_memory.h
===================================================================
--- include/bits/stl_memory.h	(revision 123724)
+++ include/bits/stl_memory.h	(working copy)
@@ -41,7 +41,6 @@
 #include <bits/stl_uninitialized.h>
 #include <bits/stl_raw_storage_iter.h>
 #include <debug/debug.h>
-#include <limits>
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
@@ -57,7 +56,8 @@
     pair<_Tp*, ptrdiff_t>
     __get_temporary_buffer(ptrdiff_t __len, _Tp*)
     {
-      const ptrdiff_t __max = numeric_limits<ptrdiff_t>::max() / sizeof(_Tp);
+      const ptrdiff_t __max =
+	__gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp);
       if (__len > __max)
 	__len = __max;
       
Index: include/bits/stl_algobase.h
===================================================================
--- include/bits/stl_algobase.h	(revision 123715)
+++ include/bits/stl_algobase.h	(working copy)
@@ -70,7 +70,7 @@
 #include <bits/stl_pair.h>
 #include <bits/cpp_type_traits.h>
 #include <ext/type_traits.h>
-#include <limits>
+#include <ext/numeric_traits.h>
 #include <bits/stl_iterator_base_types.h>
 #include <bits/stl_iterator_base_funcs.h>
 #include <bits/stl_iterator.h>
@@ -1018,7 +1018,7 @@
     __glibcxx_requires_valid_range(__first1, __last1);
     __glibcxx_requires_valid_range(__first2, __last2);
 
-    if (std::numeric_limits<char>::is_signed)
+    if (__gnu_cxx::__numeric_traits<char>::__is_signed)
       return std::lexicographical_compare((const signed char*) __first1,
 					  (const signed char*) __last1,
 					  (const signed char*) __first2,
Index: include/bits/locale_facets.tcc
===================================================================
--- include/bits/locale_facets.tcc	(revision 123716)
+++ include/bits/locale_facets.tcc	(working copy)
@@ -39,7 +39,7 @@
 
 #pragma GCC system_header
 
-#include <limits>		// For numeric_limits
+#include <ext/numeric_traits.h>
 #include <typeinfo>		// For bad_cast.
 #include <bits/streambuf_iterator.h>
 #include <ext/type_traits.h>
@@ -538,7 +538,7 @@
 	if (!__testeof)
 	  {
 	    __c = *__beg;
-	    if (numeric_limits<_ValueT>::is_signed)
+	    if (__gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
 	      __negative = __c == __lit[__num_base::_S_iminus];
 	    if ((__negative || __c == __lit[__num_base::_S_iplus])
 		&& !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
@@ -607,8 +607,9 @@
 	if (__lc->_M_use_grouping)
 	  __found_grouping.reserve(32);
 	bool __testfail = false;
-	const __unsigned_type __max = __negative ?
-	  -numeric_limits<_ValueT>::min() : numeric_limits<_ValueT>::max();
+	const __unsigned_type __max = __negative
+	  ? -__gnu_cxx::__numeric_traits<_ValueT>::__min
+	  : __gnu_cxx::__numeric_traits<_ValueT>::__max;
 	const __unsigned_type __smax = __max / __base;
 	__unsigned_type __result = 0;
 	int __digit = 0;
@@ -1029,7 +1030,7 @@
 	    if (__v > 0)
 	      {
 		if (__flags & ios_base::showpos
-		    && numeric_limits<_ValueT>::is_signed)
+		    && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
 		  *--__cs = __lit[__num_base::_S_oplus], ++__len;
 	      }
 	    else if (__v)
@@ -1116,7 +1117,8 @@
 	// Use default precision if out of range.
 	const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision();
 
-	const int __max_digits = numeric_limits<_ValueT>::digits10;
+	const int __max_digits =
+	  __gnu_cxx::__numeric_traits<_ValueT>::__digits10;
 
 	// [22.2.2.2.2] Stage 1, numeric conversion to character.
 	int __len;
@@ -1143,7 +1145,8 @@
 #else
 	// Consider the possibility of long ios_base::fixed outputs
 	const bool __fixed = __io.flags() & ios_base::fixed;
-	const int __max_exp = numeric_limits<_ValueT>::max_exponent10;
+	const int __max_exp =
+	  __gnu_cxx::__numeric_traits<_ValueT>::__max_exponent10;
 
 	// The size of the output string is computed as follows.
 	// ios_base::fixed outputs may need up to __max_exp + 1 chars
@@ -1790,7 +1793,8 @@
 	}
 #else
       // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
-      const int __cs_size = numeric_limits<long double>::max_exponent10 + 3;
+      const int __cs_size =
+	__gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 3;
       char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
       int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf", 
 					0, __units);
@@ -2499,8 +2503,10 @@
     {
       unsigned long __val = 0;
       for (; __lo < __hi; ++__lo)
-	__val = *__lo + ((__val << 7) |
-		       (__val >> (numeric_limits<unsigned long>::digits - 7)));
+	__val =
+	  *__lo + ((__val << 7)
+		   | (__val >> (__gnu_cxx::__numeric_traits<unsigned long>::
+				__digits - 7)));
       return static_cast<long>(__val);
     }
 
Index: include/bits/basic_string.h
===================================================================
--- include/bits/basic_string.h	(revision 123715)
+++ include/bits/basic_string.h	(working copy)
@@ -395,12 +395,12 @@
       {
 	const difference_type __d = difference_type(__n1 - __n2);
 
-	if (__d > numeric_limits<int>::max())
-	  return numeric_limits<int>::max();
-	else if (__d < numeric_limits<int>::min())
-	  return numeric_limits<int>::min();
+	if (__d > __gnu_cxx::__numeric_traits<int>::__max)
+	  return __gnu_cxx::__numeric_traits<int>::__max;
+	else if (__d < __gnu_cxx::__numeric_traits<int>::__min)
+	  return __gnu_cxx::__numeric_traits<int>::__min;
 	else
-	  return int(__d);	
+	  return int(__d);
       }
 
       void
Index: include/bits/istream.tcc
===================================================================
--- include/bits/istream.tcc	(revision 123715)
+++ include/bits/istream.tcc	(working copy)
@@ -117,8 +117,8 @@
       _M_extract(__l);
       if (!this->fail())
 	{
-	  if (numeric_limits<short>::min() <= __l
-	      && __l <= numeric_limits<short>::max())
+	  if (__gnu_cxx::__numeric_traits<short>::__min <= __l
+	      && __l <= __gnu_cxx::__numeric_traits<short>::__max)
 	    __n = short(__l);
 	  else
 	    this->setstate(ios_base::failbit);
@@ -137,8 +137,8 @@
       _M_extract(__l);
       if (!this->fail())
 	{
-	  if (numeric_limits<int>::min() <= __l
-	      && __l <= numeric_limits<int>::max())
+	  if (__gnu_cxx::__numeric_traits<int>::__min <= __l
+	      && __l <= __gnu_cxx::__numeric_traits<int>::__max)
 	    __n = int(__l);
 	  else
 	    this->setstate(ios_base::failbit);
@@ -432,10 +432,11 @@
 		      ++_M_gcount;
 		      __c = __sb->snextc();
 		    }
-		  if (__n == numeric_limits<streamsize>::max()
+		  if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
 		      && !traits_type::eq_int_type(__c, __eof))
 		    {
-		      _M_gcount = numeric_limits<streamsize>::min();
+		      _M_gcount =
+			__gnu_cxx::__numeric_traits<streamsize>::__min;
 		      __large_ignore = true;
 		    }
 		  else
@@ -443,7 +444,7 @@
 		}
 
 	      if (__large_ignore)
-		_M_gcount = numeric_limits<streamsize>::max();
+		_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
 
 	      if (traits_type::eq_int_type(__c, __eof))
                 __err |= ios_base::eofbit;
@@ -483,11 +484,12 @@
 		      ++_M_gcount;
 		      __c = __sb->snextc();
 		    }
-		  if (__n == numeric_limits<streamsize>::max()
+		  if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
 		      && !traits_type::eq_int_type(__c, __eof)
 		      && !traits_type::eq_int_type(__c, __delim))
 		    {
-		      _M_gcount = numeric_limits<streamsize>::min();
+		      _M_gcount =
+			__gnu_cxx::__numeric_traits<streamsize>::__min;
 		      __large_ignore = true;
 		    }
 		  else
@@ -495,13 +497,14 @@
 		}
 
 	      if (__large_ignore)
-		_M_gcount = numeric_limits<streamsize>::max();
+		_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
 
               if (traits_type::eq_int_type(__c, __eof))
                 __err |= ios_base::eofbit;
 	      else if (traits_type::eq_int_type(__c, __delim))
 		{
-		  if (_M_gcount < numeric_limits<streamsize>::max())
+		  if (_M_gcount
+		      < __gnu_cxx::__numeric_traits<streamsize>::__max)
 		    ++_M_gcount;
 		  __sb->sbumpc();
 		}
@@ -800,7 +803,7 @@
 	      // Figure out how many characters to extract.
 	      streamsize __num = __in.width();
 	      if (__num <= 0)
-		__num = numeric_limits<streamsize>::max();
+		__num = __gnu_cxx::__numeric_traits<streamsize>::__max;
 
 	      const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
 
Index: include/bits/stl_bvector.h
===================================================================
--- include/bits/stl_bvector.h	(revision 123715)
+++ include/bits/stl_bvector.h	(working copy)
@@ -583,7 +583,8 @@
     max_size() const
     {
       const size_type __isize =
-	std::numeric_limits<difference_type>::max() - int(_S_word_bit) + 1;
+	__gnu_cxx::__numeric_traits<difference_type>::__max
+	- int(_S_word_bit) + 1;
       const size_type __asize = _M_get_Bit_allocator().max_size();
       return (__asize <= __isize / int(_S_word_bit)
 	      ? __asize * int(_S_word_bit) : __isize);
Index: include/tr1/functional_hash.h
===================================================================
--- include/tr1/functional_hash.h	(revision 123715)
+++ include/tr1/functional_hash.h	(working copy)
@@ -208,7 +208,7 @@
 	__ldval = __ldval < 0.0l ? -(__ldval + 0.5l) : __ldval;
 
 	const long double __mult =
-	  std::numeric_limits<std::size_t>::max() + 1.0l;
+	  __gnu_cxx::__numeric_traits<std::size_t>::__max + 1.0l;
 	__ldval *= __mult;
 
 	// Try to use all the bits of the mantissa (really necessary only
@@ -217,8 +217,7 @@
 	__ldval = (__ldval - (long double)__hibits) * __mult;
 
 	const std::size_t __coeff =
-	  (std::numeric_limits<std::size_t>::max()
-	   / std::numeric_limits<long double>::max_exponent);
+	  __gnu_cxx::__numeric_traits<std::size_t>::__max / __LDBL_MAX_EXP__;
 
 	__result = __hibits + (std::size_t)__ldval + __coeff * __exponent;
 
Index: include/tr1/cmath
===================================================================
--- include/tr1/cmath	(revision 123715)
+++ include/tr1/cmath	(working copy)
@@ -36,6 +36,7 @@
 
 #include <bits/c++config.h>
 #include <bits/stl_algobase.h>
+#include <limits>
 #include <cmath>
 #include <tr1/common.h>
 
Index: testsuite/23_containers/vector/bool/capacity/29134.cc
===================================================================
--- testsuite/23_containers/vector/bool/capacity/29134.cc	(revision 123715)
+++ testsuite/23_containers/vector/bool/capacity/29134.cc	(working copy)
@@ -19,6 +19,7 @@
 // 23.2.5 class vector<bool> [lib.vector.bool]
 
 #include <vector>
+#include <limits>
 #include <testsuite_hooks.h>
 
 // libstdc++/29134

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