Is there possiblitity to portable way to serialize enum type?

  • Thread starter Voronkov Konstantin
  • Start date
V

Voronkov Konstantin

Hello, All!

I want to ask question whether there is portable way to serialize
enum type? Is it safe to threat enum as integer?

Best Regards,
Voronkov Konstantin
 
V

Victor Bazarov

Voronkov said:
I want to ask question whether there is portable way to serialize
enum type? Is it safe to threat enum as integer?

It is advisable to write conversion functions instead of "treating
enums" as anything. That's basically what serialisation is about,
you define the external representation and write functions that
convert something to it and from it to something.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top