diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-09 11:59:12 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-09 12:01:26 +0100 |
| commit | a8a55bc93e06cd8f75f7d397c013f7a312ea29a4 (patch) | |
| tree | 39969558bed8fcff1c2014fda0d3674b794f6970 /64x0/cc2/regression-tests/mixed-function-expression-with-pointer-capture.cpp2 | |
| parent | b16ae0960b396c8c20e4711eabfe4b826a039d7e (diff) | |
64asm/64ld: MP-UX specialized 64x0 assembler.
Refer to 64x0 the X64000 specific toolchain.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to '64x0/cc2/regression-tests/mixed-function-expression-with-pointer-capture.cpp2')
| -rw-r--r-- | 64x0/cc2/regression-tests/mixed-function-expression-with-pointer-capture.cpp2 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/64x0/cc2/regression-tests/mixed-function-expression-with-pointer-capture.cpp2 b/64x0/cc2/regression-tests/mixed-function-expression-with-pointer-capture.cpp2 new file mode 100644 index 0000000..3d72d7a --- /dev/null +++ b/64x0/cc2/regression-tests/mixed-function-expression-with-pointer-capture.cpp2 @@ -0,0 +1,22 @@ +#include <vector> +#include <ranges> +#include <string> +#include <span> +#include <algorithm> +#include <iostream> + +main: () -> int = { + vec: std::vector<std::string> + = ("hello", "2023"); + + y: std::string = "\n"; + std::ranges::for_each( vec, :(x) = + std::cout << y&$*.c_str() << x << y&$* + ); + + callback := :(inout x) = x += "-ish"; + std::ranges::for_each( vec, callback ); + + for vec do (str) + std::cout << str << "\n"; +} |
