Chris@102: // Boost.Geometry Chris@102: Chris@102: // Copyright (c) 2015 Oracle and/or its affiliates. Chris@102: Chris@102: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle Chris@102: Chris@102: // Use, modification and distribution is subject to the Boost Software License, Chris@102: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@102: // http://www.boost.org/LICENSE_1_0.txt) Chris@102: Chris@102: #ifndef BOOST_GEOMETRY_UTIL_CONDITION_HPP Chris@102: #define BOOST_GEOMETRY_UTIL_CONDITION_HPP Chris@102: Chris@102: Chris@102: #include Chris@102: Chris@102: Chris@102: // The macro defined in this file allows to suppress the MSVC Chris@102: // compiler warning C4127: conditional expression is constant Chris@102: Chris@102: #ifdef BOOST_MSVC Chris@102: Chris@102: // NOTE: The code commented out below contains an alternative implementation Chris@102: // of a macro using a free function. It was left here in case if in the future Chris@102: // version of MSVC for the code currently used in the macro implementation Chris@102: // the warning was generated. Chris@102: Chris@102: //#ifndef DOXYGEN_NO_DETAIL Chris@102: //namespace boost { namespace geometry { namespace detail { Chris@102: //BOOST_FORCEINLINE bool condition(bool const b) { return b; } Chris@102: //}}} // boost::geometry::detail Chris@102: //#endif // DOXYGEN_NO_DETAIL Chris@102: //#define BOOST_GEOMETRY_CONDITION(CONDITION) boost::geometry::detail::condition(CONDITION) Chris@102: Chris@102: #define BOOST_GEOMETRY_CONDITION(CONDITION) ((void)0, (CONDITION)) Chris@102: Chris@102: #else Chris@102: Chris@102: #define BOOST_GEOMETRY_CONDITION(CONDITION) (CONDITION) Chris@102: Chris@102: #endif Chris@102: Chris@102: Chris@102: #endif // BOOST_GEOMETRY_UTIL_CONDITION_HPP