@@ -50,6 +50,13 @@ namespace pcs // i.e. "pythonic c++ strings"
5050 using CppString = CppStringT<char >; // !< Specialization of basic class with template argument 'char'
5151 using CppWString = CppStringT<wchar_t >; // !< Specialization of basic class with template argument 'wchar_t'
5252
53+ // litteral operators
54+ #pragma warning(disable: 4455)
55+ inline const CppString operator " " cs(const char * str, std::size_t len); // !< Forms a CppString literal.
56+ inline const CppString operator " " csv(const char * str, std::size_t len); // !< Forms a CppString view literal.
57+ /* inline const CppWString operator""cs(const wchar_t* str, std::size_t len); //!< Forms a CppWString literal.
58+ inline const CppWString operator""csv(const wchar_t* str, std::size_t len); //!< Forms a CppWString view literal. */
59+
5360 // chars classifications -- not to be directly called, see respective specializations at the very end of this module.
5461 template <class CharT >
5562 inline const bool is_alpha (const CharT ch) noexcept ; // !< Returns true if character ch is alphabetic, or false otherwise.
@@ -1431,6 +1438,31 @@ namespace pcs // i.e. "pythonic c++ strings"
14311438 };
14321439
14331440
1441+ // ===== litteral operators ============================
1442+ /* * \brief Forms a CppString literal. */
1443+ inline const CppString operator " " cs(const char * str, std::size_t len)
1444+ {
1445+ return CppString (CppString::MyBaseClass (str, len));
1446+ }
1447+
1448+ /* * \brief Forms a CppString view literal. */
1449+ inline const CppString operator " " csv(const char * str, std::size_t len)
1450+ {
1451+ return CppString (CppString::MyStringView (str, len));
1452+ }
1453+
1454+ /*
1455+ inline const CppWString operator""cs(const wchar_t* str, std::size_t len)
1456+ {
1457+ return CppWString(CppWString::MyBaseClass(str, len));
1458+ }
1459+
1460+ inline const CppWString operator""csv(const wchar_t* str, std::size_t len)
1461+ {
1462+ return CppWString(CppWString::MyStringView(str, len));
1463+ }
1464+ */
1465+
14341466
14351467 // ===== templated chars classes ===========================
14361468 // --- is_alpha() ------------------------------------------
0 commit comments