String concatenation with string literal and non string literal

69 views Asked by At

I want to understand what the following declaration means:

constexpr auto type = u"bluetooth-opp-transfer-complete"_ns;

I know constexpr evaluates things at compile time, but what does u mean here? Also will _ns gets appended here? if yes then how cause _ns is not defined anywhere.

1

There are 1 answers

0
Pzc On

The u makes it a UTF-16 string literal. For more options see cppreference, for example.