Skip to content

Commit

Permalink
[NFC][libc++] Moves ios_base's forward declaration. (#88027)
Browse files Browse the repository at this point in the history
According to our synopsis it belonged to ios_fwd. This is not true in
the C++11 version of the Standard, I did not validate against C++98.

Moving this to ios's forward where it's declared in the standard allows
removing a module quirk. An earlier removal of std::vectors forward
declaration allows to remove all quirks for the iosfwd module part.

Since iosfwd includes __fwd/ios.h this does not change the required
includes.
  • Loading branch information
mordante authored Apr 16, 2024
1 parent 5462b27 commit a75c9d0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions libcxx/include/__fwd/ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI ios_base;

template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_ios;

Expand Down
3 changes: 0 additions & 3 deletions libcxx/include/iosfwd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ template<> struct char_traits<wchar_t>;
template<class T> class allocator;
class ios_base;
template <class charT, class traits = char_traits<charT> > class basic_ios;
template <class charT, class traits = char_traits<charT> > class basic_streambuf;
Expand Down Expand Up @@ -124,8 +123,6 @@ using wosyncstream = basic_osyncstream<wchar_t>; // C++20

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI ios_base;

template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
template <class _CharT, class _Traits = char_traits<_CharT> >
Expand Down
2 changes: 0 additions & 2 deletions libcxx/utils/libcxx/test/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
# The operators are added for private types like __iom_t10.
SkipDeclarations["iomanip"] = ["std::operator<<", "std::operator>>"]

SkipDeclarations["iosfwd"] = ["std::ios_base", "std::vector"]

# This header also provides declarations in the namespace that might be
# an error.
SkipDeclarations["filesystem"] = [
Expand Down

0 comments on commit a75c9d0

Please sign in to comment.