// C++11 delete definition ( function declaration = delete)
#define CDS_CXX11_DELETE_DEFINITION_SUPPORT
-// C++11 explicitly-defaulted function (= default) [std 8.4.2 [dcl.fct.def.default]]
-#define CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
-
// C++11 inline namespace
#define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
atomic_noncopyable& operator=(const atomic_noncopyable&);
//atomic_noncopyable& operator=(const atomic_noncopyable&) volatile;
protected:
-# ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
atomic_noncopyable() = default;
-# else
- atomic_noncopyable()
- {}
-# endif
};
#endif
return atomic_ops::atomic_fetch_xor_explicit( &m_val, val, order );
}
-#ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
atomic_integral() = default;
-#else
- atomic_integral() CDS_NOEXCEPT
- {}
-#endif
CDS_CONSTEXPR atomic_integral(T val) CDS_NOEXCEPT
: m_val(val)
{}
return compare_exchange_strong( expected, desired, success_order, memory_order_relaxed );
}
-#ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
atomic() = default;
-#else
- atomic()
- {}
-#endif
CDS_CONSTEXPR atomic(T val)
: m_data( val )
{}
}
};
-#if defined(CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT) && defined(CDS_CXX11_DELETE_DEFINITION_SUPPORT)
+#if defined(CDS_CXX11_DELETE_DEFINITION_SUPPORT)
# define CDS_DECLARE_ATOMIC_INTEGRAL( _type ) \
template <> \
struct atomic<_type>: public details::atomic_integral<_type> \
return atomic_ops::atomic_fetch_sub_explicit( &m_ptr, offset, order );
}
-#ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
atomic() = default;
-#else
- atomic() CDS_NOEXCEPT
- {}
-#endif
CDS_CONSTEXPR atomic(T * val) CDS_NOEXCEPT
: m_ptr( val )
{}
return platform::atomic_flag_tas( &m_Flag, order );
}
-#ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
atomic_flag() = default;
-#elif CDS_COMPILER != CDS_COMPILER_MSVC
- // MS VC generate error C2552 "non-aggregates cannot be initialized with initializer list"
- // when atomic_flag initializes with ATOMIC_FLAG_INIT
- atomic_flag()
- {}
-#endif
#ifdef CDS_CXX11_DELETE_DEFINITION_SUPPORT
atomic_flag(const atomic_flag&) = delete;
- template alias [CDS_CXX11_TEMPLATE_ALIAS_SUPPORT]
- explicit conversion operator [CDS_CXX11_EXPLICIT_CONVERSION_OPERATOR_SUPPORT]
- default template argument for function [CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT]
+ - explicit default functions (=default) [CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT]
*/
#if CDS_COMPILER == CDS_COMPILER_MSVC
// C++11 delete definition ( function declaration = delete)
#define CDS_CXX11_DELETE_DEFINITION_SUPPORT
-// C++11 explicitly-defaulted function (= default) [std 8.4.2 [dcl.fct.def.default]]
-#define CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
-
// Lambda
#define CDS_CXX11_LAMBDA_SUPPORT
// C++11 delete definition ( function declaration = delete)
#define CDS_CXX11_DELETE_DEFINITION_SUPPORT
-// C++11 explicitly-defaulted function (= default) [std 8.4.2 [dcl.fct.def.default]]
-#define CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
-
// C++11 inline namespace
#define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
// C++11 delete definition ( function declaration = delete)
#define CDS_CXX11_DELETE_DEFINITION_SUPPORT
-// C++11 explicitly-defaulted function (= default) [std 8.4.2 [dcl.fct.def.default]]
-#define CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
-
// C++11 inline namespace
//#define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
# define CDS_DELETE_SPECIFIER
#endif
-// =default function specifier
-#ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
-# define CDS_DEFAULT_SPECIFIER =default
-#else
-# define CDS_DEFAULT_SPECIFIER
-#endif
-
//@endcond
#endif // #ifndef __CDS_DETAILS_CXX11_FEATURES_H
*this |= nMask;
}
-# ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
/// Copy constructor
marked_ptr( marked_ptr const& src ) CDS_NOEXCEPT_DEFAULTED = default;
/// Copy-assignment operator
marked_ptr& operator =( marked_ptr&& p ) CDS_NOEXCEPT_DEFAULTED = default;
//@endcond
# endif
-# else
- /// Copy constructor
- marked_ptr( marked_ptr const& src ) CDS_NOEXCEPT
- : m_ptr( src.m_ptr )
- {}
-
- /// Copy-assignment operator
- marked_ptr& operator =( marked_ptr const& p ) CDS_NOEXCEPT
- {
- m_ptr = p.m_ptr;
- return *this;
- }
-# endif
//TODO: make move ctor
//@endcond
public:
//@cond
-# ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
atomic_ref() = default;
-# else
- atomic_ref() CDS_NOEXCEPT
- : base_class()
- {}
-# endif
explicit CDS_CONSTEXPR atomic_ref(T * p) CDS_NOEXCEPT
: base_class( p )
{}
, nCredits(0)
{}
-# ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
active_tag( active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default;
~active_tag() CDS_NOEXCEPT_DEFAULTED = default;
active_tag& operator=(active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default;
active_tag( active_tag&& ) CDS_NOEXCEPT_DEFAULTED = default;
active_tag& operator=(active_tag&&) CDS_NOEXCEPT_DEFAULTED = default;
# endif
-# endif
/// Returns pointer to superblock descriptor
superblock_desc * ptr() const
active_tag() CDS_NOEXCEPT
: pDesc( nullptr )
{}
-# ifdef CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
// Clang 3.1: error: first argument to atomic operation must be a pointer to a trivially-copyable type
//active_tag() CDS_NOEXCEPT_DEFAULTED = default;
active_tag( active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default;
active_tag( active_tag&& ) CDS_NOEXCEPT_DEFAULTED = default;
active_tag& operator=(active_tag&&) CDS_NOEXCEPT_DEFAULTED = default;
# endif
-# endif
superblock_desc * ptr() const
{
return pDesc.ptr();
cds_std=std \
CDS_URCU_SIGNAL_HANDLING_ENABLED \
CDS_CXX11_DELETE_DEFINITION_SUPPORT \
- CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT \
CDS_CXX11_INLINE_NAMESPACE_SUPPORT \
CDS_CXX11_INLINE_NAMESPACE=inline \
CDS_CXX11_DECLTYPE_SUPPORT \