@@ -54,10 +54,10 @@ namespace pcs // i.e. "pythonic c++ strings"
5454
5555 // litteral operators
5656#pragma warning(disable: 4455)
57- inline const CppString operator " " cs(const char * str, std::size_t len); // !< Forms a CppString literal.
58- inline const CppString operator " " csv(const char * str, std::size_t len); // !< Forms a CppString view literal.
59- inline const CppWString operator " " cs(const wchar_t * str, std::size_t len); // !< Forms a CppWString literal.
60- inline const CppWString operator " " csv(const wchar_t * str, std::size_t len); // !< Forms a CppWString view literal.
57+ inline CppString operator " " cs(const char * str, std::size_t len); // !< Forms a CppString literal.
58+ inline CppString operator " " csv(const char * str, std::size_t len); // !< Forms a CppString view literal.
59+ inline CppWString operator " " cs(const wchar_t * str, std::size_t len); // !< Forms a CppWString literal.
60+ inline CppWString operator " " csv(const wchar_t * str, std::size_t len); // !< Forms a CppWString view literal.
6161
6262 // chars classifications -- not to be directly called, see respective specializations at the very end of this module.
6363 template <class CharT >
@@ -1016,12 +1016,12 @@ namespace pcs // i.e. "pythonic c++ strings"
10161016 * The separator between elements is the string to which this method is applied.
10171017 */
10181018 template <const std::size_t N>
1019- inline CppStringT join (const std::array<CppStringT, N>& strs) const noexcept
1019+ CppStringT join (const std::array<CppStringT, N>& strs) const noexcept
10201020 {
1021- auto str_it = strs.cbegin ();
1022- if (str_it == strs.cend ())
1021+ if (strs.empty ())
10231022 return CppStringT ();
10241023
1024+ auto str_it = strs.cbegin ();
10251025 CppStringT res{ *str_it++ };
10261026 while (str_it != strs.cend ())
10271027 res += *this + *str_it++;
@@ -1034,10 +1034,10 @@ namespace pcs // i.e. "pythonic c++ strings"
10341034 */
10351035 CppStringT join (const std::vector<CppStringT>& strs) const noexcept
10361036 {
1037- auto str_it = strs.cbegin ();
1038- if (str_it == strs.cend ())
1037+ if (strs.empty ())
10391038 return CppStringT ();
10401039
1040+ auto str_it = strs.cbegin ();
10411041 CppStringT res{ *str_it++ };
10421042 while (str_it != strs.cend ())
10431043 res += *this + *str_it++;
@@ -1056,7 +1056,7 @@ namespace pcs // i.e. "pythonic c++ strings"
10561056 }
10571057
10581058 /* * \brief Single parameter signature. Returns a copy of this parameter. */
1059- inline const CppStringT join (const CppStringT& s) const noexcept
1059+ inline CppStringT join (const CppStringT& s) const noexcept
10601060 {
10611061 return s;
10621062 }
@@ -1928,26 +1928,26 @@ namespace pcs // i.e. "pythonic c++ strings"
19281928
19291929 // ===== litteral operators ============================
19301930 /* * \brief Forms a CppString literal. */
1931- inline const CppString operator " " cs(const char * str, std::size_t len)
1931+ inline CppString operator " " cs(const char * str, std::size_t len)
19321932 {
19331933 return CppString (CppString::MyBaseClass (str, len));
19341934 }
19351935
19361936 /* * \brief Forms a CppString view literal. */
1937- inline const CppString operator " " csv(const char * str, std::size_t len)
1937+ inline CppString operator " " csv(const char * str, std::size_t len)
19381938 {
19391939 // return CppString(CppString::MyStringView(str, len));
19401940 return CppString (str, len);
19411941 }
19421942
19431943 /* * \brief Forms a CppWString literal. */
1944- inline const CppWString operator " " cs(const wchar_t * str, std::size_t len)
1944+ inline CppWString operator " " cs(const wchar_t * str, std::size_t len)
19451945 {
19461946 return CppWString (CppWString::MyBaseClass (str, len));
19471947 }
19481948
19491949 /* * \brief Forms a CppWString view literal. */
1950- inline const CppWString operator " " csv(const wchar_t * str, std::size_t len)
1950+ inline CppWString operator " " csv(const wchar_t * str, std::size_t len)
19511951 {
19521952 // return CppWString(CppWString::MyStringView(str, len));
19531953 return CppWString (str, len);
0 commit comments