mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 00:30:36 +08:00
libstdc++: Add testcase for fs::path constraint recursion [PR106201]
libstdc++-v3/ChangeLog: PR libstdc++/106201 * testsuite/27_io/filesystem/iterators/106201.cc: New test.
This commit is contained in:
parent
95489a2a27
commit
6b859736bb
12
libstdc++-v3/testsuite/27_io/filesystem/iterators/106201.cc
Normal file
12
libstdc++-v3/testsuite/27_io/filesystem/iterators/106201.cc
Normal file
@ -0,0 +1,12 @@
|
||||
// { dg-options "-std=gnu++20" }
|
||||
// { dg-do compile { target c++20 } }
|
||||
// { dg-require-filesystem-ts "" }
|
||||
|
||||
// PR libstdc++/106201 constraint recursion in path(Source const&) constructor.
|
||||
|
||||
#include <filesystem>
|
||||
#include <ranges>
|
||||
using I = std::counted_iterator<std::filesystem::directory_iterator>;
|
||||
static_assert( std::swappable<I> );
|
||||
using R = std::counted_iterator<std::filesystem::recursive_directory_iterator>;
|
||||
static_assert( std::swappable<R> );
|
Loading…
x
Reference in New Issue
Block a user