Mirror von
https://github.com/tkuschel/bees.git
synchronisiert 2026-05-07 20:49:38 +02:00
lib: fix non-local lambda expression cannot have a capture-default
We got away with this because GCC 4.8 (and apparently every GCC prior to 9) didn't notice or care, and because there is nothing referenced inside the lambda function body that isn't accessible from any other kind of function body (i.e. the capture wasn't needed at all). GCC 9 now enforces what the C++ standard said all along: there is no need to allow capture-default in this case, so it is not. Fix by removing the offending capture-default. Fixes: https://github.com/Zygo/bees/issues/112 Signed-off-by: Zygo Blaxell <bees@furryterror.org>
Dieser Commit ist enthalten in:
committet von
Zygo Blaxell
Ursprung
87e8a21c41
Commit
228747a8f8
+1
-1
@@ -32,7 +32,7 @@ namespace crucible {
|
||||
|
||||
// FIXME: could probably avoid some of these levels of indirection
|
||||
static
|
||||
function<void(string s)> current_catch_explainer = [&](string s) {
|
||||
function<void(string s)> current_catch_explainer = [](string s) {
|
||||
cerr << s << endl;
|
||||
};
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren