C++14 includes standard-defined literals for, amongst other things,
using namespace std::literals;
One can summarize the requirements of the [Portland] discussion as follows:
- use an inline namespace for a (group of related) UDL operator(s)
Because it easily generates conflicts, since the name is a single character. In fact, there already are two UDLs named
s: One for strings and one for seconds. The problem is that at some stage, we are forced to either use unfitting, longer suffixes, or introduce namespaces in hindsight, which are both messy options.
So it was decided that UDLs are put into inline namespaces, which allow for unambiguous
using directives (
using namespace std::literals::chrono_literals) and simple directives (
using namespace std).