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: 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)

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@…>

Attachment: thread.diff added

comment:1 Changed 8 years ago by Steven Watanabe

Component: Nonethread
Owner: set to Anthony Williams

comment:2 Changed 7 years ago by anonymous

Type: BugsPatches

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 Anthony Williams

Resolution: fixed
Status: newclosed

Fixed on trunk.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Anthony Williams.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.