is_constructible.hpp
Go to the documentation of this file.
1 
2 // (C) Copyright John Maddock 2015.
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
6 //
7 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
8 
9 #ifndef BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
10 #define BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
11 
14 
15 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
16 
21 
22 namespace boost{
23 
24  namespace detail{
25 
27  {
28  template<typename T, typename ...TheArgs, typename = decltype(T(boost::declval<TheArgs>()...))>
30  template<typename, typename...>
32 
33  template<typename T, typename Arg, typename = decltype(::new T(boost::declval<Arg>()))>
35  template<typename, typename>
37 
38  template <typename T>
40  template <typename T>
42  };
43 
44  }
45 
46  template <class T, class ...Args> struct is_constructible : public integral_constant<bool, sizeof(detail::is_constructible_imp::test<T, Args...>(0)) == sizeof(boost::type_traits::yes_type)>{};
47  template <class T, class Arg> struct is_constructible<T, Arg> : public integral_constant<bool, is_destructible<T>::value && sizeof(detail::is_constructible_imp::test1<T, Arg>(0)) == sizeof(boost::type_traits::yes_type)>{};
48  template <class Ref, class Arg> struct is_constructible<Ref&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{};
49  template <class Ref, class Arg> struct is_constructible<Ref&&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{};
50 
51  template <> struct is_constructible<void> : public false_type{};
52  template <> struct is_constructible<void const> : public false_type{};
53  template <> struct is_constructible<void const volatile> : public false_type{};
54  template <> struct is_constructible<void volatile> : public false_type{};
55 
56  template <class T> struct is_constructible<T> : public is_default_constructible<T>{};
57 
58 #else
59 
62 
63 namespace boost{
64 
65  // We don't know how to implement this:
66  template <class T, class U = void> struct is_constructible : public is_convertible<U, T>{};
67  template <class T> struct is_constructible<T, void> : public is_default_constructible<T>{};
68  template <> struct is_constructible<void, void> : public false_type{};
69  template <> struct is_constructible<void const, void> : public false_type{};
70  template <> struct is_constructible<void const volatile, void> : public false_type{};
71  template <> struct is_constructible<void volatile, void> : public false_type{};
72  template <class Ref> struct is_constructible<Ref&, void> : public false_type{};
73 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
74  template <class Ref> struct is_constructible<Ref&&, void> : public false_type{};
75 #endif
76 #endif
77 
78 } // namespace boost
79 
80 #endif // BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
static boost::type_traits::yes_type ref_test(T)
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
const char * detail
static boost::type_traits::yes_type test(int)
static boost::type_traits::yes_type test1(int)


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:17