型リストのいずれかの型が述語を満たせばtrue
全ての型が述語を満たさない場合はfalseを返すメタ関数です。
template <template <class T> class P, class Seq> struct any; template <template <class T> class P, class Head, class... Tail> struct any<P, tuple<Head, Tail...>> { static const bool value = P<Head>::value ? true : any<P, tuple<Tail...>>::value; }; template <template <class T> class P> struct any<P, tuple<>> { static const bool value = false; };
any<is_integral, tuple<int, long, char>>::value → true
any<is_integral, tuple<float, int, void*>>::value → true
any<is_integral, tuple<float, double, void*>>::value → false