diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-01-07 20:54:51 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-01-07 20:54:51 +0000 |
commit | 842b4aecf87856a90cfcb4e3fa14fdb1dff32fcc (patch) | |
tree | 241afda82601a800880c84150daeca33b9493305 | |
parent | 045153299658ed71708347f6cb0c14ccdcdf2de2 (diff) | |
download | bcm5719-llvm-842b4aecf87856a90cfcb4e3fa14fdb1dff32fcc.tar.gz bcm5719-llvm-842b4aecf87856a90cfcb4e3fa14fdb1dff32fcc.zip |
Add tests to check the typedefs from the result of std::owner_less
llvm-svn: 225381
-rw-r--r-- | libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp index db2ed3bb35a..d091ae99fc2 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp @@ -47,6 +47,10 @@ int main() typedef std::owner_less<std::shared_ptr<int> > CS; CS cs; + static_assert((std::is_same<std::shared_ptr<int>, CS::first_argument_type>::value), "" ); + static_assert((std::is_same<std::shared_ptr<int>, CS::second_argument_type>::value), "" ); + static_assert((std::is_same<bool, CS::result_type>::value), "" ); + assert(!cs(p1, p2)); assert(!cs(p2, p1)); assert(cs(p1 ,p3) || cs(p3, p1)); @@ -61,6 +65,10 @@ int main() typedef std::owner_less<std::weak_ptr<int> > CS; CS cs; + static_assert((std::is_same<std::weak_ptr<int>, CS::first_argument_type>::value), "" ); + static_assert((std::is_same<std::weak_ptr<int>, CS::second_argument_type>::value), "" ); + static_assert((std::is_same<bool, CS::result_type>::value), "" ); + assert(!cs(w1, w2)); assert(!cs(w2, w1)); assert(cs(w1, w3) || cs(w3, w1)); |