1 /*
2 Copyright 2017 Glen Joseph Fernandes
3 (glenjofe@gmail.com)
4 
5 Distributed under the Boost Software License, Version 1.0.
6 (http://www.boost.org/LICENSE_1_0.txt)
7 */
8 #include <boost/core/pointer_traits.hpp>
9 #include <boost/core/is_same.hpp>
10 #include <boost/core/lightweight_test_trait.hpp>
11 
12 template<class T>
13 struct P { };
14 
main()15 int main()
16 {
17     BOOST_TEST_TRAIT_TRUE((boost::core::is_same<int*,
18         boost::pointer_traits<int*>::pointer>));
19     BOOST_TEST_TRAIT_TRUE((boost::core::is_same<P<int>,
20         boost::pointer_traits<P<int> >::pointer>));
21     BOOST_TEST_TRAIT_TRUE((boost::core::is_same<void*,
22         boost::pointer_traits<void*>::pointer>));
23     BOOST_TEST_TRAIT_TRUE((boost::core::is_same<P<void>,
24         boost::pointer_traits<P<void> >::pointer>));
25     BOOST_TEST_TRAIT_TRUE((boost::core::is_same<const int*,
26         boost::pointer_traits<const int*>::pointer>));
27     BOOST_TEST_TRAIT_TRUE((boost::core::is_same<P<const int>,
28         boost::pointer_traits<P<const int> >::pointer>));
29     return boost::report_errors();
30 }
31