page =
url = https://quuxplusone.github.io/blog
arthur o'dwyer – stuff mostly about c++
c++-style ranges today-i-learned
Today I learned: std::ranges::view_interface provides an
explicit operator bool
. When you have a view type from the Ranges STL (such as
std::ranges::subrange
), you can branch on its boolean value: empty ranges are falsey and everything else is truthy.