This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Default to --enable-libstdcxx-time=auto
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, Benjamin Kosnik <bkoz at redhat dot com>, Paolo Carlini <paolo dot carlini at oracle dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 24 May 2013 16:16:22 +0200
- Subject: Re: [patch] Default to --enable-libstdcxx-time=auto
- References: <20130523210611 dot GH1377 at tucnak dot redhat dot com> <ydd38tdwgis dot fsf at CeBiTec dot Uni-Bielefeld dot DE> <yddy5b5uzuq dot fsf at CeBiTec dot Uni-Bielefeld dot DE> <20130524075705 dot GK1377 at tucnak dot redhat dot com> <yddk3mopxat dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <20130524132117 dot GT1377 at tucnak dot redhat dot com> <ydd38tcpkks dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <20130524134056 dot GU1377 at tucnak dot redhat dot com> <CAH6eHdScm3PHL_HVJU7rKywvDoPwgeU_OJ1kDAS12y-v5RJbwg at mail dot gmail dot com> <20130524140748 dot GV1377 at tucnak dot redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, May 24, 2013 at 04:07:48PM +0200, Jakub Jelinek wrote:
> On Fri, May 24, 2013 at 02:56:24PM +0100, Jonathan Wakely wrote:
> > > Jonathan/Benjamin, could you please review the patch in the mean time,
> > > so that if it works well for Rainer, it can be applied immediately and
> > > 4.8.1-rc2 rolled, even during the weekend?
> >
> >
> > In the fallback for steady_clock::now() would it be easier to just
> > call system_clock::now() instead of duplicating its logic?
>
> Yeah, that is what I've tried in
> http://gcc.gnu.org/ml/gcc-patches/2013-05/msg01440.html
> but it failed horribly, because the return type from both the static methods
> is different (system_clock::time_point (aka chrono::time_point<system_clock,
> duration>) in the first case,
> steady_clock::time_point (aka chrono::time_point<steady_clock, duration>)
> in the latter). And there is no conversion in between the two.
>
> Perhaps I'd have to do something like:
> return time_point(system_clock::now().time_since_epoch());
> ? Can try that.
Ah, but the duration can be different depending on macros.
Jakub