PrevUpHomeNext

.cast method


.cast member function of esv::class_type

esv::class_type::cast

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

c++ example

#include <esvcpp/core.hpp>

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

See Also

esv::ix32

esv::fx64

esv::print


PrevUpHomeNext

E