{}
template <typename Predicate>
- bool operator()(Predicate pr) CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
+ bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
{
return pr();
}
/// Switch to another thread (yield). Good for thread preemption architecture.
struct yield {
//@cond
- void operator ()() CDS_NOEXCEPT
+ void operator ()() const CDS_NOEXCEPT
{
std::this_thread::yield();
}
template <typename Predicate>
- bool operator()(Predicate pr) CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
+ bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
{
if ( pr() )
return true;
*/
struct pause {
//@cond
- void operator ()() CDS_NOEXCEPT
+ void operator ()() const CDS_NOEXCEPT
{
# ifdef CDS_backoff_pause_defined
platform::backoff_pause();
}
template <typename Predicate>
- bool operator()(Predicate pr) CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
+ bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
{
if ( pr() )
return true;
struct hint
{
//@cond
- void operator ()() CDS_NOEXCEPT
+ void operator ()() const CDS_NOEXCEPT
{
# if defined(CDS_backoff_hint_defined)
platform::backoff_hint();
}
template <typename Predicate>
- bool operator()(Predicate pr) CDS_NOEXCEPT_(noexcept(std::declval<Predicate>()() ))
+ bool operator()(Predicate pr) const CDS_NOEXCEPT_(noexcept(std::declval<Predicate>()() ))
{
if ( pr() )
return true;
{}
/// Initializes timeout from \p nTimeout
- CDS_CONSTEXPR delay( unsigned int nTimeout ) CDS_NOEXCEPT
+ CDS_CONSTEXPR explicit delay( unsigned int nTimeout ) CDS_NOEXCEPT
: m_nTimeout( nTimeout )
{}
return false;
}
- void reset() const CDS_NOEXCEPT
+ static void reset() CDS_NOEXCEPT
{}
//@endcond
};