OSVR-Core
Defer.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_Defer_h_GUID_FB817A3F_C608_43B7_BE11_2E81132DE2E0
29 #define INCLUDED_Defer_h_GUID_FB817A3F_C608_43B7_BE11_2E81132DE2E0
30 
31 // Internal Includes
32 #include "List.h"
33 
34 // Library/third-party includes
35 // - none
36 
37 // Standard includes
38 // - none
39 
40 namespace osvr {
41 namespace typepack {
42 
44  namespace detail {
45 
46  template <template <typename...> class, typename> struct defer_ {};
47 
48  template <template <typename...> class C, typename... Ts>
49  struct defer_<C, list<Ts...>> {
50  using type = C<Ts...>;
51  };
52  } // namespace detail
54 
56  // defer
73  template <template <typename...> class C, typename... Ts>
74  struct defer : detail::defer_<C, list<Ts...>> {};
75 
76 } // namespace typepack
77 } // namespace osvr
78 #endif // INCLUDED_Defer_h_GUID_FB817A3F_C608_43B7_BE11_2E81132DE2E0
A wrapper that defers the instantiation of a template C with type parameters Ts in a lambda or let ex...
Definition: Defer.h:74
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Definition: newuoa.h:1888
Header.