Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:09:54

0001 // Boost.Units - A C++ library for zero-overhead dimensional analysis and 
0002 // unit/quantity manipulation and conversion
0003 //
0004 // Copyright (C) 2003-2008 Matthias Christian Schabel
0005 // Copyright (C) 2008 Steven Watanabe
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See
0008 // accompanying file LICENSE_1_0.txt or copy at
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 
0011 #ifndef BOOST_UNITS_CONFIG_HPP
0012 #define BOOST_UNITS_CONFIG_HPP
0013 
0014 #include <boost/config.hpp>
0015 #include <boost/version.hpp>
0016 
0017 #ifndef BOOST_UNITS_HAS_BOOST_TYPEOF
0018     #if (BOOST_VERSION >= 103400)
0019         ///INTERNAL ONLY
0020         #define BOOST_UNITS_HAS_BOOST_TYPEOF    1
0021     #else
0022         ///INTERNAL ONLY
0023         #define BOOST_UNITS_HAS_BOOST_TYPEOF    0
0024     #endif
0025 #endif 
0026 
0027 #if (BOOST_UNITS_HAS_BOOST_TYPEOF)
0028     #include <boost/typeof/typeof.hpp> 
0029     ///INTERNAL ONLY
0030     #define BOOST_UNITS_HAS_TYPEOF          1
0031 #else    
0032     #if (__GNUC__ && __cplusplus)
0033         ///INTERNAL ONLY
0034         #define BOOST_UNITS_HAS_TYPEOF          1
0035         ///INTERNAL ONLY
0036         #define BOOST_UNITS_HAS_GNU_TYPEOF      1
0037     #elif defined(__MWERKS__)
0038         ///INTERNAL ONLY
0039         #define BOOST_UNITS_HAS_TYPEOF          1
0040         ///INTERNAL ONLY
0041         #define BOOST_UNITS_HAS_MWERKS_TYPEOF   1
0042     #else
0043         ///INTERNAL ONLY
0044         #define BOOST_UNITS_HAS_TYPEOF          0
0045     #endif
0046 #endif
0047 
0048 // uncomment this to test without typeof support at all
0049 //#undef BOOST_UNITS_HAS_TYPEOF
0050 //#define BOOST_UNITS_HAS_TYPEOF          0
0051 
0052 #ifndef BOOST_UNITS_NO_COMPILER_CHECK
0053 
0054     #ifdef BOOST_NO_MEMBER_TEMPLATES
0055         #error Boost.Units requires member template
0056     #endif
0057 
0058     #ifdef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
0059         #error Boost.Units requires member template keyword
0060     #endif
0061 
0062     #ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
0063         #error Boost.Units requires in class member initialization
0064     #endif
0065 
0066     #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
0067         #error Boost.Units requires function template partial ordering
0068     #endif
0069 
0070 
0071 #endif
0072 
0073 #ifdef BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY
0074     ///INTERNAL ONLY
0075     #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) BOOST_STATIC_ASSERT((sizeof(a) == sizeof(b)))
0076 #else
0077     ///INTERNAL ONLY
0078     #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b)
0079 #endif
0080 
0081 #ifdef BOOST_UNITS_DOXYGEN
0082 
0083 /// If defined will trigger a static assertion if quantity<Unit, T>
0084 /// is not layout compatible with T
0085 #define BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY
0086 
0087 /// If defined will disable a preprocessor check that the
0088 /// compiler is able to handle the library.
0089 #define BOOST_UNITS_NO_COMPILER_CHECK
0090 
0091 /// Enable checking to verify that a homogeneous system
0092 /// is actually capable of representing all the dimensions
0093 /// that it is used with.  Off by default.
0094 #define BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
0095 
0096 #endif
0097 
0098 #endif