Opened 13 years ago
Closed 12 years ago
#3761 closed Patches (fixed)
Thread ignores BOOST_NO_MEMBER_TEMPLATE_FRIENDS
Reported by: | Owned by: | Anthony Williams | |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | thread |
Version: | Boost 1.41.0 | Severity: | Problem |
Keywords: | Cc: |
Description
class thread::id in boost/thread/detail/thread.hpp has template friend operator <<
Attachments (1)
Change History (4)
by , 13 years ago
Attachment: | thread.diff added |
---|
comment:1 by , 13 years ago
Component: | None → thread |
---|---|
Owner: | set to |
comment:2 by , 12 years ago
Type: | Bugs → Patches |
---|
Note:
See TracTickets
for help on using tickets.
Another possibility could be to define a public print function which is used by the operator<<
+# ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+ 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