forked from qt-creator/qt-creator
Utils: Add iterator constructors to small string
Change-Id: Ib8fcacd5dc520842cf5cee73ea21c021221158ca Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -127,6 +127,16 @@ public:
|
||||
: SmallString(SmallString::fromQString(qString))
|
||||
{}
|
||||
|
||||
template<typename BeginIterator,
|
||||
typename EndIterator,
|
||||
typename = typename std::enable_if<std::is_same<BeginIterator, EndIterator>::value>::type
|
||||
>
|
||||
SmallString(BeginIterator begin, EndIterator end)
|
||||
: SmallString(&(*begin), size_type(end - begin))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
~SmallString() noexcept
|
||||
{
|
||||
if (Q_UNLIKELY(hasAllocatedMemory()))
|
||||
|
||||
Reference in New Issue
Block a user