return cstr;
}
-/* We need this helper function because the interface of std::string::reserve
- * doesn't provide the chaining ability in the type append(). It's required
- * to concatenate string without reallocations in a way const-correct manner. */
-template <class StringT>
-static inline StringT create_n_reserve(const size_t reserve_len)
-{
- StringT ret;
- /* I would love to see reserve() returning "basic_string&" instead of "void"
- * in the standard library! */
- ret.reserve(reserve_len);
- return ret;
-}
-
/* std::strlen() isn't guaranteed to be computable at compile-time. Although
* newer GCCs actually do that, Clang doesn't. Please be aware this function
* IS NOT A DROP-IN REPLACEMENT FOR STRLEN -- it returns a different result