fallback_policy_fwd.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright Andrey Semashev 2007 - 2015.
  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 fallback_policy_fwd.hpp
  9. * \author Andrey Semashev
  10. * \date 18.08.2012
  11. *
  12. * The header contains forward declaration of fallback policies when attribute value visitation or extraction fails.
  13. */
  14. #ifndef BOOST_LOG_ATTRIBUTES_FALLBACK_POLICY_FWD_HPP_INCLUDED_
  15. #define BOOST_LOG_ATTRIBUTES_FALLBACK_POLICY_FWD_HPP_INCLUDED_
  16. #include <boost/log/detail/config.hpp>
  17. #ifdef BOOST_HAS_PRAGMA_ONCE
  18. #pragma once
  19. #endif
  20. namespace boost {
  21. BOOST_LOG_OPEN_NAMESPACE
  22. /*!
  23. * The \c fallback_to_none policy results in returning an empty value reference if the attribute value cannot be extracted.
  24. */
  25. struct fallback_to_none;
  26. /*!
  27. * The \c fallback_to_throw policy results in throwing an exception if the attribute value cannot be extracted.
  28. */
  29. struct fallback_to_throw;
  30. /*!
  31. * The \c fallback_to_default policy results in a default value if the attribute value cannot be extracted.
  32. */
  33. template< typename DefaultT >
  34. struct fallback_to_default;
  35. BOOST_LOG_CLOSE_NAMESPACE // namespace log
  36. } // namespace boost
  37. #endif // BOOST_LOG_ATTRIBUTES_FALLBACK_POLICY_FWD_HPP_INCLUDED_