Modify

Opened 8 years ago

Closed 7 years ago

#3761 closed Patches (fixed)

Thread ignores BOOST_NO_MEMBER_TEMPLATE_FRIENDS

Reported by: Yuriy A. Krasnoschek <aka.rider@…> Owned by: anthonyw
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)

thread.diff (629 bytes) - added by Yuriy A. Krasnoschek <aka.rider@…> 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Yuriy A. Krasnoschek <aka.rider@…>

comment:1 Changed 8 years ago by steven_watanabe

  • Component changed from None to thread
  • Owner set to anthonyw

comment:2 Changed 7 years ago by anonymous

  • Type changed from Bugs to Patches

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

comment:3 Changed 7 years ago by anthonyw

  • Resolution set to fixed
  • Status changed from new to closed

Fixed on trunk.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anthonyw.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.