How to check if std::hex is set

I have made a class named luint for handling very large unsigned integers. I want to overload the input and output operators std::ostream& operator<<(std::ostream&,const luint&) and
std::istream& operator>>(std::istream&,luint&).

I want to write such an implementation that if std::hex is set, my program displays the large integer in hexadecimal form instead of decimal form. How can I do this?
Last edited on
if (stream.flags() & std::ios::hex)
	// "std::hex is set"
Topic archived. No new replies allowed.