[Bug libstdc++/90454] filesystem::path template constructor void* overload interference

2019-05-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |8.4
  Known to fail||8.3.0, 9.1.0

--- Comment #8 from Jonathan Wakely  ---
Also fixed for 8.4 and 9.2, so now I'll close it. Thanks for the report.

[Bug libstdc++/90454] filesystem::path template constructor void* overload interference

2019-05-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Wed May 15 20:27:45 2019
New Revision: 271265

URL: https://gcc.gnu.org/viewcvs?rev=271265=gcc=rev
Log:
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::reference.

Backport from mainline
2019-05-13  Jonathan Wakely  

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.

Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/fs_path.h
branches/gcc-8-branch/libstdc++-v3/include/experimental/bits/fs_path.h
   
branches/gcc-8-branch/libstdc++-v3/testsuite/27_io/filesystem/path/construct/80762.cc
   
branches/gcc-8-branch/libstdc++-v3/testsuite/experimental/filesystem/path/construct/80762.cc

[Bug libstdc++/90454] filesystem::path template constructor void* overload interference

2019-05-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454

--- Comment #6 from Jonathan Wakely  ---
Author: redi
Date: Wed May 15 19:34:59 2019
New Revision: 271262

URL: https://gcc.gnu.org/viewcvs?rev=271262=gcc=rev
Log:
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::reference.

Backport from mainline
2019-05-13  Jonathan Wakely  

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.

Modified:
branches/gcc-9-branch/libstdc++-v3/ChangeLog
branches/gcc-9-branch/libstdc++-v3/include/bits/fs_path.h
branches/gcc-9-branch/libstdc++-v3/include/experimental/bits/fs_path.h
   
branches/gcc-9-branch/libstdc++-v3/testsuite/27_io/filesystem/path/construct/80762.cc
   
branches/gcc-9-branch/libstdc++-v3/testsuite/experimental/filesystem/path/construct/80762.cc

[Bug libstdc++/90454] filesystem::path template constructor void* overload interference

2019-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454

--- Comment #5 from Jonathan Wakely  ---
Please leave it open.

[Bug libstdc++/90454] filesystem::path template constructor void* overload interference

2019-05-14 Thread patrick.a.moran at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454

--- Comment #4 from Patrick Moran  ---
I just did a clean build of gcc with the change linked from ViewVC and
confirmed that my reproduction is fixed. Thank you.

I admit I'm uncertain of the etiquette regarding this ticket itself - I'm not
changing the status yet in case that would mess with release management
conventions, but I can confirm that the patch fixes the reported issue.  If I
should mark as "RESOLVED", I'm happy to do so.

[Bug libstdc++/90454] filesystem::path template constructor void* overload interference

2019-05-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454

--- Comment #3 from Jonathan Wakely  ---
Author: redi
Date: Mon May 13 20:12:06 2019
New Revision: 271134

URL: https://gcc.gnu.org/viewcvs?rev=271134=gcc=rev
Log:
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::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.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/fs_path.h
trunk/libstdc++-v3/include/experimental/bits/fs_path.h
trunk/libstdc++-v3/testsuite/27_io/filesystem/path/construct/80762.cc
   
trunk/libstdc++-v3/testsuite/experimental/filesystem/path/construct/80762.cc

[Bug libstdc++/90454] filesystem::path template constructor void* overload interference

2019-05-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454

--- Comment #2 from Jonathan Wakely  ---
C++20 fixes this by iterator_traits requires is_object_v.

I think I have a patch implementing that for C++11 upwards...

[Bug libstdc++/90454] filesystem::path template constructor void* overload interference

2019-05-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-05-13
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
I'm testing this patch:

--- a/libstdc++-v3/include/bits/fs_path.h
+++ b/libstdc++-v3/include/bits/fs_path.h
@@ -115,7 +115,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
 template
   using _Path = typename
std::enable_if<__and_<__not_, path>>,
- __not_>,
+ __not_>>,
  __constructible_from<_Tp1, _Tp2>>::value,
   path>::type;