| 1 | #ifndef BOOST_BIND_STD_PLACEHOLDERS_HPP_INCLUDED |
| 2 | #define BOOST_BIND_STD_PLACEHOLDERS_HPP_INCLUDED |
| 3 | |
| 4 | // MS compatible compilers support #pragma once |
| 5 | |
| 6 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) |
| 7 | # pragma once |
| 8 | #endif |
| 9 | |
| 10 | // Copyright 2021 Peter Dimov |
| 11 | // Distributed under the Boost Software License, Version 1.0. |
| 12 | // https://www.boost.org/LICENSE_1_0.txt |
| 13 | |
| 14 | #include <boost/bind/detail/requires_cxx11.hpp> |
| 15 | #include <boost/is_placeholder.hpp> |
| 16 | #include <boost/config.hpp> |
| 17 | |
| 18 | #if !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) |
| 19 | |
| 20 | #include <functional> |
| 21 | #include <type_traits> |
| 22 | |
| 23 | namespace boost |
| 24 | { |
| 25 | |
| 26 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_1)>::type > { enum _vt { value = 1 }; }; |
| 27 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_2)>::type > { enum _vt { value = 2 }; }; |
| 28 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_3)>::type > { enum _vt { value = 3 }; }; |
| 29 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_4)>::type > { enum _vt { value = 4 }; }; |
| 30 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_5)>::type > { enum _vt { value = 5 }; }; |
| 31 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_6)>::type > { enum _vt { value = 6 }; }; |
| 32 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_7)>::type > { enum _vt { value = 7 }; }; |
| 33 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_8)>::type > { enum _vt { value = 8 }; }; |
| 34 | template<> struct is_placeholder< typename std::decay<decltype(std::placeholders::_9)>::type > { enum _vt { value = 9 }; }; |
| 35 | |
| 36 | } // namespace boost |
| 37 | |
| 38 | #endif |
| 39 | |
| 40 | #endif // #ifndef BOOST_BIND_STD_PLACEHOLDERS_HPP_INCLUDED |
| 41 | |