
Niels Dekker - address until 2010-10-10 wrote:
typedef std::bitset<8> bitset_type; const bitset_type initial_value1 = 1; const bitset_type initial_value2 = 2;
That also seems ok on mingw-4.5, in both c++98 and c++0x modes. On a side note, GCC 4.5 (4.5.0 20100225 (experimental)) seems to suffer from the same problem as VC bug 500122 when constructing from a literal 0: bitset.cpp:7:37: error: call of overloaded 'bitset(int)' is ambiguous c:\mingw450eq\bin\../lib/gcc/i686-pc-mingw32/4.5.0/../../../../include/c++/4.5.0 /bitset:864:7: note: candidates are: std::bitset<_Nb>::bitset(const char*) [with unsigned int _Nb = 8u] c:\mingw450eq\bin\../lib/gcc/i686-pc-mingw32/4.5.0/../../../../include/c++/4.5.0 /bitset:792:7: note: std::bitset<_Nb>::bitset(long long unsigned int) [with unsigned int _Nb = 8u] c:\mingw450eq\bin\../lib/gcc/i686-pc-mingw32/4.5.0/../../../../include/c++/4.5.0 /bitset:699:5: note: std::bitset<8u>::bitset(const std::bitset<8 u>&) As you say though, there are several workarounds for the problem. -- View this message in context: http://old.nabble.com/-utility-swap--MSVC-10-test-failure%2C-unsigned-long-t... Sent from the Boost - Dev mailing list archive at Nabble.com.