** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * User‐defined literals for creating FixedString objects from string literals on the compilers that support it.
Synopsis
Declared in <folly/FixedString.h>
template<
class Char,
Char Cs...>
constexpr
BasicFixedString<Char, sizeof...(Cs)>
operator""_fs() noexcept;
Example:
using namespace folly::string_literals;
constexpr auto hello = "hello world!"_fs;
|
Note
|
This requires a GNU compiler extension (‐Wgnu‐string‐literal‐operator‐template) supported by clang and gcc, proposed for standardization in <http://www.open‐std.org/jtc1/sc22/wg21/docs/papers/2016/p0424r0.pdf>. |
For portable code, prefer the suffixes _fs4, _fs8, _fs16, _fs32,
_fs64, and _fs128 for creating instances of types FixedString<4>, FixedString<8>, FixedString<16>, etc.
Return Value
A BasicFixedString holding the characters of the literal.
Created with MrDocs