LWG 2989 hide path iostream operators from normal lookup
authorJonathan Wakely <jwakely@redhat.com>
Mon, 18 Jun 2018 18:59:44 +0000 (19:59 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 18 Jun 2018 18:59:44 +0000 (19:59 +0100)
commitb0874c667d1bcc7e414f130dd4ec3973d388dbfb
tree07be2d2b825895ff064717384af7f979bd573fef
parentadac3a685da705d6811d4069f57e1bc73a95a957
LWG 2989 hide path iostream operators from normal lookup

By only defining these operators as friends (with no namespace-scope
declaration) they can only be found by ADL and do not participate in
overload resolution for arguments of types other than path.

LWG 2989 hide path iostream operators from normal lookup
* include/bits/fs_path.h (operator<<, operator>>): Define inline as
friends.
* testsuite/27_io/filesystem/path/io/dr2989.cc: New.

From-SVN: r261711
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/fs_path.h
libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc [new file with mode: 0644]