Revert "Revert "Merge to upstream r304942.""

This reverts commit 38a0d5af7e.

Test: make checkbuild
Test: ./run_tests.py
Test: ./run_tests.py --bitness 64
This commit is contained in:
Dan Albert
2018-01-17 14:21:02 -08:00
parent 38a0d5af7e
commit c79549b70e
1102 changed files with 19092 additions and 14798 deletions

View File

@@ -11,7 +11,8 @@
// class function<R(ArgTypes...)>
// function(const function& f);
// function(const function& f);
// function(const function&& f);
#include <functional>
#include <memory>

View File

@@ -63,6 +63,7 @@ int main()
assert(A::count == 1);
assert(f.target<A>());
assert(f.target<int(*)(int)>() == 0);
assert(f.target<int>() == nullptr);
}
assert(A::count == 0);
{
@@ -70,6 +71,7 @@ int main()
assert(A::count == 0);
assert(f.target<int(*)(int)>());
assert(f.target<A>() == 0);
assert(f.target<int>() == nullptr);
}
assert(A::count == 0);
{
@@ -77,6 +79,7 @@ int main()
assert(A::count == 1);
assert(f.target<A>());
assert(f.target<int(*)(int)>() == 0);
assert(f.target<int>() == nullptr);
}
assert(A::count == 0);
{
@@ -84,6 +87,7 @@ int main()
assert(A::count == 0);
assert(f.target<int(*)(int)>());
assert(f.target<A>() == 0);
assert(f.target<int>() == nullptr);
}
assert(A::count == 0);
}