Add enum types to what is captured by value by default

As it turns out, enums can be used to declare bitfields, and we
cannot form a reference to a bitfield in the cpature. Thus, we add
`std::is_enum` as a criteria to the default for `capture_by_value`,
so that enum-based bitfields are also captured by value and thus
decomposable.

Closes #3001
This commit is contained in:
Martin Hořeňovský
2025-07-29 23:51:13 +02:00
parent a1c7ee115f
commit ccabd4de89
20 changed files with 164 additions and 29 deletions

View File

@@ -1719,6 +1719,6 @@ due to unexpected exception with message:
Why would you throw a std::string?
===============================================================================
test cases: 431 | 331 passed | 76 failed | 7 skipped | 17 failed as expected
assertions: 2267 | 2090 passed | 136 failed | 41 failed as expected
test cases: 432 | 332 passed | 76 failed | 7 skipped | 17 failed as expected
assertions: 2269 | 2092 passed | 136 failed | 41 failed as expected