summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io/filesystem/path
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-13 21:12:06 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-13 21:12:06 +0100
commitbceb07e3584c9d8ea3e5760636ae24ff7f8606ff (patch)
tree548aa85b283f5123201fab5a3f4c86265bd3d498 /libstdc++-v3/testsuite/27_io/filesystem/path
parent0dd50fc6f13c02d9d548fd57e7f8f7020241e317 (diff)
PR libstdc++/90454.cc path construction from void*
Make the filesystem::path constructors SFINAE away for void* arguments, instead of giving an error due to iterator_traits<void*>::reference. PR libstdc++/90454.cc path construction from void* * include/bits/fs_path.h (path::_Path): Use remove_pointer so that pointers to void are rejected as well as void. * include/experimental/bits/fs_path.h (path::_Path): Likewise. * testsuite/27_io/filesystem/path/construct/80762.cc: Also check pointers to void. * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise. From-SVN: r271134
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/filesystem/path')
-rw-r--r--libstdc++-v3/testsuite/27_io/filesystem/path/construct/80762.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/construct/80762.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/construct/80762.cc
index 71cdaa9d969..e22e3deb56e 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/path/construct/80762.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/path/construct/80762.cc
@@ -22,8 +22,18 @@
using std::filesystem::path;
+// PR libstdc++/80762.cc
static_assert( !std::is_constructible_v<path, void> );
static_assert( !std::is_constructible_v<path, volatile path> );
static_assert( !std::is_constructible_v<path, volatile path&> );
static_assert( !std::is_constructible_v<path, const volatile path> );
static_assert( !std::is_constructible_v<path, const volatile path&> );
+
+// PR libstdc++/90454.cc
+static_assert( !std::is_constructible_v<path, void*> );
+static_assert( !std::is_constructible_v<path, const void*> );
+static_assert( !std::is_constructible_v<path, volatile void*> );
+static_assert( !std::is_constructible_v<path, const volatile void*> );
+static_assert( !std::is_constructible_v<path, void*&> );
+static_assert( !std::is_constructible_v<path, void* const&> );
+static_assert( !std::is_constructible_v<path, const void* const&> );