2
0
mirror of https://github.com/boostorg/hof.git synced 2026-01-22 17:22:35 +00:00
Files
hof/test/flip.cpp
2016-10-31 19:14:13 -05:00

28 lines
517 B
C++

#include <fit/flip.hpp>
#include <fit/placeholders.hpp>
#include "test.hpp"
FIT_TEST_CASE()
{
FIT_TEST_CHECK(3 == fit::flip(fit::_ - fit::_)(2, 5));
FIT_STATIC_TEST_CHECK(3 == fit::flip(fit::_ - fit::_)(2, 5));
}
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ < 7
#define FINAL
#else
#define FINAL final
#endif
struct f FINAL {
int operator()(int i, void *) const {
return i;
}
};
FIT_TEST_CASE()
{
FIT_TEST_CHECK(fit::flip(f())(nullptr, 2) == 2);
}