summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-11-10 15:42:26 +0200
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-11-23 16:04:33 +0200
commit06242bc6f47b25c19f91c76897ada39cd425015f (patch)
treec94597697a59bc70e92f3f63b1e1d77a8dc60d81 /docs/markdown/snippets
parentc52e6c92b08d28048047fa5642f16530bc81c5d7 (diff)
downloadmeson-06242bc6f47b25c19f91c76897ada39cd425015f.tar.gz
Add documentation for import std.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/istd.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/markdown/snippets/istd.md b/docs/markdown/snippets/istd.md
new file mode 100644
index 000000000..6b92d114a
--- /dev/null
+++ b/docs/markdown/snippets/istd.md
@@ -0,0 +1,19 @@
+## Experimental C++ import std support
+
+**Note**: this feature is experimental and not guaranteed to be
+ backwards compatible or even exist at all in future Meson releases.
+
+Meson now supports `import std`, a new, modular way of using the C++
+standard library. This support is enabled with the new `cpp_importstd`
+option. It defaults to `false`, but you can set it to `true` either
+globally or per-target using `override_options` in the usual way.
+
+The implementation has many limitations. The biggest one is that the
+same module file is used on _all_ targets. That means you can not mix
+multiple different C++ standards versions as the compiled module file
+can only be used with the same compiler options as were used to build
+it. This feature only works with the Ninja backend.
+
+As `import std` is a major new feature in compilers, expect to
+encounter toolchain issues when using it. For an example [see
+here](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122614).