OSDN Git Service

2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / profile / bitset
index 7917524..a995afa 100644 (file)
 
 #include <bitset>
 
-namespace std
+namespace std _GLIBCXX_VISIBILITY(default)
 {
 namespace __profile
 {
   /// Class std::bitset wrapper with performance instrumentation.
   template<size_t _Nb>
     class bitset
-    : public _GLIBCXX_STD_D::bitset<_Nb>
+    : public _GLIBCXX_STD_C::bitset<_Nb>
     {
-      typedef _GLIBCXX_STD_D::bitset<_Nb> _Base;
+      typedef _GLIBCXX_STD_C::bitset<_Nb> _Base;
 
     public:
       // bit reference:
@@ -95,10 +95,10 @@ namespace __profile
       };
 
       // 23.3.5.1 constructors:
-      bitset() : _Base() { }
+      _GLIBCXX_CONSTEXPR bitset() : _Base() { }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-      bitset(unsigned long long __val)
+      constexpr bitset(unsigned long long __val)
 #else
       bitset(unsigned long __val)
 #endif
@@ -127,8 +127,13 @@ namespace __profile
       bitset(const _Base& __x) : _Base(__x) { }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-      explicit
-      bitset(const char* __str) : _Base(__str) { }
+      template<typename _CharT>
+        explicit
+        bitset(const _CharT* __str,
+              typename std::basic_string<_CharT>::size_type __n
+              = std::basic_string<_CharT>::npos,
+              _CharT __zero = _CharT('0'), _CharT __one = _CharT('1'))
+       : _Base(__str, __n, __zero, __one) { }
 #endif
 
       // 23.3.5.2 bitset operations:
@@ -363,7 +368,7 @@ namespace __profile
     {
       size_t
       operator()(const __profile::bitset<_Nb>& __b) const
-      { return std::hash<_GLIBCXX_STD_D::bitset<_Nb>>()(__b._M_base()); }
+      { return std::hash<_GLIBCXX_STD_C::bitset<_Nb>>()(__b._M_base()); }
     };
 #endif