From d76d714816bc0dcca7c5704ec998878c0f429c88 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Thu, 4 Oct 2012 23:25:28 +0900 Subject: [PATCH] fix adl/not_found --- sprout/adl/not_found.hpp | 12 +++++ sprout/tpp/algorithm.hpp | 92 ++------------------------------ sprout/tpp/algorithm/all_of.hpp | 39 ++++++++++++++ sprout/tpp/algorithm/any_of.hpp | 39 ++++++++++++++ sprout/tpp/algorithm/none_of.hpp | 39 ++++++++++++++ 5 files changed, 132 insertions(+), 89 deletions(-) create mode 100644 sprout/tpp/algorithm/all_of.hpp create mode 100644 sprout/tpp/algorithm/any_of.hpp create mode 100644 sprout/tpp/algorithm/none_of.hpp diff --git a/sprout/adl/not_found.hpp b/sprout/adl/not_found.hpp index c33e23d5..46dcb238 100644 --- a/sprout/adl/not_found.hpp +++ b/sprout/adl/not_found.hpp @@ -17,6 +17,18 @@ namespace sprout { struct is_not_found_via_adl : public std::is_same {}; + template + struct is_not_found_via_adl + : public sprout::is_not_found_via_adl + {}; + template + struct is_not_found_via_adl + : public sprout::is_not_found_via_adl + {}; + template + struct is_not_found_via_adl + : public sprout::is_not_found_via_adl + {}; // // is_found_via_adl diff --git a/sprout/tpp/algorithm.hpp b/sprout/tpp/algorithm.hpp index 12ab7326..7ec63b78 100644 --- a/sprout/tpp/algorithm.hpp +++ b/sprout/tpp/algorithm.hpp @@ -1,95 +1,9 @@ #ifndef SPROUT_TPP_ALGORITHM_HPP #define SPROUT_TPP_ALGORITHM_HPP -#include #include - -namespace sprout { - namespace tpp { - namespace detail { - template - struct all_of_impl; - template<> - struct all_of_impl - : public std::true_type - {}; - template<> - struct all_of_impl - : public std::false_type - {}; - template - struct all_of_impl - : public std::integral_constant::value> - {}; - template - struct all_of_impl - : public std::false_type - {}; - } // namespace detail - // - // all_of - // - template - struct all_of - : public sprout::tpp::detail::all_of_impl - {}; - - namespace detail { - template - struct any_of_impl; - template<> - struct any_of_impl - : public std::true_type - {}; - template<> - struct any_of_impl - : public std::false_type - {}; - template - struct any_of_impl - : public std::true_type - {}; - template - struct any_of_impl - : public std::integral_constant::value> - {}; - } // namespace detail - // - // any_of - // - template - struct any_of - : public sprout::tpp::detail::any_of_impl - {}; - - namespace detail { - template - struct none_of_impl; - template<> - struct none_of_impl - : public std::false_type - {}; - template<> - struct none_of_impl - : public std::true_type - {}; - template - struct none_of_impl - : public std::false_type - {}; - template - struct none_of_impl - : public std::integral_constant::value> - {}; - } // namespace detail - // - // none_of - // - template - struct none_of - : public sprout::tpp::detail::none_of_impl - {}; - } // namespace tpp -} // namespace sprout +#include +#include +#include #endif // #ifndef SPROUT_TPP_ALGORITHM_HPP diff --git a/sprout/tpp/algorithm/all_of.hpp b/sprout/tpp/algorithm/all_of.hpp new file mode 100644 index 00000000..79a9d258 --- /dev/null +++ b/sprout/tpp/algorithm/all_of.hpp @@ -0,0 +1,39 @@ +#ifndef SPROUT_TPP_ALGORITHM_ALL_OF_HPP +#define SPROUT_TPP_ALGORITHM_ALL_OF_HPP + +#include +#include + +namespace sprout { + namespace tpp { + namespace detail { + template + struct all_of_impl; + template<> + struct all_of_impl + : public std::true_type + {}; + template<> + struct all_of_impl + : public std::false_type + {}; + template + struct all_of_impl + : public std::integral_constant::value> + {}; + template + struct all_of_impl + : public std::false_type + {}; + } // namespace detail + // + // all_of + // + template + struct all_of + : public sprout::tpp::detail::all_of_impl + {}; + } // namespace tpp +} // namespace sprout + +#endif // #ifndef SPROUT_TPP_ALGORITHM_ALL_OF_HPP diff --git a/sprout/tpp/algorithm/any_of.hpp b/sprout/tpp/algorithm/any_of.hpp new file mode 100644 index 00000000..2ededd43 --- /dev/null +++ b/sprout/tpp/algorithm/any_of.hpp @@ -0,0 +1,39 @@ +#ifndef SPROUT_TPP_ALGORITHM_ANY_OF_HPP +#define SPROUT_TPP_ALGORITHM_ANY_OF_HPP + +#include +#include + +namespace sprout { + namespace tpp { + namespace detail { + template + struct any_of_impl; + template<> + struct any_of_impl + : public std::true_type + {}; + template<> + struct any_of_impl + : public std::false_type + {}; + template + struct any_of_impl + : public std::true_type + {}; + template + struct any_of_impl + : public std::integral_constant::value> + {}; + } // namespace detail + // + // any_of + // + template + struct any_of + : public sprout::tpp::detail::any_of_impl + {}; + } // namespace tpp +} // namespace sprout + +#endif // #ifndef SPROUT_TPP_ALGORITHM_ANY_OF_HPP diff --git a/sprout/tpp/algorithm/none_of.hpp b/sprout/tpp/algorithm/none_of.hpp new file mode 100644 index 00000000..bcf63bcd --- /dev/null +++ b/sprout/tpp/algorithm/none_of.hpp @@ -0,0 +1,39 @@ +#ifndef SPROUT_TPP_ALGORITHM_NONE_OF_HPP +#define SPROUT_TPP_ALGORITHM_NONE_OF_HPP + +#include +#include + +namespace sprout { + namespace tpp { + namespace detail { + template + struct none_of_impl; + template<> + struct none_of_impl + : public std::false_type + {}; + template<> + struct none_of_impl + : public std::true_type + {}; + template + struct none_of_impl + : public std::false_type + {}; + template + struct none_of_impl + : public std::integral_constant::value> + {}; + } // namespace detail + // + // none_of + // + template + struct none_of + : public sprout::tpp::detail::none_of_impl + {}; + } // namespace tpp +} // namespace sprout + +#endif // #ifndef SPROUT_TPP_ALGORITHM_NONE_OF_HPP