stream.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 stream.hpp
  9. * \author Andrey Semashev
  10. * \date 24.07.2012
  11. *
  12. * The header contains implementation of a stream placeholder in template expressions.
  13. */
  14. #ifndef BOOST_LOG_EXPRESSIONS_FORMATTERS_STREAM_HPP_INCLUDED_
  15. #define BOOST_LOG_EXPRESSIONS_FORMATTERS_STREAM_HPP_INCLUDED_
  16. #include <boost/phoenix/core/argument.hpp>
  17. #include <boost/log/detail/config.hpp>
  18. #include <boost/log/detail/header.hpp>
  19. #ifdef BOOST_HAS_PRAGMA_ONCE
  20. #pragma once
  21. #endif
  22. namespace boost {
  23. BOOST_LOG_OPEN_NAMESPACE
  24. namespace expressions {
  25. /*!
  26. * Stream placeholder type in formatter template expressions.
  27. */
  28. typedef phoenix::expression::argument< 2 >::type stream_type;
  29. /*!
  30. * Stream placeholder in formatter template expressions.
  31. */
  32. BOOST_INLINE_VARIABLE const stream_type stream = {};
  33. } // namespace expressions
  34. BOOST_LOG_CLOSE_NAMESPACE // namespace log
  35. } // namespace boost
  36. #include <boost/log/detail/footer.hpp>
  37. #if defined(BOOST_LOG_EXPRESSIONS_ATTR_HPP_INCLUDED_)
  38. #include <boost/log/detail/attr_output_impl.hpp>
  39. #endif
  40. #endif // BOOST_LOG_EXPRESSIONS_FORMATTERS_STREAM_HPP_INCLUDED_