diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-05-13 21:12:06 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-05-13 21:12:06 +0100 |
commit | bceb07e3584c9d8ea3e5760636ae24ff7f8606ff (patch) | |
tree | 548aa85b283f5123201fab5a3f4c86265bd3d498 /libstdc++-v3/testsuite/experimental/filesystem/path | |
parent | 0dd50fc6f13c02d9d548fd57e7f8f7020241e317 (diff) | |
download | gcc-bceb07e3584c9d8ea3e5760636ae24ff7f8606ff.tar.gz |
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/experimental/filesystem/path')
-rw-r--r-- | libstdc++-v3/testsuite/experimental/filesystem/path/construct/80762.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/80762.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/80762.cc index fa4a64feb3e..98dadabcffb 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/80762.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/80762.cc @@ -22,8 +22,18 @@ using std::experimental::filesystem::path; +// PR libstdc++/80762.cc static_assert( !std::is_constructible<path, void>::value, "" ); static_assert( !std::is_constructible<path, volatile path>::value, "" ); static_assert( !std::is_constructible<path, volatile path&>::value, "" ); static_assert( !std::is_constructible<path, const volatile path>::value, "" ); static_assert( !std::is_constructible<path, const volatile path&>::value, "" ); + +// PR libstdc++/90454.cc +static_assert( !std::is_constructible<path, void*>::value, "" ); +static_assert( !std::is_constructible<path, const void*>::value, "" ); +static_assert( !std::is_constructible<path, volatile void*>::value, "" ); +static_assert( !std::is_constructible<path, const volatile void*>::value, "" ); +static_assert( !std::is_constructible<path, void*&>::value, "" ); +static_assert( !std::is_constructible<path, void* const&>::value, "" ); +static_assert( !std::is_constructible<path, const void* const&>::value, "" ); |