libstdc++: Update tests on trunk [PR106201]
This copies the better tests from gcc-12 to trunk. libstdc++-v3/ChangeLog: PR libstdc++/106201 * testsuite/27_io/filesystem/iterators/106201.cc: Improve test. * testsuite/experimental/filesystem/iterators/106201.cc: New test.
This commit is contained in:
parent
0c1b0a23f1
commit
3892251498
2 changed files with 19 additions and 3 deletions
|
@ -5,8 +5,10 @@
|
|||
// PR libstdc++/106201 constraint recursion in path(Source const&) constructor.
|
||||
|
||||
#include <filesystem>
|
||||
#include <ranges>
|
||||
using I = std::counted_iterator<std::filesystem::directory_iterator>;
|
||||
#include <iterator>
|
||||
#include <concepts>
|
||||
namespace fs = std::filesystem;
|
||||
using I = std::counted_iterator<fs::directory_iterator>;
|
||||
static_assert( std::swappable<I> );
|
||||
using R = std::counted_iterator<std::filesystem::recursive_directory_iterator>;
|
||||
using R = std::counted_iterator<fs::recursive_directory_iterator>;
|
||||
static_assert( std::swappable<R> );
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// { 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 <experimental/filesystem>
|
||||
#include <iterator>
|
||||
#include <concepts>
|
||||
namespace fs = std::experimental::filesystem;
|
||||
using I = std::counted_iterator<fs::directory_iterator>;
|
||||
static_assert( std::swappable<I> );
|
||||
using R = std::counted_iterator<fs::recursive_directory_iterator>;
|
||||
static_assert( std::swappable<R> );
|
Loading…
Add table
Reference in a new issue