Skip to content

Commit

Permalink
Do not define local boost-like functionality, if boost has already be…
Browse files Browse the repository at this point in the history
…en included (#198)
  • Loading branch information
repagh authored and bcoconni committed Jul 20, 2019
1 parent c6c6d9c commit 0ec1cc8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/simgear/props/props.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@

#include <simgear/compiler.h>
#if PROPS_STANDALONE
// taken from: boost/utility/enable_if.hpp

#ifndef SG_LOG
# define SG_GENERAL 0
# define SG_ALERT 0
# define SG_WARN 1
# define SG_LOG(type, level, message) (type) ? (std::cerr <<message << endl) : (std::cout <<message << endl)
#endif

// use this local implementation only if boost has not been included
#if !defined(BOOST_UTILITY_ENABLE_IF_HPP) && !defined(BOOST_CORE_ENABLE_IF_HPP)
// taken from: boost/utility/enable_if.hpp
namespace boost {
template <bool B, class T = void>
struct enable_if_c {
Expand All @@ -53,6 +57,7 @@ namespace boost {
template <class Cond, class T = void>
struct disable_if : public disable_if_c<Cond::value, T> {};
}
#endif
#else
# include <boost/utility.hpp>
# include <boost/type_traits/is_enum.hpp>
Expand Down

0 comments on commit 0ec1cc8

Please sign in to comment.