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]

[v3] Two small changes


Hi,

tested x86_64-linux (debug-mode too), committed to mainline.

Paolo.

//////////////////
2008-05-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/debug/bitset (bitset(const char*)): Implement DR 778
	in debug-mode too.

	* include/bits/cpp_type_traits.h (__is_integer): In C++0x mode
	deal with char16_t and char32_t.
Index: include/debug/bitset
===================================================================
--- include/debug/bitset	(revision 136151)
+++ include/debug/bitset	(working copy)
@@ -134,6 +134,12 @@
 	       __n = (std::basic_string<_CharT,_Traits,_Allocator>::npos))
 	: _Base(__str, __pos, __n) { }
 
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 778. std::bitset does not have any constructor taking a string literal
+      explicit
+      bitset(const char* __s)
+      : _Base(__s) { }
+
       bitset(const _Base& __x) : _Base(__x), _Safe_base() { }
 
       // 23.3.5.2 bitset operations:
Index: include/bits/cpp_type_traits.h
===================================================================
--- include/bits/cpp_type_traits.h	(revision 136151)
+++ include/bits/cpp_type_traits.h	(working copy)
@@ -180,6 +180,22 @@
     };
 # endif
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<>
+    struct __is_integer<char16_t>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<char32_t>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+#endif
+
   template<>
     struct __is_integer<short>
     {

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