diff options
Diffstat (limited to 'Examples/test-suite/cpp20_lambda_template.i')
-rw-r--r-- | Examples/test-suite/cpp20_lambda_template.i | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Examples/test-suite/cpp20_lambda_template.i b/Examples/test-suite/cpp20_lambda_template.i new file mode 100644 index 000000000..61b59dfff --- /dev/null +++ b/Examples/test-suite/cpp20_lambda_template.i @@ -0,0 +1,16 @@ +%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> +auto templated_lambda = []<typename T>(std::vector<T> t){}; + +// 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; }; +%} |