explicit_operator_bool.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright Andrey Semashev 2007 - 2013.
  3. * Distributed under the Boost Software License, Version 1.0.
  4. * (See accompanying file LICENSE_1_0.txt or copy at
  5. * http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. /*!
  8. * \file explicit_operator_bool.hpp
  9. * \author Andrey Semashev
  10. * \date 08.03.2009
  11. *
  12. * This header is deprecated, use boost/utility/explicit_operator_bool.hpp instead. The header is left for
  13. * backward compatibility and will be removed in future versions.
  14. */
  15. #ifndef BOOST_LOG_UTILITY_EXPLICIT_OPERATOR_BOOL_HPP_INCLUDED_
  16. #define BOOST_LOG_UTILITY_EXPLICIT_OPERATOR_BOOL_HPP_INCLUDED_
  17. #include <boost/utility/explicit_operator_bool.hpp>
  18. #include <boost/log/detail/config.hpp>
  19. #ifdef BOOST_HAS_PRAGMA_ONCE
  20. #pragma once
  21. #endif
  22. #if defined(__GNUC__)
  23. #pragma message "Boost.Log: This header is deprecated, use boost/utility/explicit_operator_bool.hpp instead."
  24. #elif defined(_MSC_VER)
  25. #pragma message("Boost.Log: This header is deprecated, use boost/utility/explicit_operator_bool.hpp instead.")
  26. #endif
  27. /*!
  28. * \brief The macro defines an explicit operator of conversion to \c bool
  29. *
  30. * The macro should be used inside the definition of a class that has to
  31. * support the conversion. The class should also implement <tt>operator!</tt>,
  32. * in terms of which the conversion operator will be implemented.
  33. */
  34. #define BOOST_LOG_EXPLICIT_OPERATOR_BOOL()\
  35. BOOST_EXPLICIT_OPERATOR_BOOL()
  36. #endif // BOOST_LOG_UTILITY_EXPLICIT_OPERATOR_BOOL_HPP_INCLUDED_