[all-commits] [llvm/llvm-project] 03c19e: [libc++][numeric] P0543R3: Saturation arithmetic (...

Hristo Hristov via All-commits all-commits at lists.llvm.org
Sun Jan 21 20:57:57 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03c19e91e8d8cb706b58e02d69f80caeaf7eb0f4
      https://github.com/llvm/llvm-project/commit/03c19e91e8d8cb706b58e02d69f80caeaf7eb0f4
  Author: Hristo Hristov <hristo.goshev.hristov at gmail.com>
  Date:   2024-01-22 (Mon, 22 Jan 2024)

  Changed paths:
    M libcxx/docs/FeatureTestMacroTable.rst
    M libcxx/docs/ReleaseNotes/18.rst
    M libcxx/docs/Status/Cxx2cPapers.csv
    M libcxx/include/CMakeLists.txt
    A libcxx/include/__numeric/saturation_arithmetic.h
    M libcxx/include/libcxx.imp
    M libcxx/include/module.modulemap.in
    M libcxx/include/numeric
    M libcxx/include/version
    M libcxx/modules/std/numeric.inc
    M libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.compile.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/add_sat.compile.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/add_sat.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/div_sat.assert.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/div_sat.compile.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/div_sat.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/mul_sat.compile.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/mul_sat.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.compile.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/sub_sat.compile.pass.cpp
    A libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/sub_sat.pass.cpp
    M libcxx/utils/generate_feature_test_macro_components.py

  Log Message:
  -----------
  [libc++][numeric] P0543R3: Saturation arithmetic (#77967)

Implements: https://wg21.link/P0543R3
- https://eel.is/c++draft/numeric.sat

Additional references:
- Division: https://eel.is/c++draft/expr.mul#4
- Arithmetic conversions: https://eel.is/c++draft/expr.arith.conv#1
- Clang builtins:
https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions

Depends on: https://github.com/llvm/llvm-project/pull/78086

---------

Co-authored-by: Zingam <zingam at outlook.com>
Co-authored-by: Mark de Wever <zar-rpg at xs4all.nl>




More information about the All-commits mailing list