aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2008-07-03 09:42:30 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2008-07-03 09:42:30 +0000
commitd07660ccf3063d1155df32ce320f101bafca04a2 (patch)
tree9f20668582a612716e9165420b1090d7447dfb85
parent1466cf1a6b43180972c82a4bef227f1714a2110f (diff)
downloadgcc-d07660ccf3063d1155df32ce320f101bafca04a2.zip
gcc-d07660ccf3063d1155df32ce320f101bafca04a2.tar.gz
gcc-d07660ccf3063d1155df32ce320f101bafca04a2.tar.bz2
Makefile.am: Add initializer_list to the headers.
2008-07-03 Paolo Carlini <paolo.carlini@oracle.com> * libsupc++/Makefile.am: Add initializer_list to the headers. * libsupc++/Makefile.in: Regenerate. * libsupc++/initializer_list: Minor cosmetic changes. From-SVN: r137409
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/libsupc++/Makefile.am5
-rw-r--r--libstdc++-v3/libsupc++/Makefile.in3
-rw-r--r--libstdc++-v3/libsupc++/initializer_list37
4 files changed, 33 insertions, 19 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6f0b415..6459c75 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * libsupc++/Makefile.am: Add initializer_list to the headers.
+ * libsupc++/Makefile.in: Regenerate.
+
+ * libsupc++/initializer_list: Minor cosmetic changes.
+
2008-07-02 Jason Merrill <jason@redhat.com>
* libsupc++/initializer_list: Uglify and wrap in
diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am
index 366efa2..c0412f0 100644
--- a/libstdc++-v3/libsupc++/Makefile.am
+++ b/libstdc++-v3/libsupc++/Makefile.am
@@ -1,6 +1,6 @@
## Makefile for the GNU C++ Support library.
##
-## Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007
+## Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
## Free Software Foundation, Inc.
##
## Process this file with automake to produce Makefile.in.
@@ -33,7 +33,8 @@ noinst_LTLIBRARIES = libsupc++convenience.la
headers = \
- exception new typeinfo cxxabi.h cxxabi-forced.h exception_defines.h
+ exception new typeinfo cxxabi.h cxxabi-forced.h exception_defines.h \
+ initializer_list
if GLIBCXX_HOSTED
c_sources = \
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index 76e34de..0f7cf8c 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -354,7 +354,8 @@ toolexeclib_LTLIBRARIES = libsupc++.la
# 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
noinst_LTLIBRARIES = libsupc++convenience.la
headers = \
- exception new typeinfo cxxabi.h cxxabi-forced.h exception_defines.h
+ exception new typeinfo cxxabi.h cxxabi-forced.h exception_defines.h \
+ initializer_list
@GLIBCXX_HOSTED_TRUE@c_sources = \
@GLIBCXX_HOSTED_TRUE@ cp-demangle.c
diff --git a/libstdc++-v3/libsupc++/initializer_list b/libstdc++-v3/libsupc++/initializer_list
index 3c81bb6..18fb15b 100644
--- a/libstdc++-v3/libsupc++/initializer_list
+++ b/libstdc++-v3/libsupc++/initializer_list
@@ -40,25 +40,30 @@
namespace std
{
template<class _E>
- class initializer_list
- {
- const _E* __array;
- size_t __len;
+ class initializer_list
+ {
+ const _E* __array;
+ size_t __len;
- // The compiler can call a private constructor.
- initializer_list(const _E* __a, size_t __l)
+ // The compiler can call a private constructor.
+ initializer_list(const _E* __a, size_t __l)
: __array(__a), __len(__l) { }
- public:
- initializer_list()
- : __array(NULL), __len(0) {}
-
- size_t size() const // number of elements
- { return __len; }
- const _E* begin() const // first element
- { return __array; }
- const _E* end() const // one past the last element
- { return begin() + size(); }
+ public:
+ initializer_list()
+ : __array(NULL), __len(0) { }
+
+ // Number of elements.
+ size_t size() const
+ { return __len; }
+
+ // First element.
+ const _E* begin() const
+ { return __array; }
+
+ // One past the last element.
+ const _E* end() const
+ { return begin() + size(); }
};
}