]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/poly_collection/detail/is_acceptable.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / poly_collection / detail / is_acceptable.hpp
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)
5 *
6 * See http://www.boost.org/libs/poly_collection for library home page.
7 */
8
9 #ifndef BOOST_POLY_COLLECTION_DETAIL_IS_ACCEPTABLE_HPP
10 #define BOOST_POLY_COLLECTION_DETAIL_IS_ACCEPTABLE_HPP
11
12 #if defined(_MSC_VER)
13 #pragma once
14 #endif
15
16 #include <type_traits>
17
18 namespace boost{
19
20 namespace poly_collection{
21
22 namespace detail{
23
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).
27 */
28
29 template<typename T,typename Model,typename=void>
30 struct is_acceptable:std::integral_constant<
31 bool,
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)
36 >{};
37
38 } /* namespace poly_collection::detail */
39
40 } /* namespace poly_collection */
41
42 } /* namespace boost */
43
44 #endif