TartanLlama / optional

C++11/14/17 std::optional with functional-style extensions and reference support
https://tl.tartanllama.xyz
Creative Commons Zero v1.0 Universal
859 stars 67 forks source link

Add `begin`/`end` #65

Open sigasigasiga opened 2 months ago

sigasigasiga commented 2 months ago

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3168r2.html

The paper also adds following template specializations, but I don't have any idea on how to implement them without __has_include which is available only since C++17

template<class T>
constexpr bool ranges::enable_view<optional<T>> = true;   
template<class T>
constexpr auto format_kind<optional<T>> = range_format::disabled;