]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/allocator_const_void_pointer_test.cpp
bump version to 18.2.2-pve1
[ceph.git] / ceph / src / boost / libs / core / test / allocator_const_void_pointer_test.cpp
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 typedef int* const_void_pointer;
17 template<class U>
18 struct rebind {
19 typedef A1<U> other;
20 };
21 };
22
23 template<class T>
24 struct A2 {
25 typedef T value_type;
26 };
27
28 int main()
29 {
30 BOOST_TEST_TRAIT_TRUE((boost::core::is_same<int*,
31 boost::allocator_const_void_pointer<A1<char> >::type>));
32 BOOST_TEST_TRAIT_TRUE((boost::core::is_same<const void*,
33 boost::allocator_const_void_pointer<A2<int> >::type>));
34 return boost::report_errors();
35 }