Boost logo

Boost :

Subject: Re: [boost] Library addition request
From: Bjorn Reese (breese_at_[hidden])
Date: 2016-06-18 08:14:36


On 06/15/2016 07:46 PM, Thomas Heller wrote:

> Wouldn't it be possible to have a generic implementation for serialization
> that's SFINAEed properly?

That can be done with Boost.Serialization today if you bounce the
boost::serialization::serialize() function to a trampoline function
object and do your SFINAE on the function object. I have described
the general technique here:

   http://breese.github.io/2015/12/20/partiality-for-functions.html

I am using this technique together with Boost.Serialization here:

 
https://github.com/breese/trial.protocol/blob/develop/include/trial/protocol/json/serialization/serialization.hpp

with a SFINAE (well, partial specialization) example here:

 
https://github.com/breese/trial.protocol/blob/develop/include/trial/protocol/json/serialization/std/map.hpp


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk