[PATCH] D119544: Deferred Concept Instantiation Implementation

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 12:59:12 PDT 2022


erichkeane added a comment.

In D119544#3486573 <https://reviews.llvm.org/D119544#3486573>, @gulfem wrote:

>> Then pipe that to a file (note the -E I added at the end).  You should get a file that looks like some slightly-wonky C++ code.
>
> I got the following output after running it via `-E`.
>
>   /usr/local/google/home/gulfem/llvm-clean/llvm-project/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp:15:10: fatal error: 'memory' file not found
>   #include <memory>
>            ^~~~~~~~
>   # 1 "/usr/local/google/home/gulfem/llvm-clean/llvm-project/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp"
>   # 1 "<built-in>" 1
>   # 1 "<built-in>" 3
>   # 434 "<built-in>" 3
>   # 1 "<command line>" 1
>   # 1 "<built-in>" 2
>   # 1 "/usr/local/google/home/gulfem/llvm-clean/llvm-project/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp" 2
>   # 21 "/usr/local/google/home/gulfem/llvm-clean/llvm-project/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp"
>   template <typename>
>   struct ForwardProxyIterator {
>     using value_type = int;
>     using difference_type = int;
>     ForwardProxyIterator& operator++();
>     ForwardProxyIterator operator++(int);
>     bool operator==(const ForwardProxyIterator&) const;
>   
>     int operator*() const;
>   };
>   
>   static_assert(std::ranges::__nothrow_forward_range<test_range<forward_iterator>>);
>   static_assert(!std::ranges::__nothrow_forward_range<test_range<cpp20_input_iterator>>);
>   static_assert(std::ranges::forward_range<test_range<ForwardProxyIterator>>);
>   static_assert(!std::ranges::__nothrow_forward_range<test_range<ForwardProxyIterator>>);
>   
>   constexpr bool forward_subsumes_input(std::ranges::__nothrow_forward_range auto&&) {
>     return true;
>   }
>   constexpr bool forward_subsumes_input(std::ranges::__nothrow_input_range auto&&);
>   
>   static_assert(forward_subsumes_input("foo"));
>   1 error generated.
>
> Would that be enough?

Ah, thats unfortunate, I wouldn't expect that to happen in the same place as the previous repo.  I'll see if I can find another way to repro it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119544



More information about the cfe-commits mailing list