OSVR-Core
Contains.h
Go to the documentation of this file.
1 
11 // Copyright 2015 Sensics, Inc.
12 // TypePack is part of OSVR-Core.
13 //
14 // Use, modification and distribution is subject to the
15 // Boost Software License, Version 1.0. (See accompanying
16 // file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
18 
19 #ifndef INCLUDED_Contains_h_GUID_39658344_E4B2_4196_15DF_546AE1F0DF0B
20 #define INCLUDED_Contains_h_GUID_39658344_E4B2_4196_15DF_546AE1F0DF0B
21 
22 // Internal Includes
23 #include "ApplyList.h"
24 #include "Or.h"
25 #include "Quote.h"
26 #include "Transform.h"
27 
28 // Library/third-party includes
29 // - none
30 
31 // Standard includes
32 #include <type_traits>
33 
34 namespace osvr {
35 namespace typepack {
36 
37  namespace detail {
39  template <typename T> struct is_ {
40  template <typename Elt> using apply = std::is_same<T, Elt>;
41  };
42 
43  } // namespace detail
44 
47  template <typename Haystack, typename Needle>
48  using contains =
50 
51 } // namespace typepack
52 } // namespace osvr
53 #endif // INCLUDED_Contains_h_GUID_39658344_E4B2_4196_15DF_546AE1F0DF0B
apply_list< quote< or_ >, transform< Haystack, detail::is_< Needle >>> contains
Determines if type Needle is in the list Haystack - is an alias for a type that inherits std::true_ty...
Definition: Contains.h:49
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Bind the first argument of std::is_same.
Definition: Contains.h:39
Header.
Definition: newuoa.h:1888
t_< detail::transform_< List, Fun >> transform
Given a list and an alias class, apply the alias class to each element in the list and return the res...
Definition: Transform.h:54
Header.
Header.
apply< detail::apply_list_< F, Args >> apply_list
Apply an alias class, exploding the list of args.
Definition: ApplyList.h:56