mirror of
https://github.com/mfontanini/libtins
synced 2026-01-30 21:44:26 +01:00
Add checks for std::chrono and std::function
This commit is contained in:
11
cmake/Modules/CheckCXXFeatures/cxx-test-functional.cpp
Normal file
11
cmake/Modules/CheckCXXFeatures/cxx-test-functional.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <functional>
|
||||
|
||||
int add(int x, int y) {
|
||||
return x + y;
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::function<int(int, int)> func;
|
||||
func = std::bind(&add, std::placeholders::_1, std::placeholders::_2);
|
||||
return (func(2, 2) == 4) ? 0 : 1;
|
||||
}
|
||||
Reference in New Issue
Block a user