PrevUpHomeNext

kpp::bare_same_v_assert


---- kpp::bare_same_v_assert << Basic Utils << Type System << Kpp c++ ----

kpp::bare_same_v_assert is a c++ class of kpp c++ library.

kpp::bare_same_v_assert asserts two values are both the same type and the same value.

AKA. kpp::bare_same_v_assert <====> static_assert + kpp::bare_t + kpp::same_as + value-equality.

Note that kpp::bare_t is applied before checking.

Note that kpp::bare_same_v_assert might have no effect for different compilers or different compiler commit points, but it does not affect the result.

kpp::bare_same_v_assert usage Sig:

kpp::bare_same_v_assert<value1, value2>{};
kpp::bare_same_v_assert<value1, value2, true>{};
kpp::bare_same_v_assert<value1, value2, false>{};

true by default.

include

#include <kpp/types.hpp>

c++ example

#include <kpp/types.hpp>

int main()
{
	kpp::bare_same_v_assert<7, 7u, false>{};
	kpp::bare_same_v_assert<7, 7>{};
}

See Also

kpp::same_v_assert

kpp::same_assert

kpp::same_as

Back

Up










Deck

Kpp Home


PrevUpHomeNext