1 /* Copyright 2003-2019 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/multi_index for library home page.
7  */
8 
9 #ifndef BOOST_MULTI_INDEX_DETAIL_IS_FUNCTION_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_IS_FUNCTION_HPP
11 
12 #if defined(_MSC_VER)
13 #pragma once
14 #endif
15 
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/detail/workaround.hpp>
18 
19 #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)||\
20     BOOST_WORKAROUND(_LIBCPP_VERSION,<30700)||\
21     BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<40802)
22 /* libc++: std::is_function<void() const> fails,
23  * https://bugs.llvm.org/show_bug.cgi?id=20084
24  *
25  * libstdc++-v3: std::is_function does not support ref-qualified function types,
26  * https://github.com/gcc-mirror/gcc/commit/
27  *   2fa630fb50ba29d8e891c52a75aaec261b07874e#
28  *   diff-6547f965a8d66bf35a6388fcf404aaa3
29  */
30 
31 #include <boost/type_traits/is_function.hpp>
32 
33 namespace boost{namespace multi_index{namespace detail{
34 
35 template<typename T>
36 struct is_function:boost::is_function<T>{};
37 
38 }}} /* namespace boost::multi_index::detail */
39 
40 #else
41 
42 #include <type_traits>
43 
44 namespace boost{namespace multi_index{namespace detail{
45 
46 template<typename T>
47 struct is_function:std::is_function<T>{};
48 
49 }}} /* namespace boost::multi_index::detail */
50 
51 #endif
52 #endif
53