123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- #ifndef BOOST_BIND_DETAIL_RESULT_TRAITS_HPP_INCLUDED
- #define BOOST_BIND_DETAIL_RESULT_TRAITS_HPP_INCLUDED
- #if defined(_MSC_VER) && (_MSC_VER >= 1020)
- # pragma once
- #endif
- #include <boost/config.hpp>
- #include <boost/core/ref.hpp>
- #if BOOST_CXX_VERSION >= 201700L
- #include <functional>
- #endif
- namespace boost
- {
- namespace _bi
- {
- template<class R, class F> struct result_traits
- {
- typedef R type;
- };
- struct unspecified {};
- template<class F> struct result_traits<unspecified, F>
- {
- typedef typename F::result_type type;
- };
- template<class F> struct result_traits< unspecified, reference_wrapper<F> >
- {
- typedef typename F::result_type type;
- };
- #if BOOST_CXX_VERSION >= 201700L
- template<class T> struct result_traits< unspecified, std::plus<T> >
- {
- typedef T type;
- };
- template<class T> struct result_traits< unspecified, std::minus<T> >
- {
- typedef T type;
- };
- template<class T> struct result_traits< unspecified, std::multiplies<T> >
- {
- typedef T type;
- };
- template<class T> struct result_traits< unspecified, std::divides<T> >
- {
- typedef T type;
- };
- template<class T> struct result_traits< unspecified, std::modulus<T> >
- {
- typedef T type;
- };
- template<class T> struct result_traits< unspecified, std::negate<T> >
- {
- typedef T type;
- };
- template<class T> struct result_traits< unspecified, std::equal_to<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::not_equal_to<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::greater<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::less<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::greater_equal<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::less_equal<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::logical_and<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::logical_or<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::logical_not<T> >
- {
- typedef bool type;
- };
- template<class T> struct result_traits< unspecified, std::bit_and<T> >
- {
- typedef T type;
- };
- template<class T> struct result_traits< unspecified, std::bit_or<T> >
- {
- typedef T type;
- };
- template<class T> struct result_traits< unspecified, std::bit_xor<T> >
- {
- typedef T type;
- };
- #if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 40900
- #else
- template<class T> struct result_traits< unspecified, std::bit_not<T> >
- {
- typedef T type;
- };
- #endif
- #endif
- }
- }
- #endif
|