DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
Utils.h
Go to the documentation of this file.
1
#pragma once
2
#include <initializer_list>
3
7
template
<
class
T>
8
struct
_init_list_with_indexer
{
9
const
std::initializer_list<T>&
list
;
10
13
_init_list_with_indexer
(
const
std::initializer_list<T>& _list)
14
:
list
(_list) {
15
}
16
20
T
operator[]
(
unsigned
int
index) {
return
*(
list
.begin() + index); }
21
};
_init_list_with_indexer::_init_list_with_indexer
_init_list_with_indexer(const std::initializer_list< T > &_list)
Constructs a wrapper over the provided initializer list.
Definition
Utils.h:13
_init_list_with_indexer::operator[]
T operator[](unsigned int index)
Accesses the element at the specified index.
Definition
Utils.h:20
_init_list_with_indexer::list
const std::initializer_list< T > & list
Reference to the wrapped initializer list.
Definition
Utils.h:9
Include
System
Utils.h
Generated by
1.18.0