|
|
@@ -30,26 +30,4 @@ namespace detail {
|
|
|
using is_nt_c = std::is_nothrow_constructible<P, Y>;
|
|
|
template <typename P, typename Y>
|
|
|
using is_nt_a = std::is_nothrow_assignable<P, Y>;
|
|
|
-
|
|
|
- template <typename P, typename = void> struct get_ptr {
|
|
|
- decltype(std::declval<P>().get()) get(P const & ptr) const {
|
|
|
- return std::addressof(*ptr);
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
- template <typename T> struct get_ptr<std::weak_ptr<T>> {
|
|
|
- void get(std::weak_ptr<T> const & ptr) throw();
|
|
|
- };
|
|
|
-
|
|
|
- template <typename T> struct get_ptr<T *> {
|
|
|
- T * get(T * ptr) const { return ptr; }
|
|
|
- };
|
|
|
-
|
|
|
- template <typename P>
|
|
|
- struct get_ptr<P, typename std::enable_if<!std::is_void<decltype(
|
|
|
- std::declval<P>().get())>::value>::type> {
|
|
|
- decltype(std::declval<P>().get()) get(P const & ptr) const {
|
|
|
- return ptr.get();
|
|
|
- }
|
|
|
- };
|
|
|
}
|