page = arthur o'dwyer – stuff mostly about c++
url = https://quuxplusone.github.io/blog
types are boolean-testable
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.