diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2013-04-14 00:01:13 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2013-04-14 00:01:13 +0000 |
| commit | f3b02b17af0794a0a354cbd48c91abd4f3463d1e (patch) | |
| tree | fba61cc7a081936704816e4263624577e2736eac /libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp | |
| parent | 9594f4c8183ec59f8c9e35620fe52540060eb8aa (diff) | |
| download | bcm5719-llvm-f3b02b17af0794a0a354cbd48c91abd4f3463d1e.tar.gz bcm5719-llvm-f3b02b17af0794a0a354cbd48c91abd4f3463d1e.zip | |
Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.
llvm-svn: 179467
Diffstat (limited to 'libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp')
| -rw-r--r-- | libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp b/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp index 60ebd93aba7..33aed89b073 100644 --- a/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp +++ b/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp @@ -67,4 +67,13 @@ int main() assert(std::get<1>(t1) == int('a')); assert(std::get<2>(t1).id_ == 2); } + { + typedef std::tuple<double, char, int> T0; + typedef std::tuple<int, int, B> T1; + T0 t0(2.5, 'a', 3); + T1 t1(t0); + assert(std::get<0>(t1) == 2); + assert(std::get<1>(t1) == int('a')); + assert(std::get<2>(t1).id_ == 3); + } } |

