swift
Loading...
Searching...
No Matches
propertyindexlist.cpp
1// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6SWIFT_DEFINE_SEQUENCE_MIXINS(swift::misc, CPropertyIndex, CPropertyIndexList)
7
8namespace swift::misc
9{
11
13 {
14 if (this->size() < 2)
15 {
16 return {};
17 }
18 CPropertyIndexList copy(*this);
19 copy.pop_front();
20 return copy;
21 }
22
23} // namespace swift::misc
CSequence()=default
Default constructor.
Q_REQUIRED_RESULT CPropertyIndexList copyFrontRemoved() const
List without front element, or empty list if not applicable.
CPropertyIndexList()=default
Default constructor.
void pop_front()
Removes an element at the front of the sequence.
Definition sequence.h:383
Free functions in swift::misc.
#define SWIFT_DEFINE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template definition of mixins for a CSequence subclass.
Definition sequence.h:63