fennec
Loading...
Searching...
No Matches
initializer_list.h
Go to the documentation of this file.
1
// =====================================================================================================================
2
// fennec, a free and open source game engine
3
// Copyright © 2025 Medusa Slockbower
4
//
5
// This program is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program. If not, see <https://www.gnu.org/licenses/>.
17
// =====================================================================================================================
18
30
31
#ifndef FENNEC_CONTAINERS_INITIALIZER_LIST_H
32
#define FENNEC_CONTAINERS_INITIALIZER_LIST_H
33
34
// Since initializer lists are completely intertwined with the compiler, and this is part of the c++ standard
35
// (specifically standard, and not the standard template library) we need to use std::initializer_list.
36
// We can at least alias it for proper naming conventions.
37
38
#include <initializer_list>
39
40
namespace
fennec
41
{
42
43
using
std::initializer_list;
44
45
template
<
typename
T>
46
constexpr
const
T* begin(initializer_list<T> inls)
noexcept
{
47
return
inls.begin();
48
}
49
50
template
<
typename
T>
51
constexpr
const
T* end(initializer_list<T> inls)
noexcept
{
52
return
inls.end();
53
}
54
55
}
56
57
#endif
// FENNEC_CONTAINERS_INITIALIZER_LIST_H
include
fennec
containers
initializer_list.h
Generated by
1.9.8