]> git.sesse.net Git - casparcg/blob - dependencies64/boost/boost/units/config.hpp
Unpacked dependencies64
[casparcg] / dependencies64 / boost / boost / units / config.hpp
1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and 
2 // unit/quantity manipulation and conversion
3 //
4 // Copyright (C) 2003-2008 Matthias Christian Schabel
5 // Copyright (C) 2008 Steven Watanabe
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See
8 // accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
10
11 #ifndef BOOST_UNITS_CONFIG_HPP
12 #define BOOST_UNITS_CONFIG_HPP
13
14 #include <boost/config.hpp>
15 #include <boost/version.hpp>
16
17 #ifndef BOOST_UNITS_HAS_BOOST_TYPEOF
18     #if (BOOST_VERSION >= 103400)
19         ///INTERNAL ONLY
20         #define BOOST_UNITS_HAS_BOOST_TYPEOF    1
21     #else
22         ///INTERNAL ONLY
23         #define BOOST_UNITS_HAS_BOOST_TYPEOF    0
24     #endif
25 #endif 
26
27 #if (BOOST_UNITS_HAS_BOOST_TYPEOF)
28     #include <boost/typeof/typeof.hpp> 
29     ///INTERNAL ONLY
30     #define BOOST_UNITS_HAS_TYPEOF          1
31 #else    
32     #if (__GNUC__ && __cplusplus && __GNUC__ >= 3)
33         ///INTERNAL ONLY
34         #define BOOST_UNITS_HAS_TYPEOF          1
35         ///INTERNAL ONLY
36         #define BOOST_UNITS_HAS_GNU_TYPEOF      1
37     #elif defined(__MWERKS__)
38         ///INTERNAL ONLY
39         #define BOOST_UNITS_HAS_TYPEOF          1
40         ///INTERNAL ONLY
41         #define BOOST_UNITS_HAS_MWERKS_TYPEOF   1
42     #else
43         ///INTERNAL ONLY
44         #define BOOST_UNITS_HAS_TYPEOF          0
45     #endif
46 #endif
47
48 // uncomment this to test without typeof support at all
49 //#undef BOOST_UNITS_HAS_TYPEOF
50 //#define BOOST_UNITS_HAS_TYPEOF          0
51
52 #ifndef BOOST_UNITS_NO_COMPILER_CHECK
53
54     #ifdef BOOST_NO_MEMBER_TEMPLATES
55         #error Boost.Units requires member template
56     #endif
57
58     #ifdef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
59         #error Boost.Units requires member template keyword
60     #endif
61
62     #ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
63         #error Boost.Units requires in class member initialization
64     #endif
65
66     #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
67         #error Boost.Units requires function template partial ordering
68     #endif
69
70     #ifdef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
71         #error Boost.Units requires explicit function template arguments
72     #endif
73
74     #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
75         #error Boost.Units requires partial specialization
76     #endif
77
78 #endif
79
80 #ifdef BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY
81     ///INTERNAL ONLY
82     #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) BOOST_STATIC_ASSERT((sizeof(a) == sizeof(b)))
83 #else
84     ///INTERNAL ONLY
85     #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) ((void)0)
86 #endif
87
88 #ifdef BOOST_UNITS_DOXYGEN
89
90 /// If defined will trigger a static assertion if quantity<Unit, T>
91 /// is not layout compatible with T
92 #define BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY
93
94 /// If defined will disable a preprocessor check that the
95 /// compiler is able to handle the library.
96 #define BOOST_UNITS_NO_COMPILER_CHECK
97
98 /// Enable checking to verify that a homogeneous system
99 /// is actually capable of representing all the dimensions
100 /// that it is used with.  Off by default.
101 #define BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
102
103 #endif
104
105 #endif