Closed qustrolabe closed 3 weeks ago
Will also check if draft standard has the bug.
Will also check if draft standard has the bug.
[optional.iterators]/1 is already requiring the iterator types meeting the contexpr iterator requirements. Such requirements are correctly copied into [optionalref.iterators]/1 in P2988R7.
So we should just add lacked constexpr
in the implementation...
std::views::join
onbeman::optional26::optional
doesn't work in constexpr context in my code https://godbolt.org/z/Ed11G66s3 (switch preprocessor if 1 to see error)This code doesn't work in constexpr:
I expected it work like this C++23 code:
Filtering out all nullopt from view
With std::views::join compiler gives error that contiguous_iterator is not constexpr, so I simply tried editing it's declaration - marking everything I could as constexpr and afterwards this code worked as expected. So solely based on this I think it should be constexpr.