File: derived.hpp

package info (click to toggle)
libcereal 1.3.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,064 kB
  • sloc: cpp: 19,837; xml: 178; sh: 56; makefile: 13
file content (22 lines) | stat: -rwxr-xr-x 610 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include "base.hpp"
class Derived : public Base
{
  public:
    virtual ~Derived() {}

  private:
    friend class cereal::access;
    template <class Archive>
    void serialize(Archive & ar, std::uint32_t const)
    {
      ar(cereal::base_class<Base>(this));
    }
};

extern template DECLSPECIFIER void Derived::serialize<cereal::XMLOutputArchive>
    ( cereal::XMLOutputArchive & ar, std::uint32_t const version );
extern template DECLSPECIFIER void Derived::serialize<cereal::XMLInputArchive>
    ( cereal::XMLInputArchive & ar, std::uint32_t const version );

CEREAL_REGISTER_TYPE(Derived)