[libcxx-commits] [PATCH] D146984: [libc++] Add __decay_t and use it instead of decay<>::type

Ilya Biryukov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 2 07:10:13 PDT 2023


ilya-biryukov added a comment.

As the comment above mentioned, this seems to be a non-conformant breaking change.
Our integrate fails on this code snippet after this change when compiled with `-std=c++20` (godbolt <https://gcc.godbolt.org/z/5fcK5fEMP>):

  #include <vector>
  
  struct Value {};
  
  template <class Iter>
  struct WrappedIter : Iter {
      using pointer = Value*;
      using reference = Value&;
  
      pointer operator-> () { return &v; }
      reference operator* () { return v;  }
  
  private:
    Value v;
  };
  
  
  using WI = WrappedIter<std::vector<int>::iterator>;
  void foo(WI b, WI e) {
      std::vector<Value> foo(b, e);
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146984/new/

https://reviews.llvm.org/D146984



More information about the libcxx-commits mailing list