May 2017
Intermediate to advanced
590 pages
17h 18m
English
Though user-defined literals are available from C++11, standard literal operators have been available only from C++14. The following is a list of these standard literal operators:
using namespace std::string_literals; auto s1{ "text"s }; // std::string auto s2{ L"text"s }; // std::wstring auto s3{ u"text"s }; // std::u16string auto s4{ U"text"s }; // std::u32string
using namespace std::literals::chrono_literals; // std::chrono::duration<long long> auto timer {2h + 42min + 15s};
Read now
Unlock full access