summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/std/chrono
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-23 23:47:44 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-23 23:47:44 +0000
commitbcafd86c962fd9eea1aac63b9ea81daf109a7b33 (patch)
treeb9e1c59ac246a73ee7d393b41db479a7f10ffdf6 /libstdc++-v3/include/std/chrono
parent1a56f180cdd7f425ecd50a84c7f22dee0531ed0b (diff)
downloadppe42-gcc-bcafd86c962fd9eea1aac63b9ea81daf109a7b33.tar.gz
ppe42-gcc-bcafd86c962fd9eea1aac63b9ea81daf109a7b33.zip
2010-11-23 Benjamin Kosnik <bkoz@redhat.com>
* include/std/chrono: Constexpr markup for is_monotonic. * src/chrono.cc: Same. * testsuite/20_util/clocks/1.cc: Move... * testsuite/20_util/system_clock/1.cc: ...here. * testsuite/20_util/system_clock/constexpr_data.cc * testsuite/20_util/monotonic_clock/constexpr_data.cc * include/std/complex: Mark primary template constexpr. * testsuite/26_numerics/complex/cons/constexpr_primary.cc: Add. * testsuite/26_numerics/complex/complex_value.cc: Move... * testsuite/26_numerics/complex/dr387.cc: Move... * testsuite/26_numerics/complex/value_operations/1.cc: ... here. * testsuite/26_numerics/complex/value_operations/dr387.cc: ...here. * testsuite/26_numerics/complex/value_operations/constexpr.cc: New. 2010-11-23 Benjamin Kosnik <bkoz@redhat.com> Jason Merrill <jason@redhat.com> * testsuite/lib/libstdc++.exp: Use scanasm. * testsuite/util/testsuite_common_types.h (constexpr_default_constructible): Add support for non-literal types. (constexpr_single_value_constructible): Same. * testsuite/20_util/enable_shared_from_this/cons/constexpr.cc: Remove xfail. * testsuite/20_util/shared_ptr/cons/constexpr.cc: Add. * testsuite/20_util/unique_ptr/cons/constexpr.cc: Add. * testsuite/20_util/weak_ptr/cons/constexpr.cc: Add. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust line number. 2010-11-23 Benjamin Kosnik <bkoz@redhat.com> Jonathan Wakely <jwakely.gcc@gmail.com> * include/std/future (shared_future): Default ctor constexpr. (future): Same. * testsuite/30_threads/shared_future/cons/constexpr.cc: New. * testsuite/30_threads/future/cons/constexpr.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/chrono')
-rw-r--r--libstdc++-v3/include/std/chrono26
1 files changed, 13 insertions, 13 deletions
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index c4dcbd5f67f..25110817a15 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -228,7 +228,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
&& (treat_as_floating_point<rep>::value
|| !treat_as_floating_point<_Rep2>::value)>::type>
constexpr explicit duration(const _Rep2& __rep)
- : __r(static_cast<rep>(__rep)) { }
+ : __r(static_cast<rep>(__rep)) { }
template<typename _Rep2, typename _Period2, typename = typename
enable_if<treat_as_floating_point<rep>::value
@@ -644,22 +644,22 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
struct system_clock
{
#ifdef _GLIBCXX_USE_CLOCK_REALTIME
- typedef chrono::nanoseconds duration;
+ typedef chrono::nanoseconds duration;
#elif defined(_GLIBCXX_USE_GETTIMEOFDAY)
- typedef chrono::microseconds duration;
+ typedef chrono::microseconds duration;
#else
- typedef chrono::seconds duration;
+ typedef chrono::seconds duration;
#endif
- typedef duration::rep rep;
- typedef duration::period period;
- typedef chrono::time_point<system_clock, duration> time_point;
+ typedef duration::rep rep;
+ typedef duration::period period;
+ typedef chrono::time_point<system_clock, duration> time_point;
static_assert(system_clock::duration::min()
< system_clock::duration::zero(),
"a clock's minimum duration cannot be less than its epoch");
- static const bool is_monotonic = false;
+ static constexpr bool is_monotonic = false;
static time_point
now() throw ();
@@ -685,12 +685,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/// monotonic_clock
struct monotonic_clock
{
- typedef chrono::nanoseconds duration;
- typedef duration::rep rep;
- typedef duration::period period;
- typedef chrono::time_point<monotonic_clock, duration> time_point;
+ typedef chrono::nanoseconds duration;
+ typedef duration::rep rep;
+ typedef duration::period period;
+ typedef chrono::time_point<monotonic_clock, duration> time_point;
- static const bool is_monotonic = true;
+ static constexpr bool is_monotonic = true;
static time_point
now();
OpenPOWER on IntegriCloud