mirror of
https://github.com/boostorg/hof.git
synced 2026-01-21 17:02:28 +00:00
21 lines
470 B
C++
21 lines
470 B
C++
#include <fit/result.hpp>
|
|
#include <fit/static.hpp>
|
|
#include "test.hpp"
|
|
|
|
|
|
static constexpr fit::result_adaptor<int, unary_class> unary_int = {};
|
|
|
|
FIT_TEST_CASE()
|
|
{
|
|
STATIC_ASSERT_SAME(decltype(unary_int(false)), int);
|
|
FIT_TEST_CHECK(unary_int(false) == 0);
|
|
FIT_STATIC_TEST_CHECK(unary_int(false) == 0);
|
|
}
|
|
|
|
static constexpr fit::result_adaptor<void, unary_class> unary_void = {};
|
|
|
|
FIT_TEST_CASE()
|
|
{
|
|
STATIC_ASSERT_SAME(decltype(unary_void(false)), void);
|
|
}
|