| 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_CONSTRUCIBLE_HPP |
| 10 | #define BOOST_POLY_COLLECTION_DETAIL_IS_CONSTRUCIBLE_HPP |
| 11 | |
| 12 | #if defined(_MSC_VER) |
| 13 | #pragma once |
| 14 | #endif |
| 15 | |
| 16 | #include <boost/config.hpp> |
| 17 | #include <boost/detail/workaround.hpp> |
| 18 | |
| 19 | #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER,<190023918) |
| 20 | /* https://connect.microsoft.com/VisualStudio/Feedback/Details/2118677, |
| 21 | * fixed in VS2015U2 according to |
| 22 | * https://blogs.msdn.microsoft.com/vcblog/2016/03/31/ |
| 23 | * visual-c-2015-update-2-bug-fixes/, via github.com/dodheim |
| 24 | */ |
| 25 | |
| 26 | #include <boost/type_traits/is_constructible.hpp> |
| 27 | |
| 28 | namespace boost{ |
| 29 | |
| 30 | namespace poly_collection{ |
| 31 | |
| 32 | namespace detail{ |
| 33 | |
| 34 | template<typename T,typename... Args> |
| 35 | struct is_constructible:std::integral_constant< |
| 36 | bool, |
| 37 | boost::is_constructible<T,Args...>::value |
| 38 | >{}; |
| 39 | |
| 40 | } /* namespace poly_collection::detail */ |
| 41 | |
| 42 | } /* namespace poly_collection */ |
| 43 | |
| 44 | } /* namespace boost */ |
| 45 | |
| 46 | #else |
| 47 | #include <type_traits> |
| 48 | |
| 49 | namespace boost{ |
| 50 | |
| 51 | namespace poly_collection{ |
| 52 | |
| 53 | namespace detail{ |
| 54 | |
| 55 | template<typename T,typename... Args> |
| 56 | using is_constructible=std::is_constructible<T,Args...>; |
| 57 | |
| 58 | } /* namespace poly_collection::detail */ |
| 59 | |
| 60 | } /* namespace poly_collection */ |
| 61 | |
| 62 | } /* namespace boost */ |
| 63 | |
| 64 | #endif |
| 65 | #endif |
| 66 | |