CaseyCarter / cmcstl2

An implementation of C++ Extensions for Ranges
Other
221 stars 68 forks source link

Concepts TS vs C++20 concepts #322

Closed cjdb closed 4 years ago

cjdb commented 4 years ago

Since MSVC 2019 Preview 3.2 is able to compile cmcstl2, I've noticed that some code isn't quite up-to-date. Example:

constexpr ranges::integral factorial(ranges::integral x)
{
    decltype(x) r = 1;
    for (; 1 < x; --x)
        r *= x;
    return r;
}

This is valid Concepts TS, but invalid C++20. Obviously the solution for this particular example is to introduce a type name, but it would be nice to know whether cmcstl2 will support GCC concepts forever, or if we're going to break away to become compatible with MSVC and clang-concepts-ranges.

CaseyCarter commented 4 years ago

Syntax in cmcstl2 that isn't valid C++20 is a bug that needs to be fixed.