OSDN Git Service

[ADT] Add a default constructor and a bool conversion to function_ref.
authorChandler Carruth <chandlerc@gmail.com>
Sun, 9 Jul 2017 06:12:56 +0000 (06:12 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 9 Jul 2017 06:12:56 +0000 (06:12 +0000)
commitcc60d7b17de095ac429f5066d0bea80837fabb65
treea20b756e322c65925992f0dac45cf6d81d925299
parent7e96a89b3cfa47e30078b0e4bcc38a3d21bc8985
[ADT] Add a default constructor and a bool conversion to function_ref.

The internal representation has a natural way to handle this and it
seems nicer than having to wrap this in an optional (with its own
separate flag).

This also matches how std::function works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307490 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/STLExtras.h
unittests/ADT/FunctionRefTest.cpp