PrevUpHomeNext

.cast method


.cast member function of utx::class_type

utx::class_type::cast

Method .cast of utx::class_type is used to convert current object value to another arithmetic basic type or arithmetic utx::class_type .

c++ example

#include <utxcpp/core.hpp>

int main()
{
	constexpr utx::ix32 a = 329;
	constexpr auto b = a.cast<utx::fx64>();
	constexpr auto c = a.cast<utx::f32>();
	utx::print(a, b, c);
}

See Also

utx::ix32

utx::fx64

utx::print


PrevUpHomeNext

utx::print

esv::print