This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR libstdc++/80762 avoid ambiguous __constructible_from<void, void>

On 13/12/18 08:56 +0100, Christophe Lyon wrote:
On Wed, 12 Dec 2018 at 17:13, Jonathan Wakely <> wrote:

Ensure we don't try to instantiate __is_constructible_from<void, void>,
because there are two partial specializations that are equally good

        PR libstdc++/80762
        * include/bits/fs_path.h (path::_Path): Use remove_cv_t and is_void.
        * include/experimental/bits/fs_path.h (path::_Path): Likewise.
        * testsuite/27_io/filesystem/path/construct/ New test.
        * testsuite/experimental/filesystem/path/construct/ New test.

Hi Jonathan,

One of the new tests fails on bare-metal/newlib targets (aarch64-elf/arm-eabi):
FAIL: experimental/filesystem/path/construct/ (test for excess errors)
fatal error: experimental/filesystem: No such file or directory

I think there was a similar issue recently, but I don't remember how
you fixed it?

Like this. Sorry for forgetting it. Committed to trunk.

There's actually no reason the filesystem::path type can't be enabled
unconditionally for all targets, as it only relies on portable
features like std::string, but currently the definitions of its member
functions are in the libstdc++fs.a library which is only enabled
conditionally. Later today I plan to move the std::filesystem::path
type into the main library, so only the tests for
std::experimental::filesystem::path will depend on libstdc++fs.a being
available. Until then, this patch is needed.

commit e9d4b85b9d8f91743617729d0a1e6a9f9a39e37d
Author: Jonathan Wakely <>
Date:   Thu Dec 13 10:56:46 2018 +0000

    Disable new tests for configurations with no libstdc++fs.a
            * testsuite/27_io/filesystem/path/construct/ Skip test if
            the Filesystem TS support is not configured.
            * testsuite/experimental/filesystem/path/construct/ Likewise.

diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/construct/ b/libstdc++-v3/testsuite/27_io/filesystem/path/construct/
index 15a79fd4e12..0137e4466d0 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/path/construct/
+++ b/libstdc++-v3/testsuite/27_io/filesystem/path/construct/
@@ -17,6 +17,7 @@
 // { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
+// { dg-require-filesystem-ts "" }
 #include <filesystem>
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/
index fdd9f768f78..84ea48b11b1 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/
@@ -16,6 +16,7 @@
 // <>.
 // { dg-do compile { target c++11 } }
+// { dg-require-filesystem-ts "" }
 #include <experimental/filesystem>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]