////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2004-2013. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include "movable_int.hpp" #include "dummy_test_allocator.hpp" using namespace boost::container; typedef boost::container::dtl::pair pair_t; namespace boost { namespace container { //Explicit instantiation to detect compilation errors namespace dtl { template class flat_tree < pair_t , select1st , std::less , test::simple_allocator >; template class flat_tree < pair_t , select1st , std::less , std::allocator >; template class flat_tree < pair_t , select1st , std::less , small_vector >; template class flat_tree < pair_t , select1st , std::less , stable_vector >; template class flat_tree < test::movable_and_copyable_int , identity , std::less , test::simple_allocator >; template class flat_tree < test::movable_and_copyable_int , identity , std::less , std::allocator >; template class flat_tree < test::movable_and_copyable_int , identity , std::less , small_vector >; template class flat_tree < test::movable_and_copyable_int , identity , std::less , stable_vector >; template class flat_tree < test::movable_and_copyable_int , identity , std::less , static_vector >; } //dtl { }} //boost::container #if (__cplusplus > 201103L) #include namespace boost{ namespace container{ namespace dtl{ template class flat_tree < test::movable_and_copyable_int , identity , std::less , std::vector >; template class flat_tree < pair_t , select1st , std::less , std::vector >; } //dtl { }} //boost::container #endif int main () { //////////////////////////////////// // has_trivial_destructor_after_move testing //////////////////////////////////// // default { typedef boost::container::dtl::flat_tree, std::less, void> tree; typedef tree::container_type container_type; typedef tree::key_compare key_compare; if (boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) { std::cerr << "has_trivial_destructor_after_move(default allocator) test failed" << std::endl; return 1; } } // std::allocator { typedef boost::container::dtl::flat_tree, std::less, std::allocator > tree; typedef tree::container_type container_type; typedef tree::key_compare key_compare; if (boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) { std::cerr << "has_trivial_destructor_after_move(std::allocator) test failed" << std::endl; return 1; } } return 0; }