== Why is this an issue?

While in C, and derived languages, it is legal to concatenate two literals by putting them next to each other, this is only justified  in a few cases. For instance if one is a macro or if the layout makes it clearer.


=== Noncompliant code example

[source,cpp]
----
const char * v1 = "a""b";      // Noncompliant; same as "ab"
const char * v2 = "a\n" "b\n"; // Noncompliant
----


=== Compliant solution

[source,cpp]
----
const char * v1 = "ab"
const char * v2 = "a\n"
                  "b\n";
----


=== Exceptions

[source,cpp]
----
const char * v3 = "a" /* comment */ "b";

#define _s "b"
const char * v4 = "a" _s; // concatenation with macro ignored
----



ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Merge this literal with previous.


=== Highlighting

The second literal


'''
== Comments And Links
(visible only on this page)

=== on 5 Oct 2016, 10:03:37 Alban Auzeill wrote:
Not possible to highlight the two literals, we just highlight the second one.

I also add the following case as none compliant: ``++"a"  "b"++``

endif::env-github,rspecator-view[]
