/* Copyright 2003-2025 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * See http://www.boost.org/libs/multi_index for library home page. */ #ifndef BOOST_MULTI_INDEX_DETAIL_IS_TRANSPARENT_HPP #define BOOST_MULTI_INDEX_DETAIL_IS_TRANSPARENT_HPP #if defined(_MSC_VER) #pragma once #endif #include /* keep it first to prevent nasty warns in MSVC */ #include #include namespace boost{ namespace multi_index{ namespace detail{ /* Metafunction that checks if f(arg,arg2) executes without argument type * conversion. By default (i.e. when it cannot be determined) it evaluates to * true. */ template struct is_transparent:std::true_type{}; } /* namespace multi_index::detail */ } /* namespace multi_index */ } /* namespace boost */ #if !defined(BOOST_NO_SFINAE_EXPR)&& \ (defined(BOOST_NO_CXX11_FINAL)||defined(BOOST_IS_FINAL)) #include #include #include #include #include #include #include #include namespace boost{ namespace multi_index{ namespace detail{ struct not_is_transparent_result_type{}; template struct is_transparent_class_helper:F { using F::operator(); template not_is_transparent_result_type operator()(const T&,const Q&)const; }; template struct is_transparent_class:std::true_type{}; template struct is_transparent_class< F,Arg1,Arg2, typename enable_if< is_same< decltype( declval >()( declval(),declval()) ), not_is_transparent_result_type > >::type >:std::false_type{}; template struct is_transparent< F,Arg1,Arg2, typename enable_if_c< is_class::value&& !is_final::value /* is_transparent_class_helper derives from F */ >::type >:is_transparent_class{}; template struct is_transparent_function:std::true_type{}; template struct is_transparent_function< F,Arg1,Arg2, typename enable_if_c< !(is_same::arg1_type,const Arg1&>::value|| is_same::arg1_type,Arg1>::value) || !(is_same::arg2_type,const Arg2&>::value|| is_same::arg2_type,Arg2>::value) >::type >:std::false_type{}; template struct is_transparent< F,Arg1,Arg2, typename enable_if< is_function::type> >::type >:is_transparent_function::type,Arg1,Arg2>{}; } /* namespace multi_index::detail */ } /* namespace multi_index */ } /* namespace boost */ #endif #endif