10#include <ocl/detail/config.hpp>
11#include <ocl/io_fwd.hpp>
13#ifdef OCL_HAS_PRINT_LIBRARY
23 inline void print(T fmt)
noexcept
25 console_io_out << fmt;
31 extern void lf()
noexcept;
35 template <
typename... Args>
36 inline void print(Args... fmt)
noexcept
42 template <
typename T,
typename... Args>
43 inline void print(T fmt, Args... other)
noexcept
45 console_io_out << fmt;
51 inline bool is_stdio_sync =
true;
53 using io_error = std::runtime_error;
55 inline void throw_option_invalid_type_error(
const boost::source_location& loc = BOOST_CURRENT_LOCATION)
57 ::boost::throw_exception(std::runtime_error(
""), loc);
64 detail::is_stdio_sync = enable;
65 console_io_out.sync_with_stdio(detail::is_stdio_sync);
71 return detail::is_stdio_sync;
74 inline void lf() noexcept
76#ifdef OCL_USE_CRLF_ENDINGS
85 console_io_out << std::endl;
88 template <
typename... T>
89 inline void println(T... fmt)
noexcept
This file takes care of I/O manip.
Definition print_fwd.hpp:20
void print() noexcept
Definition print_fwd.hpp:28
const bool & is_stdio_sync()
Checks if standard I/O synchronization is enabled.
Definition print_fwd.hpp:69
void enable_stdio_sync(const bool &enable) noexcept
Enables or disables synchronization between C++ standard streams and C standard streams.
Definition print_fwd.hpp:62