//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // class function // : public unary_function // iff sizeof...(ArgTypes) == 1 and // // ArgTypes contains T1 // : public binary_function // iff sizeof...(ArgTypes) == 2 and // // ArgTypes contains T1 and T2 // { // public: // typedef R result_type; // ... // }; #include #include int main() { static_assert((!std::is_base_of, std::function >::value), ""); static_assert((!std::is_base_of, std::function >::value), ""); static_assert(( std::is_same< std::function::result_type, int>::value), ""); static_assert(( std::is_base_of, std::function >::value), ""); static_assert((!std::is_base_of, std::function >::value), ""); static_assert(( std::is_same< std::function::result_type, double>::value), ""); static_assert((!std::is_base_of, std::function >::value), ""); static_assert(( std::is_base_of, std::function >::value), ""); static_assert(( std::is_same< std::function::result_type, double>::value), ""); }