FairRoot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
cxx11-test-initializer_list.cpp
Go to the documentation of this file.
1
#include <vector>
2
3
class
seq
{
4
public
:
5
seq
(std::initializer_list<int> list);
6
7
int
length
()
const
;
8
private
:
9
std::vector<int> m_v;
10
};
11
12
seq::seq
(std::initializer_list<int> list)
13
: m_v(list)
14
{
15
}
16
17
int
seq::length
()
const
18
{
19
return
m_v.size();
20
}
21
22
int
main
(
void
)
23
{
24
seq
a = {18, 20, 2, 0, 4, 7};
25
26
return
(a.
length
() == 6) ? 0 : 1;
27
}
seq::length
int length() const
Definition:
cxx11-test-initializer_list.cpp:17
seq
Definition:
cxx11-test-initializer_list.cpp:3
main
int main(void)
Definition:
cxx11-test-__func__.cpp:1
seq::seq
seq(std::initializer_list< int > list)
Definition:
cxx11-test-initializer_list.cpp:12
FairRoot
cmake
checks
cxx11-test-initializer_list.cpp
Generated on Mon Mar 8 2021 12:14:05 for FairRoot by
1.8.5