BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
FTList< T > Class Template Reference

#include <FTList.h>

Inheritance diagram for FTList< T >:

Public Member Functions

std::vector< T >::iterator erase (typename std::vector< T >::iterator it)
std::vector< T >::iterator erase (typename std::vector< T >::const_iterator it)

Detailed Description

template<typename T>
class FTList< T >

Definition at line 6 of file FTList.h.

Member Function Documentation

◆ erase() [1/2]

template<typename T>
std::vector< T >::iterator FTList< T >::erase ( typename std::vector< T >::const_iterator it)
inline

Definition at line 29 of file FTList.h.

29 {
30
31 if ( it < this->begin() || it > this->end() )
32 { throw std::runtime_error( "list::erase: iterator out of range" ); }
33
34 if ( it == this->end() - 1 )
35 {
37 return this->end();
38 }
39
40 T lastElem = std::move( this->back() );
42
43 *it = std::move( lastElem );
44
45 return it;
46 }
Definition FTList.h:6

◆ erase() [2/2]

template<typename T>
std::vector< T >::iterator FTList< T >::erase ( typename std::vector< T >::iterator it)
inline

Definition at line 10 of file FTList.h.

10 {
11
12 if ( it < this->begin() || it > this->end() )
13 { throw std::runtime_error( "list::erase: iterator out of range" ); }
14
15 if ( it == this->end() - 1 )
16 {
18 return this->end();
19 }
20
21 T lastElem = std::move( this->back() );
23
24 *it = std::move( lastElem );
25
26 return it;
27 }

Referenced by FTSuperLayer::mkSegmentList(), FTTrack::r_phi3Fit(), FTTrack::r_phiFit(), and FTTrack::s_zFit().


The documentation for this class was generated from the following file: