]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/type_traits/detail/detector.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / type_traits / detail / detector.hpp
1 /*
2 Copyright 2017-2018 Glen Joseph Fernandes
3 <glenjofe -at- gmail.com>
4
5 Distributed under the Boost Software License,
6 Version 1.0. (See accompanying file LICENSE_1_0.txt
7 or copy at http://www.boost.org/LICENSE_1_0.txt)
8 */
9
10 #ifndef BOOST_TT_DETAIL_DETECTOR_HPP_INCLUDED
11 #define BOOST_TT_DETAIL_DETECTOR_HPP_INCLUDED
12
13 #include <boost/type_traits/integral_constant.hpp>
14 #include <boost/type_traits/make_void.hpp>
15
16 namespace boost {
17 namespace detail {
18
19 template<class T>
20 using detector_t = typename boost::make_void<T>::type;
21
22 template<class Default, class, template<class...> class, class...>
23 struct detector {
24 using value_t = boost::false_type;
25 using type = Default;
26 };
27
28 template<class Default, template<class...> class Op, class... Args>
29 struct detector<Default, detector_t<Op<Args...> >, Op, Args...> {
30 using value_t = boost::true_type;
31 using type = Op<Args...>;
32 };
33
34 } /* detail */
35 } /* boost */
36
37 #endif