Skip to content

melardev/CppBoostSerializationSnippets

Repository files navigation

Introduction

This repository contains Boost Cpp Serialization snippets, I have actually a lot more snippets
but I have to refactor them before publishing so you can follow me on Github to stay tuned.

Getting Started

For Cpp nowadas there are no excuses to setup your environment in a painless manner, this is why
I recommend using vcpkg, which is what I use, with vcpkg install boost:x64-windows-static it downloaded and built
boost libraries. Then I open the vcproject file and add the following inside the Globals section:

<PropertyGroup Label="Globals"> <-- Find this tag, then in that tag add the two VcpkgTriplet tags-->
............
<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
..........

This is how I set up my environment, I strongly encourage you to do the same, take a time reading about vcpkg
and enjoy modern Cpp made easy.

Notes

  • BOOST_SERIALIZATION_SPLIT_FREE should always be executed outside any namespace.
  • Don't forget the appropiate includes, if you serialize a shared_ptr you need the serialization/shared_ptr.hpp header file.
  • Never use BOOST_EXPORT_CLASS for a base class.

Social Media

Resources

TODO

  • Port to CMake

About

Cpp Boost Serialization Snippets

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages