summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/experimental/filesystem/iterators/106201.cc
blob: 017b72ef5f6cf35e72fb802e3e642f81fba5fdca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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> );