Modify

Ticket #3761 (closed Patches: fixed)

Opened 4 years ago

Last modified 4 years ago

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

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

Change History

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

comment:1 Changed 4 years ago by steven_watanabe

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

comment:2 Changed 4 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 4 years ago by anthonyw

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

Fixed on trunk.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
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.