P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::literals Namespace Reference

Functions

cstring operator""_cs (const char *str, std::size_t len)
 

Detailed Description

Let's prevent literal clashes. A user wishing to use the literal can do using namespace P4::literals, similarly as they can do using namespace std::literals for the standard once.

Function Documentation

◆ operator""_cs()

cstring P4::literals::operator""_cs ( const char * str,
std::size_t len )
inline

A user-provided literal suffix to allow creation of cstring from literals: "foo"_cs. Note that the C++ standard mandates that all user-defined literal suffixes defined outside of the standard library must start with underscore.