mapbox / variant

C++11/C++14 Variant
BSD 3-Clause "New" or "Revised" License
371 stars 101 forks source link

Support for empty class serialization #168

Closed brunoabinader closed 5 years ago

brunoabinader commented 5 years ago

This allows serialization of empty class types, such as geometry.hpp's empty class.

brunoabinader commented 5 years ago

@brunoabinader - looking good but I'm wondering why do we need std::enable_if ? Why not just an overload for the empty type ? Have you tried ?

The intent was to make this available to all empty classes, not just the geometry.hpp one in particular. In geometry.hpp, for instance, there is at least one more empty class (feature's null_value_t).