https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80448
Bug ID: 80448
Summary: #include <experimental/filesystem> fails with Clang
5.0
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Simply including <experimental/filesystem> fails to compile when using Clang.
The first error in the stack is:
/opt/gcc-tot/lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/experimental/bits/fs_dir.h:265:5:
error: default member initializer for '_M_options' needed within definition of
enclosing
class 'recursive_directory_iterator' outside of member functions
recursive_directory_iterator() noexcept = default;
The complete reproducer is:
// clang++ -std=c++1z -fsyntax-only --gcc-toolchain=/opt/gcc-tot test.cpp
// test.cpp
#include <experimental/filesystem>