Subject: [Boost-bugs] [Boost C++ Libraries] #4674: output operator<< of thread::id
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-22 16:18:14
#4674: output operator<< of thread::id
-------------------------------+--------------------------------------------
Reporter: ka55i0peia@⦠| Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.44.0 | Severity: Problem
Keywords: |
-------------------------------+--------------------------------------------
Hi,
{{{#!cpp
std::cout << boost::this_thread::get_id();
}}}
produces:
{{{
thread.hpp(473) : error C2662: 'std::basic_ostream<_Elem,_Traits>
&boost::thread::id::print<char,std::char_traits<char>>(std::basic_ostream<_Elem,_Traits>
&)' : cannot convert 'this' pointer from 'const boost::thread::id' to
'boost::thread::id &'
}}}
For me it was okay to comment the const out:
{{{#!cpp
operator<<(std::basic_ostream<charT, traits>& os, /*const*/ thread::id& x)
{
return x.print(os);
}
}}}
Greetings,
Jan.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4674> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC