OSDN Git Service

2010-12-08 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Dec 2010 02:33:55 +0000 (02:33 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Dec 2010 02:33:55 +0000 (02:33 +0000)
* include/std/bitset (_Base_bitset<>::_Base_bitset(),
_Base_bitset(unsigned long)): Simplify.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167624 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/bitset

index 1447927..ed2b11d 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/std/bitset (_Base_bitset<>::_Base_bitset(),
+       _Base_bitset(unsigned long)): Simplify.
+
 2010-12-07  Fran├žois Dumont  <francois.cppdevs@free.fr>
 
        * include/bits/stl_iterator.h: Add move_iterator operators overloads
index db20eaf..86f361c 100644 (file)
@@ -72,9 +72,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
       /// 0 is the least significant word.
       _WordT           _M_w[_Nw];
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      constexpr _Base_bitset() : _M_w({ }) { }
+      _GLIBCXX_CONSTEXPR _Base_bitset()
+      : _M_w() { }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
       constexpr _Base_bitset(unsigned long long __val)
       : _M_w({ _WordT(__val)
 #if __SIZEOF_LONG_LONG__ > __SIZEOF_LONG__
@@ -82,14 +83,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
 #endif
        }) { }
 #else
-      _Base_bitset()
-      { _M_do_reset(); }
-
       _Base_bitset(unsigned long __val)
-      {
-       _M_do_reset();
-       _M_w[0] = __val;
-      }
+      : _M_w()
+      { _M_w[0] = __val; }
 #endif
 
       static _GLIBCXX_CONSTEXPR size_t