/*============================================================================= Copyright (c) 2011-2017 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout 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) =============================================================================*/ #ifndef SPROUT_TPP_ALGORITHM_MAX_ELEMENT_HPP #define SPROUT_TPP_ALGORITHM_MAX_ELEMENT_HPP #include #include #include #include #include namespace sprout { namespace tpp { namespace detail { template struct max_value : public std::conditional<(T::value < U::value), U, T> {}; template struct max_element_impl : public std::tuple_element::type {}; template struct max_element_impl : public sprout::tpp::detail::max_value< typename sprout::tpp::detail::max_element_impl::type, typename sprout::tpp::detail::max_element_impl::type >::type {}; } // namespace detail // // max_element // template struct max_element : public sprout::tpp::detail::max_element_impl, 0, sizeof...(Types)> {}; // // max_element_c // template struct max_element_c : public sprout::tpp::max_element...> {}; } // namespace tpp } // namespace sprout #endif // #ifndef SPROUT_TPP_ALGORITHM_MAX_ELEMENT_HPP