Commit 37f449aa by Paolo Carlini Committed by Paolo Carlini

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

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.

From-SVN: r136158
parent 4efa7ef9
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.
2008-05-26 Paolo Carlini <paolo.carlini@oracle.com> 2008-05-26 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (pow(float, int), pow(double, int), * include/c_global/cmath (pow(float, int), pow(double, int),
......
...@@ -180,6 +180,22 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -180,6 +180,22 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}; };
# endif # 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<> template<>
struct __is_integer<short> struct __is_integer<short>
{ {
......
...@@ -134,6 +134,12 @@ namespace __debug ...@@ -134,6 +134,12 @@ namespace __debug
__n = (std::basic_string<_CharT,_Traits,_Allocator>::npos)) __n = (std::basic_string<_CharT,_Traits,_Allocator>::npos))
: _Base(__str, __pos, __n) { } : _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() { } bitset(const _Base& __x) : _Base(__x), _Safe_base() { }
// 23.3.5.2 bitset operations: // 23.3.5.2 bitset operations:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment