Skip to content

Commit 2f1665b

Browse files
authored
[utils] Add Doxygen comment for utils::as_const (danmar#8320)
Fix typos in Doxygen comment of splitString
1 parent 018417d commit 2f1665b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/utils.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,18 @@ static inline T* empty_if_null(T* p)
403403
}
404404

405405
/**
406-
* Split string by given sperator.
406+
* Split string by given separator.
407407
* @param str The string to split
408-
* @param sep The seperator
409-
* @return The list of seperate strings (including empty ones). The whole input string if no seperator found.
408+
* @param sep The separator
409+
* @return The list of separate strings (including empty ones). The whole input string if no separator found.
410410
*/
411411
CPPCHECKLIB std::vector<std::string> splitString(const std::string& str, char sep);
412412

413413
namespace utils {
414+
/**
415+
* Drop-in replacement for C++17's std::as_const
416+
* @param t The function forms the lvalue reference to const type of this argument.
417+
*/
414418
template<class T>
415419
constexpr typename std::add_const<T>::type & as_const(T& t) noexcept
416420
{

0 commit comments

Comments
 (0)