CLOGS
C++ library for sorting and searching in OpenCL applications
platform.h
Go to the documentation of this file.
1 /* Copyright (c) 2014, Bruce Merry
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a copy
4  * of this software and associated documentation files (the "Software"), to deal
5  * in the Software without restriction, including without limitation the rights
6  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7  * copies of the Software, and to permit persons to whom the Software is
8  * furnished to do so, subject to the following conditions:
9  *
10  * The above copyright notice and this permission notice shall be included in
11  * all copies or substantial portions of the Software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19  * SOFTWARE.
20  */
21 
28 #ifndef CLOGS_PLATFORM_H
29 #define CLOGS_PLATFORM_H
30 
31 #if __cplusplus >= 201103L
32 # define CLOGS_HAVE_RVALUE_REFERENCES 1
33 #elif defined(_MSC_VER)
34 # if _MSC_VER >= 1600 // VC 2010
35 # define CLOGS_HAVE_RVALUE_REFERENCES 1
36 # endif
37 #elif defined(__has_extension)
38 # if __has_extension(cxx_rvalue_references)
39 # define CLOGS_HAVE_RVALUE_REFERENCES 1
40 # endif
41 #endif
42 
43 #if __cplusplus >= 201103L
44 # define CLOGS_HAVE_NOEXCEPT 1
45 #elif defined(__has_extension)
46 # if __has_extension(cxx_noexcept)
47 # define CLOGS_HAVE_NOEXCEPT 1
48 # endif
49 #endif
50 #ifdef CLOGS_HAVE_NOEXCEPT
51 # define CLOGS_NOEXCEPT noexcept
52 #else
53 # define CLOGS_NOEXCEPT
54 #endif
55 
56 #if __cplusplus >= 201103L
57 # define CLOGS_HAVE_DELETED_FUNCTIONS 1
58 #elif defined(_MSC_VER)
59 # if _MSC_VER >= 1800
60 # define CLOGS_HAVE_DELETED_FUNCTIONS 1
61 # endif
62 #elif defined(__has_extension)
63 # if __has_extension(cxx_deleted_functions)
64 # define CLOGS_HAVE_DELETED_FUNCTIONS 1
65 # endif
66 #endif
67 #ifdef CLOGS_HAVE_DELETED_FUNCTION
68 # define CLOGS_DELETE_FUNCTION = delete
69 #else
70 # define CLOGS_DELETE_FUNCTION
71 #endif
72 
73 #endif /* !CLOGS_PLATFORM_H */