]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/type_traits/detail/detector.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / type_traits / detail / detector.hpp
CommitLineData
11fdf7f2
TL
1/*
2Copyright 2017-2018 Glen Joseph Fernandes
92f5a8d4 3(glenjofe@gmail.com)
11fdf7f2
TL
4
5Distributed under the Boost Software License,
6Version 1.0. (See accompanying file LICENSE_1_0.txt
7or 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
16namespace boost {
17namespace detail {
18
19template<class T>
20using detector_t = typename boost::make_void<T>::type;
21
22template<class Default, class, template<class...> class, class...>
23struct detector {
24 using value_t = boost::false_type;
25 using type = Default;
26};
27
28template<class Default, template<class...> class Op, class... Args>
29struct 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