|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75242 - trunk/libs/chrono/example
From: vicente.botet_at_[hidden]
Date: 2011-11-01 18:48:52
Author: viboes
Date: 2011-11-01 18:48:51 EDT (Tue, 01 Nov 2011)
New Revision: 75242
URL: http://svn.boost.org/trac/boost/changeset/75242
Log:
Chrono: Update french show the customization for '0 seconde'.
Text files modified:
trunk/libs/chrono/example/french.cpp | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
Modified: trunk/libs/chrono/example/french.cpp
==============================================================================
--- trunk/libs/chrono/example/french.cpp (original)
+++ trunk/libs/chrono/example/french.cpp 2011-11-01 18:48:51 EDT (Tue, 01 Nov 2011)
@@ -39,6 +39,12 @@
{
}
protected:
+
+ std::size_t do_get_plural_form(int_least64_t value) const
+ {
+ return (value == -1 || value == 0 || value == 1) ? 0 : 1;
+ }
+
std::basic_string<CharT> do_get_plural_form(duration_style_type style, ratio<1> , std::size_t pf) const
{
static const CharT t[] =
@@ -122,5 +128,6 @@
seconds s(15);
milliseconds ms(763);
cout << h << ", " << m << ", " << s << " et " << ms << '\n';
+ cout << hours(0) << ", " << minutes(0) << ", " << s << " et " << ms << '\n';
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk