//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // class function // template // bool operator==(const function&, nullptr_t); // // template // bool operator==(nullptr_t, const function&); // // template // bool operator!=(const function&, nullptr_t); // // template // bool operator!=(nullptr_t, const function&); #include #include int g(int) {return 0;} int main() { { std::function f; assert(f == nullptr); assert(nullptr == f); f = g; assert(f != nullptr); assert(nullptr != f); } }