From 11e3715f37072c542d26f490dbcd575ee39009d3 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 7 Nov 2016 14:01:19 -0500 Subject: [PATCH] Updated to use unique_ptr instead of auto_ptr when appropriate. Removed unnecessary structs. --- test/iterator_adaptor_test.cpp | 31 ------------------------------- test/pointee.cpp | 12 ++++++++++++ 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/test/iterator_adaptor_test.cpp b/test/iterator_adaptor_test.cpp index 5b5e0c3..66c67b4 100644 --- a/test/iterator_adaptor_test.cpp +++ b/test/iterator_adaptor_test.cpp @@ -33,37 +33,6 @@ using boost::dummyT; -struct mult_functor { - typedef int result_type; - typedef int argument_type; - // Functors used with transform_iterator must be - // DefaultConstructible, as the transform_iterator must be - // DefaultConstructible to satisfy the requirements for - // TrivialIterator. - mult_functor() { } - mult_functor(int aa) : a(aa) { } - int operator()(int b) const { return a * b; } - int a; -}; - -template -struct select1st_ - : public std::unary_function -{ - const typename Pair::first_type& operator()(const Pair& x) const { - return x.first; - } - typename Pair::first_type& operator()(Pair& x) const { - return x.first; - } -}; - -struct one_or_four { - bool operator()(dummyT x) const { - return x.foo() == 1 || x.foo() == 4; - } -}; - typedef std::deque storage; typedef std::deque pointer_deque; typedef std::set iterator_set; diff --git a/test/pointee.cpp b/test/pointee.cpp index 71d1d04..3b99947 100644 --- a/test/pointee.cpp +++ b/test/pointee.cpp @@ -56,12 +56,24 @@ int main() STATIC_ASSERT_SAME(boost::pointee::type, X); STATIC_ASSERT_SAME(boost::pointee::type, X const); +#if defined(BOOST_NO_CXX11_SMART_PTR) + STATIC_ASSERT_SAME(boost::pointee >::type, int); STATIC_ASSERT_SAME(boost::pointee >::type, X); STATIC_ASSERT_SAME(boost::pointee >::type, int const); STATIC_ASSERT_SAME(boost::pointee >::type, X const); +#else + + STATIC_ASSERT_SAME(boost::pointee >::type, int); + STATIC_ASSERT_SAME(boost::pointee >::type, X); + + STATIC_ASSERT_SAME(boost::pointee >::type, int const); + STATIC_ASSERT_SAME(boost::pointee >::type, X const); + +#endif + STATIC_ASSERT_SAME(boost::pointee::iterator >::type, int); STATIC_ASSERT_SAME(boost::pointee::iterator >::type, X);