|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78455 - in sandbox/chrono_date: boost/chrono/date libs/date/build libs/date/test
From: vicente.botet_at_[hidden]
Date: 2012-05-13 12:42:03
Author: viboes
Date: 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
New Revision: 78455
URL: http://svn.boost.org/trac/boost/changeset/78455
Log:
Date: Fix some constexpr issues
Text files modified:
sandbox/chrono_date/boost/chrono/date/date_durations.hpp | 4 +-
sandbox/chrono_date/boost/chrono/date/day.hpp | 2
sandbox/chrono_date/boost/chrono/date/day_of_year.hpp | 2
sandbox/chrono_date/boost/chrono/date/month.hpp | 4 +-
sandbox/chrono_date/boost/chrono/date/no_check.hpp | 2
sandbox/chrono_date/boost/chrono/date/week.hpp | 2
sandbox/chrono_date/boost/chrono/date/weekday.hpp | 2
sandbox/chrono_date/boost/chrono/date/year.hpp | 14 ++++++------
sandbox/chrono_date/boost/chrono/date/ymd_date.hpp | 3 -
sandbox/chrono_date/libs/date/build/Jamfile.v2 | 8 ++++--
sandbox/chrono_date/libs/date/test/Jamfile.v2 | 42 ++++++++++++++++++++++++++-------------
11 files changed, 50 insertions(+), 35 deletions(-)
Modified: sandbox/chrono_date/boost/chrono/date/date_durations.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/date_durations.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/date_durations.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -41,8 +41,8 @@
average_months;
typedef duration<boost::int_least32_t, boost::ratio<31556952> >
average_years;
- typedef duration<boost::int_least32_t, boost::ratio<400 * 31556952> >
- _400_years;
+ //typedef duration<boost::int_least32_t, boost::ratio<400 * 31556952> >
+ // _400_years;
// /**
Modified: sandbox/chrono_date/boost/chrono/date/day.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/day.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/day.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -52,7 +52,7 @@
* @Note This function doesn't check the parameters validity.
* It is up to the user to provide a valid ones.
*/
- day(rep d,no_check_t) BOOST_NOEXCEPT
+ BOOST_CONSTEXPR day(rep d,no_check_t) BOOST_NOEXCEPT
: value_(d)
{}
/**
Modified: sandbox/chrono_date/boost/chrono/date/day_of_year.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/day_of_year.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/day_of_year.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -50,7 +50,7 @@
* @Note This function doesn't check the parameters validity.
* It is up to the user to provide a valid ones.
*/
- day_of_year(rep d,no_check_t) BOOST_NOEXCEPT
+ BOOST_CONSTEXPR day_of_year(rep d,no_check_t) BOOST_NOEXCEPT
: value_(d)
{}
/**
Modified: sandbox/chrono_date/boost/chrono/date/month.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/month.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/month.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -36,7 +36,7 @@
* @Postconditions: <c>value() == m && is_valid()</c>.
* @Throws: if @c m is outside of the range [1, 12], throws an exception of type @c bad_date.
*/
- BOOST_CONSTEXPR explicit month(rep v) :
+ explicit month(rep v) :
value_(v)
{
if (!(is_valid()))
@@ -51,7 +51,7 @@
* @Note This function doesn't check the parameters validity.
* It is up to the user to provide a valid ones.
*/
- explicit month(rep m, no_check_t) :
+ BOOST_CONSTEXPR explicit month(rep m, no_check_t) :
value_(m)
{
}
Modified: sandbox/chrono_date/boost/chrono/date/no_check.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/no_check.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/no_check.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -16,7 +16,7 @@
struct no_check_t
{};
- const no_check_t no_check =
+ BOOST_CONSTEXPR_OR_CONST no_check_t no_check =
{};
Modified: sandbox/chrono_date/boost/chrono/date/week.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/week.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/week.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -49,7 +49,7 @@
* @Effects Constructs an object of class week by storing v.
* @Postconditions static_cast<rep>(*this) == v
*/
- week(rep v,no_check_t) BOOST_NOEXCEPT
+ BOOST_CONSTEXPR week(rep v,no_check_t) BOOST_NOEXCEPT
: value_(v)
{}
Modified: sandbox/chrono_date/boost/chrono/date/weekday.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/weekday.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/weekday.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -51,7 +51,7 @@
* @Effects Constructs an object of class weekday by storing v.
* @Postconditions static_cast<rep>(*this) == v
*/
- explicit weekday(rep wd, no_check_t) BOOST_NOEXCEPT
+ BOOST_CONSTEXPR explicit weekday(rep wd, no_check_t) BOOST_NOEXCEPT
:value_(wd)
{
};
Modified: sandbox/chrono_date/boost/chrono/date/year.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/year.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/year.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -61,7 +61,7 @@
* @Effects: Constructs an object of class year by storing y.
* @Postconditions: static_cast<int>(*this) == y.
*/
- BOOST_CONSTEXPR year(rep y, no_check_t)BOOST_NOEXCEPT
+ BOOST_CONSTEXPR year(rep y, no_check_t) BOOST_NOEXCEPT
:value_(y)
{}
/**
@@ -109,8 +109,7 @@
/**
* @Return the number of days of the month parameter in this year.
*/
- days days_in(month m) const
-BOOST_NOEXCEPT ;
+ days days_in(month m) const BOOST_NOEXCEPT;
/**
* @Return the number of days since the epoch until the fist day of this year.
@@ -131,14 +130,15 @@
static BOOST_CONSTEXPR year zero()
{
- return year(0);
+ return year(0, no_check);
}
static BOOST_CONSTEXPR year min BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
- return year(first_);
- }static BOOST_CONSTEXPR year max BOOST_PREVENT_MACRO_SUBSTITUTION ()
+ return year(first_, no_check);
+ }
+ static BOOST_CONSTEXPR year max BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
- return year(last_);
+ return year(last_, no_check);
}
private:
Modified: sandbox/chrono_date/boost/chrono/date/ymd_date.hpp
==============================================================================
--- sandbox/chrono_date/boost/chrono/date/ymd_date.hpp (original)
+++ sandbox/chrono_date/boost/chrono/date/ymd_date.hpp 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -79,8 +79,7 @@
* @Effect Constructs a @c ymd_date constructor from @c year, @c month, @c day stored in the arguments as follows:
* Constructs a ymd_date so that <c>get_year() == y && get_month() = m && get_day() == d</c>.
*/
- ymd_date(year::rep y, month::rep m, day::rep d, no_check_t)
-BOOST_NOEXCEPT ;
+ ymd_date(year::rep y, month::rep m, day::rep d, no_check_t) BOOST_NOEXCEPT;
/**
* @Effect Constructs a ymd_date using the year, month_day stored in the arguments as follows:
* If the value stored in md is outside the range of valid dates for this year y,
Modified: sandbox/chrono_date/libs/date/build/Jamfile.v2
==============================================================================
--- sandbox/chrono_date/libs/date/build/Jamfile.v2 (original)
+++ sandbox/chrono_date/libs/date/build/Jamfile.v2 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -32,7 +32,7 @@
#<define>BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
#<define>BOOST_RATIO_USES_ARRAY_ASSERT
#<define>BOOST_CHRONO_USES_ARRAY_ASSERT
- <toolset>sun:<define>BOOST_TYPEOF_EMULATION
+ <toolset>sun:<define>__typeof__=__typeof__
<define>BOOST_SYSTEM_NO_DEPRECATED
#<toolset>gcc-3.4.4:<linkflags>--enable-auto-import
#<toolset>gcc-4.3.4:<linkflags>--enable-auto-import
@@ -54,6 +54,9 @@
<toolset>gcc-mingw-4.4.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.6.0:<cxxflags>-fdiagnostics-show-option
+ <toolset>gcc-mingw-4.6.3:<cxxflags>-fdiagnostics-show-option
+ <toolset>gcc-mingw-4.7.0:<cxxflags>-fdiagnostics-show-option
+ <toolset>gcc-mingw-4.8.0:<cxxflags>-fdiagnostics-show-option
# Note: Some of the remarks from the Intel compiler are disabled
# remark #304: access control not specified ("public" by default)
# remark #383: value copied to temporary, reference to temporary used
@@ -78,8 +81,7 @@
#<define>BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
#<define>BOOST_RATIO_USES_ARRAY_ASSERT
#<define>BOOST_CHRONO_USES_ARRAY_ASSERT
- <toolset>sun:<define>BOOST_COMMON_TYPE_DONT_USE_TYPEOF
- <toolset>sun:<define>BOOST_TYPEOF_EMULATION
+ <toolset>sun:<define>__typeof__=__typeof__
<define>BOOST_SYSTEM_NO_DEPRECATED
<link>shared:<define>BOOST_CHRONO_DYN_LINK=1
<link>static:<define>BOOST_CHRONO_STATIC_LINK=1
Modified: sandbox/chrono_date/libs/date/test/Jamfile.v2
==============================================================================
--- sandbox/chrono_date/libs/date/test/Jamfile.v2 (original)
+++ sandbox/chrono_date/libs/date/test/Jamfile.v2 2012-05-13 12:42:01 EDT (Sun, 13 May 2012)
@@ -8,36 +8,48 @@
# See library home page at http://www.boost.org/libs/chrono
import os ;
+# bring in rules for testing
+import testing ;
import feature ;
+#feature.feature chrono_v2
+# : on off
+# : composite propagated optional
+# ;
+
+#feature.compose <chrono_v2>on
+# : <define>BOOST_CHRONO_DONT_PROVIDE_DEPRECATED_IO_V1=1
+# ;
+
project
: requirements
- <define>BOOST_CHRONO_DONT_PROVIDE_DEPRECATED_IO_V1
+ #defines
+ #<define>BOOST_CHRONO_DONT_PROVIDE_DEPRECATED_IO_V1
<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
<define>BOOST_CHRONO_HEADER_ONLY
+ <define>BOOST_CHRONO_USES_MPL_ASSERT
+ <define>BOOST_SYSTEM_NO_DEPRECATED
+ <toolset>sun:<define>BOOST_TYPEOF_EMULATION
+ #<threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
+ #link
<target-os>freebsd:<linkflags>"-lrt"
<target-os>linux:<linkflags>"-lrt"
<toolset>pgi:<linkflags>"-lrt"
- #<threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
+
<toolset>msvc:<asynch-exceptions>on
- <define>BOOST_CHRONO_USES_MPL_ASSERT
- <define>BOOST_SYSTEM_NO_DEPRECATED
- <toolset>sun:<define>BOOST_TYPEOF_EMULATION
+
<warnings>all
- <toolset>gcc:<cxxflags>-Wextra
- <toolset>gcc:<cxxflags>-pedantic
- <toolset>gcc:<cxxflags>-Wno-long-long
- <toolset>darwin:<cxxflags>-Wextra
- <toolset>darwin:<cxxflags>-pedantic
- <toolset>darwin:<cxxflags>-Wno-long-long
- #<toolset>pathscale:<cxxflags>-Wextra
- <toolset>pathscale:<cxxflags>-Wno-long-long
- <toolset>pathscale:<cxxflags>-pedantic
<toolset>clang:<cxxflags>-Wextra
<toolset>clang:<cxxflags>-pedantic
<toolset>clang:<cxxflags>-Wno-long-long
+ <toolset>darwin:<cxxflags>-Wextra
+ <toolset>darwin:<cxxflags>-pedantic
+ <toolset>darwin:<cxxflags>-Wno-long-long
+ <toolset>gcc:<cxxflags>-Wextra
+ <toolset>gcc:<cxxflags>-pedantic
+ <toolset>gcc:<cxxflags>-Wno-long-long
<toolset>gcc-mingw-4.5.0:<cxxflags>-Wno-missing-field-initializers
<toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
<toolset>msvc:<cxxflags>/wd4127
@@ -46,6 +58,8 @@
# remark #383: value copied to temporary, reference to temporary used
# remark #1418: external function definition with no prior declaration
<toolset>intel:<cxxflags>-wd304,383,1418
+ <toolset>pathscale:<cxxflags>-Wno-long-long
+ <toolset>pathscale:<cxxflags>-pedantic
;
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