fork download
  1. #include <iostream>
  2. #include <boost/chrono/io/time_point_io.hpp>
  3. boost::chrono::time_fmt_io_saver<> tmp(std::cout);
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
In file included from prog.cpp:2:0:
/usr/include/boost/chrono/io/time_point_io.hpp: In instantiation of 'boost::chrono::time_fmt_io_saver<CharT, Traits>::time_fmt_io_saver(boost::chrono::time_fmt_io_saver<CharT, Traits>::state_type&) [with CharT = char; Traits = std::char_traits<char>; boost::chrono::time_fmt_io_saver<CharT, Traits>::state_type = std::basic_ostream<char>]':
prog.cpp:3:49:   required from here
/usr/include/boost/chrono/io/time_point_io.hpp:535:49: error: no matching function for call to 'get_time_fmt(boost::chrono::time_fmt_io_saver<>::state_type&)'
         s_save_(s), a_save_(get_time_fmt(s_save_))
                                                 ^
/usr/include/boost/chrono/io/time_point_io.hpp:535:49: note: candidate is:
In file included from /usr/include/boost/chrono/io/time_point_units.hpp:15:0,
                 from /usr/include/boost/chrono/io/time_point_put.hpp:15,
                 from /usr/include/boost/chrono/io/time_point_io.hpp:22,
                 from prog.cpp:2:
/usr/include/boost/chrono/io/ios_base_state.hpp:135:37: note: template<class CharT> std::basic_string<_CharT> boost::chrono::get_time_fmt(std::ios_base&)
     inline std::basic_string<CharT> get_time_fmt(std::ios_base & ios)
                                     ^
/usr/include/boost/chrono/io/ios_base_state.hpp:135:37: note:   template argument deduction/substitution failed:
In file included from prog.cpp:2:0:
/usr/include/boost/chrono/io/time_point_io.hpp:535:49: note:   couldn't deduce template parameter 'CharT'
         s_save_(s), a_save_(get_time_fmt(s_save_))
                                                 ^
/usr/include/boost/chrono/io/time_point_io.hpp: In instantiation of 'void boost::chrono::time_fmt_io_saver<CharT, Traits>::restore() [with CharT = char; Traits = std::char_traits<char>]':
/usr/include/boost/chrono/io/time_point_io.hpp:556:9:   required from 'boost::chrono::time_fmt_io_saver<CharT, Traits>::~time_fmt_io_saver() [with CharT = char; Traits = std::char_traits<char>]'
prog.cpp:3:36:   required from here
/usr/include/boost/chrono/io/time_point_io.hpp:564:38: error: no matching function for call to 'set_time_fmt(boost::chrono::time_fmt_io_saver<>::aspect_type&, boost::chrono::time_fmt_io_saver<>::aspect_type&)'
         set_time_fmt(a_save_, a_save_);
                                      ^
/usr/include/boost/chrono/io/time_point_io.hpp:564:38: note: candidate is:
In file included from /usr/include/boost/chrono/io/time_point_units.hpp:15:0,
                 from /usr/include/boost/chrono/io/time_point_put.hpp:15,
                 from /usr/include/boost/chrono/io/time_point_io.hpp:22,
                 from prog.cpp:2:
/usr/include/boost/chrono/io/ios_base_state.hpp:141:17: note: template<class CharT> void boost::chrono::set_time_fmt(std::ios_base&, const std::basic_string<_CharT>&)
     inline void set_time_fmt(std::ios_base& ios, std::basic_string<
                 ^
/usr/include/boost/chrono/io/ios_base_state.hpp:141:17: note:   template argument deduction/substitution failed:
In file included from prog.cpp:2:0:
/usr/include/boost/chrono/io/time_point_io.hpp:564:38: note:   cannot convert '((boost::chrono::time_fmt_io_saver<>*)this)->boost::chrono::time_fmt_io_saver<>::a_save_' (type 'boost::chrono::time_fmt_io_saver<>::aspect_type {aka std::basic_string<char>}') to type 'std::ios_base&'
         set_time_fmt(a_save_, a_save_);
                                      ^
stdout
Standard output is empty