auto_newline.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright Andrey Semashev 2019.
  3. * Distributed under the Boost Software License, Version 1.0.
  4. * (See accompanying file LICENSE_1_0.txt or copy at
  5. * https://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. /*!
  8. * \file expressions/formatters/auto_newline.hpp
  9. * \author Andrey Semashev
  10. * \date 23.06.2019
  11. *
  12. * The header contains implementation of formatter for inserting a newline, unless there is already one inserted.
  13. */
  14. #ifndef BOOST_LOG_EXPRESSIONS_FORMATTERS_AUTO_NEWLINE_HPP_INCLUDED_
  15. #define BOOST_LOG_EXPRESSIONS_FORMATTERS_AUTO_NEWLINE_HPP_INCLUDED_
  16. #include <boost/log/detail/config.hpp>
  17. #include <boost/log/utility/manipulators/auto_newline.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. * Formatter for inserting a newline character, unless the last character
  27. * inserted into the stream is already a newline.
  28. */
  29. using boost::log::auto_newline;
  30. } // namespace expressions
  31. BOOST_LOG_CLOSE_NAMESPACE // namespace log
  32. } // namespace boost
  33. #include <boost/log/detail/footer.hpp>
  34. #endif // BOOST_LOG_EXPRESSIONS_FORMATTERS_AUTO_NEWLINE_HPP_INCLUDED_