]>
Commit | Line | Data |
---|---|---|
20effc67 TL |
1 | /* |
2 | Copyright 2020 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/allocator_access.hpp> | |
9 | #include <boost/core/is_same.hpp> | |
10 | #include <boost/core/lightweight_test_trait.hpp> | |
11 | ||
12 | template<class T> | |
13 | struct A1 { | |
14 | typedef T value_type; | |
15 | typedef int* const_pointer; | |
16 | }; | |
17 | ||
20effc67 TL |
18 | template<class T> |
19 | struct A2 { | |
20 | typedef T value_type; | |
21 | }; | |
20effc67 TL |
22 | |
23 | int main() | |
24 | { | |
25 | BOOST_TEST_TRAIT_TRUE((boost::core::is_same<int*, | |
26 | boost::allocator_const_pointer<A1<char> >::type>)); | |
20effc67 TL |
27 | BOOST_TEST_TRAIT_TRUE((boost::core::is_same<const int*, |
28 | boost::allocator_const_pointer<A2<int> >::type>)); | |
20effc67 TL |
29 | return boost::report_errors(); |
30 | } |