1 /* Copyright 2016-2017 Joaquin M Lopez Munoz.
2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE_1_0.txt or copy at
4 * http://www.boost.org/LICENSE_1_0.txt)
6 * See http://www.boost.org/libs/poly_collection for library home page.
9 #ifndef BOOST_POLY_COLLECTION_DETAIL_IS_ACCEPTABLE_HPP
10 #define BOOST_POLY_COLLECTION_DETAIL_IS_ACCEPTABLE_HPP
16 #include <type_traits>
20 namespace poly_collection{
24 /* This can be further specialized by Model when the std type trait classes
25 * fail to give the right info (as it can happen with class templates whose
26 * nominally existing operators do not compile for certain instantiations).
29 template<typename T,typename Model,typename=void>
30 struct is_acceptable:std::integral_constant<
32 Model::template is_implementation<T>::value&&
33 std::is_move_constructible<typename std::decay<T>::type>::value&&
34 (std::is_move_assignable<typename std::decay<T>::type>::value||
35 std::is_nothrow_move_constructible<typename std::decay<T>::type>::value)
38 } /* namespace poly_collection::detail */
40 } /* namespace poly_collection */
42 } /* namespace boost */