Patchwork [v3] Small fix to _Base_bitset constructor in 32-bit mode

login
register
mail settings
Submitter Paolo Carlini
Date Nov. 2, 2010, 3:53 p.m.
Message ID <4CD033F2.2030804@oracle.com>
Download mbox | patch
Permalink /patch/69901/
State New
Headers show

Comments

Paolo Carlini - Nov. 2, 2010, 3:53 p.m.
Hi,

tested x86_64-multilib, committed.

Paolo.

//////////////////////
2010-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/bitset (_Base_bitset<>_Base_bitset(unsigned long long)):
	Convert __val to _WordT.

Patch

Index: include/std/bitset
===================================================================
--- include/std/bitset	(revision 166172)
+++ include/std/bitset	(working copy)
@@ -76,9 +76,9 @@ 
       constexpr _Base_bitset() : _M_w({ }) { }
 
       constexpr _Base_bitset(unsigned long long __val)
-      : _M_w({ __val
+      : _M_w({ _WordT(__val)
 #if __SIZEOF_LONG_LONG__ > __SIZEOF_LONG__
-	       , __val >> _GLIBCXX_BITSET_BITS_PER_WORD
+	       , _WordT(__val >> _GLIBCXX_BITSET_BITS_PER_WORD)
 #endif
        }) { }
 #else