Boost C++ Libraries: Ticket #6068: Serialization doesn't work with strongly typed enum https://svn.boost.org/trac10/ticket/6068 <p> I guess the summary basically says it all. I'm using Intel c++ composer XE 2011 (update 6). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6068 Trac 1.4.3 Robert Ramey Sat, 12 Nov 2011 20:39:03 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6068#comment:1 https://svn.boost.org/trac10/ticket/6068#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> I don't know what you mean by a "strongly typed enum". If you want to post a small sample I'll have a look at it. But until that happens there's nothing I can do. </p> <p> Robert Ramey </p> Ticket tommitissari@… Sun, 13 Nov 2011 10:51:06 GMT <link>https://svn.boost.org/trac10/ticket/6068#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6068#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/6068#comment:1" title="Comment 1">ramey</a>: </p> <blockquote class="citation"> <p> I don't know what you mean by a "strongly typed enum". If you want to post a small sample I'll have a look at it. But until that happens there's nothing I can do. </p> <p> Robert Ramey </p> </blockquote> <hr /> <p> I mean the new C++11 strongly typed enumeration as described here:<br /> <a class="ext-link" href="http://en.wikipedia.org/wiki/C%2B%2B11#Strongly_typed_enumerations"><span class="icon">​</span>http://en.wikipedia.org/wiki/C%2B%2B11#Strongly_typed_enumerations</a> </p> <p> Compiling the following gives the error:<br /> C:\Boost\include\boost-1_47\boost/serialization/access.hpp(118): error : expression must have class type </p> <pre class="wiki">enum class MyEnum { first, second, third }; MyEnum myenum = MyEnum::second; std::ofstream file( _T("serialized_enum"), std::ios::out | std::ios::binary ); boost::archive::binary_oarchive outArchive( file ); outArchive &lt;&lt; myenum; file.close(); </pre> </description> <category>Ticket</category> </item> </channel> </rss>