Constrain __invoke functions more accurately. This fixes http://llvm.org/bugs/show_bug.cgi?id=15861 .
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,6 +28,12 @@ struct S
|
||||
typedef void (S::*PMS)(long) const;
|
||||
typedef char S::*PMD;
|
||||
|
||||
struct wat
|
||||
{
|
||||
wat& operator*() { return *this; }
|
||||
void foo();
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
static_assert((std::is_same<std::result_of<S(int)>::type, short>::value), "Error!");
|
||||
@@ -40,4 +46,5 @@ int main()
|
||||
static_assert((std::is_same<std::result_of<PMD(S)>::type, char&&>::value), "Error!");
|
||||
#endif
|
||||
static_assert((std::is_same<std::result_of<PMD(const S*)>::type, const char&>::value), "Error!");
|
||||
using type = std::result_of<decltype(&wat::foo)(wat)>::type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user