veselink1 / refl-cpp

Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).
https://veselink1.github.io/refl-cpp/md__introduction.html
MIT License
1.06k stars 77 forks source link

Regression: Windows compilation broken due to constexpr rules #8

Closed Milerius closed 4 years ago

Milerius commented 4 years ago

https://github.com/veselink1/refl-cpp/commit/469c3c676184deb58b354efa3c4479322b29f87a#diff-9d3b8a5a5ab7d2d06d496a5008d3d3ac

This commit seem's to broke windows compilation:

image

/**
             * Explicitly converts to std::string.
             */
            explicit constexpr operator std::string() const noexcept
            {
                return data;
            }

This code is illegal because constexpr function cannot return non constexpr type such as std::string

veselink1 commented 4 years ago

Fixed in v0.6.1 / commit b3138c2.