c++ - Serialize boost array -


I want to sort a boost :: array, which already has a serial.

Obtain this error:

Error C2039: 'serialize': 'boost :: arrays & lt; T, n>

I have tried to include the Serialization / array.hpp header but it did not help

Edit: a wrong link deleted

promotes you: show the code of the underlying class in the array the wanted. Since Promotion: There is an array, there should be no reason that this will not work. For example, you should do something like bus_route and bus_stop classes.

The category contained in the promotion will have to declare the array: :: Access as a Friend class: Access and implement the sorted method as below:

 < Code> class bus_stop {friend group promotion :: serialization :: access; Friends std :: ostream & amp; Operator & lt; & Lt; (Std :: ostream & os, const bus_stop & gt;); Virtual std :: string description () const = 0; GPS_ latitude; GPS_ position Latitude; Template & lt; Classic Collections & gt; Zero serial (archive and AR, consigned unsigned bunch version) {R & amp; Latitude; R & A Longitude; } Safe: Busstop (console GPS_pose and _wat, console GPS_position & amp; _long): latitude (_lat), longitude (_long) {} public: busstop () {} virtual ~ busstop () {}};  

Once this is done, an STD container should be able to busstop busstop:

  class bus_route {friend class boost :: serialization} :: access; Friends std :: ostream & amp; Operator & lt; & Lt; (Std :: ostream & os, const bus_route & amp; br); Typefif busstop * bus_stop_pointer; Std :: from the list & lt; Bus_stop_pointer & gt; Stops; Template & lt; Classic Collections & gt; Zero serialize (archive and AR, constricted int version) {// In this program, these sections are being directly serialized, but not through the pointer to the base class bus stop. So we need to make sure that the collection contains information about these derivative classes. //ar.template register_type & lt; Bus_stop_corner & gt; (); Ar.register_type (static_cast & lt; bus_stop_corner * & gt; (NULL)); //ar.template register_type & lt; Bus_stop_destination & gt; (); Ar.register_type (static_cast & lt; bus_stop_destination * & gt; (NULL)); // The sequence of the CRL archive is already defined // in the heading RA & amp; Stops; } Public: bus_route () {} zero availability (busstop * _b) {stops.insert (stop.and (), _bs); }};  

Note the important line:

  AR & amp; Stops;  

which will automatically be repeated through the std container, in this case a bus stop :: list bus stop pointer.

Error:

  Error C2039: 'serialize': 'boost :: arrays & lt; T, n>  

This indicates that: Promotion: The class contained in the ARM has not declared either :: Serialization :: Sorting as a Friend class or using the template method have not done it.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -