2
0
mirror of https://github.com/boostorg/core.git synced 2026-01-19 16:12:18 +00:00
Files
core/test/allocator_void_pointer_test.cpp
2020-04-14 14:52:30 -04:00

29 lines
670 B
C++

/*
Copyright 2020 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/core/allocator_access.hpp>
#include <boost/core/is_same.hpp>
#include <boost/core/lightweight_test_trait.hpp>
struct A1 {
typedef int* pointer;
};
struct A2 {
typedef int* pointer;
typedef bool* void_pointer;
};
int main()
{
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<void*,
boost::allocator_void_pointer<A1>::type>));
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<bool*,
boost::allocator_void_pointer<A2>::type>));
return boost::report_errors();
}