[chrono] Compatibility issues with 1.44

Hi Vicente, do you have an estimate for an update of Boost.Chrono which is compatible with the upcoming 1.44 version of boost? I just tried the daily snapshot provided by Beman with the current Chrono zip: * Compilation of Boost.Chrono fails * Boost.Chrono zip contains changes for parts of Boost.Thread Are these still needed/compatible? Also (not related to 1.44, but also 1.41, at least), there are many warnings issued by the compiler. It seems to me that they are somehow related to the constructors of duration, but I haven't been able to figure them out. These also occur when compiling client code. A log file is attached. Generated on Ubuntu-10.4, 64bit, gcc-4.4.3 Regards, Roland PS: Snapshot: http://boost.cowic.de/rc/ (boost-posix-2010-08-02.tar.bz2) Boost.Chrono: http://www.boostpro.com/vault/index.php?&direction=0&order=&directory=System http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/index.htm.... [...] common.mkdir build/boost/bin.v2/libs/chrono common.mkdir build/boost/bin.v2/libs/chrono/build common.mkdir build/boost/bin.v2/libs/chrono/build/gcc-4.4.3 common.mkdir build/boost/bin.v2/libs/chrono/build/gcc-4.4.3/release common.mkdir build/boost/bin.v2/libs/chrono/build/gcc-4.4.3/release/threading-multi gcc.compile.c++ build/boost/bin.v2/libs/chrono/build/gcc-4.4.3/release/threading-multi/chrono.o In file included from libs/chrono/src/chrono.cpp:40: libs/chrono/src/posix/chrono.cpp: In static member function ‘static boost::chrono::time_point<boost::chrono::system_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > > boost::chrono::system_clock::now()’: libs/chrono/src/posix/chrono.cpp:27: error: no matching function for call to ‘boost::system::system_error::system_error(int&, const boost::system::error_category& (&)(), const char [21])’ ./boost/system/system_error.hpp:43: note: candidates are: boost::system::system_error::system_error(int, const boost::system::error_category&, const char*) ./boost/system/system_error.hpp:39: note: boost::system::system_error::system_error(int, const boost::system::error_category&, const std::string&) ./boost/system/system_error.hpp:36: note: boost::system::system_error::system_error(int, const boost::system::error_category&) ./boost/system/system_error.hpp:33: note: boost::system::system_error::system_error(boost::system::error_code, const char*) ./boost/system/system_error.hpp:30: note: boost::system::system_error::system_error(boost::system::error_code, const std::string&) ./boost/system/system_error.hpp:27: note: boost::system::system_error::system_error(boost::system::error_code) ./boost/system/system_error.hpp:25: note: boost::system::system_error::system_error(const boost::system::system_error&) libs/chrono/src/posix/chrono.cpp:31: warning: suggest parentheses around ‘&&’ within ‘||’ In file included from ./boost/type_traits.hpp:42, from ./boost/ratio.hpp:38, from ./boost/chrono/chrono.hpp:73, from libs/chrono/src/chrono.cpp:14: ./boost/type_traits/is_convertible.hpp: At global scope: ./boost/type_traits/is_convertible.hpp: In instantiation of ‘const bool boost::detail::is_convertible_basic_impl<boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >&, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >::value’: ./boost/type_traits/is_convertible.hpp:295: instantiated from ‘const bool boost::detail::is_convertible_impl<boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >::value’ ./boost/type_traits/is_convertible.hpp:418: instantiated from ‘boost::is_convertible<boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >’ ./boost/utility/enable_if.hpp:36: instantiated from ‘boost::enable_if<boost::is_convertible<boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >, void>’ libs/chrono/src/posix/chrono.cpp:31: instantiated from here ./boost/type_traits/is_convertible.hpp:136: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/type_traits/is_convertible.hpp: In instantiation of ‘const bool boost::detail::is_convertible_basic_impl<boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >&, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >::value’: ./boost/type_traits/is_convertible.hpp:295: instantiated from ‘const bool boost::detail::is_convertible_impl<boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >::value’ ./boost/type_traits/is_convertible.hpp:418: instantiated from ‘boost::is_convertible<boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >’ ./boost/utility/enable_if.hpp:36: instantiated from ‘boost::enable_if<boost::is_convertible<boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >, void>’ libs/chrono/src/posix/chrono.cpp:31: instantiated from here ./boost/type_traits/is_convertible.hpp:136: warning: initializing argument 1 of ‘static boost::type_traits::yes_type boost::detail::checker<T>::_m_check(T, int) [with T = boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >]’ In file included from libs/chrono/src/chrono.cpp:14: ./boost/chrono/chrono.hpp: In copy constructor ‘boost::chrono::time_point<boost::chrono::system_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >::time_point(const boost::chrono::time_point<boost::chrono::system_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >&)’: ./boost/chrono/chrono.hpp:838: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/chrono/chrono.hpp:838: warning: suggest parentheses around ‘&&’ within ‘||’ In file included from libs/chrono/src/chrono.cpp:40: libs/chrono/src/posix/chrono.cpp: In static member function ‘static boost::chrono::time_point<boost::chrono::system_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > > boost::chrono::system_clock::now()’: libs/chrono/src/posix/chrono.cpp:31: note: synthesized method ‘boost::chrono::time_point<boost::chrono::system_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >::time_point(const boost::chrono::time_point<boost::chrono::system_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >&)’ first required here libs/chrono/src/posix/chrono.cpp: In static member function ‘static boost::chrono::time_point<boost::chrono::system_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > > boost::chrono::system_clock::now(boost::system::error_code&)’: libs/chrono/src/posix/chrono.cpp:39: error: no matching function for call to ‘boost::system::error_code::assign(int&, const boost::system::error_category& (&)())’ ./boost/system/error_code.hpp:326: note: candidates are: void boost::system::error_code::assign(int, const boost::system::error_category&) libs/chrono/src/posix/chrono.cpp:45: warning: suggest parentheses around ‘&&’ within ‘||’ libs/chrono/src/posix/chrono.cpp: In static member function ‘static boost::chrono::time_point<boost::chrono::system_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > > boost::chrono::system_clock::from_time_t(time_t)’: libs/chrono/src/posix/chrono.cpp:55: warning: suggest parentheses around ‘&&’ within ‘||’ libs/chrono/src/posix/chrono.cpp: In static member function ‘static boost::chrono::time_point<boost::chrono::monotonic_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > > boost::chrono::monotonic_clock::now()’: libs/chrono/src/posix/chrono.cpp:66: error: no matching function for call to ‘boost::system::system_error::system_error(int&, const boost::system::error_category& (&)(), const char [24])’ ./boost/system/system_error.hpp:43: note: candidates are: boost::system::system_error::system_error(int, const boost::system::error_category&, const char*) ./boost/system/system_error.hpp:39: note: boost::system::system_error::system_error(int, const boost::system::error_category&, const std::string&) ./boost/system/system_error.hpp:36: note: boost::system::system_error::system_error(int, const boost::system::error_category&) ./boost/system/system_error.hpp:33: note: boost::system::system_error::system_error(boost::system::error_code, const char*) ./boost/system/system_error.hpp:30: note: boost::system::system_error::system_error(boost::system::error_code, const std::string&) ./boost/system/system_error.hpp:27: note: boost::system::system_error::system_error(boost::system::error_code) ./boost/system/system_error.hpp:25: note: boost::system::system_error::system_error(const boost::system::system_error&) libs/chrono/src/posix/chrono.cpp:70: warning: suggest parentheses around ‘&&’ within ‘||’ In file included from libs/chrono/src/chrono.cpp:14: ./boost/chrono/chrono.hpp: In copy constructor ‘boost::chrono::time_point<boost::chrono::monotonic_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >::time_point(const boost::chrono::time_point<boost::chrono::monotonic_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >&)’: ./boost/chrono/chrono.hpp:838: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/chrono/chrono.hpp:838: warning: suggest parentheses around ‘&&’ within ‘||’ In file included from libs/chrono/src/chrono.cpp:40: libs/chrono/src/posix/chrono.cpp: In static member function ‘static boost::chrono::time_point<boost::chrono::monotonic_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > > boost::chrono::monotonic_clock::now()’: libs/chrono/src/posix/chrono.cpp:70: note: synthesized method ‘boost::chrono::time_point<boost::chrono::monotonic_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >::time_point(const boost::chrono::time_point<boost::chrono::monotonic_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > >&)’ first required here libs/chrono/src/posix/chrono.cpp: In static member function ‘static boost::chrono::time_point<boost::chrono::monotonic_clock, boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> > > boost::chrono::monotonic_clock::now(boost::system::error_code&)’: libs/chrono/src/posix/chrono.cpp:78: error: no matching function for call to ‘boost::system::error_code::assign(int&, const boost::system::error_category& (&)())’ ./boost/system/error_code.hpp:326: note: candidates are: void boost::system::error_code::assign(int, const boost::system::error_category&) libs/chrono/src/posix/chrono.cpp:84: warning: suggest parentheses around ‘&&’ within ‘||’ In file included from libs/chrono/src/chrono.cpp:14: ./boost/chrono/chrono.hpp: In constructor ‘boost::chrono::time_point<Clock, Duration>::time_point(const Duration&) [with Clock = boost::chrono::system_clock, Duration = boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >]’: libs/chrono/src/posix/chrono.cpp:31: instantiated from here ./boost/chrono/chrono.hpp:851: warning: suggest parentheses around ‘&&’ within ‘||’ libs/chrono/src/posix/chrono.cpp:31: instantiated from here ./boost/chrono/chrono.hpp:851: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/chrono/chrono.hpp: In constructor ‘boost::chrono::time_point<Clock, Duration>::time_point() [with Clock = boost::chrono::system_clock, Duration = boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >]’: libs/chrono/src/posix/chrono.cpp:40: instantiated from here ./boost/chrono/chrono.hpp:850: warning: suggest parentheses around ‘&&’ within ‘||’ libs/chrono/src/posix/chrono.cpp:40: instantiated from here ./boost/chrono/chrono.hpp:850: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/chrono/chrono.hpp: In member function ‘Duration boost::chrono::time_point<Clock, Duration>::time_since_epoch() const [with Clock = boost::chrono::system_clock, Duration = boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >]’: libs/chrono/src/posix/chrono.cpp:50: instantiated from here ./boost/chrono/chrono.hpp:864: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/chrono/chrono.hpp: In constructor ‘boost::chrono::time_point<Clock, Duration>::time_point(const Duration&) [with Clock = boost::chrono::monotonic_clock, Duration = boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >]’: libs/chrono/src/posix/chrono.cpp:70: instantiated from here ./boost/chrono/chrono.hpp:851: warning: suggest parentheses around ‘&&’ within ‘||’ libs/chrono/src/posix/chrono.cpp:70: instantiated from here ./boost/chrono/chrono.hpp:851: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/chrono/chrono.hpp: In constructor ‘boost::chrono::time_point<Clock, Duration>::time_point() [with Clock = boost::chrono::monotonic_clock, Duration = boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >]’: libs/chrono/src/posix/chrono.cpp:79: instantiated from here ./boost/chrono/chrono.hpp:850: warning: suggest parentheses around ‘&&’ within ‘||’ libs/chrono/src/posix/chrono.cpp:79: instantiated from here ./boost/chrono/chrono.hpp:850: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/chrono/chrono.hpp: In static member function ‘static boost::chrono::duration<Rep, Period> boost::chrono::duration<Rep, Period>::zero() [with Rep = long int, Period = boost::ratio<1l, 1000000000l>]’: ./boost/chrono/chrono.hpp:850: instantiated from ‘boost::chrono::time_point<Clock, Duration>::time_point() [with Clock = boost::chrono::system_clock, Duration = boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >]’ libs/chrono/src/posix/chrono.cpp:40: instantiated from here ./boost/chrono/chrono.hpp:585: warning: suggest parentheses around ‘&&’ within ‘||’ ./boost/chrono/chrono.hpp:850: instantiated from ‘boost::chrono::time_point<Clock, Duration>::time_point() [with Clock = boost::chrono::system_clock, Duration = boost::chrono::duration<long int, boost::ratio<1l, 1000000000l> >]’ libs/chrono/src/posix/chrono.cpp:40: instantiated from here ./boost/chrono/chrono.hpp:585: warning: suggest parentheses around ‘&&’ within ‘||’ In file included from libs/chrono/src/chrono.cpp:40: ./boost/system/error_code.hpp: At global scope: ./boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used ./boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used ./boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not used "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_USES_STATIC_ASSERT -DBOOST_RATIO_USES_STATIC_ASSERT -DBOOST_SYSTEM_DYN_LINK=1 -DNDEBUG -I"." -c -o "build/boost/bin.v2/libs/chrono/build/gcc-4.4.3/release/threading-multi/chrono.o" "libs/chrono/src/chrono.cpp" ...failed gcc.compile.c++ build/boost/bin.v2/libs/chrono/build/gcc-4.4.3/release/threading-multi/chrono.o... ...failed updating 1 target... ...updated 328 targets...

On 08/03/2010 01:17 PM, Roland Bock wrote:
I was able to get rid of the errors and the warnings (see attached patches). In my eyes, the warnings show a compiler error, but anyway, they can be removed by using boost::mpl. With the patches applied, Chrono now compiles without warnings on my system. I am still not sure whether or not I can safely use the files from the chrono.zip which belong to other libraries, especially Boost.Thread. Regards, Roland

Roland Bock-2 wrote:
Hi, I guess you are using the last upload on the Vault. The last snapshot on the sandbox includes already all these changes. 07/11/10: 11:34 Changeset [63878] by viboes * Take care of Boost.System break on version 1.44 * Fix "warning C4700: … I have made it compatible with older versions using the version to get rid of the Boost.System interface break. #if (BOOST_VERSION / 100 % 1000) < 44 system::system_error( errno, system::system_category, "chrono::system_clock" )); #else system::system_error( errno, system::system_category(), "chrono::system_clock" )); #endif I will upload the last snapshot on the vault next 10th. Hopping this helps. Vicente -- View this message in context: http://old.nabble.com/-chrono--Compatibility-issues-with-1.44-tp29334238p293... Sent from the Boost - Dev mailing list archive at Nabble.com.

On 08/08/2010 01:22 PM, Roland Bock wrote:
Just tested with the version from the sandbox: * no compile errors * the warnings are still there (see patch from 4th of August) * Admittedly, I am a bit worried by the amount of changes that chrono introduces to Boost.Thread. Regards, Roland

----- Original Message ----- From: "Roland Bock" <rbock@eudoxos.de> To: <boost@lists.boost.org> Sent: Monday, August 09, 2010 7:10 AM Subject: Re: [boost] [chrono] Compatibility issues with 1.44
I will introduce your patch once I have checked the warnings are removed.
* Admittedly, I am a bit worried by the amount of changes that chrono introduces to Boost.Thread.
The changes are associated to the changes N3090 introduce to the C++0x standard. The changes introduced to Boost.Thread are more an example of implementability on top of the current Boost.Thread, and are not part of the Boost.Chono library. I will let Anthony make the modification he consider pertinent once Boost.Chrono will be in Boost. Best, Vicente

----- Original Message ----- From: "vicente.botet" <vicente.botet@wanadoo.fr> To: <boost@lists.boost.org> Sent: Monday, August 09, 2010 6:13 PM Subject: Re: [boost] [chrono] Compatibility issues with 1.44
Please, could you sent me which warnings appear yet with the sandbox that your patch remove? Thanks

On 08/09/2010 07:54 PM, vicente.botet wrote:
I will introduce your patch once I have checked the warnings are removed.
Please, could you sent me which warnings appear yet with the sandbox that your patch remove?
The attached code gives the attached warnings. As written before, I'd consider that a compiler error, but it can be cleaned up with mpl logic templates (while maintaining readability IMO). The warnings occur with gcc-4.4.3, the default version of gcc for Ubuntu-10.4. Regards, Roland

I have found the warnings on the log you sent on the first mail. I have applied the patch on the sandbox and the warning "warning: suggest parentheses around '&&' within '||' " has been removed. I have never undesrtood why this warning appears on gcc-4.3 or gcc-4.4. The warning didn't appear with gcc-4.5. I guess it was a GCC compiler bug. Thanks, Vicente

On 08/10/2010 09:19 AM, vicente.botet wrote:
:-)
I have applied the patch on the sandbox and the warning "warning: suggest parentheses around '&&' within '||' " has been removed. I have never undesrtood why this warning appears on gcc-4.3 or gcc-4.4. The warning didn't appear with gcc-4.5. I guess it was a GCC compiler bug.
That's my guess, too. Thanks and regards, Roland

Roland Bock wrote:
Vicente Botet Escriba wrote:
[snip massive overquoting from both]
Cool, I'll give it a try on Monday and let you :-)
Please, guys, don't overquote: http://www.boost.org/community/policy.html#quoting. ___ Rob IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
participants (5)
-
Lars Viklund
-
Roland Bock
-
Stewart, Robert
-
Vicente Botet Escriba
-
vicente.botet