[all-commits] [llvm/llvm-project] c85a09: [libc++] Restore `basic_ios`'s implicit conversion...

Quuxplusone via All-commits all-commits at lists.llvm.org
Wed Aug 11 10:41:35 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: c85a094bcaad233b1a7f029d29f37cfa70ef10c6
      https://github.com/llvm/llvm-project/commit/c85a094bcaad233b1a7f029d29f37cfa70ef10c6
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2021-08-11 (Wed, 11 Aug 2021)

  Changed paths:
    M libcxx/include/ios
    M libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp

  Log Message:
  -----------
  [libc++] Restore `basic_ios`'s implicit conversion to `bool` in C++03 mode.

efriedma noted that D104682 broke this test case, reduced from SPEC2006.

    #include <istream>
    bool a(std::istream a) {
        return a.getline(0,0) == 0;
    }

We can unbreak it by restoring the conversion to something-convertible-to-bool.
We chose `void*` in order to match libstdc++.

For more ancient history, see PR19460: https://bugs.llvm.org/show_bug.cgi?id=19460

Differential Revision: https://reviews.llvm.org/D107663

(cherry picked from commit c1a8f12873783e8f4827437f6b2dddadfc58109d)




More information about the All-commits mailing list