From 37f449aa3b21401759cef03a60c0d9ee320b24a3 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 29 May 2008 11:42:08 +0000 Subject: [PATCH] bitset (bitset(const char*)): Implement DR 778 in debug-mode too. 2008-05-29 Paolo Carlini * 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. From-SVN: r136158 --- libstdc++-v3/ChangeLog | 8 ++++++++ libstdc++-v3/include/bits/cpp_type_traits.h | 16 ++++++++++++++++ libstdc++-v3/include/debug/bitset | 6 ++++++ 3 files changed, 30 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1c023cfe827..261d5e9473d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2008-05-29 Paolo Carlini + + * 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. + 2008-05-26 Paolo Carlini * include/c_global/cmath (pow(float, int), pow(double, int), diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h index 45b958f852d..b378abafcb4 100644 --- a/libstdc++-v3/include/bits/cpp_type_traits.h +++ b/libstdc++-v3/include/bits/cpp_type_traits.h @@ -180,6 +180,22 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; # endif +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; +#endif + template<> struct __is_integer { diff --git a/libstdc++-v3/include/debug/bitset b/libstdc++-v3/include/debug/bitset index db4b3c075d0..75474c806b5 100644 --- a/libstdc++-v3/include/debug/bitset +++ b/libstdc++-v3/include/debug/bitset @@ -134,6 +134,12 @@ namespace __debug __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: -- 2.30.2