The third episode of the QStringView Diaries blog series is out, in which Qt developer Marc Mutz describes the ongoing work in implementing a string-view for QString data.
QStringView Diaries: Masters Of The Overloads
by Marc Mutz
From the article:
The last blog post in this series described how to use string-views. This post is about how to design one. In particular, it’s about
QStringView
‘s constructors. They evolved through a rapid succession of changes. These changes either fixed ambiguities betweenQString
andQStringView
overloads, or improved performance. And they all have the same solution:std::enable_if
, the Swiss Army Knife for overload control.This post will take you from where we naïvely started to where we made the impossible possible: overloading a function for arrays and pointers.
In case you missed them, here are the first two instalments:
QStringView Diaries: The Eagle Has Landed
QStringView Diaries: Advances in QStringLiteral
Add a Comment
Comments are closed.