head	1.3;
access;
symbols
	RELENG_9_1_0_RELEASE:1.2.2.2
	RELENG_9_1:1.2.2.2.0.2
	RELENG_9_1_BP:1.2.2.2
	RELENG_9:1.2.0.2;
locks; strict;
comment	@# @;


1.3
date	2013.04.28.00.41.54;	author svnexp;	state Exp;
branches;
next	1.2;

1.2
date	2012.03.14.00.09.36;	author theraven;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2011.11.25.20.59.04;	author theraven;	state Exp;
branches;
next	;

1.2.2.1
date	2012.05.22.18.30.14;	author theraven;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2012.05.22.18.30.14;	author theraven;	state Exp;
branches;
next	1.2.2.3;

1.2.2.3
date	2013.05.11.17.01.44;	author svnexp;	state Exp;
branches;
next	1.2.2.4;

1.2.2.4
date	2014.03.05.20.01.45;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249998
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@// -*- C++ -*-
//===----------------------- initializer_list -----------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_INITIALIZER_LIST
#define _LIBCPP_INITIALIZER_LIST

/*
    initializer_list synopsis

namespace std
{

template<class E>
class initializer_list
{
public:
    typedef E        value_type;
    typedef const E& reference;
    typedef const E& const_reference;
    typedef size_t   size_type;

    typedef const E* iterator;
    typedef const E* const_iterator;

    initializer_list() noexcept;

    size_t   size()  const noexcept;
    const E* begin() const noexcept;
    const E* end()   const noexcept;
};

template<class E> const E* begin(initializer_list<E> il) noexcept;
template<class E> const E* end(initializer_list<E> il) noexcept;

}  // std

*/

#include <__config>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

namespace std  // purposefully not versioned
{

#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS

template<class _Ep>
class _LIBCPP_TYPE_VIS initializer_list
{
    const _Ep* __begin_;
    size_t    __size_;

    _LIBCPP_ALWAYS_INLINE
    initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
        : __begin_(__b),
          __size_(__s)
        {}
public:
    typedef _Ep        value_type;
    typedef const _Ep& reference;
    typedef const _Ep& const_reference;
    typedef size_t    size_type;

    typedef const _Ep* iterator;
    typedef const _Ep* const_iterator;

    _LIBCPP_ALWAYS_INLINE initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}

    _LIBCPP_ALWAYS_INLINE size_t    size()  const _NOEXCEPT {return __size_;}
    _LIBCPP_ALWAYS_INLINE const _Ep* begin() const _NOEXCEPT {return __begin_;}
    _LIBCPP_ALWAYS_INLINE const _Ep* end()   const _NOEXCEPT {return __begin_ + __size_;}
};

template<class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
const _Ep*
begin(initializer_list<_Ep> __il) _NOEXCEPT
{
    return __il.begin();
}

template<class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
const _Ep*
end(initializer_list<_Ep> __il) _NOEXCEPT
{
    return __il.end();
}

#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS

}  // std

#endif  // _LIBCPP_INITIALIZER_LIST
@


1.2
log
@SVN rev 232950 on 2012-03-14 00:09:36Z by theraven

Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!

Approved by:	dim (mentor)
@
text
@d59 1
a59 1
class _LIBCPP_VISIBLE initializer_list
@


1.2.2.1
log
@file initializer_list was added on branch RELENG_9 on 2012-05-22 18:32:26 +0000
@
text
@d1 105
@


1.2.2.2
log
@SVN rev 235798 on 2012-05-22 18:30:14Z by theraven

Merged libcxxrt and libc++.  Now available for testing on 9-stable with
-stdlib=libc++.  Changes to libstdc++ not yet merged, so it is not yet possible
to mix libstdc++ and libc++ in the same program.

Merged revisions: 226702,226785,227006,227755,227983,227987,228531,228630,228761,229067,230127,232950,233098,234715-234716,234772
@
text
@a0 105
// -*- C++ -*-
//===----------------------- initializer_list -----------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_INITIALIZER_LIST
#define _LIBCPP_INITIALIZER_LIST

/*
    initializer_list synopsis

namespace std
{

template<class E>
class initializer_list
{
public:
    typedef E        value_type;
    typedef const E& reference;
    typedef const E& const_reference;
    typedef size_t   size_type;

    typedef const E* iterator;
    typedef const E* const_iterator;

    initializer_list() noexcept;

    size_t   size()  const noexcept;
    const E* begin() const noexcept;
    const E* end()   const noexcept;
};

template<class E> const E* begin(initializer_list<E> il) noexcept;
template<class E> const E* end(initializer_list<E> il) noexcept;

}  // std

*/

#include <__config>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

namespace std  // purposefully not versioned
{

#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS

template<class _Ep>
class _LIBCPP_VISIBLE initializer_list
{
    const _Ep* __begin_;
    size_t    __size_;

    _LIBCPP_ALWAYS_INLINE
    initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
        : __begin_(__b),
          __size_(__s)
        {}
public:
    typedef _Ep        value_type;
    typedef const _Ep& reference;
    typedef const _Ep& const_reference;
    typedef size_t    size_type;

    typedef const _Ep* iterator;
    typedef const _Ep* const_iterator;

    _LIBCPP_ALWAYS_INLINE initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}

    _LIBCPP_ALWAYS_INLINE size_t    size()  const _NOEXCEPT {return __size_;}
    _LIBCPP_ALWAYS_INLINE const _Ep* begin() const _NOEXCEPT {return __begin_;}
    _LIBCPP_ALWAYS_INLINE const _Ep* end()   const _NOEXCEPT {return __begin_ + __size_;}
};

template<class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
const _Ep*
begin(initializer_list<_Ep> __il) _NOEXCEPT
{
    return __il.begin();
}

template<class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
const _Ep*
end(initializer_list<_Ep> __il) _NOEXCEPT
{
    return __il.end();
}

#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS

}  // std

#endif  // _LIBCPP_INITIALIZER_LIST
@


1.2.2.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250514
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d59 1
a59 1
class _LIBCPP_TYPE_VIS initializer_list
@


1.2.2.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/262801
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d32 1
a32 1
    initializer_list() noexcept; // constexpr in C++14
d34 3
a36 3
    size_t   size()  const noexcept; // constexpr in C++14
    const E* begin() const noexcept; // constexpr in C++14
    const E* end()   const noexcept; // constexpr in C++14
d39 2
a40 2
template<class E> const E* begin(initializer_list<E> il) noexcept; // constexpr in C++14
template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in C++14
d59 1
a59 1
class _LIBCPP_TYPE_VIS_ONLY initializer_list
a64 1
    _LIBCPP_CONSTEXPR_AFTER_CXX11
d78 1
a78 3
    _LIBCPP_ALWAYS_INLINE
    _LIBCPP_CONSTEXPR_AFTER_CXX11
    initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}
d80 3
a82 11
    _LIBCPP_ALWAYS_INLINE
    _LIBCPP_CONSTEXPR_AFTER_CXX11
    size_t    size()  const _NOEXCEPT {return __size_;}
    
    _LIBCPP_ALWAYS_INLINE
    _LIBCPP_CONSTEXPR_AFTER_CXX11
    const _Ep* begin() const _NOEXCEPT {return __begin_;}

    _LIBCPP_ALWAYS_INLINE
    _LIBCPP_CONSTEXPR_AFTER_CXX11
    const _Ep* end()   const _NOEXCEPT {return __begin_ + __size_;}
a86 1
_LIBCPP_CONSTEXPR_AFTER_CXX11
a94 1
_LIBCPP_CONSTEXPR_AFTER_CXX11
@


1.1
log
@SVN rev 227983 on 2011-11-25 20:59:04Z by theraven

Import libc++ / libcxxrt into base.  Not build by default yet (use
MK_LIBCPLUSPLUS=yes to enable).  This is a work-in-progress.  It works for
me, but is not guaranteed to work for anyone else and may eat your dog.

To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags.

Bug reports welcome, bug fixes even more welcome...

Approved by:	dim (mentor)
@
text
@d58 1
a58 1
template<class _E>
d61 1
a61 1
    const _E* __begin_;
d65 1
a65 1
    initializer_list(const _E* __b, size_t __s) _NOEXCEPT
d70 3
a72 3
    typedef _E        value_type;
    typedef const _E& reference;
    typedef const _E& const_reference;
d75 2
a76 2
    typedef const _E* iterator;
    typedef const _E* const_iterator;
d81 2
a82 2
    _LIBCPP_ALWAYS_INLINE const _E* begin() const _NOEXCEPT {return __begin_;}
    _LIBCPP_ALWAYS_INLINE const _E* end()   const _NOEXCEPT {return __begin_ + __size_;}
d85 1
a85 1
template<class _E>
d87 2
a88 2
const _E*
begin(initializer_list<_E> __il) _NOEXCEPT
d93 1
a93 1
template<class _E>
d95 2
a96 2
const _E*
end(initializer_list<_E> __il) _NOEXCEPT
@

