[all-commits] [llvm/llvm-project] 34a438: [libc++] Make std::exp constexpr for float and dou...

Muhammad Bassiouni via All-commits all-commits at lists.llvm.org
Fri Sep 18 10:19:57 PDT 2026


  Branch: refs/heads/users/bassiounix/libcxx-constexpr-exp
  Home:   https://github.com/llvm/llvm-project
  Commit: 34a4380f2a3984642032c4de9e51d605dbc38654
      https://github.com/llvm/llvm-project/commit/34a4380f2a3984642032c4de9e51d605dbc38654
  Author: bassiounix <muhammad.m.bassiouni at gmail.com>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M libcxx/include/__math/exponential_functions.h
    M libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp

  Log Message:
  -----------
  [libc++] Make std::exp constexpr for float and double since C++23

Now that __builtin_exp and __builtin_expf are constant-evaluable in
clang (#199808), mark libc++'s float, double, and integral-promoting
overloads of __math::exp as _LIBCPP_CONSTEXPR_SINCE_CXX23. The long
double overload stays non-constexpr because __builtin_expl is not
constant-evaluable yet.

Add constexpr coverage for std::exp and std::expf to the clang-specific
constexpr <cmath> test.

Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list