/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/cpp20_lambda_template.i
19 строк
551 B
William S Fulton
C++20 lambdas: accept prefix and trailing form with return type requires-clauses
13 май 2026, 01:04
13 май 2026, 01:04
3fc35e0
Код
Авторство
О чём код?
%module cpp20_lambda_template // We just want to test that SWIG doesn't choke parsing this so suppress: // Warning 340: Lambda expressions and closures are not fully supported yet. %warnfilter(SWIGWARN_CPP11_LAMBDA); %include <std_vector.i> %inline %{ #include <vector> #include <numeric> auto templated_lambda_sum = []<typename T>(std::vector<T> v) { return std::reduce(v.begin(), v.end()); }; // Regression test for parsing bug fixed in SWIG 4.2.0 (#2630) auto y = []<bool X = 1>=2> { return 1; }; auto z = []<bool X = 1<=2> { return 1; }; %}