diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-01 00:35:40 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-01 00:35:40 +0000 |
commit | c79d28f3ee18ba9cd630f15c9fd167a8bbb1d37d (patch) | |
tree | 8ddb01cd153663677b0905e4f55d5fe270042891 /libstdc++-v3/testsuite/20_util | |
parent | d06b63705eec184b9abf8a04062e1cc16a6da700 (diff) | |
download | gcc-c79d28f3ee18ba9cd630f15c9fd167a8bbb1d37d.tar.gz |
2009-10-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/chrono (struct __common_rep_type): New.
(duration_cast(const duration<>&),
duration<>::duration(const _Rep2&),
duration<>::duration(const duration<>&),
operator*(const duration<>&, const _Rep2&),
operator*(const _Rep1&, const duration<>&),
operator/(const duration<>&, const _Rep2&),
time_point_cast(const time_point<>&)): Implement resolution of
DR 1177 ([Ready] in Santa Cruz), change to not participate to
overload resolution if the constraints are not met.
* testsuite/20_util/duration/cons/1_neg.cc: Adjust dg-errors.
* testsuite/20_util/duration/cons/dr974.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
dg-error line numbers.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153787 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/20_util')
5 files changed, 7 insertions, 15 deletions
diff --git a/libstdc++-v3/testsuite/20_util/duration/cons/1_neg.cc b/libstdc++-v3/testsuite/20_util/duration/cons/1_neg.cc index 40d8219093e..56b4e4f413e 100644 --- a/libstdc++-v3/testsuite/20_util/duration/cons/1_neg.cc +++ b/libstdc++-v3/testsuite/20_util/duration/cons/1_neg.cc @@ -26,7 +26,7 @@ void test01() { - std::chrono::duration<int> d1(1.0); + std::chrono::duration<int> d1(1.0); // { dg-error "no matching" } } void @@ -35,11 +35,7 @@ test02() using namespace std::chrono; duration<int, std::micro> d2(8); - duration<int, std::milli> d2_copy(d2); + duration<int, std::milli> d2_copy(d2); // { dg-error "no matching" } } -// { dg-error "instantiated from here" "" { target *-*-* } 29 } -// { dg-error "instantiated from here" "" { target *-*-* } 38 } -// { dg-error "not exactly representable" "" { target *-*-* } 227 } -// { dg-error "integral duration with floating point" "" { target *-*-* } 217 } -// { dg-excess-errors "In instantiation of" } +// { dg-excess-errors "candidates are" } diff --git a/libstdc++-v3/testsuite/20_util/duration/cons/dr974.cc b/libstdc++-v3/testsuite/20_util/duration/cons/dr974.cc index 43132c9867c..4466d30097a 100644 --- a/libstdc++-v3/testsuite/20_util/duration/cons/dr974.cc +++ b/libstdc++-v3/testsuite/20_util/duration/cons/dr974.cc @@ -29,9 +29,5 @@ void test01() using namespace std::chrono; duration<double> d(3.5); - duration<int> i = d; // implicit truncation, should not compile + duration<int> i = d; // { dg-error "conversion" } } - -// { dg-error "instantiated from here" "" { target *-*-* } 32 } -// { dg-error "not exactly representable" "" { target *-*-* } 227 } -// { dg-excess-errors "In instantiation of" } diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc index e8b6d33a1ea..297b5cb690d 100644 --- a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc +++ b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc @@ -31,6 +31,6 @@ void test01() test_type d; } -// { dg-error "rep cannot be a duration" "" { target *-*-* } 202 } +// { dg-error "rep cannot be a duration" "" { target *-*-* } 203 } // { dg-error "instantiated from here" "" { target *-*-* } 31 } // { dg-excess-errors "In instantiation of" } diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc index 91081836779..b83bf494db5 100644 --- a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc +++ b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc @@ -32,6 +32,6 @@ void test01() test_type d; } -// { dg-error "must be a specialization of ratio" "" { target *-*-* } 203 } +// { dg-error "must be a specialization of ratio" "" { target *-*-* } 204 } // { dg-error "instantiated from here" "" { target *-*-* } 32 } // { dg-excess-errors "In instantiation of" } diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc index 540d72dde46..b4224401d47 100644 --- a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc +++ b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc @@ -33,6 +33,6 @@ void test01() test_type d; } -// { dg-error "period must be positive" "" { target *-*-* } 205 } +// { dg-error "period must be positive" "" { target *-*-* } 206 } // { dg-error "instantiated from here" "" { target *-*-* } 33 } // { dg-excess-errors "In instantiation of" } |