[libcxx] LWG2420 bits for bind<void> - Patch from K-Ballo
Implemented LWG2420 bits for bind<void> Review: http://reviews.llvm.org/D10997 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241967 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -39,21 +39,34 @@ test_const(const F& f)
|
||||
|
||||
void f() {++count;}
|
||||
|
||||
struct A_int_0
|
||||
int g() {++count; return 0;}
|
||||
|
||||
struct A_void_0
|
||||
{
|
||||
void operator()() {++count;}
|
||||
void operator()() const {count += 2;}
|
||||
};
|
||||
|
||||
struct A_int_0
|
||||
{
|
||||
int operator()() {++count; return 4;}
|
||||
int operator()() const {count += 2; return 5;}
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
test(std::bind(f));
|
||||
test(std::bind(&f));
|
||||
test(std::bind(A_int_0()));
|
||||
test_const(std::bind(A_int_0()));
|
||||
test(std::bind(A_void_0()));
|
||||
test_const(std::bind(A_void_0()));
|
||||
|
||||
test(std::bind<void>(f));
|
||||
test(std::bind<void>(&f));
|
||||
test(std::bind<void>(A_void_0()));
|
||||
test_const(std::bind<void>(A_void_0()));
|
||||
|
||||
test(std::bind<void>(g));
|
||||
test(std::bind<void>(&g));
|
||||
test(std::bind<void>(A_int_0()));
|
||||
test_const(std::bind<void>(A_int_0()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user