mirror of
https://github.com/boostorg/core.git
synced 2025-07-30 04:47:24 +02:00
No BOOST_WORKAROUND for MSVC as >1900 has builtin
This commit is contained in:
@ -59,8 +59,8 @@ private:
|
|||||||
template<class T>
|
template<class T>
|
||||||
struct address_of {
|
struct address_of {
|
||||||
static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT {
|
static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT {
|
||||||
return reinterpret_cast<T*>(&const_cast<
|
return reinterpret_cast<T*>(&
|
||||||
char&>(reinterpret_cast<const volatile char&>(o)));
|
const_cast<char&>(reinterpret_cast<const volatile char&>(o)));
|
||||||
}
|
}
|
||||||
static BOOST_FORCEINLINE T* get(T* p, int) BOOST_NOEXCEPT {
|
static BOOST_FORCEINLINE T* get(T* p, int) BOOST_NOEXCEPT {
|
||||||
return p;
|
return p;
|
||||||
@ -115,8 +115,7 @@ struct address_of<const volatile addressof_null_t> {
|
|||||||
defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
|
defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
|
||||||
defined(BOOST_NO_CXX11_CONSTEXPR) || \
|
defined(BOOST_NO_CXX11_CONSTEXPR) || \
|
||||||
defined(BOOST_NO_CXX11_DECLTYPE) || \
|
defined(BOOST_NO_CXX11_DECLTYPE) || \
|
||||||
(defined(BOOST_MSVC) && \
|
defined(BOOST_MSVC_FULL_VER)
|
||||||
BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1900)))
|
|
||||||
#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF
|
#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -181,7 +180,7 @@ typename addressof_rvalue<T>::type
|
|||||||
addressof_declval() BOOST_NOEXCEPT;
|
addressof_declval() BOOST_NOEXCEPT;
|
||||||
|
|
||||||
template<class>
|
template<class>
|
||||||
struct addressof_make_void {
|
struct addressof_void {
|
||||||
typedef void type;
|
typedef void type;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -191,9 +190,8 @@ struct addressof_member_operator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct addressof_member_operator<T,
|
struct addressof_member_operator<T, typename
|
||||||
typename addressof_make_void<
|
addressof_void<decltype(addressof_declval<T&>().operator&())>::type> {
|
||||||
decltype(addressof_declval<T&>().operator&())>::type> {
|
|
||||||
static constexpr bool value = true;
|
static constexpr bool value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -210,9 +208,8 @@ struct addressof_non_member_operator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct addressof_non_member_operator<T,
|
struct addressof_non_member_operator<T, typename
|
||||||
typename addressof_make_void<
|
addressof_void<decltype(operator&(addressof_declval<T&>()))>::type> {
|
||||||
decltype(operator&(addressof_declval<T&>()))>::type> {
|
|
||||||
static constexpr bool value = true;
|
static constexpr bool value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -223,8 +220,7 @@ struct addressof_expression {
|
|||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct addressof_expression<T,
|
struct addressof_expression<T,
|
||||||
typename addressof_make_void<
|
typename addressof_void<decltype(&addressof_declval<T&>())>::type> {
|
||||||
decltype(&addressof_declval<T&>())>::type> {
|
|
||||||
static constexpr bool value = true;
|
static constexpr bool value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user