[all-commits] [llvm/llvm-project] 901a22: [libc++] Make std::bind constexpr-friendly
Louis Dionne via All-commits
all-commits at lists.llvm.org
Fri Apr 28 07:01:11 PDT 2023
Branch: refs/heads/phabricator/diff/517624
Home: https://github.com/llvm/llvm-project
Commit: 901a22b810784ff09c36ff9d69a3edb3547c6c08
https://github.com/llvm/llvm-project/commit/901a22b810784ff09c36ff9d69a3edb3547c6c08
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2023-04-27 (Thu, 27 Apr 2023)
Changed paths:
M libcxx/include/__functional/bind.h
M libcxx/include/__functional/invoke.h
A libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141.pass.cpp
R libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp
M libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_int_0.pass.cpp
M libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
M libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_rvalue.pass.cpp
M libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp
Log Message:
-----------
[libc++] Make std::bind constexpr-friendly
std::bind is supposed to be constexpr-friendly since C++20 and it was
marked as such in our synopsis. However, the tests were not actually
testing any of it and as it happens, std::bind was not really constexpr
friendly. This fixes the issue and makes sure that at least some of the
tests are running in constexpr mode.
Some tests for std::bind check functions that return void, and those
use global variables. These tests haven't been made constexpr-friendly,
however the coverage added by this patch should be sufficient to get
decent confidence.
Differential Revision: https://reviews.llvm.org/D149295
More information about the All-commits
mailing list