Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

33 lines
897 B
Plaintext

== Why is this an issue?
Cumulatively, saved keystrokes can add up to a lot of saved time. Or at least it can feel that way. So the difference between using ``++L#macro_arg++`` and ``++L###macro_arg++`` to create a wide string literal may seem perfectly justified because MSVC yields the same result for each. But if you ever need to switch to another compiler, that saved time - and then some - will be lost. So it's best to use the cross-compiler standard from the start.
=== Noncompliant code example
[source,cpp]
----
#define MY_WIDE_CONSTANT_MAP(x) my_wide_constant_string_map[x] = L#x;
----
=== Compliant solution
[source,cpp]
----
#define MY_WIDE_CONSTANT_MAP(x) my_wide_constant_string_map[x] = L###x;
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Use "L###xxx" instead.
endif::env-github,rspecator-view[]