Opened 11 years ago

Last modified 10 years ago

#6342 closed Feature Requests

c++11 compliance: Adapt the one_flag and call_once to the c++11 interface — at Version 1

Reported by: viboes Owned by: viboes
Milestone: Boost 1.50.0 Component: thread
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

The current implementation is doesn't complies completely with c++11 standard 30.4.4 Call once.

struct once_flag { 
  constexpr once_flag() noexcept;
  once_flag(const once_flag&) = delete; 
  once_flag& operator=(const once_flag&) = delete;
};

E.g.

boost::once_flag once;

fails

and needs

boost::once_flag once=BOOST_ONCE_INIT;

In addition one_flag in not copyable.

Change History (2)

comment:1 by viboes, 11 years ago

Description: modified (diff)

by viboes, 11 years ago

Attachment: 6342.patch added

committed diffs in trunk [77767]

Note: See TracTickets for help on using tickets.