boostorg / serialization

Boost.org serialization module
http://boost.org/libs/serialization
120 stars 139 forks source link

Make BOOST_STRONG_TYPEDEF constexpr #301

Open jakubmiernik opened 11 months ago

jakubmiernik commented 11 months ago

Lack of constexpr constructor for BOOST_STRONG_TYPEDEF cause errors in clang and warning in gcc when using in constexpr functions.

robertramey commented 9 months ago

Suppose we make this change. What happens when we use it with a compiler which does not support constant expressions? I think this needs to be more elaborate to be totally portable. I see merit in the idea, but I don't see it being portable to all compilers that the boost serialization library supports.

FYI. The serialization library no longer uses this macro. It's been left in there as it seems that many find it useful.