diff --git a/libc/test/config/linux/x86_64/syscall_test.cpp b/libc/test/config/linux/x86_64/syscall_test.cpp --- a/libc/test/config/linux/x86_64/syscall_test.cpp +++ b/libc/test/config/linux/x86_64/syscall_test.cpp @@ -15,30 +15,30 @@ // We only do a signature test here. Actual functionality tests are // done by the unit tests of the syscall wrappers like mmap. - using __llvm_libc::cpp::function; + using __llvm_libc::cpp::Function; - function f([](long n) { return __llvm_libc::syscall(n); }); - function f1( + Function f([](long n) { return __llvm_libc::syscall(n); }); + Function f1( [](long n, long a1) { return __llvm_libc::syscall(n, a1); }); - function f2( + Function f2( [](long n, long a1, long a2) { return __llvm_libc::syscall(n, a1, a2); }); - function f3( + Function f3( [](long n, long a1, long a2, long a3) { return __llvm_libc::syscall(n, a1, a2, a3); }); - function f4( + Function f4( [](long n, long a1, long a2, long a3, long a4) { return __llvm_libc::syscall(n, a1, a2, a3, a4); }); - function f5( + Function f5( [](long n, long a1, long a2, long a3, long a4, long a5) { return __llvm_libc::syscall(n, a1, a2, a3, a4, a5); }); - function f6( + Function f6( [](long n, long a1, long a2, long a3, long a4, long a5, long a6) { return __llvm_libc::syscall(n, a1, a2, a3, a4, a5, a6); }); - function notLongType( + Function notLongType( [](long n, void *a1) { return __llvm_libc::syscall(n, a1); }); } diff --git a/libc/utils/CPP/Functional.h b/libc/utils/CPP/Functional.h --- a/libc/utils/CPP/Functional.h +++ b/libc/utils/CPP/Functional.h @@ -12,14 +12,14 @@ namespace __llvm_libc { namespace cpp { -template class function; +template class Function; -template class function { +template class Function { Ret (*func)(Params...) = nullptr; public: - constexpr function() = default; - template constexpr function(Func &&f) : func(f) {} + constexpr Function() = default; + template constexpr Function(Func &&f) : func(f) {} constexpr Ret operator()(Params... params) { return func(params...); } };