2020-04-13 01:43:43 -04:00
|
|
|
/*
|
|
|
|
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>
|
|
|
|
|
2020-05-25 15:00:18 -04:00
|
|
|
template<class T>
|
|
|
|
struct A1 {
|
|
|
|
typedef T value_type;
|
|
|
|
};
|
2020-04-13 01:43:43 -04:00
|
|
|
|
2020-05-25 15:00:18 -04:00
|
|
|
template<class T>
|
2020-04-13 01:43:43 -04:00
|
|
|
struct A2 {
|
2020-05-25 15:00:18 -04:00
|
|
|
typedef T value_type;
|
2021-12-08 10:26:49 -05:00
|
|
|
struct propagate_on_container_move_assignment {
|
|
|
|
static const bool value = true;
|
|
|
|
};
|
2020-04-13 01:43:43 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
BOOST_TEST_TRAIT_FALSE((boost::
|
2020-05-25 15:00:18 -04:00
|
|
|
allocator_propagate_on_container_move_assignment<A1<int> >::type));
|
2020-04-13 01:43:43 -04:00
|
|
|
BOOST_TEST_TRAIT_TRUE((boost::
|
2020-05-25 15:00:18 -04:00
|
|
|
allocator_propagate_on_container_move_assignment<A2<int> >::type));
|
2020-04-13 01:43:43 -04:00
|
|
|
return boost::report_errors();
|
|
|
|
}
|