[all-commits] [llvm/llvm-project] fe958b: [libc++] Quick fix to remove a narrowing conversio...

Konstantin Varlamov via All-commits all-commits at lists.llvm.org
Wed Jan 12 01:50:09 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe958b140ab37acf316f5b98318e75ba2119d5a2
      https://github.com/llvm/llvm-project/commit/fe958b140ab37acf316f5b98318e75ba2119d5a2
  Author: Konstantin Varlamov <varconst at apple.com>
  Date:   2022-01-12 (Wed, 12 Jan 2022)

  Changed paths:
    M libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp

  Log Message:
  -----------
  [libc++] Quick fix to remove a narrowing conversion from the in_out_result test.

This needs a proper solution in a follow-up. The issue is that the
Standard defines conversions between `in_out_result` classes with
different template types as just `return {in, out};`. Because the
expression uses list initialization, it will fail to compile if the
conversion happens to be narrowing -- which is probably unintended.

Surprisingly, this error wasn't caught by the CI.

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




More information about the All-commits mailing list