4template <
class... Args>
21 std::tuple<int, int>
a{0, 0}, b{0, 1};
31 REQUIRE(kblib::signed_cast<unsigned>(-1ll) == -1ull);
32 REQUIRE(kblib::signed_cast<signed>(
static_cast<unsigned short>(78)) == 78);
34 std::is_same<signed short, decltype(kblib::signed_cast<signed>(
35 std::declval<unsigned short>()))>::value,
37 static_assert(std::is_same<
unsigned short,
38 decltype(kblib::signed_cast<unsigned>(
39 std::declval<unsigned short>()))>::value,
41 static_assert(std::is_same<signed short, decltype(kblib::signed_cast<signed>(
42 std::declval<short>()))>::value,
44 static_assert(std::is_same<
unsigned short,
45 decltype(kblib::signed_cast<unsigned>(
46 std::declval<unsigned short>()))>::value,
49 std::is_same<signed int, decltype(kblib::signed_cast<signed>(
50 std::declval<unsigned int>()))>::value,
61 string_view p = __PRETTY_FUNCTION__;
62 return string_view(p.data() + 36, p.size() - 36 - 1);
63# elif defined(__GNUC__)
64 string_view p = __PRETTY_FUNCTION__;
65# if __cplusplus < 201402
66 return string_view(p.data() + 36, p.size() - 36 - 1);
68 return string_view(p.data() + 49, p.find(
';', 49) - 49);
70# elif defined(_MSC_VER)
71 string_view p = __FUNCSIG__;
72 return string_view(p.data() + 84, p.size() - 84 - 7);
80 std::is_same<kblib::detail::next_larger_signed<signed char>::type,
82 "signed char < short");
84 std::is_same<kblib::detail::next_larger_signed<short>::type,
int>::value,
87 std::is_same<kblib::detail::next_larger_signed<int>::type,
long>::value,
93 << type_name_f<kblib::detail::next_larger_signed<signed char>::type>()
98 << type_name_f<kblib::detail::next_larger_signed<int>::type>() <<
'\n';
TEST_CASE("to_unique(lambda)")
KBLIB_UNUSED constexpr auto type_name_f() -> std::string_view
This header provides some features of C++17 <type_traits> and other headers for C++14,...
constexpr auto a(const std::initializer_list< T > &a) -> auto
Index an array literal without naming its type.
auto to_unique(owner< T * > p) -> std::unique_ptr< T >
typename meta_type< Ts... >::type meta_type_t
auto operator->() -> auto
typename decltype(ints_map::template get_default< max_val< T >+1 >())::type type
#define KBLIB_UNUSED
This internal macro is used to provide a fallback for [[maybe_unused]] in C++14.