[libcxx] [test] Untabify, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@309464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2017-07-29 00:55:10 +00:00
parent 62e519c2f9
commit a686caad20
121 changed files with 786 additions and 786 deletions

View File

@@ -24,25 +24,25 @@ int identity(int v) { return v; }
int sum(int a, int b) { return a + b; }
struct Foo {
int zero() const { return 0; }
int identity(int v) const { return v; }
int sum(int a, int b) const { return a + b; }
int zero() const { return 0; }
int identity(int v) const { return v; }
int sum(int a, int b) const { return a + b; }
};
int main()
{
typedef std::pointer_to_unary_function<int, int> PUF;
typedef std::pointer_to_binary_function<int, int, int> PBF;
assert((std::ptr_fun<int, int>(identity)(4) == 4));
assert((std::ptr_fun<int, int, int>(sum)(4, 5) == 9));
typedef std::pointer_to_unary_function<int, int> PUF;
typedef std::pointer_to_binary_function<int, int, int> PBF;
assert((std::ptr_fun<int, int>(identity)(4) == 4));
assert((std::ptr_fun<int, int, int>(sum)(4, 5) == 9));
Foo f;
assert((std::mem_fn(&Foo::identity)(f, 5) == 5));
assert((std::mem_fn(&Foo::sum)(f, 5, 6) == 11));
Foo f;
assert((std::mem_fn(&Foo::identity)(f, 5) == 5));
assert((std::mem_fn(&Foo::sum)(f, 5, 6) == 11));
typedef std::mem_fun_ref_t<int, Foo> MFR;
typedef std::const_mem_fun_ref_t<int, Foo> CMFR;
assert((std::mem_fun_ref(&Foo::zero)(f) == 0));
assert((std::mem_fun_ref(&Foo::identity)(f, 5) == 5));
assert((std::mem_fun_ref(&Foo::zero)(f) == 0));
assert((std::mem_fun_ref(&Foo::identity)(f, 5) == 5));
}