Subject: [Boost-bugs] [Boost C++ Libraries] #7546: time_point<system_clock> output version 2 fails to compile
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-21 16:57:59
#7546: time_point<system_clock> output version 2 fails to compile
------------------------------+---------------------------------------------
Reporter: viboes | Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
Version: Boost 1.51.0 | Severity: Showstopper
Keywords: |
------------------------------+---------------------------------------------
Unfortunately I had commented the test for time_point<system_clock> and
while uncommenting it there is a severe compile error.
{{{
clang-darwin.compile.c++
../../../bin.v2/libs/chrono/test/time_point_output_h.test/clang-
darwin-3.1x/debug/io/time_point_output.o
In file included from io/time_point_output.cpp:5:
In file included from ../../../boost/chrono/chrono_io.hpp:26:
../../../boost/chrono/io/time_point_io.hpp:415:46: error: no viable
conversion from 'const time_point<boost::chrono::system_clock,
boost::chrono::duration<long long, boost::ratio<1, 30> > >' to 'const
time_point' (aka 'const time_point<boost::chrono::system_clock>')
time_t t = system_clock::to_time_t(tp);
^~
io/time_point_output.cpp:17:7: note: in instantiation of function template
specialization 'boost::chrono::operator<<<char, std::char_traits<char>,
boost::chrono::duration<long long, boost::ratio<1, 30> > >' requested here
out << tp;
^
io/time_point_output.cpp:69:3: note: in instantiation of function template
specialization 'test_good_prefix<boost::chrono::system_clock,
boost::chrono::duration<long long, boost::ratio<1, 30> > >' requested here
test_good_prefix<Clock> ("2 [1/30]seconds",
duration<boost::int_least64_t, ratio<1, 30> > (2));
^
io/time_point_output.cpp:94:3: note: in instantiation of function template
specialization 'check_all<boost::chrono::system_clock>' requested here
check_all<boost::chrono::system_clock>();
^
../../../boost/chrono/time_point.hpp:156:11: note: candidate constructor
(the implicit copy constructor) not viable: no known conversion from
'const time_point<boost::chrono::system_clock,
boost::chrono::duration<long long, boost::ratio<1, 30> > >' to 'const
boost::chrono::time_point<boost::chrono::system_clock,
boost::chrono::duration<long long, boost::ratio<1, 1000000000> > > &' for
1st argument;
class time_point
^
../../../boost/chrono/time_point.hpp:181:9: note: candidate template
ignored: substitution failure [with Duration2 =
boost::chrono::duration<long long, boost::ratio<1, 30> >]
time_point(const time_point<clock, Duration2>& t
^
../../../boost/chrono/detail/inlined/mac/chrono.hpp:53:43: note: passing
argument to parameter 't' here
system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT
^
1 error generated.
"/Users/viboes/clang/clang+llvm-3.1-x86_64-apple-darwin11/bin/clang++"
-x c++ -std=c++11 -O0 -g -Wextra -Wno-long-long -pedantic -O0 -fno-inline
-Wall -pedantic -g -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_HEADER_ONLY
-DBOOST_CHRONO_USES_MPL_ASSERT -DBOOST_CHRONO_VERSION=2
-DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -I"../../.."
-c -o "../../../bin.v2/libs/chrono/test/time_point_output_h.test/clang-
darwin-3.1x/debug/io/time_point_output.o" "io/time_point_output.cpp"
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7546> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC