Index: boost/chrono/config.hpp =================================================================== --- boost/chrono/config.hpp (revision 81020) +++ boost/chrono/config.hpp (working copy) @@ -25,6 +25,13 @@ #define BOOST_USE_WINDOWS_H #endif +#if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \ + && ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT + +# define BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT + +#endif + // BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API // can be defined by the user to specify which API should be used Index: boost/chrono/io/time_point_io.hpp =================================================================== --- boost/chrono/io/time_point_io.hpp (revision 81044) +++ boost/chrono/io/time_point_io.hpp (working copy) @@ -708,6 +708,7 @@ #endif } // detail +#if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT template std::basic_ostream& operator<<(std::basic_ostream& os, const time_point& tp) @@ -838,6 +839,7 @@ //std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl; return os; } +#endif namespace detail { @@ -901,6 +903,7 @@ } // detail +#if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT template std::basic_istream& operator>>(std::basic_istream& is, time_point& tp) @@ -1034,6 +1037,7 @@ } return is; } +#endif #endif //UTC } // chrono Index: libs/chrono/test/io/time_point_input.cpp =================================================================== --- libs/chrono/test/io/time_point_input.cpp (revision 81044) +++ libs/chrono/test/io/time_point_input.cpp (working copy) @@ -147,7 +147,7 @@ check_all (); #endif std::cout << "system_clock=" << std::endl; -#if BOOST_CHRONO_VERSION >= 2 +#if BOOST_CHRONO_VERSION >= 2 && defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT check_all_system_clock(); #else check_all (); Index: libs/chrono/test/io/time_point_output.cpp =================================================================== --- libs/chrono/test/io/time_point_output.cpp (revision 81040) +++ libs/chrono/test/io/time_point_output.cpp (working copy) @@ -41,7 +41,7 @@ { std::ostringstream out; boost::chrono::time_point tp(d); -#if BOOST_CHRONO_VERSION==2 +#if BOOST_CHRONO_VERSION>=2 out << boost::chrono::duration_fmt(boost::chrono::duration_style::symbol) << tp; #else out << boost::chrono::duration_short << tp; @@ -96,7 +96,7 @@ using namespace boost::chrono; using namespace boost; -#if BOOST_CHRONO_VERSION==2 +#if BOOST_CHRONO_VERSION>=2 test_good("2 hours", hours(2), duration_style::prefix); test_good("2 h", hours(2), duration_style::symbol); #endif @@ -114,7 +114,7 @@ test_good_prefix ("2 [1/30]seconds", duration > (2)); test_good_symbol ("2 h", hours(2)); -#if BOOST_CHRONO_VERSION==2 +#if BOOST_CHRONO_VERSION>=2 test_good_symbol("2 min", minutes(2)); #else test_good_symbol ("2 m", minutes(2)); @@ -126,7 +126,7 @@ test_good_symbol ("2 [1/30]s", duration > (2)); } -#if BOOST_CHRONO_VERSION==2 +#if BOOST_CHRONO_VERSION >= 2 void check_all_system_clock() { using namespace boost::chrono; @@ -166,7 +166,7 @@ check_all (); #endif std::cout << "system_clock=" << std::endl; -#if BOOST_CHRONO_VERSION==2 +#if BOOST_CHRONO_VERSION >= 2 && defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT check_all_system_clock(); #else check_all ();