File Index Symbol Index

// initializer_list standard header (core)
#pragma once
#ifndef _INITIALIZER_LIST_
#define _INITIALIZER_LIST_
#ifndef RC_INVOKED
#include <cstddef>
_STL_DISABLE_CLANG_WARNINGS
#pragma push_macro("new")
#undef new
// CLASS TEMPLATE initializer_list
template
<
class
_Elem
>
class
initializer_list
{
// list of pointers to elements
public
:
typedef
_Elem
value_type
;
typedef
const
_Elem
&
reference
;
typedef
const
_Elem
&
const_reference
;
typedef
size_t
size_type
;
typedef
const
_Elem
*
iterator
;
typedef
const
_Elem
*
const_iterator
;
constexpr
initializer_list
()
noexcept
: _First(
nullptr
), _Last(
nullptr
) {
// empty list
}
constexpr
initializer_list
(
const
_Elem
*
_First_arg
,
const
_Elem
*
_Last_arg
)
noexcept
: _First(
_First_arg
), _Last(
_Last_arg
) {
// construct with pointers
} {
// get beginning of list
return
(
_First
); } {
// get end of list
return
(
_Last
); } {
// get length of list
return
(
static_cast
<
size_t
>(
_Last
-
_First
)); }
private
:
const
_Elem
*
_First
;
const
_Elem
*
_Last
; };
// FUNCTION TEMPLATE begin
template
<
class
_Elem
> {
// get beginning of sequence
return
(
_Ilist
.
begin
()); }
// FUNCTION TEMPLATE end
template
<
class
_Elem
> {
// get end of sequence
return
(
_Ilist
.
end
()); }
#pragma pop_macro("new")
_STL_RESTORE_CLANG_WARNINGS
/* * Copyright (c) by P.J. Plauger. All rights reserved. * Consult your license regarding permissions and restrictions. V6.50:0009 */