stderr_output.hpp 894 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 2018-2025 Jean-Louis Leroy
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // See accompanying file LICENSE_1_0.txt
  4. // or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_OPENMETHOD_POLICIES_STANDARD_ERROR_OUTPUT_HPP
  6. #define BOOST_OPENMETHOD_POLICIES_STANDARD_ERROR_OUTPUT_HPP
  7. #include <boost/openmethod/preamble.hpp>
  8. #include <boost/openmethod/detail/ostdstream.hpp>
  9. namespace boost::openmethod::policies {
  10. //! @ref Writes to the C standard error stream.
  11. //!
  12. //! `stderr_output` writes to standard error using the C API.
  13. struct stderr_output : output {
  14. //! An OutputFn metafunction.
  15. template<class Registry>
  16. struct fn {
  17. //! A @ref LightweightOuputStream.
  18. static detail::ostderr os;
  19. };
  20. };
  21. template<class Registry>
  22. detail::ostderr stderr_output::fn<Registry>::os;
  23. } // namespace boost::openmethod::policies
  24. #endif