3 // Copyright (c) 2015 Oracle and/or its affiliates.
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7 // Use, modification and distribution is subject to the Boost Software License,
8 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_GEOMETRY_UTIL_CONDITION_HPP
12 #define BOOST_GEOMETRY_UTIL_CONDITION_HPP
15 #include <boost/config.hpp>
18 // The macro defined in this file allows to suppress the MSVC
19 // compiler warning C4127: conditional expression is constant
23 // NOTE: The code commented out below contains an alternative implementation
24 // of a macro using a free function. It was left here in case if in the future
25 // version of MSVC for the code currently used in the macro implementation
26 // the warning was generated.
28 //#ifndef DOXYGEN_NO_DETAIL
29 //namespace boost { namespace geometry { namespace detail {
30 //BOOST_FORCEINLINE bool condition(bool const b) { return b; }
31 //}}} // boost::geometry::detail
32 //#endif // DOXYGEN_NO_DETAIL
33 //#define BOOST_GEOMETRY_CONDITION(CONDITION) boost::geometry::detail::condition(CONDITION)
35 #define BOOST_GEOMETRY_CONDITION(CONDITION) ((void)0, (CONDITION))
39 #define BOOST_GEOMETRY_CONDITION(CONDITION) (CONDITION)
44 #endif // BOOST_GEOMETRY_UTIL_CONDITION_HPP