mp_defer.hpp
Go to the documentation of this file.
1 #ifndef BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED
2 #define BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED
3 
4 //
5 // Copyright 2015 Peter Dimov
6 //
7 // Distributed under the Boost Software License, Version 1.0.
8 // See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt
10 //
11 
14 
15 namespace boost
16 {
17 
18 namespace type_traits_detail
19 {
20 
21 // mp_valid
22 // implementation by Bruno Dutra (by the name is_evaluable)
23 
24 template<template<class...> class F, class... T>
26 {
27  template<template<class...> class G, class = G<T...>>
28  static boost::true_type check_s(int);
29 
30  template<template<class...> class>
31  static boost::false_type check_s(...);
32 
33  using type = decltype(check_s<F>(0));
34 };
35 
36 template<template<class...> class F, class... T>
37 using mp_valid = typename mp_valid_impl<F, T...>::type;
38 
39 // mp_defer
40 
41 struct mp_empty
42 {
43 };
44 
45 template<template<class...> class F, class... T> struct mp_defer_impl
46 {
47  using type = F<T...>;
48 };
49 
50 template<template<class...> class F, class... T> using mp_defer = typename boost::conditional<mp_valid<F, T...>::value, mp_defer_impl<F, T...>, mp_empty>::type;
51 
52 } // namespace type_traits_detail
53 
54 } // namespace boost
55 
56 #endif // #ifndef BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED
typename boost::conditional< mp_valid< F, T... >::value, mp_defer_impl< F, T... >, mp_empty >::type mp_defer
Definition: mp_defer.hpp:50
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
GLfloat value
typename mp_valid_impl< F, T... >::type mp_valid
Definition: mp_defer.hpp:37
static boost::true_type check_s(int)
decltype(check_s< F >(0)) type
Definition: mp_defer.hpp:33


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