OSVR-Core
Or.h
Go to the documentation of this file.
1 
14 // Copyright 2015 Sensics, Inc.
15 // TypePack is part of OSVR-Core.
16 //
17 // Incorporates code from "meta":
18 // Copyright Eric Niebler 2014-2015
19 //
20 // Use, modification and distribution is subject to the
21 // Boost Software License, Version 1.0. (See accompanying
22 // file LICENSE_1_0.txt or copy at
23 // http://www.boost.org/LICENSE_1_0.txt)
24 //
25 // Project home: https://github.com/ericniebler/meta
26 //
27 
28 #ifndef INCLUDED_Or_h_GUID_2D16A5C5_4937_4695_30A8_842C5DD4B2C7
29 #define INCLUDED_Or_h_GUID_2D16A5C5_4937_4695_30A8_842C5DD4B2C7
30 
31 // Internal Includes
32 #include "Bool.h"
33 #include "If.h"
34 
35 // Library/third-party includes
36 // - none
37 
38 // Standard includes
39 #include <type_traits>
40 
41 namespace osvr {
42 namespace typepack {
43 
45  namespace detail {
46  template <typename... Bools> struct or_impl;
47 
48  template <> struct or_impl<> : std::false_type {};
49 
50  template <typename Bool, typename... Bools>
51  struct or_impl<Bool, Bools...>
52  : if_c<Bool::type::value, std::true_type, or_impl<Bools...>> {};
53  } // namespace detail
55 
58  template <typename... Bools> using or_ = t_<detail::or_impl<Bools...>>;
59 
60 } // namespace typepack
61 } // namespace osvr
62 #endif // INCLUDED_Or_h_GUID_2D16A5C5_4937_4695_30A8_842C5DD4B2C7
t_< detail::or_impl< Bools... >> or_
Logically or together all the integral constant-wrapped Boolean parameters, with short-circuiting.
Definition: Or.h:58
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Definition: gtest_pred_impl_unittest.cc:56
Header.
Definition: newuoa.h:1888
typename T::type t_
A convenience alias template to extract the nested type within the supplied T.
Definition: T.h:52
Header.
t_< detail::if_impl< bool_< If >, Args... >> if_c
Select one type or another depending on a compile-time Boolean value.
Definition: If.h:65