utils: to_range(): relax constraint
The input range to utils::to_range() should be indeed a range, but clang has trouble compiling <ranges> which causes it to fail. Relax the constraint until this is fixed.
This commit is contained in:
@@ -25,7 +25,13 @@
|
||||
|
||||
namespace ranges {
|
||||
|
||||
#ifndef __clang__
|
||||
template <std::ranges::range Container, std::ranges::range Range>
|
||||
#else
|
||||
// 'Range' should be constrained to std::ranges::range, but due to
|
||||
// problems between clang and <ranges>, it cannot be
|
||||
template <std::ranges::range Container, typename Range>
|
||||
#endif
|
||||
Container to(const Range& range) {
|
||||
return Container(range.begin(), range.end());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user