diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-27 01:18:10 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-27 01:18:10 +0000 |
| commit | 64152da056aefc2919f5c17c55c7fcd340236d05 (patch) | |
| tree | 75e7269d87caf39cfd55bcf8003ba5f6113e0c32 /libstdc++-v3/include/std/chrono | |
| parent | ce6dc7575acc91ffd8f1f98d56a33bb4691b9927 (diff) | |
| download | ppe42-gcc-64152da056aefc2919f5c17c55c7fcd340236d05.tar.gz ppe42-gcc-64152da056aefc2919f5c17c55c7fcd340236d05.zip | |
2009-10-26 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/chrono (duration<>::duration(const duration<>&)): Fix
per the straightforward resolution of DR 974.
* testsuite/20_util/duration/cons/dr974.cc: Add.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/chrono')
| -rw-r--r-- | libstdc++-v3/include/std/chrono | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono index aa4888d9a9d..300c13ce97e 100644 --- a/libstdc++-v3/include/std/chrono +++ b/libstdc++-v3/include/std/chrono @@ -225,7 +225,8 @@ namespace std : __r(duration_cast<duration>(__d).count()) { static_assert(treat_as_floating_point<rep>::value == true - || ratio_divide<_Period2, period>::type::den == 1, + || (ratio_divide<_Period2, period>::type::den == 1 + && !treat_as_floating_point<_Rep2>::value), "the resulting duration is not exactly representable"); } |

