Describe the bug
After #2000, path's comparison operators are IF-NDR (ill-formed, no diagnostic required). See Arthur O'Dwyer (@Quuxplusone)'s blogpost and Jonathan Wakely (@jwakely)'s comment for a detailed analysis of similar issues in libc++ and libstdc++.
Command-line test case
Copied from Arthur O’Dwyer's blogpost.
#include <filesystem>
#include <ranges>
static_assert(std::ranges::range<std::filesystem::path>);
static_assert(std::ranges::range<const std::filesystem::path>);
D:\Temp>clang-cl /c /EHsc /W4 /std:c++latest /D_HAS_CXX23=1 repro.cpp
repro.cpp(5,1): error: static_assert failed
static_assert(std::ranges::range<const std::filesystem::path>);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
repro.cpp(5,28): note: because 'const std::filesystem::path' does not satisfy 'range'
static_assert(std::ranges::range<const std::filesystem::path>);
^
D:\repos\STL\out\\build\x64\out\inc\xutility(2233,9): note: because '::std::ranges::begin(__r)' would be invalid: no
matching function for call to object of type 'const _Begin::_Cpo'
_RANGES begin(__r);
^
D:\repos\STL\out\\build\x64\out\inc\yvals_core.h(1411,20): note: expanded from macro '_RANGES'
#define _RANGES ::std::ranges::
^
1 error generated.
STL version
3c2fd04
Describe the bug
After #2000,
path's comparison operators are IF-NDR (ill-formed, no diagnostic required). See Arthur O'Dwyer (@Quuxplusone)'s blogpost and Jonathan Wakely (@jwakely)'s comment for a detailed analysis of similar issues in libc++ and libstdc++.Command-line test case
Copied from Arthur O’Dwyer's blogpost.
STL version
3c2fd04