HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Function.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_Function.h
7  *
8  * COMMENTS:
9  * Define UT_Function alias template for std::function and
10  * designate it as NOT being trivially relocatable.
11  *
12  * Be sure to include this header whenever you use
13  * UT_Array< std::function< ... > >.
14  *
15  */
16 
17 #ifndef __UT_FUNCTION_H__
18 #define __UT_FUNCTION_H__
19 
20 #include <SYS/SYS_TypeDecorate.h>
21 
22 #include <functional>
23 
24 template< typename R, typename ... AS >
25 struct SafeTrivialRelocationNoCV< std::function< R( AS ... ) > >
26 {
27  static constexpr bool value = false;
28 };
29 
30 template< typename R, typename ... AS >
31 struct UnsafeTrivialRelocationNoCV< std::function< R( AS ... ) > >
32 {
33  static constexpr bool value = true;
34 };
35 
36 template< typename T >
37 using UT_Function = std::function< T >;
38 
39 #endif // __UT_FUNCTION_H__
40 
std::function< T > UT_Function
Definition: UT_Function.h:37
Definition: core.h:1131