Ticket #7546: 7546_7547_disabler.patch

File 7546_7547_disabler.patch, 3.9 KB (added by viboes, 10 years ago)

I don't find how to fix this for now. This patch that disable the specific time_point<system_clock,D> i/o.

  • boost/chrono/config.hpp

     
    2525#define BOOST_USE_WINDOWS_H
    2626#endif
    2727
     28#if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \
     29    && ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
     30
     31# define BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
     32
     33#endif
     34
    2835//  BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API
    2936//  can be defined by the user to specify which API should be used
    3037
  • boost/chrono/io/time_point_io.hpp

     
    708708#endif
    709709    } // detail
    710710
     711#if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
    711712    template <class CharT, class Traits, class Duration>
    712713    std::basic_ostream<CharT, Traits>&
    713714    operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<system_clock, Duration>& tp)
     
    838839      //std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
    839840      return os;
    840841    }
     842#endif
    841843
    842844    namespace detail
    843845    {
     
    901903
    902904    } // detail
    903905
     906#if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
    904907    template <class CharT, class Traits, class Duration>
    905908    std::basic_istream<CharT, Traits>&
    906909    operator>>(std::basic_istream<CharT, Traits>& is, time_point<system_clock, Duration>& tp)
     
    10341037      }
    10351038      return is;
    10361039    }
     1040#endif
    10371041#endif //UTC
    10381042  } // chrono
    10391043
  • libs/chrono/test/io/time_point_input.cpp

     
    147147  check_all<boost::chrono::steady_clock> ();
    148148#endif
    149149  std::cout << "system_clock=" << std::endl;
    150 #if BOOST_CHRONO_VERSION >= 2
     150#if BOOST_CHRONO_VERSION >= 2  && defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
    151151  check_all_system_clock();
    152152#else
    153153  check_all<boost::chrono::system_clock> ();
  • libs/chrono/test/io/time_point_output.cpp

     
    4141{
    4242  std::ostringstream out;
    4343  boost::chrono::time_point<Clock, D> tp(d);
    44 #if BOOST_CHRONO_VERSION==2
     44#if BOOST_CHRONO_VERSION>=2
    4545  out << boost::chrono::duration_fmt(boost::chrono::duration_style::symbol) << tp;
    4646#else
    4747  out << boost::chrono::duration_short << tp;
     
    9696  using namespace boost::chrono;
    9797  using namespace boost;
    9898
    99 #if BOOST_CHRONO_VERSION==2
     99#if BOOST_CHRONO_VERSION>=2
    100100  test_good<Clock>("2 hours", hours(2), duration_style::prefix);
    101101  test_good<Clock>("2 h", hours(2), duration_style::symbol);
    102102#endif
     
    114114  test_good_prefix<Clock> ("2 [1/30]seconds", duration<boost::int_least64_t, ratio<1, 30> > (2));
    115115
    116116  test_good_symbol<Clock> ("2 h", hours(2));
    117 #if BOOST_CHRONO_VERSION==2
     117#if BOOST_CHRONO_VERSION>=2
    118118  test_good_symbol<Clock>("2 min", minutes(2));
    119119#else
    120120  test_good_symbol<Clock> ("2 m", minutes(2));
     
    126126  test_good_symbol<Clock> ("2 [1/30]s", duration<boost::int_least64_t, ratio<1, 30> > (2));
    127127}
    128128
    129 #if BOOST_CHRONO_VERSION==2
     129#if BOOST_CHRONO_VERSION >= 2
    130130void check_all_system_clock()
    131131{
    132132  using namespace boost::chrono;
     
    166166  check_all<boost::chrono::steady_clock> ();
    167167#endif
    168168  std::cout << "system_clock=" << std::endl;
    169 #if BOOST_CHRONO_VERSION==2
     169#if BOOST_CHRONO_VERSION >= 2  && defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
    170170  check_all_system_clock();
    171171#else
    172172  check_all<boost::chrono::system_clock> ();