diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-04 17:02:25 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-04 17:02:25 +0000 |
commit | abca37d7fd4b7dbf4346980488db8af7f10d7963 (patch) | |
tree | 515e5b111dc110843d4ae59d42bfc766d20c2889 /libstdc++-v3/include | |
parent | 598ffe5978b072ef42289d7d916b65fc2c0b723d (diff) | |
download | gcc-abca37d7fd4b7dbf4346980488db8af7f10d7963.tar.gz |
2010-11-04 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/46303
* testsuite/30_threads/call_once/constexpr.cc: Add missing dg-require
directives.
* testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
* testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.
2010-11-04 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/ratio (ratio_add, ratio_subtract, ratio_multiply,
ratio_divide): Declare the data members constexpr.
* testsuite/20_util/ratio/requirements/constexpr_data.cc: Extend.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166319 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/std/ratio | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libstdc++-v3/include/std/ratio b/libstdc++-v3/include/std/ratio index b424ef341a4..80c5d15e789 100644 --- a/libstdc++-v3/include/std/ratio +++ b/libstdc++-v3/include/std/ratio @@ -185,15 +185,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __safe_multiply<_R2::num, (_R1::den / __gcd)>::value>::value, __safe_multiply<_R1::den, (_R2::den / __gcd)>::value> type; - static const intmax_t num = type::num; - static const intmax_t den = type::den; + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; }; template<typename _R1, typename _R2> - const intmax_t ratio_add<_R1, _R2>::num; + constexpr intmax_t ratio_add<_R1, _R2>::num; template<typename _R1, typename _R2> - const intmax_t ratio_add<_R1, _R2>::den; + constexpr intmax_t ratio_add<_R1, _R2>::den; /// ratio_subtract template<typename _R1, typename _R2> @@ -203,15 +203,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _R1, ratio<-_R2::num, _R2::den>>::type type; - static const intmax_t num = type::num; - static const intmax_t den = type::den; + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; }; template<typename _R1, typename _R2> - const intmax_t ratio_subtract<_R1, _R2>::num; + constexpr intmax_t ratio_subtract<_R1, _R2>::num; template<typename _R1, typename _R2> - const intmax_t ratio_subtract<_R1, _R2>::den; + constexpr intmax_t ratio_subtract<_R1, _R2>::den; /// ratio_multiply template<typename _R1, typename _R2> @@ -230,15 +230,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __safe_multiply<(_R1::den / __gcd2), (_R2::den / __gcd1)>::value> type; - static const intmax_t num = type::num; - static const intmax_t den = type::den; + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; }; template<typename _R1, typename _R2> - const intmax_t ratio_multiply<_R1, _R2>::num; + constexpr intmax_t ratio_multiply<_R1, _R2>::num; template<typename _R1, typename _R2> - const intmax_t ratio_multiply<_R1, _R2>::den; + constexpr intmax_t ratio_multiply<_R1, _R2>::den; /// ratio_divide template<typename _R1, typename _R2> @@ -250,15 +250,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _R1, ratio<_R2::den, _R2::num>>::type type; - static const intmax_t num = type::num; - static const intmax_t den = type::den; + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; }; template<typename _R1, typename _R2> - const intmax_t ratio_divide<_R1, _R2>::num; + constexpr intmax_t ratio_divide<_R1, _R2>::num; template<typename _R1, typename _R2> - const intmax_t ratio_divide<_R1, _R2>::den; + constexpr intmax_t ratio_divide<_R1, _R2>::den; /// ratio_equal template<typename _R1, typename _R2> |