swift
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 
6 SWIFT_DEFINE_SEQUENCE_MIXINS(swift::misc, CPropertyIndex, CPropertyIndexList)
7 
8 namespace swift::misc
9 {
11 
13 
15  {
16  if (this->size() < 2) { return CPropertyIndexList(); }
17  CPropertyIndexList copy(*this);
18  copy.pop_front();
19  return copy;
20  }
21 
22 } // namespace swift::misc
Value object encapsulating a list of property indexes.
CPropertyIndexList()
Default constructor.
Q_REQUIRED_RESULT CPropertyIndexList copyFrontRemoved() const
List without front element, or empty list if not applicable.
size_type size() const
Returns number of elements in the sequence.
Definition: sequence.h:273
void pop_front()
Removes an element at the front of the sequence.
Definition: sequence.h:374
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