[libcxx-commits] [PATCH] D116023: [libc++][ranges] Implement `uninitialized_copy{, _n}` and `uninitialized_move{, _n}`.

Mikael Holmén via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 11 21:41:08 PST 2022


uabelho added a comment.

In D116023#3236465 <https://reviews.llvm.org/D116023#3236465>, @vvereschaka wrote:

> @var-const, @gulfem
>
> The `libc++::in_out_result.pass.cpp` test gets failed to build with the following error:

I see this error too in our downstream tests:

  In file included from /repo/uabelho/master-github/libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp:19:
  In file included from /repo/uabelho/master-github/llvm/build-all-builtins/include/c++/v1/algorithm:659:
  In file included from /repo/uabelho/master-github/llvm/build-all-builtins/include/c++/v1/functional:506:
  In file included from /repo/uabelho/master-github/llvm/build-all-builtins/include/c++/v1/__functional/function.h:24:
  In file included from /repo/uabelho/master-github/llvm/build-all-builtins/include/c++/v1/memory:793:
  In file included from /repo/uabelho/master-github/llvm/build-all-builtins/include/c++/v1/__memory/ranges_uninitialized_algorithms.h:13:
  /repo/uabelho/master-github/llvm/build-all-builtins/include/c++/v1/__algorithm/in_out_result.h:36:13: error: non-constant-expression cannot be narrowed from type 'int' to 'double' in initializer list [-Wc++11-narrowing]
      return {in, out};
              ^~
  /repo/uabelho/master-github/libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp:49:50: note: in instantiation of function template specialization 'std::ranges::in_out_result<int, bool>::operator in_out_result<double, char>' requested here
      std::ranges::in_out_result<double, char> y = x;
                                                   ^
  /repo/uabelho/master-github/llvm/build-all-builtins/include/c++/v1/__algorithm/in_out_result.h:36:13: note: insert an explicit cast to silence this issue
      return {in, out};
              ^~
              static_cast<double>( )
  1 error generated.
  
  error: command failed with exit status: 1

I'm on RHEL7 compiling with clang 8.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116023



More information about the libcxx-commits mailing list