https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80762
Bug ID: 80762
Summary: is_constructible<filesystem::path, void> gives hard
error with clang
Product: gcc
Version: 6.3.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
#include <experimental/filesystem>
int main()
{
static_assert(
!std::is_constructible<std::experimental::filesystem::path, void>::value,
"");
}
This fails to compile with Clang:
In file included from fs.cc:1:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/experimental/filesystem:38:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/experimental/bits/fs_fwd.h:37:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/system_error:41:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/stdexcept:38:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/exception:171:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/bits/nested_exception.h:40:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/bits/move.h:57:
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/type_traits:144:14:
error: ambiguous partial specializations of '__constructible_from<void, void>'
: public conditional<_B1::value, _B2, _B1>::type
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/experimental/bits/fs_path.h:124:17:
note: in instantiation of template class
'std::__and_<std::__not_<std::is_same<void,
std::experimental::filesystem::v1::__cxx11::path> >,
std::experimental::filesystem::v1::__cxx11::path::__constructible_from<void,
void> >' requested here
std::enable_if<__and_<__not_<is_same<_Tp1, path>>,
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/experimental/bits/fs_path.h:194:27:
note: in instantiation of template type alias '_Path' requested here
typename _Require = _Path<_Source>>
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/experimental/bits/fs_path.h:195:7:
note: in instantiation of default argument for 'path<void>' required here
path(_Source const& __source)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/type_traits:970:28:
note: while substituting deduced template arguments into function template
'path'
[with _Source = void, _Require = (no value)]
= decltype(::new _Tp(declval<_Arg>()))>
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/type_traits:971:24:
note: in instantiation of default argument for
'__test<std::experimental::filesystem::v1::__cxx11::path, void>' required
here
static true_type __test(int);
^~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/type_traits:981:24:
note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to
see all)
typedef decltype(__test<_Tp, _Arg>(0)) type;
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/type_traits:1068:14:
note: in instantiation of template class
'std::__is_direct_constructible_new_safe<std::experimental::filesystem::v1::__cxx11::path,
void>' requested here
: public conditional<is_reference<_Tp>::value,
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/type_traits:1076:14:
note: in instantiation of template class
'std::__is_direct_constructible_new<std::experimental::filesystem::v1::__cxx11::path,
void>' requested here
: public __is_direct_constructible_new<_Tp, _Arg>::type
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/type_traits:1116:14:
note: in instantiation of template class
'std::__is_direct_constructible<std::experimental::filesystem::v1::__cxx11::path,
void>' requested here
: public __is_direct_constructible<_Tp, _Arg>
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/type_traits:1127:14:
note: in instantiation of template class
'std::__is_constructible_impl<std::experimental::filesystem::v1::__cxx11::path,
void>' requested here
: public __is_constructible_impl<_Tp, _Args...>::type
^
fs.cc:6:13: note: in instantiation of template class
'std::is_constructible<std::experimental::filesystem::v1::__cxx11::path, void>'
requested here
!std::is_constructible<std::experimental::filesystem::path, void>::value,
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/experimental/bits/fs_path.h:113:14:
note: partial specialization matches [with _Iter = void]
struct __constructible_from<_Iter, _Iter>
^
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/experimental/bits/fs_path.h:118:14:
note: partial specialization matches [with _Source = void]
struct __constructible_from<_Source, void>
^
1 error generated.