OleksandrKvl / sbepp

C++ implementation of the FIX Simple Binary Encoding
https://oleksandrkvl.github.io/sbepp/
MIT License
42 stars 4 forks source link

Built-in optional types use wrong base class for `optional_base` CRTP #29

Closed OleksandrKvl closed 6 months ago

OleksandrKvl commented 6 months ago

As was discovered in https://github.com/OleksandrKvl/sbepp/issues/27#issuecomment-2011880139, built-in optional types use NAME##_t instead of NAME##_opt_t here:

class NAME##_opt_t : public detail::optional_base<TYPE, NAME##_t>

which results in wrong min/max values being used and null value absent at all.