::operator<<(std::basic_ostream<_CharT, _Traits>&(*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/ostream.tcc:74: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(s
Hello Cory-san,
Thank you for your prompt advice for my basic question.
I found same thing happens even when I use dynamic bitsets as member
of struct.
My original simple code:
#include <iostream>
#include
#include
using namespace std;
using namespace boost;
struct multi_bitsets{
dynamic_bitset<> db1(10,1ul);
dynamic_bitset<> db2(10,2ul);
};
int main()
{
multi_bitsets mb1;
cout<<"mb1.db1:"<&)(&std::cout)), ((const char*)"mb1.db1:")) << mb1.multi_bitsets::db1'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/ostream.tcc:63: note: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits
td::basic_ios<_CharT, _Traits>&(*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/ostream.tcc:86: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(s
td::ios_base&(*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
-------------------------------------------------------------------
And modified code with the initializer list suggested by Cory-san:
#include <iostream>
#include
#include
using namespace std;
using namespace boost;
struct multi_bitsets{
dynamic_bitset<> db1;
dynamic_bitset<> db2;
};
multi_bitsets():db1(10,1ul), db2(10,2ul){}
int main()
{
multi_bitsets mb1;
cout<<"mb1.db1:"<