Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3761: Thread ignores BOOST_NO_MEMBER_TEMPLATE_FRIENDS
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-06 12:36:47
#3761: Thread ignores BOOST_NO_MEMBER_TEMPLATE_FRIENDS
--------------------------------------------------------+-------------------
Reporter: Yuriy A. Krasnoschek <aka.rider@â¦> | Owner: anthonyw
Type: Patches | Status: new
Milestone: Boost 1.42.0 | Component: thread
Version: Boost 1.41.0 | Severity: Problem
Keywords: |
--------------------------------------------------------+-------------------
Changes (by anonymous):
* type: Bugs => Patches
Comment:
Another possibility could be to define a public print function which is
used by the operator<<
+# ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
template<class charT, class traits>
friend std::basic_ostream<charT, traits>&
- operator<<(std::basic_ostream<charT, traits>& os, const id& x)
+ operator<<
+# else
+ template<class charT, class traits>
+ static std::basic_ostream<charT, traits>&
+ print
+# endif
+ (std::basic_ostream<charT, traits>& os, const id& x)
+# ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+ template<class charT, class traits>
+ std::basic_ostream<charT, traits>&
+ operator<<(std::basic_ostream<charT, traits>& os, const thread::id&
x)
+ {
+ return thread::id::print(os, x);
+ }
+# endif
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3761#comment:2> 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:03 UTC