For nest-cam v350 release

Bug: 259322762
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/README.txt b/arm-2011.03/arm-none-linux-gnueabi/bin/README.txt
new file mode 100644
index 0000000..acf5da0
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/README.txt
@@ -0,0 +1,4 @@
+The executables in this directory are for internal use by the compiler
+and may not operate correctly when used directly.  This directory
+should not be placed on your PATH.  Instead, you should use the
+executables in ../../bin/ and place that directory on your PATH.
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/ar b/arm-2011.03/arm-none-linux-gnueabi/bin/ar
new file mode 100755
index 0000000..4afa50c
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/ar
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/as b/arm-2011.03/arm-none-linux-gnueabi/bin/as
new file mode 100755
index 0000000..5c13fd6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/as
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/c++ b/arm-2011.03/arm-none-linux-gnueabi/bin/c++
new file mode 100755
index 0000000..225bb03
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/c++
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/g++ b/arm-2011.03/arm-none-linux-gnueabi/bin/g++
new file mode 100755
index 0000000..225bb03
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/g++
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/gcc b/arm-2011.03/arm-none-linux-gnueabi/bin/gcc
new file mode 100755
index 0000000..0f02571
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/gcc
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/ld b/arm-2011.03/arm-none-linux-gnueabi/bin/ld
new file mode 100755
index 0000000..c640e94
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/ld
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/nm b/arm-2011.03/arm-none-linux-gnueabi/bin/nm
new file mode 100755
index 0000000..f01111c
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/nm
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/objcopy b/arm-2011.03/arm-none-linux-gnueabi/bin/objcopy
new file mode 100755
index 0000000..9d78d4b
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/objcopy
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/objdump b/arm-2011.03/arm-none-linux-gnueabi/bin/objdump
new file mode 100755
index 0000000..517314f
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/objdump
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/ranlib b/arm-2011.03/arm-none-linux-gnueabi/bin/ranlib
new file mode 100755
index 0000000..b868758
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/ranlib
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/bin/strip b/arm-2011.03/arm-none-linux-gnueabi/bin/strip
new file mode 100755
index 0000000..ba56494
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/bin/strip
Binary files differ
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/algorithm b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/algorithm
new file mode 100644
index 0000000..7449ec3
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/algorithm
@@ -0,0 +1,69 @@
+// <algorithm> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file include/algorithm
+ *  This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_ALGORITHM
+#define _GLIBCXX_ALGORITHM 1
+
+#pragma GCC system_header
+
+#include <utility> // UK-300.
+#include <bits/stl_algobase.h>
+#include <bits/stl_algo.h>
+
+#ifdef _GLIBCXX_PARALLEL
+# include <parallel/algorithm>
+#endif
+
+#endif /* _GLIBCXX_ALGORITHM */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/atomic_word.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/atomic_word.h
new file mode 100644
index 0000000..f2bdbbc
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/atomic_word.h
@@ -0,0 +1,47 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file atomic_word.h
+ *  This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H	1
+
+typedef int _Atomic_word;
+
+// Define these two macros using the appropriate memory barrier for the target.
+// The commented out versions below are the defaults.
+// See ia64/atomic_word.h for an alternative approach.
+
+// This one prevents loads from being hoisted across the barrier;
+// in other words, this is a Load-Load acquire barrier.
+// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.  
+// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
+
+// This one prevents stores from being sunk across the barrier; in other
+// words, a Store-Store release barrier.
+// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
+
+#endif 
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/basic_file.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/basic_file.h
new file mode 100644
index 0000000..7f30c4e
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/basic_file.h
@@ -0,0 +1,108 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+/** @file basic_file.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_BASIC_FILE_STDIO_H
+#define _GLIBCXX_BASIC_FILE_STDIO_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/c++io.h>  // for __c_lock and __c_file
+#include <ios>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Generic declaration.
+  template<typename _CharT>
+    class __basic_file; 
+
+  // Specialization.
+  template<>
+    class __basic_file<char>
+    {
+      // Underlying data source/sink.
+      __c_file* 	_M_cfile;
+
+      // True iff we opened _M_cfile, and thus must close it ourselves.
+      bool 		_M_cfile_created;
+
+    public:
+      __basic_file(__c_lock* __lock = 0) throw ();
+
+      __basic_file* 
+      open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
+
+      __basic_file*
+      sys_open(__c_file* __file, ios_base::openmode);
+
+      __basic_file*
+      sys_open(int __fd, ios_base::openmode __mode) throw ();
+
+      __basic_file* 
+      close(); 
+
+      _GLIBCXX_PURE bool 
+      is_open() const throw ();
+
+      _GLIBCXX_PURE int 
+      fd() throw ();
+
+      _GLIBCXX_PURE __c_file*
+      file() throw ();
+
+      ~__basic_file();
+
+      streamsize 
+      xsputn(const char* __s, streamsize __n);
+
+      streamsize 
+      xsputn_2(const char* __s1, streamsize __n1,
+	       const char* __s2, streamsize __n2);
+
+      streamsize 
+      xsgetn(char* __s, streamsize __n);
+
+      streamoff
+      seekoff(streamoff __off, ios_base::seekdir __way) throw ();
+
+      int 
+      sync();
+
+      streamsize
+      showmanyc();
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif	
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++allocator.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++allocator.h
new file mode 100644
index 0000000..c33a124
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++allocator.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++allocator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_ALLOCATOR_H
+#define _GLIBCXX_CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/new_allocator.h>
+#define __glibcxx_base_allocator  __gnu_cxx::new_allocator
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++config.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++config.h
new file mode 100644
index 0000000..94a36cd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++config.h
@@ -0,0 +1,1506 @@
+// Predefined symbols and macros -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++config.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_CONFIG_H
+#define _GLIBCXX_CXX_CONFIG_H 1
+
+// The current version of the C++ library in compressed ISO date format.
+#define __GLIBCXX__ 20101216 
+
+// Macros for visibility.
+// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+// _GLIBCXX_VISIBILITY_ATTR
+# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1
+
+#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V)))
+#else
+// If this is not supplied by the OS-specific or CPU-specific
+// headers included below, it will be defined to an empty default.
+# define _GLIBCXX_VISIBILITY_ATTR(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
+#endif
+
+// Macros for deprecated.
+// _GLIBCXX_DEPRECATED
+// _GLIBCXX_DEPRECATED_ATTR
+#ifndef _GLIBCXX_DEPRECATED
+# define _GLIBCXX_DEPRECATED 1
+#endif
+
+#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define _GLIBCXX_DEPRECATED_ATTR __attribute__ ((__deprecated__))
+#else
+# define _GLIBCXX_DEPRECATED_ATTR
+#endif
+
+// Macros for activating various namespace association modes.
+// _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+// _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+
+// Guide to libstdc++ namespaces.
+/*
+  namespace std
+  {
+    namespace __debug { }
+    namespace __parallel { }
+    namespace __norm { } // __normative, __shadow, __replaced
+    namespace __cxx1998 { }
+
+    namespace tr1 { }
+  }
+*/
+#if __cplusplus
+
+#ifdef _GLIBCXX_DEBUG
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
+#endif
+
+#ifdef _GLIBCXX_PARALLEL
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL 1
+#endif
+
+// Namespace association for profile
+#ifdef _GLIBCXX_PROFILE
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE 1
+#endif
+
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0 
+
+// Defined if any namespace association modes are active.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+# define _GLIBCXX_USE_NAMESPACE_ASSOCIATION 1
+#endif
+
+// Macros for namespace scope. Either namespace std:: or the name
+// of some nested namespace within it.
+// _GLIBCXX_STD
+// _GLIBCXX_STD_D
+// _GLIBCXX_STD_P
+//
+// Macros for enclosing namespaces and possibly nested namespaces.
+// _GLIBCXX_BEGIN_NAMESPACE
+// _GLIBCXX_END_NAMESPACE
+// _GLIBCXX_BEGIN_NESTED_NAMESPACE
+// _GLIBCXX_END_NESTED_NAMESPACE
+#ifndef _GLIBCXX_USE_NAMESPACE_ASSOCIATION
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD_PR _GLIBCXX_STD
+# define _GLIBCXX_STD std
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+#else
+
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION // && not anything else
+#  define _GLIBCXX_STD_D _GLIBCXX_STD
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD _6
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
+#  define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
+# endif
+
+//  debug
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+#  define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D _GLIBCXX_STD
+#  define _GLIBCXX_STD_P __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+# endif
+
+// debug + parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG  && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+#  define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// profile
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL || _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+#   error Cannot use -D_GLIBCXX_PROFILE with -D_GLIBCXX_DEBUG or \
+    -D_GLIBCXX_PARALLEL
+#  endif
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD_PR __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+# endif
+
+# if __NO_INLINE__ && !__GXX_WEAK__
+#  warning currently using namespace associated mode which may fail \
+   without inlining due to lack of weak symbols
+# endif
+
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)  namespace X { namespace Y _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NESTED_NAMESPACE } }
+#endif
+
+// Namespace associations for debug mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __debug { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for parallel mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __parallel { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for profile mode
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __profile { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for versioning mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+namespace std
+{
+  inline namespace _6 { }
+}
+
+namespace __gnu_cxx 
+{ 
+  inline namespace _6 { }
+}
+
+namespace std
+{
+  namespace tr1 
+  { 
+    inline namespace _6 { }
+  }
+}
+#endif
+
+// XXX GLIBCXX_ABI Deprecated
+// Define if compatibility should be provided for -mlong-double-64
+#undef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+// Namespace associations for long double 128 mode.
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 
+namespace std
+{
+  inline namespace __gnu_cxx_ldbl128 { }
+}
+# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
+# define _GLIBCXX_END_LDBL_NAMESPACE }
+#else
+# define _GLIBCXX_LDBL_NAMESPACE
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE
+# define _GLIBCXX_END_LDBL_NAMESPACE
+#endif
+
+
+// Defines for C compatibility. In particular, define extern "C"
+// linkage only when using C++.
+# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
+# define _GLIBCXX_END_EXTERN_C }
+
+#else // !__cplusplus
+# undef _GLIBCXX_BEGIN_NAMESPACE
+# undef _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) 
+# define _GLIBCXX_END_NAMESPACE 
+# define _GLIBCXX_BEGIN_EXTERN_C
+# define _GLIBCXX_END_EXTERN_C 
+#endif
+
+// First includes.
+
+// Pick up any OS-specific definitions.
+#include <bits/os_defines.h>
+
+// Pick up any CPU-specific definitions.
+#include <bits/cpu_defines.h>
+
+// If platform uses neither visibility nor psuedo-visibility,
+// specify empty default for namespace annotation macros.
+#ifndef _GLIBCXX_PSEUDO_VISIBILITY
+#define _GLIBCXX_PSEUDO_VISIBILITY(V)
+#endif
+
+// Allow use of "export template." This is currently not a feature
+// that g++ supports.
+// #define _GLIBCXX_EXPORT_TEMPLATE 1
+
+// Allow use of the GNU syntax extension, "extern template." This
+// extension is fully documented in the g++ manual, but in a nutshell,
+// it inhibits all implicit instantiations and is used throughout the
+// library to avoid multiple weak definitions for required types that
+// are already explicitly instantiated in the library binary. This
+// substantially reduces the binary size of resulting executables.
+
+// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern
+// templates only in basic_string, thus activating its debug-mode
+// checks even at -O0.
+#ifndef _GLIBCXX_EXTERN_TEMPLATE
+# define _GLIBCXX_EXTERN_TEMPLATE 1
+#endif
+
+// Certain function definitions that are meant to be overridable from
+// user code are decorated with this macro.  For some targets, this
+// macro causes these definitions to be weak.
+#ifndef _GLIBCXX_WEAK_DEFINITION
+# define _GLIBCXX_WEAK_DEFINITION
+#endif
+
+// Assert.
+// Avoid the use of assert, because we're trying to keep the <cassert>
+// include out of the mix.
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
+#define __glibcxx_assert(_Condition)
+#else
+_GLIBCXX_BEGIN_NAMESPACE(std)
+  // Avoid the use of assert, because we're trying to keep the <cassert>
+  // include out of the mix.
+  inline void
+  __replacement_assert(const char* __file, int __line, 
+		       const char* __function, const char* __condition)
+  {
+    __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
+		     __function, __condition);
+    __builtin_abort();
+  }
+_GLIBCXX_END_NAMESPACE
+
+#define __glibcxx_assert(_Condition)                               	\
+  do 								        \
+  {							      		\
+    if (! (_Condition))                                                 \
+      std::__replacement_assert(__FILE__, __LINE__, 			\
+				__PRETTY_FUNCTION__, #_Condition);	\
+  } while (false)
+#endif
+
+// The remainder of the prewritten config is automatic; all the
+// user hooks are listed above.
+
+// Create a boolean flag to be used to determine if --fast-math is set.
+#ifdef __FAST_MATH__
+# define _GLIBCXX_FAST_MATH 1
+#else
+# define _GLIBCXX_FAST_MATH 0
+#endif
+
+// This marks string literals in header files to be extracted for eventual
+// translation.  It is primarily used for messages in thrown exceptions; see
+// src/functexcept.cc.  We use __N because the more traditional _N is used
+// for something else under certain OSes (see BADNAMES).
+#define __N(msgid)     (msgid)
+
+// For example, <windows.h> is known to #define min and max as macros...
+#undef min
+#undef max
+
+#ifndef _GLIBCXX_PURE
+# define _GLIBCXX_PURE __attribute__ ((__pure__))
+#endif
+
+#ifndef _GLIBCXX_CONST
+# define _GLIBCXX_CONST __attribute__ ((__const__))
+#endif
+
+#ifndef _GLIBCXX_NORETURN
+# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__))
+#endif
+
+#ifndef _GLIBCXX_NOTHROW
+# ifdef __cplusplus
+#  define _GLIBCXX_NOTHROW throw() 
+# else
+#  define _GLIBCXX_NOTHROW __attribute__((__nothrow__))
+# endif
+#endif
+
+// End of prewritten config; the discovered settings follow.
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the `acosf' function. */
+#define _GLIBCXX_HAVE_ACOSF 1
+
+/* Define to 1 if you have the `acosl' function. */
+#define _GLIBCXX_HAVE_ACOSL 1
+
+/* Define to 1 if you have the `asinf' function. */
+#define _GLIBCXX_HAVE_ASINF 1
+
+/* Define to 1 if you have the `asinl' function. */
+#define _GLIBCXX_HAVE_ASINL 1
+
+/* Define to 1 if the target assembler supports .symver directive. */
+#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
+
+/* Define to 1 if you have the `atan2f' function. */
+#define _GLIBCXX_HAVE_ATAN2F 1
+
+/* Define to 1 if you have the `atan2l' function. */
+#define _GLIBCXX_HAVE_ATAN2L 1
+
+/* Define to 1 if you have the `atanf' function. */
+#define _GLIBCXX_HAVE_ATANF 1
+
+/* Define to 1 if you have the `atanl' function. */
+#define _GLIBCXX_HAVE_ATANL 1
+
+/* Define to 1 if the target assembler supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_CC_TLS */
+
+/* Define to 1 if you have the `ceilf' function. */
+#define _GLIBCXX_HAVE_CEILF 1
+
+/* Define to 1 if you have the `ceill' function. */
+#define _GLIBCXX_HAVE_CEILL 1
+
+/* Define to 1 if you have the <complex.h> header file. */
+#define _GLIBCXX_HAVE_COMPLEX_H 1
+
+/* Define to 1 if you have the `cosf' function. */
+#define _GLIBCXX_HAVE_COSF 1
+
+/* Define to 1 if you have the `coshf' function. */
+#define _GLIBCXX_HAVE_COSHF 1
+
+/* Define to 1 if you have the `coshl' function. */
+#define _GLIBCXX_HAVE_COSHL 1
+
+/* Define to 1 if you have the `cosl' function. */
+#define _GLIBCXX_HAVE_COSL 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define _GLIBCXX_HAVE_DLFCN_H 1
+
+/* Define if EBADMSG exists. */
+#define _GLIBCXX_HAVE_EBADMSG 1
+
+/* Define if ECANCELED exists. */
+#define _GLIBCXX_HAVE_ECANCELED 1
+
+/* Define if EIDRM exists. */
+#define _GLIBCXX_HAVE_EIDRM 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define _GLIBCXX_HAVE_ENDIAN_H 1
+
+/* Define if ENODATA exists. */
+#define _GLIBCXX_HAVE_ENODATA 1
+
+/* Define if ENOLINK exists. */
+#define _GLIBCXX_HAVE_ENOLINK 1
+
+/* Define if ENOSR exists. */
+#define _GLIBCXX_HAVE_ENOSR 1
+
+/* Define if ENOSTR exists. */
+#define _GLIBCXX_HAVE_ENOSTR 1
+
+/* Define if ENOTRECOVERABLE exists. */
+#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1
+
+/* Define if ENOTSUP exists. */
+#define _GLIBCXX_HAVE_ENOTSUP 1
+
+/* Define if EOVERFLOW exists. */
+#define _GLIBCXX_HAVE_EOVERFLOW 1
+
+/* Define if EOWNERDEAD exists. */
+#define _GLIBCXX_HAVE_EOWNERDEAD 1
+
+/* Define if EPROTO exists. */
+#define _GLIBCXX_HAVE_EPROTO 1
+
+/* Define if ETIME exists. */
+#define _GLIBCXX_HAVE_ETIME 1
+
+/* Define if ETXTBSY exists. */
+#define _GLIBCXX_HAVE_ETXTBSY 1
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#define _GLIBCXX_HAVE_EXECINFO_H 1
+
+/* Define to 1 if you have the `expf' function. */
+#define _GLIBCXX_HAVE_EXPF 1
+
+/* Define to 1 if you have the `expl' function. */
+#define _GLIBCXX_HAVE_EXPL 1
+
+/* Define to 1 if you have the `fabsf' function. */
+#define _GLIBCXX_HAVE_FABSF 1
+
+/* Define to 1 if you have the `fabsl' function. */
+#define _GLIBCXX_HAVE_FABSL 1
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#define _GLIBCXX_HAVE_FENV_H 1
+
+/* Define to 1 if you have the `finite' function. */
+#define _GLIBCXX_HAVE_FINITE 1
+
+/* Define to 1 if you have the `finitef' function. */
+#define _GLIBCXX_HAVE_FINITEF 1
+
+/* Define to 1 if you have the `finitel' function. */
+#define _GLIBCXX_HAVE_FINITEL 1
+
+/* Define to 1 if you have the <float.h> header file. */
+#define _GLIBCXX_HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `floorf' function. */
+#define _GLIBCXX_HAVE_FLOORF 1
+
+/* Define to 1 if you have the `floorl' function. */
+#define _GLIBCXX_HAVE_FLOORL 1
+
+/* Define to 1 if you have the `fmodf' function. */
+#define _GLIBCXX_HAVE_FMODF 1
+
+/* Define to 1 if you have the `fmodl' function. */
+#define _GLIBCXX_HAVE_FMODL 1
+
+/* Define to 1 if you have the `fpclass' function. */
+/* #undef _GLIBCXX_HAVE_FPCLASS */
+
+/* Define to 1 if you have the <fp.h> header file. */
+/* #undef _GLIBCXX_HAVE_FP_H */
+
+/* Define to 1 if you have the `frexpf' function. */
+#define _GLIBCXX_HAVE_FREXPF 1
+
+/* Define to 1 if you have the `frexpl' function. */
+#define _GLIBCXX_HAVE_FREXPL 1
+
+/* Define if _Unwind_GetIPInfo is available. */
+#define _GLIBCXX_HAVE_GETIPINFO 1
+
+/* Define if gthr-default.h exists (meaning that threading support is
+   enabled). */
+#define _GLIBCXX_HAVE_GTHR_DEFAULT 1
+
+/* Define to 1 if you have the `hypot' function. */
+#define _GLIBCXX_HAVE_HYPOT 1
+
+/* Define to 1 if you have the `hypotf' function. */
+#define _GLIBCXX_HAVE_HYPOTF 1
+
+/* Define to 1 if you have the `hypotl' function. */
+#define _GLIBCXX_HAVE_HYPOTL 1
+
+/* Define if you have the iconv() function. */
+#define _GLIBCXX_HAVE_ICONV 1
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef _GLIBCXX_HAVE_IEEEFP_H */
+
+/* Define if int64_t is available in <stdint.h>. */
+#define _GLIBCXX_HAVE_INT64_T 1
+
+/* Define if int64_t is a long. */
+/* #undef _GLIBCXX_HAVE_INT64_T_LONG */
+
+/* Define if int64_t is a long long. */
+#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define _GLIBCXX_HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isinf' function. */
+#define _GLIBCXX_HAVE_ISINF 1
+
+/* Define to 1 if you have the `isinff' function. */
+#define _GLIBCXX_HAVE_ISINFF 1
+
+/* Define to 1 if you have the `isinfl' function. */
+#define _GLIBCXX_HAVE_ISINFL 1
+
+/* Define to 1 if you have the `isnan' function. */
+#define _GLIBCXX_HAVE_ISNAN 1
+
+/* Define to 1 if you have the `isnanf' function. */
+#define _GLIBCXX_HAVE_ISNANF 1
+
+/* Define to 1 if you have the `isnanl' function. */
+#define _GLIBCXX_HAVE_ISNANL 1
+
+/* Defined if iswblank exists. */
+#define _GLIBCXX_HAVE_ISWBLANK 1
+
+/* Define if LC_MESSAGES is available in <locale.h>. */
+#define _GLIBCXX_HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the `ldexpf' function. */
+#define _GLIBCXX_HAVE_LDEXPF 1
+
+/* Define to 1 if you have the `ldexpl' function. */
+#define _GLIBCXX_HAVE_LDEXPL 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+/* #undef _GLIBCXX_HAVE_LIBINTL_H */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_AS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
+
+/* Define if futex syscall is available. */
+#define _GLIBCXX_HAVE_LINUX_FUTEX 1
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define _GLIBCXX_HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `log10f' function. */
+#define _GLIBCXX_HAVE_LOG10F 1
+
+/* Define to 1 if you have the `log10l' function. */
+#define _GLIBCXX_HAVE_LOG10L 1
+
+/* Define to 1 if you have the `logf' function. */
+#define _GLIBCXX_HAVE_LOGF 1
+
+/* Define to 1 if you have the `logl' function. */
+#define _GLIBCXX_HAVE_LOGL 1
+
+/* Define to 1 if you have the <machine/endian.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */
+
+/* Define to 1 if you have the <machine/param.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */
+
+/* Define if mbstate_t exists in wchar.h. */
+#define _GLIBCXX_HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define _GLIBCXX_HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `modf' function. */
+#define _GLIBCXX_HAVE_MODF 1
+
+/* Define to 1 if you have the `modff' function. */
+#define _GLIBCXX_HAVE_MODFF 1
+
+/* Define to 1 if you have the `modfl' function. */
+#define _GLIBCXX_HAVE_MODFL 1
+
+/* Define to 1 if you have the <nan.h> header file. */
+/* #undef _GLIBCXX_HAVE_NAN_H */
+
+/* Define if poll is available in <poll.h>. */
+#define _GLIBCXX_HAVE_POLL 1
+
+/* Define to 1 if you have the `powf' function. */
+#define _GLIBCXX_HAVE_POWF 1
+
+/* Define to 1 if you have the `powl' function. */
+#define _GLIBCXX_HAVE_POWL 1
+
+/* Define to 1 if you have the `qfpclass' function. */
+/* #undef _GLIBCXX_HAVE_QFPCLASS */
+
+/* Define to 1 if you have the `setenv' function. */
+/* #undef _GLIBCXX_HAVE_SETENV */
+
+/* Define to 1 if you have the `sincos' function. */
+#define _GLIBCXX_HAVE_SINCOS 1
+
+/* Define to 1 if you have the `sincosf' function. */
+#define _GLIBCXX_HAVE_SINCOSF 1
+
+/* Define to 1 if you have the `sincosl' function. */
+#define _GLIBCXX_HAVE_SINCOSL 1
+
+/* Define to 1 if you have the `sinf' function. */
+#define _GLIBCXX_HAVE_SINF 1
+
+/* Define to 1 if you have the `sinhf' function. */
+#define _GLIBCXX_HAVE_SINHF 1
+
+/* Define to 1 if you have the `sinhl' function. */
+#define _GLIBCXX_HAVE_SINHL 1
+
+/* Define to 1 if you have the `sinl' function. */
+#define _GLIBCXX_HAVE_SINL 1
+
+/* Define to 1 if you have the `sqrtf' function. */
+#define _GLIBCXX_HAVE_SQRTF 1
+
+/* Define to 1 if you have the `sqrtl' function. */
+#define _GLIBCXX_HAVE_SQRTL 1
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define _GLIBCXX_HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define _GLIBCXX_HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define _GLIBCXX_HAVE_STDLIB_H 1
+
+/* Define if strerror_l is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_L 1
+
+/* Define if strerror_r is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define _GLIBCXX_HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define _GLIBCXX_HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtof' function. */
+#define _GLIBCXX_HAVE_STRTOF 1
+
+/* Define to 1 if you have the `strtold' function. */
+#define _GLIBCXX_HAVE_STRTOLD 1
+
+/* Define if strxfrm_l is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRXFRM_L 1
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IPC_H 1
+
+/* Define to 1 if you have the <sys/isa_defs.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */
+
+/* Define to 1 if you have the <sys/machine.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define _GLIBCXX_HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+#define _GLIBCXX_HAVE_SYS_SEM_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define _GLIBCXX_HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define _GLIBCXX_HAVE_SYS_UIO_H 1
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+/* #undef _GLIBCXX_HAVE_S_IFREG */
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+#define _GLIBCXX_HAVE_S_ISREG 1
+
+/* Define to 1 if you have the `tanf' function. */
+#define _GLIBCXX_HAVE_TANF 1
+
+/* Define to 1 if you have the `tanhf' function. */
+#define _GLIBCXX_HAVE_TANHF 1
+
+/* Define to 1 if you have the `tanhl' function. */
+#define _GLIBCXX_HAVE_TANHL 1
+
+/* Define to 1 if you have the `tanl' function. */
+#define _GLIBCXX_HAVE_TANL 1
+
+/* Define to 1 if you have the <tgmath.h> header file. */
+#define _GLIBCXX_HAVE_TGMATH_H 1
+
+/* Define to 1 if the target supports thread-local storage. */
+#define _GLIBCXX_HAVE_TLS 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define _GLIBCXX_HAVE_UNISTD_H 1
+
+/* Defined if vfwscanf exists. */
+#define _GLIBCXX_HAVE_VFWSCANF 1
+
+/* Defined if vswscanf exists. */
+#define _GLIBCXX_HAVE_VSWSCANF 1
+
+/* Defined if vwscanf exists. */
+#define _GLIBCXX_HAVE_VWSCANF 1
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define _GLIBCXX_HAVE_WCHAR_H 1
+
+/* Defined if wcstof exists. */
+#define _GLIBCXX_HAVE_WCSTOF 1
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define _GLIBCXX_HAVE_WCTYPE_H 1
+
+/* Define if writev is available in <sys/uio.h>. */
+#define _GLIBCXX_HAVE_WRITEV 1
+
+/* Define to 1 if you have the `_acosf' function. */
+/* #undef _GLIBCXX_HAVE__ACOSF */
+
+/* Define to 1 if you have the `_acosl' function. */
+/* #undef _GLIBCXX_HAVE__ACOSL */
+
+/* Define to 1 if you have the `_asinf' function. */
+/* #undef _GLIBCXX_HAVE__ASINF */
+
+/* Define to 1 if you have the `_asinl' function. */
+/* #undef _GLIBCXX_HAVE__ASINL */
+
+/* Define to 1 if you have the `_atan2f' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2F */
+
+/* Define to 1 if you have the `_atan2l' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2L */
+
+/* Define to 1 if you have the `_atanf' function. */
+/* #undef _GLIBCXX_HAVE__ATANF */
+
+/* Define to 1 if you have the `_atanl' function. */
+/* #undef _GLIBCXX_HAVE__ATANL */
+
+/* Define to 1 if you have the `_ceilf' function. */
+/* #undef _GLIBCXX_HAVE__CEILF */
+
+/* Define to 1 if you have the `_ceill' function. */
+/* #undef _GLIBCXX_HAVE__CEILL */
+
+/* Define to 1 if you have the `_cosf' function. */
+/* #undef _GLIBCXX_HAVE__COSF */
+
+/* Define to 1 if you have the `_coshf' function. */
+/* #undef _GLIBCXX_HAVE__COSHF */
+
+/* Define to 1 if you have the `_coshl' function. */
+/* #undef _GLIBCXX_HAVE__COSHL */
+
+/* Define to 1 if you have the `_cosl' function. */
+/* #undef _GLIBCXX_HAVE__COSL */
+
+/* Define to 1 if you have the `_expf' function. */
+/* #undef _GLIBCXX_HAVE__EXPF */
+
+/* Define to 1 if you have the `_expl' function. */
+/* #undef _GLIBCXX_HAVE__EXPL */
+
+/* Define to 1 if you have the `_fabsf' function. */
+/* #undef _GLIBCXX_HAVE__FABSF */
+
+/* Define to 1 if you have the `_fabsl' function. */
+/* #undef _GLIBCXX_HAVE__FABSL */
+
+/* Define to 1 if you have the `_finite' function. */
+/* #undef _GLIBCXX_HAVE__FINITE */
+
+/* Define to 1 if you have the `_finitef' function. */
+/* #undef _GLIBCXX_HAVE__FINITEF */
+
+/* Define to 1 if you have the `_finitel' function. */
+/* #undef _GLIBCXX_HAVE__FINITEL */
+
+/* Define to 1 if you have the `_floorf' function. */
+/* #undef _GLIBCXX_HAVE__FLOORF */
+
+/* Define to 1 if you have the `_floorl' function. */
+/* #undef _GLIBCXX_HAVE__FLOORL */
+
+/* Define to 1 if you have the `_fmodf' function. */
+/* #undef _GLIBCXX_HAVE__FMODF */
+
+/* Define to 1 if you have the `_fmodl' function. */
+/* #undef _GLIBCXX_HAVE__FMODL */
+
+/* Define to 1 if you have the `_fpclass' function. */
+/* #undef _GLIBCXX_HAVE__FPCLASS */
+
+/* Define to 1 if you have the `_frexpf' function. */
+/* #undef _GLIBCXX_HAVE__FREXPF */
+
+/* Define to 1 if you have the `_frexpl' function. */
+/* #undef _GLIBCXX_HAVE__FREXPL */
+
+/* Define to 1 if you have the `_hypot' function. */
+/* #undef _GLIBCXX_HAVE__HYPOT */
+
+/* Define to 1 if you have the `_hypotf' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTF */
+
+/* Define to 1 if you have the `_hypotl' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTL */
+
+/* Define to 1 if you have the `_isinf' function. */
+/* #undef _GLIBCXX_HAVE__ISINF */
+
+/* Define to 1 if you have the `_isinff' function. */
+/* #undef _GLIBCXX_HAVE__ISINFF */
+
+/* Define to 1 if you have the `_isinfl' function. */
+/* #undef _GLIBCXX_HAVE__ISINFL */
+
+/* Define to 1 if you have the `_isnan' function. */
+/* #undef _GLIBCXX_HAVE__ISNAN */
+
+/* Define to 1 if you have the `_isnanf' function. */
+/* #undef _GLIBCXX_HAVE__ISNANF */
+
+/* Define to 1 if you have the `_isnanl' function. */
+/* #undef _GLIBCXX_HAVE__ISNANL */
+
+/* Define to 1 if you have the `_ldexpf' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPF */
+
+/* Define to 1 if you have the `_ldexpl' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPL */
+
+/* Define to 1 if you have the `_log10f' function. */
+/* #undef _GLIBCXX_HAVE__LOG10F */
+
+/* Define to 1 if you have the `_log10l' function. */
+/* #undef _GLIBCXX_HAVE__LOG10L */
+
+/* Define to 1 if you have the `_logf' function. */
+/* #undef _GLIBCXX_HAVE__LOGF */
+
+/* Define to 1 if you have the `_logl' function. */
+/* #undef _GLIBCXX_HAVE__LOGL */
+
+/* Define to 1 if you have the `_modf' function. */
+/* #undef _GLIBCXX_HAVE__MODF */
+
+/* Define to 1 if you have the `_modff' function. */
+/* #undef _GLIBCXX_HAVE__MODFF */
+
+/* Define to 1 if you have the `_modfl' function. */
+/* #undef _GLIBCXX_HAVE__MODFL */
+
+/* Define to 1 if you have the `_powf' function. */
+/* #undef _GLIBCXX_HAVE__POWF */
+
+/* Define to 1 if you have the `_powl' function. */
+/* #undef _GLIBCXX_HAVE__POWL */
+
+/* Define to 1 if you have the `_qfpclass' function. */
+/* #undef _GLIBCXX_HAVE__QFPCLASS */
+
+/* Define to 1 if you have the `_sincos' function. */
+/* #undef _GLIBCXX_HAVE__SINCOS */
+
+/* Define to 1 if you have the `_sincosf' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSF */
+
+/* Define to 1 if you have the `_sincosl' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSL */
+
+/* Define to 1 if you have the `_sinf' function. */
+/* #undef _GLIBCXX_HAVE__SINF */
+
+/* Define to 1 if you have the `_sinhf' function. */
+/* #undef _GLIBCXX_HAVE__SINHF */
+
+/* Define to 1 if you have the `_sinhl' function. */
+/* #undef _GLIBCXX_HAVE__SINHL */
+
+/* Define to 1 if you have the `_sinl' function. */
+/* #undef _GLIBCXX_HAVE__SINL */
+
+/* Define to 1 if you have the `_sqrtf' function. */
+/* #undef _GLIBCXX_HAVE__SQRTF */
+
+/* Define to 1 if you have the `_sqrtl' function. */
+/* #undef _GLIBCXX_HAVE__SQRTL */
+
+/* Define to 1 if you have the `_tanf' function. */
+/* #undef _GLIBCXX_HAVE__TANF */
+
+/* Define to 1 if you have the `_tanhf' function. */
+/* #undef _GLIBCXX_HAVE__TANHF */
+
+/* Define to 1 if you have the `_tanhl' function. */
+/* #undef _GLIBCXX_HAVE__TANHL */
+
+/* Define to 1 if you have the `_tanl' function. */
+/* #undef _GLIBCXX_HAVE__TANL */
+
+/* Define as const if the declaration of iconv() needs const. */
+#define _GLIBCXX_ICONV_CONST 
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+/* #undef _GLIBCXX_PACKAGE */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define _GLIBCXX_PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define _GLIBCXX_PACKAGE_NAME "package-unused"
+
+/* Define to the full name and version of this package. */
+#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused"
+
+/* Define to the one symbol short name of this package. */
+#define _GLIBCXX_PACKAGE_TARNAME "libstdc++"
+
+/* Define to the home page for this package. */
+#define _GLIBCXX_PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused"
+
+/* The size of `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of `void *', as computed by sizeof. */
+/* #undef SIZEOF_VOID_P */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+/* #undef _GLIBCXX_VERSION */
+
+/* Define if builtin atomic operations for bool are supported on this host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_1 1
+
+/* Define if builtin atomic operations for short are supported on this host.
+   */
+#define _GLIBCXX_ATOMIC_BUILTINS_2 1
+
+/* Define if builtin atomic operations for int are supported on this host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_4 1
+
+/* Define if builtin atomic operations for long long are supported on this
+   host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_8 */
+
+/* Define to use concept checking code from the boost libraries. */
+/* #undef _GLIBCXX_CONCEPT_CHECKS */
+
+/* Define to 1 if building for use with CSLIBC, or 0 otherwise. */
+#define _GLIBCXX_CSLIBC 0
+
+/* Define if a fully dynamic basic_string is wanted. */
+/* #undef _GLIBCXX_FULLY_DYNAMIC_STRING */
+
+/* Define if gthreads library is available. */
+#define _GLIBCXX_HAS_GTHREADS 1
+
+/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
+#define _GLIBCXX_HOSTED 1
+
+/* Define if compatibility should be provided for -mlong-double-64. */
+
+/* Define if ptrdiff_t is int. */
+#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+
+/* Define if using setrlimit to set resource limits during "make check" */
+/* #undef _GLIBCXX_RES_LIMITS */
+
+/* Define if size_t is unsigned int. */
+#define _GLIBCXX_SIZE_T_IS_UINT 1
+
+/* Define if the compiler is configured for setjmp/longjmp exceptions. */
+/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
+
+/* Define if EOF == -1, SEEK_CUR == 1, SEEK_END == 2. */
+#define _GLIBCXX_STDIO_MACROS 1
+
+/* Define to use symbol versioning in the shared library. */
+#define _GLIBCXX_SYMVER 1
+
+/* Define to use darwin versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_DARWIN */
+
+/* Define to use GNU versioning in the shared library. */
+#define _GLIBCXX_SYMVER_GNU 1
+
+/* Define to use GNU namespace versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */
+
+/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
+   <stdio.h>, and <stdlib.h> can be used or exposed. */
+#define _GLIBCXX_USE_C99 1
+
+/* Define if C99 functions in <complex.h> should be used in <complex>. Using
+   compiler builtins for these functions requires corresponding C99 library
+   functions to be present. */
+#define _GLIBCXX_USE_C99_COMPLEX 1
+
+/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
+   Using compiler builtins for these functions requires corresponding C99
+   library functions to be present. */
+#define _GLIBCXX_USE_C99_COMPLEX_TR1 1
+
+/* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_CTYPE_TR1 1
+
+/* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_FENV_TR1 1
+
+/* Define if C99 functions in <inttypes.h> should be imported in
+   <tr1/cinttypes> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_INTTYPES_TR1 1
+
+/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
+   <tr1/cinttypes> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1
+
+/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
+   in namespace std. */
+#define _GLIBCXX_USE_C99_MATH 1
+
+/* Define if C99 functions or macros in <math.h> should be imported in
+   <tr1/cmath> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_MATH_TR1 1
+
+/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_STDINT_TR1 1
+
+/* Defined if clock_gettime has monotonic clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */
+
+/* Defined if clock_gettime has realtime clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_REALTIME */
+
+/* Define if ISO/IEC TR 24733 decimal floating point types are supported on
+   this host. */
+/* #undef _GLIBCXX_USE_DECIMAL_FLOAT */
+
+/* Defined if gettimeofday is available. */
+#define _GLIBCXX_USE_GETTIMEOFDAY 1
+
+/* Define if LFS support is available. */
+#define _GLIBCXX_USE_LFS 1
+
+/* Define if code specialized for long long should be used. */
+#define _GLIBCXX_USE_LONG_LONG 1
+
+/* Defined if nanosleep is available. */
+/* #undef _GLIBCXX_USE_NANOSLEEP */
+
+/* Define if NLS translations are to be used. */
+/* #undef _GLIBCXX_USE_NLS */
+
+/* Define if /dev/random and /dev/urandom are available for the random_device
+   of TR1 (Chapter 5.1). */
+#define _GLIBCXX_USE_RANDOM_TR1 1
+
+/* Defined if sched_yield is available. */
+/* #undef _GLIBCXX_USE_SCHED_YIELD */
+
+/* Define if code specialized for wchar_t should be used. */
+#define _GLIBCXX_USE_WCHAR_T 1
+
+#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)
+# define _GLIBCXX_HAVE_ACOSF 1
+# define acosf _acosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL)
+# define _GLIBCXX_HAVE_ACOSL 1
+# define acosl _acosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF)
+# define _GLIBCXX_HAVE_ASINF 1
+# define asinf _asinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL)
+# define _GLIBCXX_HAVE_ASINL 1
+# define asinl _asinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F)
+# define _GLIBCXX_HAVE_ATAN2F 1
+# define atan2f _atan2f
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L)
+# define _GLIBCXX_HAVE_ATAN2L 1
+# define atan2l _atan2l
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF)
+# define _GLIBCXX_HAVE_ATANF 1
+# define atanf _atanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL)
+# define _GLIBCXX_HAVE_ATANL 1
+# define atanl _atanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF)
+# define _GLIBCXX_HAVE_CEILF 1
+# define ceilf _ceilf
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL)
+# define _GLIBCXX_HAVE_CEILL 1
+# define ceill _ceill
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF)
+# define _GLIBCXX_HAVE_COSF 1
+# define cosf _cosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF)
+# define _GLIBCXX_HAVE_COSHF 1
+# define coshf _coshf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL)
+# define _GLIBCXX_HAVE_COSHL 1
+# define coshl _coshl
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL)
+# define _GLIBCXX_HAVE_COSL 1
+# define cosl _cosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF)
+# define _GLIBCXX_HAVE_EXPF 1
+# define expf _expf
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL)
+# define _GLIBCXX_HAVE_EXPL 1
+# define expl _expl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF)
+# define _GLIBCXX_HAVE_FABSF 1
+# define fabsf _fabsf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL)
+# define _GLIBCXX_HAVE_FABSL 1
+# define fabsl _fabsl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE)
+# define _GLIBCXX_HAVE_FINITE 1
+# define finite _finite
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF)
+# define _GLIBCXX_HAVE_FINITEF 1
+# define finitef _finitef
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL)
+# define _GLIBCXX_HAVE_FINITEL 1
+# define finitel _finitel
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF)
+# define _GLIBCXX_HAVE_FLOORF 1
+# define floorf _floorf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL)
+# define _GLIBCXX_HAVE_FLOORL 1
+# define floorl _floorl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF)
+# define _GLIBCXX_HAVE_FMODF 1
+# define fmodf _fmodf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL)
+# define _GLIBCXX_HAVE_FMODL 1
+# define fmodl _fmodl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS)
+# define _GLIBCXX_HAVE_FPCLASS 1
+# define fpclass _fpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF)
+# define _GLIBCXX_HAVE_FREXPF 1
+# define frexpf _frexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL)
+# define _GLIBCXX_HAVE_FREXPL 1
+# define frexpl _frexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT)
+# define _GLIBCXX_HAVE_HYPOT 1
+# define hypot _hypot
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF)
+# define _GLIBCXX_HAVE_HYPOTF 1
+# define hypotf _hypotf
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL)
+# define _GLIBCXX_HAVE_HYPOTL 1
+# define hypotl _hypotl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF)
+# define _GLIBCXX_HAVE_ISINF 1
+# define isinf _isinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF)
+# define _GLIBCXX_HAVE_ISINFF 1
+# define isinff _isinff
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL)
+# define _GLIBCXX_HAVE_ISINFL 1
+# define isinfl _isinfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN)
+# define _GLIBCXX_HAVE_ISNAN 1
+# define isnan _isnan
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF)
+# define _GLIBCXX_HAVE_ISNANF 1
+# define isnanf _isnanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL)
+# define _GLIBCXX_HAVE_ISNANL 1
+# define isnanl _isnanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF)
+# define _GLIBCXX_HAVE_LDEXPF 1
+# define ldexpf _ldexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL)
+# define _GLIBCXX_HAVE_LDEXPL 1
+# define ldexpl _ldexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F)
+# define _GLIBCXX_HAVE_LOG10F 1
+# define log10f _log10f
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L)
+# define _GLIBCXX_HAVE_LOG10L 1
+# define log10l _log10l
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF)
+# define _GLIBCXX_HAVE_LOGF 1
+# define logf _logf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL)
+# define _GLIBCXX_HAVE_LOGL 1
+# define logl _logl
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF)
+# define _GLIBCXX_HAVE_MODF 1
+# define modf _modf
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF)
+# define _GLIBCXX_HAVE_MODFF 1
+# define modff _modff
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL)
+# define _GLIBCXX_HAVE_MODFL 1
+# define modfl _modfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF)
+# define _GLIBCXX_HAVE_POWF 1
+# define powf _powf
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL)
+# define _GLIBCXX_HAVE_POWL 1
+# define powl _powl
+#endif
+
+#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS)
+# define _GLIBCXX_HAVE_QFPCLASS 1
+# define qfpclass _qfpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS)
+# define _GLIBCXX_HAVE_SINCOS 1
+# define sincos _sincos
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF)
+# define _GLIBCXX_HAVE_SINCOSF 1
+# define sincosf _sincosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL)
+# define _GLIBCXX_HAVE_SINCOSL 1
+# define sincosl _sincosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF)
+# define _GLIBCXX_HAVE_SINF 1
+# define sinf _sinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF)
+# define _GLIBCXX_HAVE_SINHF 1
+# define sinhf _sinhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL)
+# define _GLIBCXX_HAVE_SINHL 1
+# define sinhl _sinhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL)
+# define _GLIBCXX_HAVE_SINL 1
+# define sinl _sinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF)
+# define _GLIBCXX_HAVE_SQRTF 1
+# define sqrtf _sqrtf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL)
+# define _GLIBCXX_HAVE_SQRTL 1
+# define sqrtl _sqrtl
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF)
+# define _GLIBCXX_HAVE_STRTOF 1
+# define strtof _strtof
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD)
+# define _GLIBCXX_HAVE_STRTOLD 1
+# define strtold _strtold
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF)
+# define _GLIBCXX_HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF)
+# define _GLIBCXX_HAVE_TANHF 1
+# define tanhf _tanhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL)
+# define _GLIBCXX_HAVE_TANHL 1
+# define tanhl _tanhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL)
+# define _GLIBCXX_HAVE_TANL 1
+# define tanl _tanl
+#endif
+
+#endif // _GLIBCXX_CXX_CONFIG_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++io.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++io.h
new file mode 100644
index 0000000..86ca53b
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++io.h
@@ -0,0 +1,49 @@
+// Underlying io library details -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++io.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// c_io_stdio.h - Defines for using "C" stdio.h
+
+#ifndef _GLIBCXX_CXX_IO_H
+#define _GLIBCXX_CXX_IO_H 1
+
+#include <cstdio>
+#include <cstddef>
+#include <bits/gthr.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  typedef __gthread_mutex_t __c_lock;
+
+  // for basic_file.h
+  typedef FILE __c_file;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++locale.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++locale.h
new file mode 100644
index 0000000..749a97a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/c++locale.h
@@ -0,0 +1,110 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++locale.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _GLIBCXX_CXX_LOCALE_H
+#define _GLIBCXX_CXX_LOCALE_H 1
+
+#pragma GCC system_header
+
+#include <clocale>
+#include <cstddef>
+
+#define _GLIBCXX_C_LOCALE_GNU 1
+
+#define _GLIBCXX_NUM_CATEGORIES 6
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  extern "C" __typeof(uselocale) __uselocale;
+
+_GLIBCXX_END_NAMESPACE
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  typedef __locale_t		__c_locale;
+
+  // Convert numeric value of type double and long double to string and
+  // return length of string.  If vsnprintf is available use it, otherwise
+  // fall back to the unsafe vsprintf which, in general, can be dangerous
+  // and should be avoided.
+  inline int
+  __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)),
+		   char* __out,
+		   const int __size __attribute__ ((__unused__)),
+		   const char* __fmt, ...)
+  {
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+#else
+    char* __old = std::setlocale(LC_NUMERIC, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	std::setlocale(LC_NUMERIC, "C");
+      }
+#endif
+
+    __builtin_va_list __args;
+    __builtin_va_start(__args, __fmt);
+
+#ifdef _GLIBCXX_USE_C99
+    const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+#else
+    const int __ret = __builtin_vsprintf(__out, __fmt, __args);
+#endif
+
+    __builtin_va_end(__args);
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __gnu_cxx::__uselocale(__old);
+#else
+    if (__sav)
+      {
+	std::setlocale(LC_NUMERIC, __sav);
+	delete [] __sav;
+      }
+#endif
+    return __ret;
+  }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/cpu_defines.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/cpu_defines.h
new file mode 100644
index 0000000..faf97e1
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/cpu_defines.h
@@ -0,0 +1,33 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cpu_defines.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CPU_DEFINES
+#define _GLIBCXX_CPU_DEFINES 1
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_base.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_base.h
new file mode 100644
index 0000000..ff1f157
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_base.h
@@ -0,0 +1,61 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+/** @file ctype_base.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Information as gleaned from /usr/include/ctype.h
+  
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /// @brief  Base class for ctype.
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype<char>::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned short 	mask;   
+    static const mask upper    	= _ISupper;
+    static const mask lower 	= _ISlower;
+    static const mask alpha 	= _ISalpha;
+    static const mask digit 	= _ISdigit;
+    static const mask xdigit 	= _ISxdigit;
+    static const mask space 	= _ISspace;
+    static const mask print 	= _ISprint;
+    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
+    static const mask cntrl 	= _IScntrl;
+    static const mask punct 	= _ISpunct;
+    static const mask alnum 	= _ISalpha | _ISdigit;
+  };
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_inline.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_inline.h
new file mode 100644
index 0000000..8ae8229
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_inline.h
@@ -0,0 +1,73 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 2002, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_inline.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+  
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  bool
+  ctype<char>::
+  is(mask __m, char __c) const
+  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
+
+  const char*
+  ctype<char>::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype<char>::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype<char>::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_noninline.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_noninline.h
new file mode 100644
index 0000000..4fc47a9
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/ctype_noninline.h
@@ -0,0 +1,190 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_noninline.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// Information as gleaned from /usr/include/ctype.h
+
+#if _GLIBCXX_C_LOCALE_GNU
+  const ctype_base::mask*
+  ctype<char>::classic_table() throw()
+  { return _S_get_c_locale()->__ctype_b; }
+#else
+  const ctype_base::mask*
+  ctype<char>::classic_table() throw()
+  {
+    const ctype_base::mask* __ret;
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __ret = *__ctype_b_loc();
+#else
+    __ret = __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    return __ret;
+  }
+#endif
+
+#if _GLIBCXX_C_LOCALE_GNU
+  ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)), 
+  _M_del(__table != 0 && __del), 
+  _M_toupper(_M_c_locale_ctype->__ctype_toupper),  
+  _M_tolower(_M_c_locale_ctype->__ctype_tolower), 
+  _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), 
+  _M_widen_ok(0), _M_narrow_ok(0) 
+  {
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#else
+  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
+  {
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {    
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);    
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    _M_toupper = *__ctype_toupper_loc();
+    _M_tolower = *__ctype_tolower_loc();
+    _M_table = __table ? __table : *__ctype_b_loc();
+#else
+    _M_toupper = __ctype_toupper;
+    _M_tolower = __ctype_tolower;
+    _M_table = __table ? __table : __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#endif
+
+#if _GLIBCXX_C_LOCALE_GNU
+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del),
+  _M_toupper(_M_c_locale_ctype->__ctype_toupper),  
+  _M_tolower(_M_c_locale_ctype->__ctype_tolower), 
+  _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), 
+  _M_widen_ok(0), _M_narrow_ok(0) 
+  {
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#else
+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
+  {
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    _M_toupper = *__ctype_toupper_loc();
+    _M_tolower = *__ctype_tolower_loc();
+    _M_table = __table ? __table : *__ctype_b_loc();
+#else
+    _M_toupper = __ctype_toupper;
+    _M_tolower = __ctype_tolower;
+    _M_table = __table ? __table : __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#endif
+
+  char
+  ctype<char>::do_toupper(char __c) const
+  { return _M_toupper[static_cast<unsigned char>(__c)]; }
+
+  const char*
+  ctype<char>::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype<char>::do_tolower(char __c) const
+  { return _M_tolower[static_cast<unsigned char>(__c)]; }
+
+  const char* 
+  ctype<char>::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
+	++__low;
+      }
+    return __high;
+  }
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/cxxabi_tweaks.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/cxxabi_tweaks.h
new file mode 100644
index 0000000..1bfc588
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/cxxabi_tweaks.h
@@ -0,0 +1,81 @@
+// Control various target specific ABI tweaks.  ARM version.
+
+// Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cxxabi_tweaks.h
+ *  The header provides an CPU-variable interface to the C++ ABI.
+ */
+
+#ifndef _CXXABI_TWEAKS_H
+#define _CXXABI_TWEAKS_H 1
+
+#ifdef __cplusplus
+namespace __cxxabiv1
+{
+  extern "C" 
+  {
+#endif
+
+#ifdef __ARM_EABI__
+  // The ARM EABI uses the least significant bit of a 32-bit
+  // guard variable.  */
+#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(x) = 1
+#define _GLIBCXX_GUARD_BIT 1
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+  typedef int __guard;
+
+  // We also want the element size in array cookies.
+#define _GLIBCXX_ELTSIZE_IN_COOKIE 1
+  
+  // __cxa_vec_ctor should return a pointer to the array.
+  typedef void * __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x
+  // Constructors and destructors return the "this" pointer.
+  typedef void * __cxa_cdtor_return_type;
+
+#else // __ARM_EABI__
+
+  // The generic ABI uses the first byte of a 64-bit guard variable.
+#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+  __extension__ typedef int __guard __attribute__((mode (__DI__)));
+
+  // __cxa_vec_ctor has void return type.
+  typedef void __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
+  // Constructors and destructors do not return a value.
+  typedef void __cxa_cdtor_return_type;
+
+#endif //!__ARM_EABI__
+
+#ifdef __cplusplus
+  }
+} // namespace __cxxabiv1
+#endif
+
+#endif 
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/error_constants.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/error_constants.h
new file mode 100644
index 0000000..61c0349
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/error_constants.h
@@ -0,0 +1,175 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file error_constants.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ERROR_CONSTANTS
+#define _GLIBCXX_ERROR_CONSTANTS 1
+
+#include <bits/c++config.h>
+#include <cerrno>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  enum class errc
+    {
+      address_family_not_supported = 		EAFNOSUPPORT,
+      address_in_use = 				EADDRINUSE,
+      address_not_available = 			EADDRNOTAVAIL,
+      already_connected = 			EISCONN,
+      argument_list_too_long = 			E2BIG,
+      argument_out_of_domain = 			EDOM,
+      bad_address = 				EFAULT,
+      bad_file_descriptor = 			EBADF,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+      bad_message = 				EBADMSG,
+#endif
+
+      broken_pipe = 				EPIPE,
+      connection_aborted = 			ECONNABORTED,
+      connection_already_in_progress = 		EALREADY,
+      connection_refused = 			ECONNREFUSED,
+      connection_reset = 			ECONNRESET,
+      cross_device_link = 			EXDEV,
+      destination_address_required = 		EDESTADDRREQ,
+      device_or_resource_busy = 		EBUSY,
+      directory_not_empty = 			ENOTEMPTY,
+      executable_format_error = 		ENOEXEC,
+      file_exists = 	       			EEXIST,
+      file_too_large = 				EFBIG,
+      filename_too_long = 			ENAMETOOLONG,
+      function_not_supported = 			ENOSYS,
+      host_unreachable = 			EHOSTUNREACH,
+
+#ifdef _GLIBCXX_HAVE_EIDRM
+      identifier_removed = 			EIDRM,
+#endif
+
+      illegal_byte_sequence = 			EILSEQ,
+      inappropriate_io_control_operation = 	ENOTTY,
+      interrupted = 				EINTR,
+      invalid_argument = 			EINVAL,
+      invalid_seek = 				ESPIPE,
+      io_error = 				EIO,
+      is_a_directory = 				EISDIR,
+      message_size = 				EMSGSIZE,
+      network_down = 				ENETDOWN,
+      network_reset = 				ENETRESET,
+      network_unreachable = 			ENETUNREACH,
+      no_buffer_space = 			ENOBUFS,
+      no_child_process = 			ECHILD,
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+      no_link = 				ENOLINK,
+#endif
+
+      no_lock_available = 			ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+      no_message_available = 			ENODATA, 
+#endif
+
+      no_message = 				ENOMSG, 
+      no_protocol_option = 			ENOPROTOOPT,
+      no_space_on_device = 			ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+      no_stream_resources = 			ENOSR,
+#endif
+
+      no_such_device_or_address = 		ENXIO,
+      no_such_device = 				ENODEV,
+      no_such_file_or_directory = 		ENOENT,
+      no_such_process = 			ESRCH,
+      not_a_directory = 			ENOTDIR,
+      not_a_socket = 				ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+      not_a_stream = 				ENOSTR,
+#endif
+
+      not_connected = 				ENOTCONN,
+      not_enough_memory = 			ENOMEM,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
+      not_supported = 				ENOTSUP,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+      operation_canceled = 			ECANCELED,
+#endif
+
+      operation_in_progress = 			EINPROGRESS,
+      operation_not_permitted = 		EPERM,
+      operation_not_supported = 		EOPNOTSUPP,
+      operation_would_block = 			EWOULDBLOCK,
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+      owner_dead = 				EOWNERDEAD,
+#endif
+
+      permission_denied = 			EACCES,
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+      protocol_error = 				EPROTO,
+#endif
+
+      protocol_not_supported = 			EPROTONOSUPPORT,
+      read_only_file_system = 			EROFS,
+      resource_deadlock_would_occur = 		EDEADLK,
+      resource_unavailable_try_again = 		EAGAIN,
+      result_out_of_range = 			ERANGE,
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+      state_not_recoverable = 			ENOTRECOVERABLE,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+      stream_timeout = 				ETIME,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETXTBSY
+      text_file_busy = 				ETXTBSY,
+#endif
+
+      timed_out = 				ETIMEDOUT,
+      too_many_files_open_in_system = 		ENFILE,
+      too_many_files_open = 			EMFILE,
+      too_many_links = 				EMLINK,
+      too_many_symbolic_link_levels = 		ELOOP,
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+      value_too_large = 			EOVERFLOW,
+#endif
+
+      wrong_protocol_type = 			EPROTOTYPE
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/extc++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/extc++.h
new file mode 100644
index 0000000..03e5339
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/extc++.h
@@ -0,0 +1,71 @@
+// C++ includes used for precompiling extensions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file extc++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#include <bits/stdtr1c++.h>
+#endif
+
+#include <ext/algorithm>
+#include <ext/array_allocator.h>
+#include <ext/atomicity.h>
+#include <ext/bitmap_allocator.h>
+#include <ext/cast.h>
+#include <ext/concurrence.h>
+#include <ext/debug_allocator.h>
+#include <ext/extptr_allocator.h>
+#include <ext/functional>
+#include <ext/iterator>
+#include <ext/malloc_allocator.h>
+#include <ext/memory>
+#include <ext/mt_allocator.h>
+#include <ext/new_allocator.h>
+#include <ext/numeric>
+#include <ext/pod_char_traits.h>
+#include <ext/pointer.h>
+#include <ext/pool_allocator.h>
+#include <ext/rb_tree>
+#include <ext/rope>
+#include <ext/slist>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+#include <ext/throw_allocator.h>
+#include <ext/typelist.h>
+#include <ext/type_traits.h>
+#include <ext/vstring.h>
+#include <ext/pb_ds/assoc_container.hpp>
+#include <ext/pb_ds/priority_queue.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/hash_policy.hpp>
+#include <ext/pb_ds/list_update_policy.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/trie_policy.hpp>
+
+#ifdef _GLIBCXX_HAVE_ICONV
+ #include <ext/codecvt_specializations.h>
+ #include <ext/enc_filebuf.h>
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-default.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-default.h
new file mode 100644
index 0000000..2817cbd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-default.h
@@ -0,0 +1,895 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+   2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported.  Please look at comments
+   in gthr.h for details. */
+#define __GTHREAD_HAS_COND	1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+#  define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+  __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo.  */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+   map a subset of the POSIX pthread API to mangled versions of their
+   names.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+__gthrw(pthread_cancel)
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+   -pthreads is not specified.  The functions are dummies and most return an
+   error value.  However pthread_once returns 0 without invoking the routine
+   it is passed so we cannot pretend that the interface is active if -pthreads
+   is not specified.  On Solaris 2.5.1, the interface is not exposed at all so
+   we need to play the usual game with weak symbols.  On Solaris 10 and up, a
+   working interface is always exposed.  On FreeBSD 6 and later, libc also
+   exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+   to 9 does.  FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+   which means the alternate __gthread_active_p below cannot be used there.  */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+  __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      if (__gthrw_(pthread_once))
+	{
+	  /* If this really is a threaded program, then we must ensure that
+	     __gthread_active has been set to 1 before exiting this block.  */
+	  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+	  __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+	  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+	}
+
+      /* Make sure we'll never enter this block again.  */
+      if (__gthread_active < 0)
+	__gthread_active = 0;
+
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+  static void *const __gthread_active_ptr
+    = __extension__ (void *) &__gthrw_(pthread_cancel);
+  return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+   calls in shared flavors of the HP-UX C library.  Most of the stubs
+   have no functionality.  The details are described in the "libc cumulative
+   patch" for each subversion of HP-UX 11.  There are two special interfaces
+   provided for checking whether an application is linked to a pthread
+   library or not.  However, these interfaces aren't available in early
+   libc versions.  We also can't use pthread_once as some libc versions
+   call the init function.  So, we use pthread_create to check whether it
+   is possible to create a thread or not.  The stub implementation returns
+   the error number ENOSYS.  */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+  return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  pthread_t __t;
+  pthread_attr_t __a;
+  int __result;
+
+  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+  if (__gthread_active < 0)
+    {
+      __gthrw_(pthread_attr_init) (&__a);
+      __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+      __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+      if (__result != ENOSYS)
+	__gthread_active = 1;
+      else
+	__gthread_active = 0;
+      __gthrw_(pthread_attr_destroy) (&__a);
+    }
+  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      __gthread_active_init ();
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  if (__gthread_active_p ())
+    {
+      /* Initialize the thread storage key.  */
+      if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+	{
+	  /* The normal default detach state for threads is
+	   * PTHREAD_CREATE_JOINABLE which causes threads to not die
+	   * when you think they should.  */
+	  if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+	      && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+					      PTHREAD_CREATE_DETACHED) == 0)
+	    return 0;
+	}
+    }
+
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+      && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+    return 0;
+
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+  objc_thread_t thread_id;
+  pthread_t new_thread_handle;
+
+  if (!__gthread_active_p ())
+    return NULL;
+
+  if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+    thread_id = (objc_thread_t) new_thread_handle;
+  else
+    thread_id = NULL;
+
+  return thread_id;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+  if (!__gthread_active_p ())
+    return -1;
+  else
+    {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+      pthread_t thread_id = __gthrw_(pthread_self) ();
+      int policy;
+      struct sched_param params;
+      int priority_min, priority_max;
+
+      if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+	{
+	  if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+	    return -1;
+
+	  if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+	    return -1;
+
+	  if (priority > priority_max)
+	    priority = priority_max;
+	  else if (priority < priority_min)
+	    priority = priority_min;
+	  params.sched_priority = priority;
+
+	  /*
+	   * The solaris 7 and several other man pages incorrectly state that
+	   * this should be a pointer to policy but pthread.h is universally
+	   * at odds with this.
+	   */
+	  if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+	    return 0;
+	}
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+      return -1;
+    }
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+  if (__gthread_active_p ())
+    {
+      int policy;
+      struct sched_param params;
+
+      if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+	return params.sched_priority;
+      else
+	return -1;
+    }
+  else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+    return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  if (__gthread_active_p ())
+    __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  if (__gthread_active_p ())
+    /* exit the thread */
+    __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+  /* Failed if we reached here */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  if (__gthread_active_p ())
+    return (objc_thread_t) __gthrw_(pthread_self) ();
+  else
+    return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+  else
+    {
+      thread_local_storage = value;
+      return 0;
+    }
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+  else
+    return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+      if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+	{
+	  objc_free (mutex->backend);
+	  mutex->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      int count;
+
+      /*
+       * Posix Threads specifically require that the thread be unlocked
+       * for __gthrw_(pthread_mutex_destroy) to work.
+       */
+
+      do
+	{
+	  count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+	  if (count < 0)
+	    return -1;
+	}
+      while (count);
+
+      if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+	return -1;
+
+      objc_free (mutex->backend);
+      mutex->backend = NULL;
+    }
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+      if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+	{
+	  objc_free (condition->backend);
+	  condition->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+	return -1;
+
+      objc_free (condition->backend);
+      condition->backend = NULL;
+    }
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+			      (pthread_mutex_t *) mutex->backend);
+  else
+    return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+		  void *__args)
+{
+  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+  return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+  return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+  return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+  return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+  return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+			   const __gthread_time_t *__abs_timeout)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+  else
+    return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+				     const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+  return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+			  const __gthread_time_t *__abs_timeout)
+{
+  return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+			       __gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+				    __gthread_recursive_mutex_t *__mutex,
+				    const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+  return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-posix.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-posix.h
new file mode 100644
index 0000000..2817cbd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-posix.h
@@ -0,0 +1,895 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+   2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported.  Please look at comments
+   in gthr.h for details. */
+#define __GTHREAD_HAS_COND	1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+#  define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+  __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo.  */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+   map a subset of the POSIX pthread API to mangled versions of their
+   names.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+__gthrw(pthread_cancel)
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+   -pthreads is not specified.  The functions are dummies and most return an
+   error value.  However pthread_once returns 0 without invoking the routine
+   it is passed so we cannot pretend that the interface is active if -pthreads
+   is not specified.  On Solaris 2.5.1, the interface is not exposed at all so
+   we need to play the usual game with weak symbols.  On Solaris 10 and up, a
+   working interface is always exposed.  On FreeBSD 6 and later, libc also
+   exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+   to 9 does.  FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+   which means the alternate __gthread_active_p below cannot be used there.  */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+  __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      if (__gthrw_(pthread_once))
+	{
+	  /* If this really is a threaded program, then we must ensure that
+	     __gthread_active has been set to 1 before exiting this block.  */
+	  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+	  __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+	  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+	}
+
+      /* Make sure we'll never enter this block again.  */
+      if (__gthread_active < 0)
+	__gthread_active = 0;
+
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+  static void *const __gthread_active_ptr
+    = __extension__ (void *) &__gthrw_(pthread_cancel);
+  return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+   calls in shared flavors of the HP-UX C library.  Most of the stubs
+   have no functionality.  The details are described in the "libc cumulative
+   patch" for each subversion of HP-UX 11.  There are two special interfaces
+   provided for checking whether an application is linked to a pthread
+   library or not.  However, these interfaces aren't available in early
+   libc versions.  We also can't use pthread_once as some libc versions
+   call the init function.  So, we use pthread_create to check whether it
+   is possible to create a thread or not.  The stub implementation returns
+   the error number ENOSYS.  */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+  return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  pthread_t __t;
+  pthread_attr_t __a;
+  int __result;
+
+  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+  if (__gthread_active < 0)
+    {
+      __gthrw_(pthread_attr_init) (&__a);
+      __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+      __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+      if (__result != ENOSYS)
+	__gthread_active = 1;
+      else
+	__gthread_active = 0;
+      __gthrw_(pthread_attr_destroy) (&__a);
+    }
+  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      __gthread_active_init ();
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  if (__gthread_active_p ())
+    {
+      /* Initialize the thread storage key.  */
+      if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+	{
+	  /* The normal default detach state for threads is
+	   * PTHREAD_CREATE_JOINABLE which causes threads to not die
+	   * when you think they should.  */
+	  if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+	      && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+					      PTHREAD_CREATE_DETACHED) == 0)
+	    return 0;
+	}
+    }
+
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+      && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+    return 0;
+
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+  objc_thread_t thread_id;
+  pthread_t new_thread_handle;
+
+  if (!__gthread_active_p ())
+    return NULL;
+
+  if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+    thread_id = (objc_thread_t) new_thread_handle;
+  else
+    thread_id = NULL;
+
+  return thread_id;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+  if (!__gthread_active_p ())
+    return -1;
+  else
+    {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+      pthread_t thread_id = __gthrw_(pthread_self) ();
+      int policy;
+      struct sched_param params;
+      int priority_min, priority_max;
+
+      if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+	{
+	  if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+	    return -1;
+
+	  if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+	    return -1;
+
+	  if (priority > priority_max)
+	    priority = priority_max;
+	  else if (priority < priority_min)
+	    priority = priority_min;
+	  params.sched_priority = priority;
+
+	  /*
+	   * The solaris 7 and several other man pages incorrectly state that
+	   * this should be a pointer to policy but pthread.h is universally
+	   * at odds with this.
+	   */
+	  if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+	    return 0;
+	}
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+      return -1;
+    }
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+  if (__gthread_active_p ())
+    {
+      int policy;
+      struct sched_param params;
+
+      if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+	return params.sched_priority;
+      else
+	return -1;
+    }
+  else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+    return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  if (__gthread_active_p ())
+    __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  if (__gthread_active_p ())
+    /* exit the thread */
+    __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+  /* Failed if we reached here */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  if (__gthread_active_p ())
+    return (objc_thread_t) __gthrw_(pthread_self) ();
+  else
+    return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+  else
+    {
+      thread_local_storage = value;
+      return 0;
+    }
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+  else
+    return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+      if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+	{
+	  objc_free (mutex->backend);
+	  mutex->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      int count;
+
+      /*
+       * Posix Threads specifically require that the thread be unlocked
+       * for __gthrw_(pthread_mutex_destroy) to work.
+       */
+
+      do
+	{
+	  count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+	  if (count < 0)
+	    return -1;
+	}
+      while (count);
+
+      if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+	return -1;
+
+      objc_free (mutex->backend);
+      mutex->backend = NULL;
+    }
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+      if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+	{
+	  objc_free (condition->backend);
+	  condition->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+	return -1;
+
+      objc_free (condition->backend);
+      condition->backend = NULL;
+    }
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+			      (pthread_mutex_t *) mutex->backend);
+  else
+    return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+		  void *__args)
+{
+  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+  return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+  return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+  return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+  return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+  return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+			   const __gthread_time_t *__abs_timeout)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+  else
+    return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+				     const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+  return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+			  const __gthread_time_t *__abs_timeout)
+{
+  return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+			       __gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+				    __gthread_recursive_mutex_t *__mutex,
+				    const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+  return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-single.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-single.h
new file mode 100644
index 0000000..692688f
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-single.h
@@ -0,0 +1,292 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
+#define _GLIBCXX_GCC_GTHR_SINGLE_H
+
+/* Just provide compatibility for mutex handling.  */
+
+typedef int __gthread_key_t;
+typedef int __gthread_once_t;
+typedef int __gthread_mutex_t;
+typedef int __gthread_recursive_mutex_t;
+
+#define __GTHREAD_ONCE_INIT 0
+#define __GTHREAD_MUTEX_INIT 0
+#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
+
+#define _GLIBCXX_UNUSED __attribute__((unused))
+
+#ifdef _LIBOBJC
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED)
+{
+  /* No thread support available */
+  return NULL;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+  return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  return;
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  /* No thread support available */
+  /* Should we really exit the program */
+  /* exit (&__objc_thread_exit_status); */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  /* No thread support, use 1.  */
+  return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  thread_local_storage = value;
+  return 0;
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  /* There can only be one thread, so we always get the lock */
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  /* There can only be one thread, so we always get the lock */
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED,
+			       objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 0;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int _GLIBCXX_UNUSED
+__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static int _GLIBCXX_UNUSED
+__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+#endif /* _LIBOBJC */
+
+#undef _GLIBCXX_UNUSED
+
+#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-tpf.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-tpf.h
new file mode 100644
index 0000000..df194e6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr-tpf.h
@@ -0,0 +1,229 @@
+/* Threads compatibility routines for libgcc2 and libobjc.
+   Compile this one with gcc.
+   Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+/* TPF needs its own version of gthr-*.h because TPF always links to
+   the thread library.  However, for performance reasons we still do not
+   want to issue thread api calls unless a check is made to see that we
+   are running as a thread.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_TPF_H
+#define _GLIBCXX_GCC_GTHR_TPF_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#ifndef _REENTRANT
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#endif
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+
+#define NOTATHREAD   00
+#define ECBBASEPTR (unsigned long int) *(unsigned int *)0x00000514u
+#define ECBPG2PTR  ECBBASEPTR + 0x1000
+#define CE2THRCPTR *((unsigned char *)(ECBPG2PTR + 16))
+#define __tpf_pthread_active() (CE2THRCPTR != NOTATHREAD)
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# define __gthrw(name) \
+  static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name)));
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw(name)
+# define __gthrw_(name) name
+#endif
+
+__gthrw(pthread_once)
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+__gthrw(pthread_create)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_key_create) (__key, __dtor);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_key_delete) (__key);
+  else
+    return -1;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_getspecific) (__key);
+  else
+    return NULL;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_setspecific) (__key, __ptr);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_lock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_trylock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_unlock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+
+
+#endif /* ! _GLIBCXX_GCC_GTHR_TPF_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr.h
new file mode 100644
index 0000000..a466c11
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/gthr.h
@@ -0,0 +1,173 @@
+/* Threads compatibility routines for libgcc2.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1998, 2004, 2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_H
+#define _GLIBCXX_GCC_GTHR_H
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility push(default)
+#endif
+
+/* If this file is compiled with threads support, it must
+       #define __GTHREADS 1
+   to indicate that threads support is present.  Also it has define
+   function
+     int __gthread_active_p ()
+   that returns 1 if thread system is active, 0 if not.
+
+   The threads interface must define the following types:
+     __gthread_key_t
+     __gthread_once_t
+     __gthread_mutex_t
+     __gthread_recursive_mutex_t
+
+   The threads interface must define the following macros:
+
+     __GTHREAD_ONCE_INIT
+     		to initialize __gthread_once_t
+     __GTHREAD_MUTEX_INIT
+     		to initialize __gthread_mutex_t to get a fast
+		non-recursive mutex.
+     __GTHREAD_MUTEX_INIT_FUNCTION
+     		some systems can't initialize a mutex without a
+		function call.  On such systems, define this to a
+		function which looks like this:
+		  void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
+		Don't define __GTHREAD_MUTEX_INIT in this case
+     __GTHREAD_RECURSIVE_MUTEX_INIT
+     __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
+     		as above, but for a recursive mutex.
+
+   The threads interface must define the following static functions:
+
+     int __gthread_once (__gthread_once_t *once, void (*func) ())
+
+     int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
+     int __gthread_key_delete (__gthread_key_t key)
+
+     void *__gthread_getspecific (__gthread_key_t key)
+     int __gthread_setspecific (__gthread_key_t key, const void *ptr)
+
+     int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
+
+     int __gthread_mutex_lock (__gthread_mutex_t *mutex);
+     int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
+     int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
+
+     int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
+     int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
+     int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
+
+   The following are supported in POSIX threads only. They are required to
+   fix a deadlock in static initialization inside libsupc++. The header file
+   gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra
+   features are supported.
+
+   Types:
+     __gthread_cond_t
+
+   Macros:
+     __GTHREAD_COND_INIT
+     __GTHREAD_COND_INIT_FUNCTION
+
+   Interface:
+     int __gthread_cond_broadcast (__gthread_cond_t *cond);
+     int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex);
+     int __gthread_cond_wait_recursive (__gthread_cond_t *cond,
+					__gthread_recursive_mutex_t *mutex);
+
+   All functions returning int should return zero on success or the error
+   number.  If the operation is not supported, -1 is returned.
+
+   If the following are also defined, you should
+     #define __GTHREADS_CXX0X 1
+   to enable the c++0x thread library.
+
+   Types:
+     __gthread_t
+     __gthread_time_t
+
+   Interface:
+     int __gthread_create (__gthread_t *thread, void *(*func) (void*),
+                           void *args);
+     int __gthread_join (__gthread_t thread, void **value_ptr);
+     int __gthread_detach (__gthread_t thread);
+     int __gthread_equal (__gthread_t t1, __gthread_t t2);
+     __gthread_t __gthread_self (void);
+     int __gthread_yield (void);
+
+     int __gthread_mutex_timedlock (__gthread_mutex_t *m,
+                                    const __gthread_time_t *abs_timeout);
+     int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m,
+                                          const __gthread_time_t *abs_time);
+
+     int __gthread_cond_signal (__gthread_cond_t *cond);
+     int __gthread_cond_timedwait (__gthread_cond_t *cond,
+                                   __gthread_mutex_t *mutex,
+                                   const __gthread_time_t *abs_timeout);
+     int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
+                                             __gthread_recursive_mutex_t *mutex,
+                                             const __gthread_time_t *abs_time)
+
+   Currently supported threads packages are
+     TPF threads with -D__tpf__
+     POSIX/Unix98 threads with -D_PTHREADS
+     POSIX/Unix95 threads with -D_PTHREADS95
+     DCE threads with -D_DCE_THREADS
+     Solaris/UI threads with -D_SOLARIS_THREADS
+
+*/
+
+/* Check first for thread specific defines.  */
+#if defined (_GLIBCXX___tpf_GLIBCXX___)
+#include <bits/gthr-tpf.h>
+#elif _GLIBCXX__PTHREADS
+#include <bits/gthr-posix.h>
+#elif _GLIBCXX__PTHREADS95
+#include <bits/gthr-posix95.h>
+#elif _GLIBCXX__DCE_THREADS
+#include <bits/gthr-dce.h>
+#elif _GLIBCXX__SOLARIS_THREADS
+#include <bits/gthr-solaris.h>
+
+/* Include GTHREAD_FILE if one is defined.  */
+#elif defined(_GLIBCXX_HAVE_GTHR_DEFAULT)
+#if __GXX_WEAK__
+#ifndef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 1
+#endif
+#endif
+#include <bits/gthr-default.h>
+
+/* Fallback to single thread definitions.  */
+#else
+#include <bits/gthr-single.h>
+#endif
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility pop
+#endif
+
+#endif /* ! _GLIBCXX_GCC_GTHR_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/messages_members.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/messages_members.h
new file mode 100644
index 0000000..8773562
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/messages_members.h
@@ -0,0 +1,128 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file messages_members.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.7.1.2  messages functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#include <libintl.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Non-virtual member functions.
+  template<typename _CharT>
+     messages<_CharT>::messages(size_t __refs)
+     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
+       _M_name_messages(_S_get_c_name())
+     { }
+
+  template<typename _CharT>
+     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
+				size_t __refs) 
+     : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
+     {
+       if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+	 {
+	   const size_t __len = __builtin_strlen(__s) + 1;
+	   char* __tmp = new char[__len];
+	   __builtin_memcpy(__tmp, __s, __len);
+	   _M_name_messages = __tmp;
+	 }
+       else
+	 _M_name_messages = _S_get_c_name();
+
+       // Last to avoid leaking memory if new throws.
+       _M_c_locale_messages = _S_clone_c_locale(__cloc);
+     }
+
+  template<typename _CharT>
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
+			   const char* __dir) const
+    { 
+      bindtextdomain(__s.c_str(), __dir);
+      return this->do_open(__s, __loc); 
+    }
+
+  // Virtual member functions.
+  template<typename _CharT>
+    messages<_CharT>::~messages()
+    { 
+      if (_M_name_messages != _S_get_c_name())
+	delete [] _M_name_messages;
+      _S_destroy_c_locale(_M_c_locale_messages); 
+    }
+
+  template<typename _CharT>
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::do_open(const basic_string<char>& __s, 
+			      const locale&) const
+    { 
+      // No error checking is done, assume the catalog exists and can
+      // be used.
+      textdomain(__s.c_str());
+      return 0;
+    }
+
+  template<typename _CharT>
+    void    
+    messages<_CharT>::do_close(catalog) const 
+    { }
+
+   // messages_byname
+   template<typename _CharT>
+     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
+     : messages<_CharT>(__refs) 
+     { 
+       if (this->_M_name_messages != locale::facet::_S_get_c_name())
+	 {
+	   delete [] this->_M_name_messages;
+	   if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0)
+	     {
+	       const size_t __len = __builtin_strlen(__s) + 1;
+	       char* __tmp = new char[__len];
+	       __builtin_memcpy(__tmp, __s, __len);
+	       this->_M_name_messages = __tmp;
+	     }
+	   else
+	     this->_M_name_messages = locale::facet::_S_get_c_name();
+	 }
+
+       if (__builtin_strcmp(__s, "C") != 0
+	   && __builtin_strcmp(__s, "POSIX") != 0)
+	 {
+	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
+	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
+	 }
+     }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/os_defines.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/os_defines.h
new file mode 100644
index 0000000..9c42b3a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/os_defines.h
@@ -0,0 +1,41 @@
+// Specific definitions for GNU/Linux  -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file os_defines.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here.  This
+// file will come before all others.
+
+// This keeps isanum, et al from being propagated as macros.
+#define __NO_CTYPE 1
+
+#include <features.h>
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/stdc++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/stdc++.h
new file mode 100644
index 0000000..c19c938
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/stdc++.h
@@ -0,0 +1,115 @@
+// C++ includes used for precompiling -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdc++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+// 17.4.1.2 Headers
+
+// C
+#ifndef _GLIBCXX_NO_ASSERT
+#include <cassert>
+#endif
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <ccomplex>
+#include <cfenv>
+#include <cinttypes>
+#include <cstdbool>
+#include <cstdint>
+#include <ctgmath>
+#include <cwchar>
+#include <cwctype>
+#endif
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <array>
+#include <atomic>
+#include <chrono>
+#include <condition_variable>
+#include <forward_list>
+#include <future>
+#include <initializer_list>
+#include <mutex>
+#include <random>
+#include <ratio>
+#include <regex>
+#include <system_error>
+#include <thread>
+#include <tuple>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/stdtr1c++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/stdtr1c++.h
new file mode 100644
index 0000000..8ed9cb6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/stdtr1c++.h
@@ -0,0 +1,53 @@
+// C++ includes used for precompiling TR1 -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdtr1c++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdc++.h>
+
+#include <tr1/array>
+#include <tr1/cctype>
+#include <tr1/cfenv>
+#include <tr1/cfloat>
+#include <tr1/cinttypes>
+#include <tr1/climits>
+#include <tr1/cmath>
+#include <tr1/complex>
+#include <tr1/cstdarg>
+#include <tr1/cstdbool>
+#include <tr1/cstdint>
+#include <tr1/cstdio>
+#include <tr1/cstdlib>
+#include <tr1/ctgmath>
+#include <tr1/ctime>
+#include <tr1/cwchar>
+#include <tr1/cwctype>
+#include <tr1/functional>
+#include <tr1/random>
+#include <tr1/tuple>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+#include <tr1/utility>
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/time_members.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/time_members.h
new file mode 100644
index 0000000..90bc0ce
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/armv4t/bits/time_members.h
@@ -0,0 +1,87 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file time_members.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(size_t __refs) 
+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(_S_get_c_name())
+    { _M_initialize_timepunct(); }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
+    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(_S_get_c_name())
+    { _M_initialize_timepunct(); }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+				     size_t __refs) 
+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(NULL)
+    {
+      if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+	{
+	  const size_t __len = __builtin_strlen(__s) + 1;
+	  char* __tmp = new char[__len];
+	  __builtin_memcpy(__tmp, __s, __len);
+	  _M_name_timepunct = __tmp;
+	}
+      else
+	_M_name_timepunct = _S_get_c_name();
+
+      __try
+	{ _M_initialize_timepunct(__cloc); }
+      __catch(...)
+	{
+	  if (_M_name_timepunct != _S_get_c_name())
+	    delete [] _M_name_timepunct;
+	  __throw_exception_again;
+	}
+    }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::~__timepunct()
+    { 
+      if (_M_name_timepunct != _S_get_c_name())
+	delete [] _M_name_timepunct;
+      delete _M_data; 
+      _S_destroy_c_locale(_M_c_locale_timepunct); 
+    }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/atomic_word.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/atomic_word.h
new file mode 100644
index 0000000..f2bdbbc
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/atomic_word.h
@@ -0,0 +1,47 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file atomic_word.h
+ *  This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H	1
+
+typedef int _Atomic_word;
+
+// Define these two macros using the appropriate memory barrier for the target.
+// The commented out versions below are the defaults.
+// See ia64/atomic_word.h for an alternative approach.
+
+// This one prevents loads from being hoisted across the barrier;
+// in other words, this is a Load-Load acquire barrier.
+// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.  
+// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
+
+// This one prevents stores from being sunk across the barrier; in other
+// words, a Store-Store release barrier.
+// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
+
+#endif 
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/basic_file.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/basic_file.h
new file mode 100644
index 0000000..7f30c4e
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/basic_file.h
@@ -0,0 +1,108 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+/** @file basic_file.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_BASIC_FILE_STDIO_H
+#define _GLIBCXX_BASIC_FILE_STDIO_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/c++io.h>  // for __c_lock and __c_file
+#include <ios>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Generic declaration.
+  template<typename _CharT>
+    class __basic_file; 
+
+  // Specialization.
+  template<>
+    class __basic_file<char>
+    {
+      // Underlying data source/sink.
+      __c_file* 	_M_cfile;
+
+      // True iff we opened _M_cfile, and thus must close it ourselves.
+      bool 		_M_cfile_created;
+
+    public:
+      __basic_file(__c_lock* __lock = 0) throw ();
+
+      __basic_file* 
+      open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
+
+      __basic_file*
+      sys_open(__c_file* __file, ios_base::openmode);
+
+      __basic_file*
+      sys_open(int __fd, ios_base::openmode __mode) throw ();
+
+      __basic_file* 
+      close(); 
+
+      _GLIBCXX_PURE bool 
+      is_open() const throw ();
+
+      _GLIBCXX_PURE int 
+      fd() throw ();
+
+      _GLIBCXX_PURE __c_file*
+      file() throw ();
+
+      ~__basic_file();
+
+      streamsize 
+      xsputn(const char* __s, streamsize __n);
+
+      streamsize 
+      xsputn_2(const char* __s1, streamsize __n1,
+	       const char* __s2, streamsize __n2);
+
+      streamsize 
+      xsgetn(char* __s, streamsize __n);
+
+      streamoff
+      seekoff(streamoff __off, ios_base::seekdir __way) throw ();
+
+      int 
+      sync();
+
+      streamsize
+      showmanyc();
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif	
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++allocator.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++allocator.h
new file mode 100644
index 0000000..c33a124
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++allocator.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++allocator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_ALLOCATOR_H
+#define _GLIBCXX_CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/new_allocator.h>
+#define __glibcxx_base_allocator  __gnu_cxx::new_allocator
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++config.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++config.h
new file mode 100644
index 0000000..94a36cd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++config.h
@@ -0,0 +1,1506 @@
+// Predefined symbols and macros -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++config.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_CONFIG_H
+#define _GLIBCXX_CXX_CONFIG_H 1
+
+// The current version of the C++ library in compressed ISO date format.
+#define __GLIBCXX__ 20101216 
+
+// Macros for visibility.
+// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+// _GLIBCXX_VISIBILITY_ATTR
+# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1
+
+#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V)))
+#else
+// If this is not supplied by the OS-specific or CPU-specific
+// headers included below, it will be defined to an empty default.
+# define _GLIBCXX_VISIBILITY_ATTR(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
+#endif
+
+// Macros for deprecated.
+// _GLIBCXX_DEPRECATED
+// _GLIBCXX_DEPRECATED_ATTR
+#ifndef _GLIBCXX_DEPRECATED
+# define _GLIBCXX_DEPRECATED 1
+#endif
+
+#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define _GLIBCXX_DEPRECATED_ATTR __attribute__ ((__deprecated__))
+#else
+# define _GLIBCXX_DEPRECATED_ATTR
+#endif
+
+// Macros for activating various namespace association modes.
+// _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+// _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+
+// Guide to libstdc++ namespaces.
+/*
+  namespace std
+  {
+    namespace __debug { }
+    namespace __parallel { }
+    namespace __norm { } // __normative, __shadow, __replaced
+    namespace __cxx1998 { }
+
+    namespace tr1 { }
+  }
+*/
+#if __cplusplus
+
+#ifdef _GLIBCXX_DEBUG
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
+#endif
+
+#ifdef _GLIBCXX_PARALLEL
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL 1
+#endif
+
+// Namespace association for profile
+#ifdef _GLIBCXX_PROFILE
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE 1
+#endif
+
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0 
+
+// Defined if any namespace association modes are active.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+# define _GLIBCXX_USE_NAMESPACE_ASSOCIATION 1
+#endif
+
+// Macros for namespace scope. Either namespace std:: or the name
+// of some nested namespace within it.
+// _GLIBCXX_STD
+// _GLIBCXX_STD_D
+// _GLIBCXX_STD_P
+//
+// Macros for enclosing namespaces and possibly nested namespaces.
+// _GLIBCXX_BEGIN_NAMESPACE
+// _GLIBCXX_END_NAMESPACE
+// _GLIBCXX_BEGIN_NESTED_NAMESPACE
+// _GLIBCXX_END_NESTED_NAMESPACE
+#ifndef _GLIBCXX_USE_NAMESPACE_ASSOCIATION
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD_PR _GLIBCXX_STD
+# define _GLIBCXX_STD std
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+#else
+
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION // && not anything else
+#  define _GLIBCXX_STD_D _GLIBCXX_STD
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD _6
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
+#  define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
+# endif
+
+//  debug
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+#  define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D _GLIBCXX_STD
+#  define _GLIBCXX_STD_P __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+# endif
+
+// debug + parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG  && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+#  define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// profile
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL || _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+#   error Cannot use -D_GLIBCXX_PROFILE with -D_GLIBCXX_DEBUG or \
+    -D_GLIBCXX_PARALLEL
+#  endif
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD_PR __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+# endif
+
+# if __NO_INLINE__ && !__GXX_WEAK__
+#  warning currently using namespace associated mode which may fail \
+   without inlining due to lack of weak symbols
+# endif
+
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)  namespace X { namespace Y _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NESTED_NAMESPACE } }
+#endif
+
+// Namespace associations for debug mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __debug { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for parallel mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __parallel { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for profile mode
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __profile { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for versioning mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+namespace std
+{
+  inline namespace _6 { }
+}
+
+namespace __gnu_cxx 
+{ 
+  inline namespace _6 { }
+}
+
+namespace std
+{
+  namespace tr1 
+  { 
+    inline namespace _6 { }
+  }
+}
+#endif
+
+// XXX GLIBCXX_ABI Deprecated
+// Define if compatibility should be provided for -mlong-double-64
+#undef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+// Namespace associations for long double 128 mode.
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 
+namespace std
+{
+  inline namespace __gnu_cxx_ldbl128 { }
+}
+# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
+# define _GLIBCXX_END_LDBL_NAMESPACE }
+#else
+# define _GLIBCXX_LDBL_NAMESPACE
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE
+# define _GLIBCXX_END_LDBL_NAMESPACE
+#endif
+
+
+// Defines for C compatibility. In particular, define extern "C"
+// linkage only when using C++.
+# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
+# define _GLIBCXX_END_EXTERN_C }
+
+#else // !__cplusplus
+# undef _GLIBCXX_BEGIN_NAMESPACE
+# undef _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) 
+# define _GLIBCXX_END_NAMESPACE 
+# define _GLIBCXX_BEGIN_EXTERN_C
+# define _GLIBCXX_END_EXTERN_C 
+#endif
+
+// First includes.
+
+// Pick up any OS-specific definitions.
+#include <bits/os_defines.h>
+
+// Pick up any CPU-specific definitions.
+#include <bits/cpu_defines.h>
+
+// If platform uses neither visibility nor psuedo-visibility,
+// specify empty default for namespace annotation macros.
+#ifndef _GLIBCXX_PSEUDO_VISIBILITY
+#define _GLIBCXX_PSEUDO_VISIBILITY(V)
+#endif
+
+// Allow use of "export template." This is currently not a feature
+// that g++ supports.
+// #define _GLIBCXX_EXPORT_TEMPLATE 1
+
+// Allow use of the GNU syntax extension, "extern template." This
+// extension is fully documented in the g++ manual, but in a nutshell,
+// it inhibits all implicit instantiations and is used throughout the
+// library to avoid multiple weak definitions for required types that
+// are already explicitly instantiated in the library binary. This
+// substantially reduces the binary size of resulting executables.
+
+// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern
+// templates only in basic_string, thus activating its debug-mode
+// checks even at -O0.
+#ifndef _GLIBCXX_EXTERN_TEMPLATE
+# define _GLIBCXX_EXTERN_TEMPLATE 1
+#endif
+
+// Certain function definitions that are meant to be overridable from
+// user code are decorated with this macro.  For some targets, this
+// macro causes these definitions to be weak.
+#ifndef _GLIBCXX_WEAK_DEFINITION
+# define _GLIBCXX_WEAK_DEFINITION
+#endif
+
+// Assert.
+// Avoid the use of assert, because we're trying to keep the <cassert>
+// include out of the mix.
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
+#define __glibcxx_assert(_Condition)
+#else
+_GLIBCXX_BEGIN_NAMESPACE(std)
+  // Avoid the use of assert, because we're trying to keep the <cassert>
+  // include out of the mix.
+  inline void
+  __replacement_assert(const char* __file, int __line, 
+		       const char* __function, const char* __condition)
+  {
+    __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
+		     __function, __condition);
+    __builtin_abort();
+  }
+_GLIBCXX_END_NAMESPACE
+
+#define __glibcxx_assert(_Condition)                               	\
+  do 								        \
+  {							      		\
+    if (! (_Condition))                                                 \
+      std::__replacement_assert(__FILE__, __LINE__, 			\
+				__PRETTY_FUNCTION__, #_Condition);	\
+  } while (false)
+#endif
+
+// The remainder of the prewritten config is automatic; all the
+// user hooks are listed above.
+
+// Create a boolean flag to be used to determine if --fast-math is set.
+#ifdef __FAST_MATH__
+# define _GLIBCXX_FAST_MATH 1
+#else
+# define _GLIBCXX_FAST_MATH 0
+#endif
+
+// This marks string literals in header files to be extracted for eventual
+// translation.  It is primarily used for messages in thrown exceptions; see
+// src/functexcept.cc.  We use __N because the more traditional _N is used
+// for something else under certain OSes (see BADNAMES).
+#define __N(msgid)     (msgid)
+
+// For example, <windows.h> is known to #define min and max as macros...
+#undef min
+#undef max
+
+#ifndef _GLIBCXX_PURE
+# define _GLIBCXX_PURE __attribute__ ((__pure__))
+#endif
+
+#ifndef _GLIBCXX_CONST
+# define _GLIBCXX_CONST __attribute__ ((__const__))
+#endif
+
+#ifndef _GLIBCXX_NORETURN
+# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__))
+#endif
+
+#ifndef _GLIBCXX_NOTHROW
+# ifdef __cplusplus
+#  define _GLIBCXX_NOTHROW throw() 
+# else
+#  define _GLIBCXX_NOTHROW __attribute__((__nothrow__))
+# endif
+#endif
+
+// End of prewritten config; the discovered settings follow.
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the `acosf' function. */
+#define _GLIBCXX_HAVE_ACOSF 1
+
+/* Define to 1 if you have the `acosl' function. */
+#define _GLIBCXX_HAVE_ACOSL 1
+
+/* Define to 1 if you have the `asinf' function. */
+#define _GLIBCXX_HAVE_ASINF 1
+
+/* Define to 1 if you have the `asinl' function. */
+#define _GLIBCXX_HAVE_ASINL 1
+
+/* Define to 1 if the target assembler supports .symver directive. */
+#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
+
+/* Define to 1 if you have the `atan2f' function. */
+#define _GLIBCXX_HAVE_ATAN2F 1
+
+/* Define to 1 if you have the `atan2l' function. */
+#define _GLIBCXX_HAVE_ATAN2L 1
+
+/* Define to 1 if you have the `atanf' function. */
+#define _GLIBCXX_HAVE_ATANF 1
+
+/* Define to 1 if you have the `atanl' function. */
+#define _GLIBCXX_HAVE_ATANL 1
+
+/* Define to 1 if the target assembler supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_CC_TLS */
+
+/* Define to 1 if you have the `ceilf' function. */
+#define _GLIBCXX_HAVE_CEILF 1
+
+/* Define to 1 if you have the `ceill' function. */
+#define _GLIBCXX_HAVE_CEILL 1
+
+/* Define to 1 if you have the <complex.h> header file. */
+#define _GLIBCXX_HAVE_COMPLEX_H 1
+
+/* Define to 1 if you have the `cosf' function. */
+#define _GLIBCXX_HAVE_COSF 1
+
+/* Define to 1 if you have the `coshf' function. */
+#define _GLIBCXX_HAVE_COSHF 1
+
+/* Define to 1 if you have the `coshl' function. */
+#define _GLIBCXX_HAVE_COSHL 1
+
+/* Define to 1 if you have the `cosl' function. */
+#define _GLIBCXX_HAVE_COSL 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define _GLIBCXX_HAVE_DLFCN_H 1
+
+/* Define if EBADMSG exists. */
+#define _GLIBCXX_HAVE_EBADMSG 1
+
+/* Define if ECANCELED exists. */
+#define _GLIBCXX_HAVE_ECANCELED 1
+
+/* Define if EIDRM exists. */
+#define _GLIBCXX_HAVE_EIDRM 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define _GLIBCXX_HAVE_ENDIAN_H 1
+
+/* Define if ENODATA exists. */
+#define _GLIBCXX_HAVE_ENODATA 1
+
+/* Define if ENOLINK exists. */
+#define _GLIBCXX_HAVE_ENOLINK 1
+
+/* Define if ENOSR exists. */
+#define _GLIBCXX_HAVE_ENOSR 1
+
+/* Define if ENOSTR exists. */
+#define _GLIBCXX_HAVE_ENOSTR 1
+
+/* Define if ENOTRECOVERABLE exists. */
+#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1
+
+/* Define if ENOTSUP exists. */
+#define _GLIBCXX_HAVE_ENOTSUP 1
+
+/* Define if EOVERFLOW exists. */
+#define _GLIBCXX_HAVE_EOVERFLOW 1
+
+/* Define if EOWNERDEAD exists. */
+#define _GLIBCXX_HAVE_EOWNERDEAD 1
+
+/* Define if EPROTO exists. */
+#define _GLIBCXX_HAVE_EPROTO 1
+
+/* Define if ETIME exists. */
+#define _GLIBCXX_HAVE_ETIME 1
+
+/* Define if ETXTBSY exists. */
+#define _GLIBCXX_HAVE_ETXTBSY 1
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#define _GLIBCXX_HAVE_EXECINFO_H 1
+
+/* Define to 1 if you have the `expf' function. */
+#define _GLIBCXX_HAVE_EXPF 1
+
+/* Define to 1 if you have the `expl' function. */
+#define _GLIBCXX_HAVE_EXPL 1
+
+/* Define to 1 if you have the `fabsf' function. */
+#define _GLIBCXX_HAVE_FABSF 1
+
+/* Define to 1 if you have the `fabsl' function. */
+#define _GLIBCXX_HAVE_FABSL 1
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#define _GLIBCXX_HAVE_FENV_H 1
+
+/* Define to 1 if you have the `finite' function. */
+#define _GLIBCXX_HAVE_FINITE 1
+
+/* Define to 1 if you have the `finitef' function. */
+#define _GLIBCXX_HAVE_FINITEF 1
+
+/* Define to 1 if you have the `finitel' function. */
+#define _GLIBCXX_HAVE_FINITEL 1
+
+/* Define to 1 if you have the <float.h> header file. */
+#define _GLIBCXX_HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `floorf' function. */
+#define _GLIBCXX_HAVE_FLOORF 1
+
+/* Define to 1 if you have the `floorl' function. */
+#define _GLIBCXX_HAVE_FLOORL 1
+
+/* Define to 1 if you have the `fmodf' function. */
+#define _GLIBCXX_HAVE_FMODF 1
+
+/* Define to 1 if you have the `fmodl' function. */
+#define _GLIBCXX_HAVE_FMODL 1
+
+/* Define to 1 if you have the `fpclass' function. */
+/* #undef _GLIBCXX_HAVE_FPCLASS */
+
+/* Define to 1 if you have the <fp.h> header file. */
+/* #undef _GLIBCXX_HAVE_FP_H */
+
+/* Define to 1 if you have the `frexpf' function. */
+#define _GLIBCXX_HAVE_FREXPF 1
+
+/* Define to 1 if you have the `frexpl' function. */
+#define _GLIBCXX_HAVE_FREXPL 1
+
+/* Define if _Unwind_GetIPInfo is available. */
+#define _GLIBCXX_HAVE_GETIPINFO 1
+
+/* Define if gthr-default.h exists (meaning that threading support is
+   enabled). */
+#define _GLIBCXX_HAVE_GTHR_DEFAULT 1
+
+/* Define to 1 if you have the `hypot' function. */
+#define _GLIBCXX_HAVE_HYPOT 1
+
+/* Define to 1 if you have the `hypotf' function. */
+#define _GLIBCXX_HAVE_HYPOTF 1
+
+/* Define to 1 if you have the `hypotl' function. */
+#define _GLIBCXX_HAVE_HYPOTL 1
+
+/* Define if you have the iconv() function. */
+#define _GLIBCXX_HAVE_ICONV 1
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef _GLIBCXX_HAVE_IEEEFP_H */
+
+/* Define if int64_t is available in <stdint.h>. */
+#define _GLIBCXX_HAVE_INT64_T 1
+
+/* Define if int64_t is a long. */
+/* #undef _GLIBCXX_HAVE_INT64_T_LONG */
+
+/* Define if int64_t is a long long. */
+#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define _GLIBCXX_HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isinf' function. */
+#define _GLIBCXX_HAVE_ISINF 1
+
+/* Define to 1 if you have the `isinff' function. */
+#define _GLIBCXX_HAVE_ISINFF 1
+
+/* Define to 1 if you have the `isinfl' function. */
+#define _GLIBCXX_HAVE_ISINFL 1
+
+/* Define to 1 if you have the `isnan' function. */
+#define _GLIBCXX_HAVE_ISNAN 1
+
+/* Define to 1 if you have the `isnanf' function. */
+#define _GLIBCXX_HAVE_ISNANF 1
+
+/* Define to 1 if you have the `isnanl' function. */
+#define _GLIBCXX_HAVE_ISNANL 1
+
+/* Defined if iswblank exists. */
+#define _GLIBCXX_HAVE_ISWBLANK 1
+
+/* Define if LC_MESSAGES is available in <locale.h>. */
+#define _GLIBCXX_HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the `ldexpf' function. */
+#define _GLIBCXX_HAVE_LDEXPF 1
+
+/* Define to 1 if you have the `ldexpl' function. */
+#define _GLIBCXX_HAVE_LDEXPL 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+/* #undef _GLIBCXX_HAVE_LIBINTL_H */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_AS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
+
+/* Define if futex syscall is available. */
+#define _GLIBCXX_HAVE_LINUX_FUTEX 1
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define _GLIBCXX_HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `log10f' function. */
+#define _GLIBCXX_HAVE_LOG10F 1
+
+/* Define to 1 if you have the `log10l' function. */
+#define _GLIBCXX_HAVE_LOG10L 1
+
+/* Define to 1 if you have the `logf' function. */
+#define _GLIBCXX_HAVE_LOGF 1
+
+/* Define to 1 if you have the `logl' function. */
+#define _GLIBCXX_HAVE_LOGL 1
+
+/* Define to 1 if you have the <machine/endian.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */
+
+/* Define to 1 if you have the <machine/param.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */
+
+/* Define if mbstate_t exists in wchar.h. */
+#define _GLIBCXX_HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define _GLIBCXX_HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `modf' function. */
+#define _GLIBCXX_HAVE_MODF 1
+
+/* Define to 1 if you have the `modff' function. */
+#define _GLIBCXX_HAVE_MODFF 1
+
+/* Define to 1 if you have the `modfl' function. */
+#define _GLIBCXX_HAVE_MODFL 1
+
+/* Define to 1 if you have the <nan.h> header file. */
+/* #undef _GLIBCXX_HAVE_NAN_H */
+
+/* Define if poll is available in <poll.h>. */
+#define _GLIBCXX_HAVE_POLL 1
+
+/* Define to 1 if you have the `powf' function. */
+#define _GLIBCXX_HAVE_POWF 1
+
+/* Define to 1 if you have the `powl' function. */
+#define _GLIBCXX_HAVE_POWL 1
+
+/* Define to 1 if you have the `qfpclass' function. */
+/* #undef _GLIBCXX_HAVE_QFPCLASS */
+
+/* Define to 1 if you have the `setenv' function. */
+/* #undef _GLIBCXX_HAVE_SETENV */
+
+/* Define to 1 if you have the `sincos' function. */
+#define _GLIBCXX_HAVE_SINCOS 1
+
+/* Define to 1 if you have the `sincosf' function. */
+#define _GLIBCXX_HAVE_SINCOSF 1
+
+/* Define to 1 if you have the `sincosl' function. */
+#define _GLIBCXX_HAVE_SINCOSL 1
+
+/* Define to 1 if you have the `sinf' function. */
+#define _GLIBCXX_HAVE_SINF 1
+
+/* Define to 1 if you have the `sinhf' function. */
+#define _GLIBCXX_HAVE_SINHF 1
+
+/* Define to 1 if you have the `sinhl' function. */
+#define _GLIBCXX_HAVE_SINHL 1
+
+/* Define to 1 if you have the `sinl' function. */
+#define _GLIBCXX_HAVE_SINL 1
+
+/* Define to 1 if you have the `sqrtf' function. */
+#define _GLIBCXX_HAVE_SQRTF 1
+
+/* Define to 1 if you have the `sqrtl' function. */
+#define _GLIBCXX_HAVE_SQRTL 1
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define _GLIBCXX_HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define _GLIBCXX_HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define _GLIBCXX_HAVE_STDLIB_H 1
+
+/* Define if strerror_l is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_L 1
+
+/* Define if strerror_r is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define _GLIBCXX_HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define _GLIBCXX_HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtof' function. */
+#define _GLIBCXX_HAVE_STRTOF 1
+
+/* Define to 1 if you have the `strtold' function. */
+#define _GLIBCXX_HAVE_STRTOLD 1
+
+/* Define if strxfrm_l is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRXFRM_L 1
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IPC_H 1
+
+/* Define to 1 if you have the <sys/isa_defs.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */
+
+/* Define to 1 if you have the <sys/machine.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define _GLIBCXX_HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+#define _GLIBCXX_HAVE_SYS_SEM_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define _GLIBCXX_HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define _GLIBCXX_HAVE_SYS_UIO_H 1
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+/* #undef _GLIBCXX_HAVE_S_IFREG */
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+#define _GLIBCXX_HAVE_S_ISREG 1
+
+/* Define to 1 if you have the `tanf' function. */
+#define _GLIBCXX_HAVE_TANF 1
+
+/* Define to 1 if you have the `tanhf' function. */
+#define _GLIBCXX_HAVE_TANHF 1
+
+/* Define to 1 if you have the `tanhl' function. */
+#define _GLIBCXX_HAVE_TANHL 1
+
+/* Define to 1 if you have the `tanl' function. */
+#define _GLIBCXX_HAVE_TANL 1
+
+/* Define to 1 if you have the <tgmath.h> header file. */
+#define _GLIBCXX_HAVE_TGMATH_H 1
+
+/* Define to 1 if the target supports thread-local storage. */
+#define _GLIBCXX_HAVE_TLS 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define _GLIBCXX_HAVE_UNISTD_H 1
+
+/* Defined if vfwscanf exists. */
+#define _GLIBCXX_HAVE_VFWSCANF 1
+
+/* Defined if vswscanf exists. */
+#define _GLIBCXX_HAVE_VSWSCANF 1
+
+/* Defined if vwscanf exists. */
+#define _GLIBCXX_HAVE_VWSCANF 1
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define _GLIBCXX_HAVE_WCHAR_H 1
+
+/* Defined if wcstof exists. */
+#define _GLIBCXX_HAVE_WCSTOF 1
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define _GLIBCXX_HAVE_WCTYPE_H 1
+
+/* Define if writev is available in <sys/uio.h>. */
+#define _GLIBCXX_HAVE_WRITEV 1
+
+/* Define to 1 if you have the `_acosf' function. */
+/* #undef _GLIBCXX_HAVE__ACOSF */
+
+/* Define to 1 if you have the `_acosl' function. */
+/* #undef _GLIBCXX_HAVE__ACOSL */
+
+/* Define to 1 if you have the `_asinf' function. */
+/* #undef _GLIBCXX_HAVE__ASINF */
+
+/* Define to 1 if you have the `_asinl' function. */
+/* #undef _GLIBCXX_HAVE__ASINL */
+
+/* Define to 1 if you have the `_atan2f' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2F */
+
+/* Define to 1 if you have the `_atan2l' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2L */
+
+/* Define to 1 if you have the `_atanf' function. */
+/* #undef _GLIBCXX_HAVE__ATANF */
+
+/* Define to 1 if you have the `_atanl' function. */
+/* #undef _GLIBCXX_HAVE__ATANL */
+
+/* Define to 1 if you have the `_ceilf' function. */
+/* #undef _GLIBCXX_HAVE__CEILF */
+
+/* Define to 1 if you have the `_ceill' function. */
+/* #undef _GLIBCXX_HAVE__CEILL */
+
+/* Define to 1 if you have the `_cosf' function. */
+/* #undef _GLIBCXX_HAVE__COSF */
+
+/* Define to 1 if you have the `_coshf' function. */
+/* #undef _GLIBCXX_HAVE__COSHF */
+
+/* Define to 1 if you have the `_coshl' function. */
+/* #undef _GLIBCXX_HAVE__COSHL */
+
+/* Define to 1 if you have the `_cosl' function. */
+/* #undef _GLIBCXX_HAVE__COSL */
+
+/* Define to 1 if you have the `_expf' function. */
+/* #undef _GLIBCXX_HAVE__EXPF */
+
+/* Define to 1 if you have the `_expl' function. */
+/* #undef _GLIBCXX_HAVE__EXPL */
+
+/* Define to 1 if you have the `_fabsf' function. */
+/* #undef _GLIBCXX_HAVE__FABSF */
+
+/* Define to 1 if you have the `_fabsl' function. */
+/* #undef _GLIBCXX_HAVE__FABSL */
+
+/* Define to 1 if you have the `_finite' function. */
+/* #undef _GLIBCXX_HAVE__FINITE */
+
+/* Define to 1 if you have the `_finitef' function. */
+/* #undef _GLIBCXX_HAVE__FINITEF */
+
+/* Define to 1 if you have the `_finitel' function. */
+/* #undef _GLIBCXX_HAVE__FINITEL */
+
+/* Define to 1 if you have the `_floorf' function. */
+/* #undef _GLIBCXX_HAVE__FLOORF */
+
+/* Define to 1 if you have the `_floorl' function. */
+/* #undef _GLIBCXX_HAVE__FLOORL */
+
+/* Define to 1 if you have the `_fmodf' function. */
+/* #undef _GLIBCXX_HAVE__FMODF */
+
+/* Define to 1 if you have the `_fmodl' function. */
+/* #undef _GLIBCXX_HAVE__FMODL */
+
+/* Define to 1 if you have the `_fpclass' function. */
+/* #undef _GLIBCXX_HAVE__FPCLASS */
+
+/* Define to 1 if you have the `_frexpf' function. */
+/* #undef _GLIBCXX_HAVE__FREXPF */
+
+/* Define to 1 if you have the `_frexpl' function. */
+/* #undef _GLIBCXX_HAVE__FREXPL */
+
+/* Define to 1 if you have the `_hypot' function. */
+/* #undef _GLIBCXX_HAVE__HYPOT */
+
+/* Define to 1 if you have the `_hypotf' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTF */
+
+/* Define to 1 if you have the `_hypotl' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTL */
+
+/* Define to 1 if you have the `_isinf' function. */
+/* #undef _GLIBCXX_HAVE__ISINF */
+
+/* Define to 1 if you have the `_isinff' function. */
+/* #undef _GLIBCXX_HAVE__ISINFF */
+
+/* Define to 1 if you have the `_isinfl' function. */
+/* #undef _GLIBCXX_HAVE__ISINFL */
+
+/* Define to 1 if you have the `_isnan' function. */
+/* #undef _GLIBCXX_HAVE__ISNAN */
+
+/* Define to 1 if you have the `_isnanf' function. */
+/* #undef _GLIBCXX_HAVE__ISNANF */
+
+/* Define to 1 if you have the `_isnanl' function. */
+/* #undef _GLIBCXX_HAVE__ISNANL */
+
+/* Define to 1 if you have the `_ldexpf' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPF */
+
+/* Define to 1 if you have the `_ldexpl' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPL */
+
+/* Define to 1 if you have the `_log10f' function. */
+/* #undef _GLIBCXX_HAVE__LOG10F */
+
+/* Define to 1 if you have the `_log10l' function. */
+/* #undef _GLIBCXX_HAVE__LOG10L */
+
+/* Define to 1 if you have the `_logf' function. */
+/* #undef _GLIBCXX_HAVE__LOGF */
+
+/* Define to 1 if you have the `_logl' function. */
+/* #undef _GLIBCXX_HAVE__LOGL */
+
+/* Define to 1 if you have the `_modf' function. */
+/* #undef _GLIBCXX_HAVE__MODF */
+
+/* Define to 1 if you have the `_modff' function. */
+/* #undef _GLIBCXX_HAVE__MODFF */
+
+/* Define to 1 if you have the `_modfl' function. */
+/* #undef _GLIBCXX_HAVE__MODFL */
+
+/* Define to 1 if you have the `_powf' function. */
+/* #undef _GLIBCXX_HAVE__POWF */
+
+/* Define to 1 if you have the `_powl' function. */
+/* #undef _GLIBCXX_HAVE__POWL */
+
+/* Define to 1 if you have the `_qfpclass' function. */
+/* #undef _GLIBCXX_HAVE__QFPCLASS */
+
+/* Define to 1 if you have the `_sincos' function. */
+/* #undef _GLIBCXX_HAVE__SINCOS */
+
+/* Define to 1 if you have the `_sincosf' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSF */
+
+/* Define to 1 if you have the `_sincosl' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSL */
+
+/* Define to 1 if you have the `_sinf' function. */
+/* #undef _GLIBCXX_HAVE__SINF */
+
+/* Define to 1 if you have the `_sinhf' function. */
+/* #undef _GLIBCXX_HAVE__SINHF */
+
+/* Define to 1 if you have the `_sinhl' function. */
+/* #undef _GLIBCXX_HAVE__SINHL */
+
+/* Define to 1 if you have the `_sinl' function. */
+/* #undef _GLIBCXX_HAVE__SINL */
+
+/* Define to 1 if you have the `_sqrtf' function. */
+/* #undef _GLIBCXX_HAVE__SQRTF */
+
+/* Define to 1 if you have the `_sqrtl' function. */
+/* #undef _GLIBCXX_HAVE__SQRTL */
+
+/* Define to 1 if you have the `_tanf' function. */
+/* #undef _GLIBCXX_HAVE__TANF */
+
+/* Define to 1 if you have the `_tanhf' function. */
+/* #undef _GLIBCXX_HAVE__TANHF */
+
+/* Define to 1 if you have the `_tanhl' function. */
+/* #undef _GLIBCXX_HAVE__TANHL */
+
+/* Define to 1 if you have the `_tanl' function. */
+/* #undef _GLIBCXX_HAVE__TANL */
+
+/* Define as const if the declaration of iconv() needs const. */
+#define _GLIBCXX_ICONV_CONST 
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+/* #undef _GLIBCXX_PACKAGE */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define _GLIBCXX_PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define _GLIBCXX_PACKAGE_NAME "package-unused"
+
+/* Define to the full name and version of this package. */
+#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused"
+
+/* Define to the one symbol short name of this package. */
+#define _GLIBCXX_PACKAGE_TARNAME "libstdc++"
+
+/* Define to the home page for this package. */
+#define _GLIBCXX_PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused"
+
+/* The size of `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of `void *', as computed by sizeof. */
+/* #undef SIZEOF_VOID_P */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+/* #undef _GLIBCXX_VERSION */
+
+/* Define if builtin atomic operations for bool are supported on this host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_1 1
+
+/* Define if builtin atomic operations for short are supported on this host.
+   */
+#define _GLIBCXX_ATOMIC_BUILTINS_2 1
+
+/* Define if builtin atomic operations for int are supported on this host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_4 1
+
+/* Define if builtin atomic operations for long long are supported on this
+   host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_8 */
+
+/* Define to use concept checking code from the boost libraries. */
+/* #undef _GLIBCXX_CONCEPT_CHECKS */
+
+/* Define to 1 if building for use with CSLIBC, or 0 otherwise. */
+#define _GLIBCXX_CSLIBC 0
+
+/* Define if a fully dynamic basic_string is wanted. */
+/* #undef _GLIBCXX_FULLY_DYNAMIC_STRING */
+
+/* Define if gthreads library is available. */
+#define _GLIBCXX_HAS_GTHREADS 1
+
+/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
+#define _GLIBCXX_HOSTED 1
+
+/* Define if compatibility should be provided for -mlong-double-64. */
+
+/* Define if ptrdiff_t is int. */
+#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+
+/* Define if using setrlimit to set resource limits during "make check" */
+/* #undef _GLIBCXX_RES_LIMITS */
+
+/* Define if size_t is unsigned int. */
+#define _GLIBCXX_SIZE_T_IS_UINT 1
+
+/* Define if the compiler is configured for setjmp/longjmp exceptions. */
+/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
+
+/* Define if EOF == -1, SEEK_CUR == 1, SEEK_END == 2. */
+#define _GLIBCXX_STDIO_MACROS 1
+
+/* Define to use symbol versioning in the shared library. */
+#define _GLIBCXX_SYMVER 1
+
+/* Define to use darwin versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_DARWIN */
+
+/* Define to use GNU versioning in the shared library. */
+#define _GLIBCXX_SYMVER_GNU 1
+
+/* Define to use GNU namespace versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */
+
+/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
+   <stdio.h>, and <stdlib.h> can be used or exposed. */
+#define _GLIBCXX_USE_C99 1
+
+/* Define if C99 functions in <complex.h> should be used in <complex>. Using
+   compiler builtins for these functions requires corresponding C99 library
+   functions to be present. */
+#define _GLIBCXX_USE_C99_COMPLEX 1
+
+/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
+   Using compiler builtins for these functions requires corresponding C99
+   library functions to be present. */
+#define _GLIBCXX_USE_C99_COMPLEX_TR1 1
+
+/* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_CTYPE_TR1 1
+
+/* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_FENV_TR1 1
+
+/* Define if C99 functions in <inttypes.h> should be imported in
+   <tr1/cinttypes> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_INTTYPES_TR1 1
+
+/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
+   <tr1/cinttypes> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1
+
+/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
+   in namespace std. */
+#define _GLIBCXX_USE_C99_MATH 1
+
+/* Define if C99 functions or macros in <math.h> should be imported in
+   <tr1/cmath> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_MATH_TR1 1
+
+/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_STDINT_TR1 1
+
+/* Defined if clock_gettime has monotonic clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */
+
+/* Defined if clock_gettime has realtime clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_REALTIME */
+
+/* Define if ISO/IEC TR 24733 decimal floating point types are supported on
+   this host. */
+/* #undef _GLIBCXX_USE_DECIMAL_FLOAT */
+
+/* Defined if gettimeofday is available. */
+#define _GLIBCXX_USE_GETTIMEOFDAY 1
+
+/* Define if LFS support is available. */
+#define _GLIBCXX_USE_LFS 1
+
+/* Define if code specialized for long long should be used. */
+#define _GLIBCXX_USE_LONG_LONG 1
+
+/* Defined if nanosleep is available. */
+/* #undef _GLIBCXX_USE_NANOSLEEP */
+
+/* Define if NLS translations are to be used. */
+/* #undef _GLIBCXX_USE_NLS */
+
+/* Define if /dev/random and /dev/urandom are available for the random_device
+   of TR1 (Chapter 5.1). */
+#define _GLIBCXX_USE_RANDOM_TR1 1
+
+/* Defined if sched_yield is available. */
+/* #undef _GLIBCXX_USE_SCHED_YIELD */
+
+/* Define if code specialized for wchar_t should be used. */
+#define _GLIBCXX_USE_WCHAR_T 1
+
+#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)
+# define _GLIBCXX_HAVE_ACOSF 1
+# define acosf _acosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL)
+# define _GLIBCXX_HAVE_ACOSL 1
+# define acosl _acosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF)
+# define _GLIBCXX_HAVE_ASINF 1
+# define asinf _asinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL)
+# define _GLIBCXX_HAVE_ASINL 1
+# define asinl _asinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F)
+# define _GLIBCXX_HAVE_ATAN2F 1
+# define atan2f _atan2f
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L)
+# define _GLIBCXX_HAVE_ATAN2L 1
+# define atan2l _atan2l
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF)
+# define _GLIBCXX_HAVE_ATANF 1
+# define atanf _atanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL)
+# define _GLIBCXX_HAVE_ATANL 1
+# define atanl _atanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF)
+# define _GLIBCXX_HAVE_CEILF 1
+# define ceilf _ceilf
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL)
+# define _GLIBCXX_HAVE_CEILL 1
+# define ceill _ceill
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF)
+# define _GLIBCXX_HAVE_COSF 1
+# define cosf _cosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF)
+# define _GLIBCXX_HAVE_COSHF 1
+# define coshf _coshf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL)
+# define _GLIBCXX_HAVE_COSHL 1
+# define coshl _coshl
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL)
+# define _GLIBCXX_HAVE_COSL 1
+# define cosl _cosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF)
+# define _GLIBCXX_HAVE_EXPF 1
+# define expf _expf
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL)
+# define _GLIBCXX_HAVE_EXPL 1
+# define expl _expl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF)
+# define _GLIBCXX_HAVE_FABSF 1
+# define fabsf _fabsf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL)
+# define _GLIBCXX_HAVE_FABSL 1
+# define fabsl _fabsl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE)
+# define _GLIBCXX_HAVE_FINITE 1
+# define finite _finite
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF)
+# define _GLIBCXX_HAVE_FINITEF 1
+# define finitef _finitef
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL)
+# define _GLIBCXX_HAVE_FINITEL 1
+# define finitel _finitel
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF)
+# define _GLIBCXX_HAVE_FLOORF 1
+# define floorf _floorf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL)
+# define _GLIBCXX_HAVE_FLOORL 1
+# define floorl _floorl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF)
+# define _GLIBCXX_HAVE_FMODF 1
+# define fmodf _fmodf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL)
+# define _GLIBCXX_HAVE_FMODL 1
+# define fmodl _fmodl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS)
+# define _GLIBCXX_HAVE_FPCLASS 1
+# define fpclass _fpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF)
+# define _GLIBCXX_HAVE_FREXPF 1
+# define frexpf _frexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL)
+# define _GLIBCXX_HAVE_FREXPL 1
+# define frexpl _frexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT)
+# define _GLIBCXX_HAVE_HYPOT 1
+# define hypot _hypot
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF)
+# define _GLIBCXX_HAVE_HYPOTF 1
+# define hypotf _hypotf
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL)
+# define _GLIBCXX_HAVE_HYPOTL 1
+# define hypotl _hypotl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF)
+# define _GLIBCXX_HAVE_ISINF 1
+# define isinf _isinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF)
+# define _GLIBCXX_HAVE_ISINFF 1
+# define isinff _isinff
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL)
+# define _GLIBCXX_HAVE_ISINFL 1
+# define isinfl _isinfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN)
+# define _GLIBCXX_HAVE_ISNAN 1
+# define isnan _isnan
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF)
+# define _GLIBCXX_HAVE_ISNANF 1
+# define isnanf _isnanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL)
+# define _GLIBCXX_HAVE_ISNANL 1
+# define isnanl _isnanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF)
+# define _GLIBCXX_HAVE_LDEXPF 1
+# define ldexpf _ldexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL)
+# define _GLIBCXX_HAVE_LDEXPL 1
+# define ldexpl _ldexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F)
+# define _GLIBCXX_HAVE_LOG10F 1
+# define log10f _log10f
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L)
+# define _GLIBCXX_HAVE_LOG10L 1
+# define log10l _log10l
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF)
+# define _GLIBCXX_HAVE_LOGF 1
+# define logf _logf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL)
+# define _GLIBCXX_HAVE_LOGL 1
+# define logl _logl
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF)
+# define _GLIBCXX_HAVE_MODF 1
+# define modf _modf
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF)
+# define _GLIBCXX_HAVE_MODFF 1
+# define modff _modff
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL)
+# define _GLIBCXX_HAVE_MODFL 1
+# define modfl _modfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF)
+# define _GLIBCXX_HAVE_POWF 1
+# define powf _powf
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL)
+# define _GLIBCXX_HAVE_POWL 1
+# define powl _powl
+#endif
+
+#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS)
+# define _GLIBCXX_HAVE_QFPCLASS 1
+# define qfpclass _qfpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS)
+# define _GLIBCXX_HAVE_SINCOS 1
+# define sincos _sincos
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF)
+# define _GLIBCXX_HAVE_SINCOSF 1
+# define sincosf _sincosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL)
+# define _GLIBCXX_HAVE_SINCOSL 1
+# define sincosl _sincosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF)
+# define _GLIBCXX_HAVE_SINF 1
+# define sinf _sinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF)
+# define _GLIBCXX_HAVE_SINHF 1
+# define sinhf _sinhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL)
+# define _GLIBCXX_HAVE_SINHL 1
+# define sinhl _sinhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL)
+# define _GLIBCXX_HAVE_SINL 1
+# define sinl _sinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF)
+# define _GLIBCXX_HAVE_SQRTF 1
+# define sqrtf _sqrtf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL)
+# define _GLIBCXX_HAVE_SQRTL 1
+# define sqrtl _sqrtl
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF)
+# define _GLIBCXX_HAVE_STRTOF 1
+# define strtof _strtof
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD)
+# define _GLIBCXX_HAVE_STRTOLD 1
+# define strtold _strtold
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF)
+# define _GLIBCXX_HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF)
+# define _GLIBCXX_HAVE_TANHF 1
+# define tanhf _tanhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL)
+# define _GLIBCXX_HAVE_TANHL 1
+# define tanhl _tanhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL)
+# define _GLIBCXX_HAVE_TANL 1
+# define tanl _tanl
+#endif
+
+#endif // _GLIBCXX_CXX_CONFIG_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++io.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++io.h
new file mode 100644
index 0000000..86ca53b
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++io.h
@@ -0,0 +1,49 @@
+// Underlying io library details -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++io.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// c_io_stdio.h - Defines for using "C" stdio.h
+
+#ifndef _GLIBCXX_CXX_IO_H
+#define _GLIBCXX_CXX_IO_H 1
+
+#include <cstdio>
+#include <cstddef>
+#include <bits/gthr.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  typedef __gthread_mutex_t __c_lock;
+
+  // for basic_file.h
+  typedef FILE __c_file;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++locale.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++locale.h
new file mode 100644
index 0000000..749a97a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/c++locale.h
@@ -0,0 +1,110 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++locale.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _GLIBCXX_CXX_LOCALE_H
+#define _GLIBCXX_CXX_LOCALE_H 1
+
+#pragma GCC system_header
+
+#include <clocale>
+#include <cstddef>
+
+#define _GLIBCXX_C_LOCALE_GNU 1
+
+#define _GLIBCXX_NUM_CATEGORIES 6
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  extern "C" __typeof(uselocale) __uselocale;
+
+_GLIBCXX_END_NAMESPACE
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  typedef __locale_t		__c_locale;
+
+  // Convert numeric value of type double and long double to string and
+  // return length of string.  If vsnprintf is available use it, otherwise
+  // fall back to the unsafe vsprintf which, in general, can be dangerous
+  // and should be avoided.
+  inline int
+  __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)),
+		   char* __out,
+		   const int __size __attribute__ ((__unused__)),
+		   const char* __fmt, ...)
+  {
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+#else
+    char* __old = std::setlocale(LC_NUMERIC, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	std::setlocale(LC_NUMERIC, "C");
+      }
+#endif
+
+    __builtin_va_list __args;
+    __builtin_va_start(__args, __fmt);
+
+#ifdef _GLIBCXX_USE_C99
+    const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+#else
+    const int __ret = __builtin_vsprintf(__out, __fmt, __args);
+#endif
+
+    __builtin_va_end(__args);
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __gnu_cxx::__uselocale(__old);
+#else
+    if (__sav)
+      {
+	std::setlocale(LC_NUMERIC, __sav);
+	delete [] __sav;
+      }
+#endif
+    return __ret;
+  }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/cpu_defines.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/cpu_defines.h
new file mode 100644
index 0000000..faf97e1
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/cpu_defines.h
@@ -0,0 +1,33 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cpu_defines.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CPU_DEFINES
+#define _GLIBCXX_CPU_DEFINES 1
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_base.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_base.h
new file mode 100644
index 0000000..ff1f157
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_base.h
@@ -0,0 +1,61 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+/** @file ctype_base.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Information as gleaned from /usr/include/ctype.h
+  
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /// @brief  Base class for ctype.
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype<char>::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned short 	mask;   
+    static const mask upper    	= _ISupper;
+    static const mask lower 	= _ISlower;
+    static const mask alpha 	= _ISalpha;
+    static const mask digit 	= _ISdigit;
+    static const mask xdigit 	= _ISxdigit;
+    static const mask space 	= _ISspace;
+    static const mask print 	= _ISprint;
+    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
+    static const mask cntrl 	= _IScntrl;
+    static const mask punct 	= _ISpunct;
+    static const mask alnum 	= _ISalpha | _ISdigit;
+  };
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_inline.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_inline.h
new file mode 100644
index 0000000..8ae8229
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_inline.h
@@ -0,0 +1,73 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 2002, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_inline.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+  
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  bool
+  ctype<char>::
+  is(mask __m, char __c) const
+  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
+
+  const char*
+  ctype<char>::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype<char>::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype<char>::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_noninline.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_noninline.h
new file mode 100644
index 0000000..4fc47a9
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/ctype_noninline.h
@@ -0,0 +1,190 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_noninline.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// Information as gleaned from /usr/include/ctype.h
+
+#if _GLIBCXX_C_LOCALE_GNU
+  const ctype_base::mask*
+  ctype<char>::classic_table() throw()
+  { return _S_get_c_locale()->__ctype_b; }
+#else
+  const ctype_base::mask*
+  ctype<char>::classic_table() throw()
+  {
+    const ctype_base::mask* __ret;
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __ret = *__ctype_b_loc();
+#else
+    __ret = __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    return __ret;
+  }
+#endif
+
+#if _GLIBCXX_C_LOCALE_GNU
+  ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)), 
+  _M_del(__table != 0 && __del), 
+  _M_toupper(_M_c_locale_ctype->__ctype_toupper),  
+  _M_tolower(_M_c_locale_ctype->__ctype_tolower), 
+  _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), 
+  _M_widen_ok(0), _M_narrow_ok(0) 
+  {
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#else
+  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
+  {
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {    
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);    
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    _M_toupper = *__ctype_toupper_loc();
+    _M_tolower = *__ctype_tolower_loc();
+    _M_table = __table ? __table : *__ctype_b_loc();
+#else
+    _M_toupper = __ctype_toupper;
+    _M_tolower = __ctype_tolower;
+    _M_table = __table ? __table : __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#endif
+
+#if _GLIBCXX_C_LOCALE_GNU
+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del),
+  _M_toupper(_M_c_locale_ctype->__ctype_toupper),  
+  _M_tolower(_M_c_locale_ctype->__ctype_tolower), 
+  _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), 
+  _M_widen_ok(0), _M_narrow_ok(0) 
+  {
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#else
+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
+  {
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    _M_toupper = *__ctype_toupper_loc();
+    _M_tolower = *__ctype_tolower_loc();
+    _M_table = __table ? __table : *__ctype_b_loc();
+#else
+    _M_toupper = __ctype_toupper;
+    _M_tolower = __ctype_tolower;
+    _M_table = __table ? __table : __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#endif
+
+  char
+  ctype<char>::do_toupper(char __c) const
+  { return _M_toupper[static_cast<unsigned char>(__c)]; }
+
+  const char*
+  ctype<char>::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype<char>::do_tolower(char __c) const
+  { return _M_tolower[static_cast<unsigned char>(__c)]; }
+
+  const char* 
+  ctype<char>::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
+	++__low;
+      }
+    return __high;
+  }
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/cxxabi_tweaks.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/cxxabi_tweaks.h
new file mode 100644
index 0000000..1bfc588
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/cxxabi_tweaks.h
@@ -0,0 +1,81 @@
+// Control various target specific ABI tweaks.  ARM version.
+
+// Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cxxabi_tweaks.h
+ *  The header provides an CPU-variable interface to the C++ ABI.
+ */
+
+#ifndef _CXXABI_TWEAKS_H
+#define _CXXABI_TWEAKS_H 1
+
+#ifdef __cplusplus
+namespace __cxxabiv1
+{
+  extern "C" 
+  {
+#endif
+
+#ifdef __ARM_EABI__
+  // The ARM EABI uses the least significant bit of a 32-bit
+  // guard variable.  */
+#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(x) = 1
+#define _GLIBCXX_GUARD_BIT 1
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+  typedef int __guard;
+
+  // We also want the element size in array cookies.
+#define _GLIBCXX_ELTSIZE_IN_COOKIE 1
+  
+  // __cxa_vec_ctor should return a pointer to the array.
+  typedef void * __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x
+  // Constructors and destructors return the "this" pointer.
+  typedef void * __cxa_cdtor_return_type;
+
+#else // __ARM_EABI__
+
+  // The generic ABI uses the first byte of a 64-bit guard variable.
+#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+  __extension__ typedef int __guard __attribute__((mode (__DI__)));
+
+  // __cxa_vec_ctor has void return type.
+  typedef void __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
+  // Constructors and destructors do not return a value.
+  typedef void __cxa_cdtor_return_type;
+
+#endif //!__ARM_EABI__
+
+#ifdef __cplusplus
+  }
+} // namespace __cxxabiv1
+#endif
+
+#endif 
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/error_constants.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/error_constants.h
new file mode 100644
index 0000000..61c0349
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/error_constants.h
@@ -0,0 +1,175 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file error_constants.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ERROR_CONSTANTS
+#define _GLIBCXX_ERROR_CONSTANTS 1
+
+#include <bits/c++config.h>
+#include <cerrno>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  enum class errc
+    {
+      address_family_not_supported = 		EAFNOSUPPORT,
+      address_in_use = 				EADDRINUSE,
+      address_not_available = 			EADDRNOTAVAIL,
+      already_connected = 			EISCONN,
+      argument_list_too_long = 			E2BIG,
+      argument_out_of_domain = 			EDOM,
+      bad_address = 				EFAULT,
+      bad_file_descriptor = 			EBADF,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+      bad_message = 				EBADMSG,
+#endif
+
+      broken_pipe = 				EPIPE,
+      connection_aborted = 			ECONNABORTED,
+      connection_already_in_progress = 		EALREADY,
+      connection_refused = 			ECONNREFUSED,
+      connection_reset = 			ECONNRESET,
+      cross_device_link = 			EXDEV,
+      destination_address_required = 		EDESTADDRREQ,
+      device_or_resource_busy = 		EBUSY,
+      directory_not_empty = 			ENOTEMPTY,
+      executable_format_error = 		ENOEXEC,
+      file_exists = 	       			EEXIST,
+      file_too_large = 				EFBIG,
+      filename_too_long = 			ENAMETOOLONG,
+      function_not_supported = 			ENOSYS,
+      host_unreachable = 			EHOSTUNREACH,
+
+#ifdef _GLIBCXX_HAVE_EIDRM
+      identifier_removed = 			EIDRM,
+#endif
+
+      illegal_byte_sequence = 			EILSEQ,
+      inappropriate_io_control_operation = 	ENOTTY,
+      interrupted = 				EINTR,
+      invalid_argument = 			EINVAL,
+      invalid_seek = 				ESPIPE,
+      io_error = 				EIO,
+      is_a_directory = 				EISDIR,
+      message_size = 				EMSGSIZE,
+      network_down = 				ENETDOWN,
+      network_reset = 				ENETRESET,
+      network_unreachable = 			ENETUNREACH,
+      no_buffer_space = 			ENOBUFS,
+      no_child_process = 			ECHILD,
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+      no_link = 				ENOLINK,
+#endif
+
+      no_lock_available = 			ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+      no_message_available = 			ENODATA, 
+#endif
+
+      no_message = 				ENOMSG, 
+      no_protocol_option = 			ENOPROTOOPT,
+      no_space_on_device = 			ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+      no_stream_resources = 			ENOSR,
+#endif
+
+      no_such_device_or_address = 		ENXIO,
+      no_such_device = 				ENODEV,
+      no_such_file_or_directory = 		ENOENT,
+      no_such_process = 			ESRCH,
+      not_a_directory = 			ENOTDIR,
+      not_a_socket = 				ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+      not_a_stream = 				ENOSTR,
+#endif
+
+      not_connected = 				ENOTCONN,
+      not_enough_memory = 			ENOMEM,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
+      not_supported = 				ENOTSUP,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+      operation_canceled = 			ECANCELED,
+#endif
+
+      operation_in_progress = 			EINPROGRESS,
+      operation_not_permitted = 		EPERM,
+      operation_not_supported = 		EOPNOTSUPP,
+      operation_would_block = 			EWOULDBLOCK,
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+      owner_dead = 				EOWNERDEAD,
+#endif
+
+      permission_denied = 			EACCES,
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+      protocol_error = 				EPROTO,
+#endif
+
+      protocol_not_supported = 			EPROTONOSUPPORT,
+      read_only_file_system = 			EROFS,
+      resource_deadlock_would_occur = 		EDEADLK,
+      resource_unavailable_try_again = 		EAGAIN,
+      result_out_of_range = 			ERANGE,
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+      state_not_recoverable = 			ENOTRECOVERABLE,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+      stream_timeout = 				ETIME,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETXTBSY
+      text_file_busy = 				ETXTBSY,
+#endif
+
+      timed_out = 				ETIMEDOUT,
+      too_many_files_open_in_system = 		ENFILE,
+      too_many_files_open = 			EMFILE,
+      too_many_links = 				EMLINK,
+      too_many_symbolic_link_levels = 		ELOOP,
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+      value_too_large = 			EOVERFLOW,
+#endif
+
+      wrong_protocol_type = 			EPROTOTYPE
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/extc++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/extc++.h
new file mode 100644
index 0000000..03e5339
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/extc++.h
@@ -0,0 +1,71 @@
+// C++ includes used for precompiling extensions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file extc++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#include <bits/stdtr1c++.h>
+#endif
+
+#include <ext/algorithm>
+#include <ext/array_allocator.h>
+#include <ext/atomicity.h>
+#include <ext/bitmap_allocator.h>
+#include <ext/cast.h>
+#include <ext/concurrence.h>
+#include <ext/debug_allocator.h>
+#include <ext/extptr_allocator.h>
+#include <ext/functional>
+#include <ext/iterator>
+#include <ext/malloc_allocator.h>
+#include <ext/memory>
+#include <ext/mt_allocator.h>
+#include <ext/new_allocator.h>
+#include <ext/numeric>
+#include <ext/pod_char_traits.h>
+#include <ext/pointer.h>
+#include <ext/pool_allocator.h>
+#include <ext/rb_tree>
+#include <ext/rope>
+#include <ext/slist>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+#include <ext/throw_allocator.h>
+#include <ext/typelist.h>
+#include <ext/type_traits.h>
+#include <ext/vstring.h>
+#include <ext/pb_ds/assoc_container.hpp>
+#include <ext/pb_ds/priority_queue.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/hash_policy.hpp>
+#include <ext/pb_ds/list_update_policy.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/trie_policy.hpp>
+
+#ifdef _GLIBCXX_HAVE_ICONV
+ #include <ext/codecvt_specializations.h>
+ #include <ext/enc_filebuf.h>
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-default.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-default.h
new file mode 100644
index 0000000..2817cbd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-default.h
@@ -0,0 +1,895 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+   2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported.  Please look at comments
+   in gthr.h for details. */
+#define __GTHREAD_HAS_COND	1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+#  define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+  __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo.  */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+   map a subset of the POSIX pthread API to mangled versions of their
+   names.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+__gthrw(pthread_cancel)
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+   -pthreads is not specified.  The functions are dummies and most return an
+   error value.  However pthread_once returns 0 without invoking the routine
+   it is passed so we cannot pretend that the interface is active if -pthreads
+   is not specified.  On Solaris 2.5.1, the interface is not exposed at all so
+   we need to play the usual game with weak symbols.  On Solaris 10 and up, a
+   working interface is always exposed.  On FreeBSD 6 and later, libc also
+   exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+   to 9 does.  FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+   which means the alternate __gthread_active_p below cannot be used there.  */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+  __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      if (__gthrw_(pthread_once))
+	{
+	  /* If this really is a threaded program, then we must ensure that
+	     __gthread_active has been set to 1 before exiting this block.  */
+	  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+	  __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+	  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+	}
+
+      /* Make sure we'll never enter this block again.  */
+      if (__gthread_active < 0)
+	__gthread_active = 0;
+
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+  static void *const __gthread_active_ptr
+    = __extension__ (void *) &__gthrw_(pthread_cancel);
+  return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+   calls in shared flavors of the HP-UX C library.  Most of the stubs
+   have no functionality.  The details are described in the "libc cumulative
+   patch" for each subversion of HP-UX 11.  There are two special interfaces
+   provided for checking whether an application is linked to a pthread
+   library or not.  However, these interfaces aren't available in early
+   libc versions.  We also can't use pthread_once as some libc versions
+   call the init function.  So, we use pthread_create to check whether it
+   is possible to create a thread or not.  The stub implementation returns
+   the error number ENOSYS.  */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+  return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  pthread_t __t;
+  pthread_attr_t __a;
+  int __result;
+
+  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+  if (__gthread_active < 0)
+    {
+      __gthrw_(pthread_attr_init) (&__a);
+      __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+      __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+      if (__result != ENOSYS)
+	__gthread_active = 1;
+      else
+	__gthread_active = 0;
+      __gthrw_(pthread_attr_destroy) (&__a);
+    }
+  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      __gthread_active_init ();
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  if (__gthread_active_p ())
+    {
+      /* Initialize the thread storage key.  */
+      if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+	{
+	  /* The normal default detach state for threads is
+	   * PTHREAD_CREATE_JOINABLE which causes threads to not die
+	   * when you think they should.  */
+	  if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+	      && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+					      PTHREAD_CREATE_DETACHED) == 0)
+	    return 0;
+	}
+    }
+
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+      && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+    return 0;
+
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+  objc_thread_t thread_id;
+  pthread_t new_thread_handle;
+
+  if (!__gthread_active_p ())
+    return NULL;
+
+  if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+    thread_id = (objc_thread_t) new_thread_handle;
+  else
+    thread_id = NULL;
+
+  return thread_id;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+  if (!__gthread_active_p ())
+    return -1;
+  else
+    {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+      pthread_t thread_id = __gthrw_(pthread_self) ();
+      int policy;
+      struct sched_param params;
+      int priority_min, priority_max;
+
+      if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+	{
+	  if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+	    return -1;
+
+	  if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+	    return -1;
+
+	  if (priority > priority_max)
+	    priority = priority_max;
+	  else if (priority < priority_min)
+	    priority = priority_min;
+	  params.sched_priority = priority;
+
+	  /*
+	   * The solaris 7 and several other man pages incorrectly state that
+	   * this should be a pointer to policy but pthread.h is universally
+	   * at odds with this.
+	   */
+	  if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+	    return 0;
+	}
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+      return -1;
+    }
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+  if (__gthread_active_p ())
+    {
+      int policy;
+      struct sched_param params;
+
+      if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+	return params.sched_priority;
+      else
+	return -1;
+    }
+  else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+    return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  if (__gthread_active_p ())
+    __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  if (__gthread_active_p ())
+    /* exit the thread */
+    __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+  /* Failed if we reached here */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  if (__gthread_active_p ())
+    return (objc_thread_t) __gthrw_(pthread_self) ();
+  else
+    return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+  else
+    {
+      thread_local_storage = value;
+      return 0;
+    }
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+  else
+    return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+      if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+	{
+	  objc_free (mutex->backend);
+	  mutex->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      int count;
+
+      /*
+       * Posix Threads specifically require that the thread be unlocked
+       * for __gthrw_(pthread_mutex_destroy) to work.
+       */
+
+      do
+	{
+	  count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+	  if (count < 0)
+	    return -1;
+	}
+      while (count);
+
+      if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+	return -1;
+
+      objc_free (mutex->backend);
+      mutex->backend = NULL;
+    }
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+      if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+	{
+	  objc_free (condition->backend);
+	  condition->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+	return -1;
+
+      objc_free (condition->backend);
+      condition->backend = NULL;
+    }
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+			      (pthread_mutex_t *) mutex->backend);
+  else
+    return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+		  void *__args)
+{
+  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+  return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+  return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+  return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+  return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+  return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+			   const __gthread_time_t *__abs_timeout)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+  else
+    return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+				     const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+  return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+			  const __gthread_time_t *__abs_timeout)
+{
+  return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+			       __gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+				    __gthread_recursive_mutex_t *__mutex,
+				    const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+  return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-posix.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-posix.h
new file mode 100644
index 0000000..2817cbd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-posix.h
@@ -0,0 +1,895 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+   2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported.  Please look at comments
+   in gthr.h for details. */
+#define __GTHREAD_HAS_COND	1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+#  define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+  __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo.  */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+   map a subset of the POSIX pthread API to mangled versions of their
+   names.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+__gthrw(pthread_cancel)
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+   -pthreads is not specified.  The functions are dummies and most return an
+   error value.  However pthread_once returns 0 without invoking the routine
+   it is passed so we cannot pretend that the interface is active if -pthreads
+   is not specified.  On Solaris 2.5.1, the interface is not exposed at all so
+   we need to play the usual game with weak symbols.  On Solaris 10 and up, a
+   working interface is always exposed.  On FreeBSD 6 and later, libc also
+   exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+   to 9 does.  FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+   which means the alternate __gthread_active_p below cannot be used there.  */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+  __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      if (__gthrw_(pthread_once))
+	{
+	  /* If this really is a threaded program, then we must ensure that
+	     __gthread_active has been set to 1 before exiting this block.  */
+	  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+	  __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+	  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+	}
+
+      /* Make sure we'll never enter this block again.  */
+      if (__gthread_active < 0)
+	__gthread_active = 0;
+
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+  static void *const __gthread_active_ptr
+    = __extension__ (void *) &__gthrw_(pthread_cancel);
+  return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+   calls in shared flavors of the HP-UX C library.  Most of the stubs
+   have no functionality.  The details are described in the "libc cumulative
+   patch" for each subversion of HP-UX 11.  There are two special interfaces
+   provided for checking whether an application is linked to a pthread
+   library or not.  However, these interfaces aren't available in early
+   libc versions.  We also can't use pthread_once as some libc versions
+   call the init function.  So, we use pthread_create to check whether it
+   is possible to create a thread or not.  The stub implementation returns
+   the error number ENOSYS.  */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+  return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  pthread_t __t;
+  pthread_attr_t __a;
+  int __result;
+
+  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+  if (__gthread_active < 0)
+    {
+      __gthrw_(pthread_attr_init) (&__a);
+      __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+      __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+      if (__result != ENOSYS)
+	__gthread_active = 1;
+      else
+	__gthread_active = 0;
+      __gthrw_(pthread_attr_destroy) (&__a);
+    }
+  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      __gthread_active_init ();
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  if (__gthread_active_p ())
+    {
+      /* Initialize the thread storage key.  */
+      if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+	{
+	  /* The normal default detach state for threads is
+	   * PTHREAD_CREATE_JOINABLE which causes threads to not die
+	   * when you think they should.  */
+	  if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+	      && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+					      PTHREAD_CREATE_DETACHED) == 0)
+	    return 0;
+	}
+    }
+
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+      && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+    return 0;
+
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+  objc_thread_t thread_id;
+  pthread_t new_thread_handle;
+
+  if (!__gthread_active_p ())
+    return NULL;
+
+  if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+    thread_id = (objc_thread_t) new_thread_handle;
+  else
+    thread_id = NULL;
+
+  return thread_id;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+  if (!__gthread_active_p ())
+    return -1;
+  else
+    {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+      pthread_t thread_id = __gthrw_(pthread_self) ();
+      int policy;
+      struct sched_param params;
+      int priority_min, priority_max;
+
+      if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+	{
+	  if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+	    return -1;
+
+	  if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+	    return -1;
+
+	  if (priority > priority_max)
+	    priority = priority_max;
+	  else if (priority < priority_min)
+	    priority = priority_min;
+	  params.sched_priority = priority;
+
+	  /*
+	   * The solaris 7 and several other man pages incorrectly state that
+	   * this should be a pointer to policy but pthread.h is universally
+	   * at odds with this.
+	   */
+	  if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+	    return 0;
+	}
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+      return -1;
+    }
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+  if (__gthread_active_p ())
+    {
+      int policy;
+      struct sched_param params;
+
+      if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+	return params.sched_priority;
+      else
+	return -1;
+    }
+  else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+    return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  if (__gthread_active_p ())
+    __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  if (__gthread_active_p ())
+    /* exit the thread */
+    __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+  /* Failed if we reached here */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  if (__gthread_active_p ())
+    return (objc_thread_t) __gthrw_(pthread_self) ();
+  else
+    return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+  else
+    {
+      thread_local_storage = value;
+      return 0;
+    }
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+  else
+    return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+      if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+	{
+	  objc_free (mutex->backend);
+	  mutex->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      int count;
+
+      /*
+       * Posix Threads specifically require that the thread be unlocked
+       * for __gthrw_(pthread_mutex_destroy) to work.
+       */
+
+      do
+	{
+	  count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+	  if (count < 0)
+	    return -1;
+	}
+      while (count);
+
+      if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+	return -1;
+
+      objc_free (mutex->backend);
+      mutex->backend = NULL;
+    }
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+      if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+	{
+	  objc_free (condition->backend);
+	  condition->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+	return -1;
+
+      objc_free (condition->backend);
+      condition->backend = NULL;
+    }
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+			      (pthread_mutex_t *) mutex->backend);
+  else
+    return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+		  void *__args)
+{
+  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+  return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+  return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+  return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+  return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+  return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+			   const __gthread_time_t *__abs_timeout)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+  else
+    return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+				     const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+  return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+			  const __gthread_time_t *__abs_timeout)
+{
+  return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+			       __gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+				    __gthread_recursive_mutex_t *__mutex,
+				    const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+  return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-single.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-single.h
new file mode 100644
index 0000000..692688f
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-single.h
@@ -0,0 +1,292 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
+#define _GLIBCXX_GCC_GTHR_SINGLE_H
+
+/* Just provide compatibility for mutex handling.  */
+
+typedef int __gthread_key_t;
+typedef int __gthread_once_t;
+typedef int __gthread_mutex_t;
+typedef int __gthread_recursive_mutex_t;
+
+#define __GTHREAD_ONCE_INIT 0
+#define __GTHREAD_MUTEX_INIT 0
+#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
+
+#define _GLIBCXX_UNUSED __attribute__((unused))
+
+#ifdef _LIBOBJC
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED)
+{
+  /* No thread support available */
+  return NULL;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+  return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  return;
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  /* No thread support available */
+  /* Should we really exit the program */
+  /* exit (&__objc_thread_exit_status); */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  /* No thread support, use 1.  */
+  return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  thread_local_storage = value;
+  return 0;
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  /* There can only be one thread, so we always get the lock */
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  /* There can only be one thread, so we always get the lock */
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED,
+			       objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 0;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int _GLIBCXX_UNUSED
+__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static int _GLIBCXX_UNUSED
+__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+#endif /* _LIBOBJC */
+
+#undef _GLIBCXX_UNUSED
+
+#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-tpf.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-tpf.h
new file mode 100644
index 0000000..df194e6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr-tpf.h
@@ -0,0 +1,229 @@
+/* Threads compatibility routines for libgcc2 and libobjc.
+   Compile this one with gcc.
+   Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+/* TPF needs its own version of gthr-*.h because TPF always links to
+   the thread library.  However, for performance reasons we still do not
+   want to issue thread api calls unless a check is made to see that we
+   are running as a thread.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_TPF_H
+#define _GLIBCXX_GCC_GTHR_TPF_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#ifndef _REENTRANT
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#endif
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+
+#define NOTATHREAD   00
+#define ECBBASEPTR (unsigned long int) *(unsigned int *)0x00000514u
+#define ECBPG2PTR  ECBBASEPTR + 0x1000
+#define CE2THRCPTR *((unsigned char *)(ECBPG2PTR + 16))
+#define __tpf_pthread_active() (CE2THRCPTR != NOTATHREAD)
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# define __gthrw(name) \
+  static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name)));
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw(name)
+# define __gthrw_(name) name
+#endif
+
+__gthrw(pthread_once)
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+__gthrw(pthread_create)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_key_create) (__key, __dtor);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_key_delete) (__key);
+  else
+    return -1;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_getspecific) (__key);
+  else
+    return NULL;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_setspecific) (__key, __ptr);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_lock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_trylock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_unlock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+
+
+#endif /* ! _GLIBCXX_GCC_GTHR_TPF_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr.h
new file mode 100644
index 0000000..a466c11
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/gthr.h
@@ -0,0 +1,173 @@
+/* Threads compatibility routines for libgcc2.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1998, 2004, 2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_H
+#define _GLIBCXX_GCC_GTHR_H
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility push(default)
+#endif
+
+/* If this file is compiled with threads support, it must
+       #define __GTHREADS 1
+   to indicate that threads support is present.  Also it has define
+   function
+     int __gthread_active_p ()
+   that returns 1 if thread system is active, 0 if not.
+
+   The threads interface must define the following types:
+     __gthread_key_t
+     __gthread_once_t
+     __gthread_mutex_t
+     __gthread_recursive_mutex_t
+
+   The threads interface must define the following macros:
+
+     __GTHREAD_ONCE_INIT
+     		to initialize __gthread_once_t
+     __GTHREAD_MUTEX_INIT
+     		to initialize __gthread_mutex_t to get a fast
+		non-recursive mutex.
+     __GTHREAD_MUTEX_INIT_FUNCTION
+     		some systems can't initialize a mutex without a
+		function call.  On such systems, define this to a
+		function which looks like this:
+		  void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
+		Don't define __GTHREAD_MUTEX_INIT in this case
+     __GTHREAD_RECURSIVE_MUTEX_INIT
+     __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
+     		as above, but for a recursive mutex.
+
+   The threads interface must define the following static functions:
+
+     int __gthread_once (__gthread_once_t *once, void (*func) ())
+
+     int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
+     int __gthread_key_delete (__gthread_key_t key)
+
+     void *__gthread_getspecific (__gthread_key_t key)
+     int __gthread_setspecific (__gthread_key_t key, const void *ptr)
+
+     int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
+
+     int __gthread_mutex_lock (__gthread_mutex_t *mutex);
+     int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
+     int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
+
+     int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
+     int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
+     int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
+
+   The following are supported in POSIX threads only. They are required to
+   fix a deadlock in static initialization inside libsupc++. The header file
+   gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra
+   features are supported.
+
+   Types:
+     __gthread_cond_t
+
+   Macros:
+     __GTHREAD_COND_INIT
+     __GTHREAD_COND_INIT_FUNCTION
+
+   Interface:
+     int __gthread_cond_broadcast (__gthread_cond_t *cond);
+     int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex);
+     int __gthread_cond_wait_recursive (__gthread_cond_t *cond,
+					__gthread_recursive_mutex_t *mutex);
+
+   All functions returning int should return zero on success or the error
+   number.  If the operation is not supported, -1 is returned.
+
+   If the following are also defined, you should
+     #define __GTHREADS_CXX0X 1
+   to enable the c++0x thread library.
+
+   Types:
+     __gthread_t
+     __gthread_time_t
+
+   Interface:
+     int __gthread_create (__gthread_t *thread, void *(*func) (void*),
+                           void *args);
+     int __gthread_join (__gthread_t thread, void **value_ptr);
+     int __gthread_detach (__gthread_t thread);
+     int __gthread_equal (__gthread_t t1, __gthread_t t2);
+     __gthread_t __gthread_self (void);
+     int __gthread_yield (void);
+
+     int __gthread_mutex_timedlock (__gthread_mutex_t *m,
+                                    const __gthread_time_t *abs_timeout);
+     int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m,
+                                          const __gthread_time_t *abs_time);
+
+     int __gthread_cond_signal (__gthread_cond_t *cond);
+     int __gthread_cond_timedwait (__gthread_cond_t *cond,
+                                   __gthread_mutex_t *mutex,
+                                   const __gthread_time_t *abs_timeout);
+     int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
+                                             __gthread_recursive_mutex_t *mutex,
+                                             const __gthread_time_t *abs_time)
+
+   Currently supported threads packages are
+     TPF threads with -D__tpf__
+     POSIX/Unix98 threads with -D_PTHREADS
+     POSIX/Unix95 threads with -D_PTHREADS95
+     DCE threads with -D_DCE_THREADS
+     Solaris/UI threads with -D_SOLARIS_THREADS
+
+*/
+
+/* Check first for thread specific defines.  */
+#if defined (_GLIBCXX___tpf_GLIBCXX___)
+#include <bits/gthr-tpf.h>
+#elif _GLIBCXX__PTHREADS
+#include <bits/gthr-posix.h>
+#elif _GLIBCXX__PTHREADS95
+#include <bits/gthr-posix95.h>
+#elif _GLIBCXX__DCE_THREADS
+#include <bits/gthr-dce.h>
+#elif _GLIBCXX__SOLARIS_THREADS
+#include <bits/gthr-solaris.h>
+
+/* Include GTHREAD_FILE if one is defined.  */
+#elif defined(_GLIBCXX_HAVE_GTHR_DEFAULT)
+#if __GXX_WEAK__
+#ifndef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 1
+#endif
+#endif
+#include <bits/gthr-default.h>
+
+/* Fallback to single thread definitions.  */
+#else
+#include <bits/gthr-single.h>
+#endif
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility pop
+#endif
+
+#endif /* ! _GLIBCXX_GCC_GTHR_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/messages_members.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/messages_members.h
new file mode 100644
index 0000000..8773562
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/messages_members.h
@@ -0,0 +1,128 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file messages_members.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.7.1.2  messages functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#include <libintl.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Non-virtual member functions.
+  template<typename _CharT>
+     messages<_CharT>::messages(size_t __refs)
+     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
+       _M_name_messages(_S_get_c_name())
+     { }
+
+  template<typename _CharT>
+     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
+				size_t __refs) 
+     : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
+     {
+       if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+	 {
+	   const size_t __len = __builtin_strlen(__s) + 1;
+	   char* __tmp = new char[__len];
+	   __builtin_memcpy(__tmp, __s, __len);
+	   _M_name_messages = __tmp;
+	 }
+       else
+	 _M_name_messages = _S_get_c_name();
+
+       // Last to avoid leaking memory if new throws.
+       _M_c_locale_messages = _S_clone_c_locale(__cloc);
+     }
+
+  template<typename _CharT>
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
+			   const char* __dir) const
+    { 
+      bindtextdomain(__s.c_str(), __dir);
+      return this->do_open(__s, __loc); 
+    }
+
+  // Virtual member functions.
+  template<typename _CharT>
+    messages<_CharT>::~messages()
+    { 
+      if (_M_name_messages != _S_get_c_name())
+	delete [] _M_name_messages;
+      _S_destroy_c_locale(_M_c_locale_messages); 
+    }
+
+  template<typename _CharT>
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::do_open(const basic_string<char>& __s, 
+			      const locale&) const
+    { 
+      // No error checking is done, assume the catalog exists and can
+      // be used.
+      textdomain(__s.c_str());
+      return 0;
+    }
+
+  template<typename _CharT>
+    void    
+    messages<_CharT>::do_close(catalog) const 
+    { }
+
+   // messages_byname
+   template<typename _CharT>
+     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
+     : messages<_CharT>(__refs) 
+     { 
+       if (this->_M_name_messages != locale::facet::_S_get_c_name())
+	 {
+	   delete [] this->_M_name_messages;
+	   if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0)
+	     {
+	       const size_t __len = __builtin_strlen(__s) + 1;
+	       char* __tmp = new char[__len];
+	       __builtin_memcpy(__tmp, __s, __len);
+	       this->_M_name_messages = __tmp;
+	     }
+	   else
+	     this->_M_name_messages = locale::facet::_S_get_c_name();
+	 }
+
+       if (__builtin_strcmp(__s, "C") != 0
+	   && __builtin_strcmp(__s, "POSIX") != 0)
+	 {
+	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
+	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
+	 }
+     }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/os_defines.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/os_defines.h
new file mode 100644
index 0000000..9c42b3a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/os_defines.h
@@ -0,0 +1,41 @@
+// Specific definitions for GNU/Linux  -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file os_defines.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here.  This
+// file will come before all others.
+
+// This keeps isanum, et al from being propagated as macros.
+#define __NO_CTYPE 1
+
+#include <features.h>
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/stdc++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/stdc++.h
new file mode 100644
index 0000000..c19c938
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/stdc++.h
@@ -0,0 +1,115 @@
+// C++ includes used for precompiling -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdc++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+// 17.4.1.2 Headers
+
+// C
+#ifndef _GLIBCXX_NO_ASSERT
+#include <cassert>
+#endif
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <ccomplex>
+#include <cfenv>
+#include <cinttypes>
+#include <cstdbool>
+#include <cstdint>
+#include <ctgmath>
+#include <cwchar>
+#include <cwctype>
+#endif
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <array>
+#include <atomic>
+#include <chrono>
+#include <condition_variable>
+#include <forward_list>
+#include <future>
+#include <initializer_list>
+#include <mutex>
+#include <random>
+#include <ratio>
+#include <regex>
+#include <system_error>
+#include <thread>
+#include <tuple>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/stdtr1c++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/stdtr1c++.h
new file mode 100644
index 0000000..8ed9cb6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/stdtr1c++.h
@@ -0,0 +1,53 @@
+// C++ includes used for precompiling TR1 -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdtr1c++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdc++.h>
+
+#include <tr1/array>
+#include <tr1/cctype>
+#include <tr1/cfenv>
+#include <tr1/cfloat>
+#include <tr1/cinttypes>
+#include <tr1/climits>
+#include <tr1/cmath>
+#include <tr1/complex>
+#include <tr1/cstdarg>
+#include <tr1/cstdbool>
+#include <tr1/cstdint>
+#include <tr1/cstdio>
+#include <tr1/cstdlib>
+#include <tr1/ctgmath>
+#include <tr1/ctime>
+#include <tr1/cwchar>
+#include <tr1/cwctype>
+#include <tr1/functional>
+#include <tr1/random>
+#include <tr1/tuple>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+#include <tr1/utility>
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/time_members.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/time_members.h
new file mode 100644
index 0000000..90bc0ce
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/bits/time_members.h
@@ -0,0 +1,87 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file time_members.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(size_t __refs) 
+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(_S_get_c_name())
+    { _M_initialize_timepunct(); }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
+    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(_S_get_c_name())
+    { _M_initialize_timepunct(); }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+				     size_t __refs) 
+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(NULL)
+    {
+      if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+	{
+	  const size_t __len = __builtin_strlen(__s) + 1;
+	  char* __tmp = new char[__len];
+	  __builtin_memcpy(__tmp, __s, __len);
+	  _M_name_timepunct = __tmp;
+	}
+      else
+	_M_name_timepunct = _S_get_c_name();
+
+      __try
+	{ _M_initialize_timepunct(__cloc); }
+      __catch(...)
+	{
+	  if (_M_name_timepunct != _S_get_c_name())
+	    delete [] _M_name_timepunct;
+	  __throw_exception_again;
+	}
+    }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::~__timepunct()
+    { 
+      if (_M_name_timepunct != _S_get_c_name())
+	delete [] _M_name_timepunct;
+      delete _M_data; 
+      _S_destroy_c_locale(_M_c_locale_timepunct); 
+    }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/atomic_word.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/atomic_word.h
new file mode 100644
index 0000000..f2bdbbc
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/atomic_word.h
@@ -0,0 +1,47 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file atomic_word.h
+ *  This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H	1
+
+typedef int _Atomic_word;
+
+// Define these two macros using the appropriate memory barrier for the target.
+// The commented out versions below are the defaults.
+// See ia64/atomic_word.h for an alternative approach.
+
+// This one prevents loads from being hoisted across the barrier;
+// in other words, this is a Load-Load acquire barrier.
+// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.  
+// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
+
+// This one prevents stores from being sunk across the barrier; in other
+// words, a Store-Store release barrier.
+// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
+
+#endif 
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/basic_file.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/basic_file.h
new file mode 100644
index 0000000..7f30c4e
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/basic_file.h
@@ -0,0 +1,108 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+/** @file basic_file.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_BASIC_FILE_STDIO_H
+#define _GLIBCXX_BASIC_FILE_STDIO_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/c++io.h>  // for __c_lock and __c_file
+#include <ios>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Generic declaration.
+  template<typename _CharT>
+    class __basic_file; 
+
+  // Specialization.
+  template<>
+    class __basic_file<char>
+    {
+      // Underlying data source/sink.
+      __c_file* 	_M_cfile;
+
+      // True iff we opened _M_cfile, and thus must close it ourselves.
+      bool 		_M_cfile_created;
+
+    public:
+      __basic_file(__c_lock* __lock = 0) throw ();
+
+      __basic_file* 
+      open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
+
+      __basic_file*
+      sys_open(__c_file* __file, ios_base::openmode);
+
+      __basic_file*
+      sys_open(int __fd, ios_base::openmode __mode) throw ();
+
+      __basic_file* 
+      close(); 
+
+      _GLIBCXX_PURE bool 
+      is_open() const throw ();
+
+      _GLIBCXX_PURE int 
+      fd() throw ();
+
+      _GLIBCXX_PURE __c_file*
+      file() throw ();
+
+      ~__basic_file();
+
+      streamsize 
+      xsputn(const char* __s, streamsize __n);
+
+      streamsize 
+      xsputn_2(const char* __s1, streamsize __n1,
+	       const char* __s2, streamsize __n2);
+
+      streamsize 
+      xsgetn(char* __s, streamsize __n);
+
+      streamoff
+      seekoff(streamoff __off, ios_base::seekdir __way) throw ();
+
+      int 
+      sync();
+
+      streamsize
+      showmanyc();
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif	
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++allocator.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++allocator.h
new file mode 100644
index 0000000..c33a124
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++allocator.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++allocator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_ALLOCATOR_H
+#define _GLIBCXX_CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/new_allocator.h>
+#define __glibcxx_base_allocator  __gnu_cxx::new_allocator
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++config.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++config.h
new file mode 100644
index 0000000..94a36cd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++config.h
@@ -0,0 +1,1506 @@
+// Predefined symbols and macros -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++config.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_CONFIG_H
+#define _GLIBCXX_CXX_CONFIG_H 1
+
+// The current version of the C++ library in compressed ISO date format.
+#define __GLIBCXX__ 20101216 
+
+// Macros for visibility.
+// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+// _GLIBCXX_VISIBILITY_ATTR
+# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1
+
+#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V)))
+#else
+// If this is not supplied by the OS-specific or CPU-specific
+// headers included below, it will be defined to an empty default.
+# define _GLIBCXX_VISIBILITY_ATTR(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
+#endif
+
+// Macros for deprecated.
+// _GLIBCXX_DEPRECATED
+// _GLIBCXX_DEPRECATED_ATTR
+#ifndef _GLIBCXX_DEPRECATED
+# define _GLIBCXX_DEPRECATED 1
+#endif
+
+#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define _GLIBCXX_DEPRECATED_ATTR __attribute__ ((__deprecated__))
+#else
+# define _GLIBCXX_DEPRECATED_ATTR
+#endif
+
+// Macros for activating various namespace association modes.
+// _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+// _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+
+// Guide to libstdc++ namespaces.
+/*
+  namespace std
+  {
+    namespace __debug { }
+    namespace __parallel { }
+    namespace __norm { } // __normative, __shadow, __replaced
+    namespace __cxx1998 { }
+
+    namespace tr1 { }
+  }
+*/
+#if __cplusplus
+
+#ifdef _GLIBCXX_DEBUG
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
+#endif
+
+#ifdef _GLIBCXX_PARALLEL
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL 1
+#endif
+
+// Namespace association for profile
+#ifdef _GLIBCXX_PROFILE
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE 1
+#endif
+
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0 
+
+// Defined if any namespace association modes are active.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE \
+  || _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+# define _GLIBCXX_USE_NAMESPACE_ASSOCIATION 1
+#endif
+
+// Macros for namespace scope. Either namespace std:: or the name
+// of some nested namespace within it.
+// _GLIBCXX_STD
+// _GLIBCXX_STD_D
+// _GLIBCXX_STD_P
+//
+// Macros for enclosing namespaces and possibly nested namespaces.
+// _GLIBCXX_BEGIN_NAMESPACE
+// _GLIBCXX_END_NAMESPACE
+// _GLIBCXX_BEGIN_NESTED_NAMESPACE
+// _GLIBCXX_END_NESTED_NAMESPACE
+#ifndef _GLIBCXX_USE_NAMESPACE_ASSOCIATION
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD_PR _GLIBCXX_STD
+# define _GLIBCXX_STD std
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+#else
+
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION // && not anything else
+#  define _GLIBCXX_STD_D _GLIBCXX_STD
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD _6
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
+#  define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
+# endif
+
+//  debug
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+#  define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D _GLIBCXX_STD
+#  define _GLIBCXX_STD_P __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+# endif
+
+// debug + parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG  && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+#  define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// profile
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+#  if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL || _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+#   error Cannot use -D_GLIBCXX_PROFILE with -D_GLIBCXX_DEBUG or \
+    -D_GLIBCXX_PARALLEL
+#  endif
+#  define _GLIBCXX_STD_D __norm
+#  define _GLIBCXX_STD_P _GLIBCXX_STD
+#  define _GLIBCXX_STD_PR __norm
+#  define _GLIBCXX_STD __cxx1998
+#  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
+#  define _GLIBCXX_END_NAMESPACE }
+# endif
+
+# if __NO_INLINE__ && !__GXX_WEAK__
+#  warning currently using namespace associated mode which may fail \
+   without inlining due to lack of weak symbols
+# endif
+
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)  namespace X { namespace Y _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NESTED_NAMESPACE } }
+#endif
+
+// Namespace associations for debug mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __debug { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for parallel mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __parallel { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for profile mode
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+namespace std
+{ 
+  namespace __norm { } 
+  inline namespace __profile { }
+  inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for versioning mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+namespace std
+{
+  inline namespace _6 { }
+}
+
+namespace __gnu_cxx 
+{ 
+  inline namespace _6 { }
+}
+
+namespace std
+{
+  namespace tr1 
+  { 
+    inline namespace _6 { }
+  }
+}
+#endif
+
+// XXX GLIBCXX_ABI Deprecated
+// Define if compatibility should be provided for -mlong-double-64
+#undef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+// Namespace associations for long double 128 mode.
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 
+namespace std
+{
+  inline namespace __gnu_cxx_ldbl128 { }
+}
+# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
+# define _GLIBCXX_END_LDBL_NAMESPACE }
+#else
+# define _GLIBCXX_LDBL_NAMESPACE
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE
+# define _GLIBCXX_END_LDBL_NAMESPACE
+#endif
+
+
+// Defines for C compatibility. In particular, define extern "C"
+// linkage only when using C++.
+# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
+# define _GLIBCXX_END_EXTERN_C }
+
+#else // !__cplusplus
+# undef _GLIBCXX_BEGIN_NAMESPACE
+# undef _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) 
+# define _GLIBCXX_END_NAMESPACE 
+# define _GLIBCXX_BEGIN_EXTERN_C
+# define _GLIBCXX_END_EXTERN_C 
+#endif
+
+// First includes.
+
+// Pick up any OS-specific definitions.
+#include <bits/os_defines.h>
+
+// Pick up any CPU-specific definitions.
+#include <bits/cpu_defines.h>
+
+// If platform uses neither visibility nor psuedo-visibility,
+// specify empty default for namespace annotation macros.
+#ifndef _GLIBCXX_PSEUDO_VISIBILITY
+#define _GLIBCXX_PSEUDO_VISIBILITY(V)
+#endif
+
+// Allow use of "export template." This is currently not a feature
+// that g++ supports.
+// #define _GLIBCXX_EXPORT_TEMPLATE 1
+
+// Allow use of the GNU syntax extension, "extern template." This
+// extension is fully documented in the g++ manual, but in a nutshell,
+// it inhibits all implicit instantiations and is used throughout the
+// library to avoid multiple weak definitions for required types that
+// are already explicitly instantiated in the library binary. This
+// substantially reduces the binary size of resulting executables.
+
+// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern
+// templates only in basic_string, thus activating its debug-mode
+// checks even at -O0.
+#ifndef _GLIBCXX_EXTERN_TEMPLATE
+# define _GLIBCXX_EXTERN_TEMPLATE 1
+#endif
+
+// Certain function definitions that are meant to be overridable from
+// user code are decorated with this macro.  For some targets, this
+// macro causes these definitions to be weak.
+#ifndef _GLIBCXX_WEAK_DEFINITION
+# define _GLIBCXX_WEAK_DEFINITION
+#endif
+
+// Assert.
+// Avoid the use of assert, because we're trying to keep the <cassert>
+// include out of the mix.
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
+#define __glibcxx_assert(_Condition)
+#else
+_GLIBCXX_BEGIN_NAMESPACE(std)
+  // Avoid the use of assert, because we're trying to keep the <cassert>
+  // include out of the mix.
+  inline void
+  __replacement_assert(const char* __file, int __line, 
+		       const char* __function, const char* __condition)
+  {
+    __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
+		     __function, __condition);
+    __builtin_abort();
+  }
+_GLIBCXX_END_NAMESPACE
+
+#define __glibcxx_assert(_Condition)                               	\
+  do 								        \
+  {							      		\
+    if (! (_Condition))                                                 \
+      std::__replacement_assert(__FILE__, __LINE__, 			\
+				__PRETTY_FUNCTION__, #_Condition);	\
+  } while (false)
+#endif
+
+// The remainder of the prewritten config is automatic; all the
+// user hooks are listed above.
+
+// Create a boolean flag to be used to determine if --fast-math is set.
+#ifdef __FAST_MATH__
+# define _GLIBCXX_FAST_MATH 1
+#else
+# define _GLIBCXX_FAST_MATH 0
+#endif
+
+// This marks string literals in header files to be extracted for eventual
+// translation.  It is primarily used for messages in thrown exceptions; see
+// src/functexcept.cc.  We use __N because the more traditional _N is used
+// for something else under certain OSes (see BADNAMES).
+#define __N(msgid)     (msgid)
+
+// For example, <windows.h> is known to #define min and max as macros...
+#undef min
+#undef max
+
+#ifndef _GLIBCXX_PURE
+# define _GLIBCXX_PURE __attribute__ ((__pure__))
+#endif
+
+#ifndef _GLIBCXX_CONST
+# define _GLIBCXX_CONST __attribute__ ((__const__))
+#endif
+
+#ifndef _GLIBCXX_NORETURN
+# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__))
+#endif
+
+#ifndef _GLIBCXX_NOTHROW
+# ifdef __cplusplus
+#  define _GLIBCXX_NOTHROW throw() 
+# else
+#  define _GLIBCXX_NOTHROW __attribute__((__nothrow__))
+# endif
+#endif
+
+// End of prewritten config; the discovered settings follow.
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the `acosf' function. */
+#define _GLIBCXX_HAVE_ACOSF 1
+
+/* Define to 1 if you have the `acosl' function. */
+#define _GLIBCXX_HAVE_ACOSL 1
+
+/* Define to 1 if you have the `asinf' function. */
+#define _GLIBCXX_HAVE_ASINF 1
+
+/* Define to 1 if you have the `asinl' function. */
+#define _GLIBCXX_HAVE_ASINL 1
+
+/* Define to 1 if the target assembler supports .symver directive. */
+#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
+
+/* Define to 1 if you have the `atan2f' function. */
+#define _GLIBCXX_HAVE_ATAN2F 1
+
+/* Define to 1 if you have the `atan2l' function. */
+#define _GLIBCXX_HAVE_ATAN2L 1
+
+/* Define to 1 if you have the `atanf' function. */
+#define _GLIBCXX_HAVE_ATANF 1
+
+/* Define to 1 if you have the `atanl' function. */
+#define _GLIBCXX_HAVE_ATANL 1
+
+/* Define to 1 if the target assembler supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_CC_TLS */
+
+/* Define to 1 if you have the `ceilf' function. */
+#define _GLIBCXX_HAVE_CEILF 1
+
+/* Define to 1 if you have the `ceill' function. */
+#define _GLIBCXX_HAVE_CEILL 1
+
+/* Define to 1 if you have the <complex.h> header file. */
+#define _GLIBCXX_HAVE_COMPLEX_H 1
+
+/* Define to 1 if you have the `cosf' function. */
+#define _GLIBCXX_HAVE_COSF 1
+
+/* Define to 1 if you have the `coshf' function. */
+#define _GLIBCXX_HAVE_COSHF 1
+
+/* Define to 1 if you have the `coshl' function. */
+#define _GLIBCXX_HAVE_COSHL 1
+
+/* Define to 1 if you have the `cosl' function. */
+#define _GLIBCXX_HAVE_COSL 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define _GLIBCXX_HAVE_DLFCN_H 1
+
+/* Define if EBADMSG exists. */
+#define _GLIBCXX_HAVE_EBADMSG 1
+
+/* Define if ECANCELED exists. */
+#define _GLIBCXX_HAVE_ECANCELED 1
+
+/* Define if EIDRM exists. */
+#define _GLIBCXX_HAVE_EIDRM 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define _GLIBCXX_HAVE_ENDIAN_H 1
+
+/* Define if ENODATA exists. */
+#define _GLIBCXX_HAVE_ENODATA 1
+
+/* Define if ENOLINK exists. */
+#define _GLIBCXX_HAVE_ENOLINK 1
+
+/* Define if ENOSR exists. */
+#define _GLIBCXX_HAVE_ENOSR 1
+
+/* Define if ENOSTR exists. */
+#define _GLIBCXX_HAVE_ENOSTR 1
+
+/* Define if ENOTRECOVERABLE exists. */
+#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1
+
+/* Define if ENOTSUP exists. */
+#define _GLIBCXX_HAVE_ENOTSUP 1
+
+/* Define if EOVERFLOW exists. */
+#define _GLIBCXX_HAVE_EOVERFLOW 1
+
+/* Define if EOWNERDEAD exists. */
+#define _GLIBCXX_HAVE_EOWNERDEAD 1
+
+/* Define if EPROTO exists. */
+#define _GLIBCXX_HAVE_EPROTO 1
+
+/* Define if ETIME exists. */
+#define _GLIBCXX_HAVE_ETIME 1
+
+/* Define if ETXTBSY exists. */
+#define _GLIBCXX_HAVE_ETXTBSY 1
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#define _GLIBCXX_HAVE_EXECINFO_H 1
+
+/* Define to 1 if you have the `expf' function. */
+#define _GLIBCXX_HAVE_EXPF 1
+
+/* Define to 1 if you have the `expl' function. */
+#define _GLIBCXX_HAVE_EXPL 1
+
+/* Define to 1 if you have the `fabsf' function. */
+#define _GLIBCXX_HAVE_FABSF 1
+
+/* Define to 1 if you have the `fabsl' function. */
+#define _GLIBCXX_HAVE_FABSL 1
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#define _GLIBCXX_HAVE_FENV_H 1
+
+/* Define to 1 if you have the `finite' function. */
+#define _GLIBCXX_HAVE_FINITE 1
+
+/* Define to 1 if you have the `finitef' function. */
+#define _GLIBCXX_HAVE_FINITEF 1
+
+/* Define to 1 if you have the `finitel' function. */
+#define _GLIBCXX_HAVE_FINITEL 1
+
+/* Define to 1 if you have the <float.h> header file. */
+#define _GLIBCXX_HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `floorf' function. */
+#define _GLIBCXX_HAVE_FLOORF 1
+
+/* Define to 1 if you have the `floorl' function. */
+#define _GLIBCXX_HAVE_FLOORL 1
+
+/* Define to 1 if you have the `fmodf' function. */
+#define _GLIBCXX_HAVE_FMODF 1
+
+/* Define to 1 if you have the `fmodl' function. */
+#define _GLIBCXX_HAVE_FMODL 1
+
+/* Define to 1 if you have the `fpclass' function. */
+/* #undef _GLIBCXX_HAVE_FPCLASS */
+
+/* Define to 1 if you have the <fp.h> header file. */
+/* #undef _GLIBCXX_HAVE_FP_H */
+
+/* Define to 1 if you have the `frexpf' function. */
+#define _GLIBCXX_HAVE_FREXPF 1
+
+/* Define to 1 if you have the `frexpl' function. */
+#define _GLIBCXX_HAVE_FREXPL 1
+
+/* Define if _Unwind_GetIPInfo is available. */
+#define _GLIBCXX_HAVE_GETIPINFO 1
+
+/* Define if gthr-default.h exists (meaning that threading support is
+   enabled). */
+#define _GLIBCXX_HAVE_GTHR_DEFAULT 1
+
+/* Define to 1 if you have the `hypot' function. */
+#define _GLIBCXX_HAVE_HYPOT 1
+
+/* Define to 1 if you have the `hypotf' function. */
+#define _GLIBCXX_HAVE_HYPOTF 1
+
+/* Define to 1 if you have the `hypotl' function. */
+#define _GLIBCXX_HAVE_HYPOTL 1
+
+/* Define if you have the iconv() function. */
+#define _GLIBCXX_HAVE_ICONV 1
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef _GLIBCXX_HAVE_IEEEFP_H */
+
+/* Define if int64_t is available in <stdint.h>. */
+#define _GLIBCXX_HAVE_INT64_T 1
+
+/* Define if int64_t is a long. */
+/* #undef _GLIBCXX_HAVE_INT64_T_LONG */
+
+/* Define if int64_t is a long long. */
+#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define _GLIBCXX_HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isinf' function. */
+#define _GLIBCXX_HAVE_ISINF 1
+
+/* Define to 1 if you have the `isinff' function. */
+#define _GLIBCXX_HAVE_ISINFF 1
+
+/* Define to 1 if you have the `isinfl' function. */
+#define _GLIBCXX_HAVE_ISINFL 1
+
+/* Define to 1 if you have the `isnan' function. */
+#define _GLIBCXX_HAVE_ISNAN 1
+
+/* Define to 1 if you have the `isnanf' function. */
+#define _GLIBCXX_HAVE_ISNANF 1
+
+/* Define to 1 if you have the `isnanl' function. */
+#define _GLIBCXX_HAVE_ISNANL 1
+
+/* Defined if iswblank exists. */
+#define _GLIBCXX_HAVE_ISWBLANK 1
+
+/* Define if LC_MESSAGES is available in <locale.h>. */
+#define _GLIBCXX_HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the `ldexpf' function. */
+#define _GLIBCXX_HAVE_LDEXPF 1
+
+/* Define to 1 if you have the `ldexpl' function. */
+#define _GLIBCXX_HAVE_LDEXPL 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+/* #undef _GLIBCXX_HAVE_LIBINTL_H */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_AS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
+
+/* Define if futex syscall is available. */
+#define _GLIBCXX_HAVE_LINUX_FUTEX 1
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define _GLIBCXX_HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `log10f' function. */
+#define _GLIBCXX_HAVE_LOG10F 1
+
+/* Define to 1 if you have the `log10l' function. */
+#define _GLIBCXX_HAVE_LOG10L 1
+
+/* Define to 1 if you have the `logf' function. */
+#define _GLIBCXX_HAVE_LOGF 1
+
+/* Define to 1 if you have the `logl' function. */
+#define _GLIBCXX_HAVE_LOGL 1
+
+/* Define to 1 if you have the <machine/endian.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */
+
+/* Define to 1 if you have the <machine/param.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */
+
+/* Define if mbstate_t exists in wchar.h. */
+#define _GLIBCXX_HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define _GLIBCXX_HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `modf' function. */
+#define _GLIBCXX_HAVE_MODF 1
+
+/* Define to 1 if you have the `modff' function. */
+#define _GLIBCXX_HAVE_MODFF 1
+
+/* Define to 1 if you have the `modfl' function. */
+#define _GLIBCXX_HAVE_MODFL 1
+
+/* Define to 1 if you have the <nan.h> header file. */
+/* #undef _GLIBCXX_HAVE_NAN_H */
+
+/* Define if poll is available in <poll.h>. */
+#define _GLIBCXX_HAVE_POLL 1
+
+/* Define to 1 if you have the `powf' function. */
+#define _GLIBCXX_HAVE_POWF 1
+
+/* Define to 1 if you have the `powl' function. */
+#define _GLIBCXX_HAVE_POWL 1
+
+/* Define to 1 if you have the `qfpclass' function. */
+/* #undef _GLIBCXX_HAVE_QFPCLASS */
+
+/* Define to 1 if you have the `setenv' function. */
+/* #undef _GLIBCXX_HAVE_SETENV */
+
+/* Define to 1 if you have the `sincos' function. */
+#define _GLIBCXX_HAVE_SINCOS 1
+
+/* Define to 1 if you have the `sincosf' function. */
+#define _GLIBCXX_HAVE_SINCOSF 1
+
+/* Define to 1 if you have the `sincosl' function. */
+#define _GLIBCXX_HAVE_SINCOSL 1
+
+/* Define to 1 if you have the `sinf' function. */
+#define _GLIBCXX_HAVE_SINF 1
+
+/* Define to 1 if you have the `sinhf' function. */
+#define _GLIBCXX_HAVE_SINHF 1
+
+/* Define to 1 if you have the `sinhl' function. */
+#define _GLIBCXX_HAVE_SINHL 1
+
+/* Define to 1 if you have the `sinl' function. */
+#define _GLIBCXX_HAVE_SINL 1
+
+/* Define to 1 if you have the `sqrtf' function. */
+#define _GLIBCXX_HAVE_SQRTF 1
+
+/* Define to 1 if you have the `sqrtl' function. */
+#define _GLIBCXX_HAVE_SQRTL 1
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define _GLIBCXX_HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define _GLIBCXX_HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define _GLIBCXX_HAVE_STDLIB_H 1
+
+/* Define if strerror_l is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_L 1
+
+/* Define if strerror_r is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define _GLIBCXX_HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define _GLIBCXX_HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtof' function. */
+#define _GLIBCXX_HAVE_STRTOF 1
+
+/* Define to 1 if you have the `strtold' function. */
+#define _GLIBCXX_HAVE_STRTOLD 1
+
+/* Define if strxfrm_l is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRXFRM_L 1
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IPC_H 1
+
+/* Define to 1 if you have the <sys/isa_defs.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */
+
+/* Define to 1 if you have the <sys/machine.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define _GLIBCXX_HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+#define _GLIBCXX_HAVE_SYS_SEM_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define _GLIBCXX_HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define _GLIBCXX_HAVE_SYS_UIO_H 1
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+/* #undef _GLIBCXX_HAVE_S_IFREG */
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+#define _GLIBCXX_HAVE_S_ISREG 1
+
+/* Define to 1 if you have the `tanf' function. */
+#define _GLIBCXX_HAVE_TANF 1
+
+/* Define to 1 if you have the `tanhf' function. */
+#define _GLIBCXX_HAVE_TANHF 1
+
+/* Define to 1 if you have the `tanhl' function. */
+#define _GLIBCXX_HAVE_TANHL 1
+
+/* Define to 1 if you have the `tanl' function. */
+#define _GLIBCXX_HAVE_TANL 1
+
+/* Define to 1 if you have the <tgmath.h> header file. */
+#define _GLIBCXX_HAVE_TGMATH_H 1
+
+/* Define to 1 if the target supports thread-local storage. */
+#define _GLIBCXX_HAVE_TLS 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define _GLIBCXX_HAVE_UNISTD_H 1
+
+/* Defined if vfwscanf exists. */
+#define _GLIBCXX_HAVE_VFWSCANF 1
+
+/* Defined if vswscanf exists. */
+#define _GLIBCXX_HAVE_VSWSCANF 1
+
+/* Defined if vwscanf exists. */
+#define _GLIBCXX_HAVE_VWSCANF 1
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define _GLIBCXX_HAVE_WCHAR_H 1
+
+/* Defined if wcstof exists. */
+#define _GLIBCXX_HAVE_WCSTOF 1
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define _GLIBCXX_HAVE_WCTYPE_H 1
+
+/* Define if writev is available in <sys/uio.h>. */
+#define _GLIBCXX_HAVE_WRITEV 1
+
+/* Define to 1 if you have the `_acosf' function. */
+/* #undef _GLIBCXX_HAVE__ACOSF */
+
+/* Define to 1 if you have the `_acosl' function. */
+/* #undef _GLIBCXX_HAVE__ACOSL */
+
+/* Define to 1 if you have the `_asinf' function. */
+/* #undef _GLIBCXX_HAVE__ASINF */
+
+/* Define to 1 if you have the `_asinl' function. */
+/* #undef _GLIBCXX_HAVE__ASINL */
+
+/* Define to 1 if you have the `_atan2f' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2F */
+
+/* Define to 1 if you have the `_atan2l' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2L */
+
+/* Define to 1 if you have the `_atanf' function. */
+/* #undef _GLIBCXX_HAVE__ATANF */
+
+/* Define to 1 if you have the `_atanl' function. */
+/* #undef _GLIBCXX_HAVE__ATANL */
+
+/* Define to 1 if you have the `_ceilf' function. */
+/* #undef _GLIBCXX_HAVE__CEILF */
+
+/* Define to 1 if you have the `_ceill' function. */
+/* #undef _GLIBCXX_HAVE__CEILL */
+
+/* Define to 1 if you have the `_cosf' function. */
+/* #undef _GLIBCXX_HAVE__COSF */
+
+/* Define to 1 if you have the `_coshf' function. */
+/* #undef _GLIBCXX_HAVE__COSHF */
+
+/* Define to 1 if you have the `_coshl' function. */
+/* #undef _GLIBCXX_HAVE__COSHL */
+
+/* Define to 1 if you have the `_cosl' function. */
+/* #undef _GLIBCXX_HAVE__COSL */
+
+/* Define to 1 if you have the `_expf' function. */
+/* #undef _GLIBCXX_HAVE__EXPF */
+
+/* Define to 1 if you have the `_expl' function. */
+/* #undef _GLIBCXX_HAVE__EXPL */
+
+/* Define to 1 if you have the `_fabsf' function. */
+/* #undef _GLIBCXX_HAVE__FABSF */
+
+/* Define to 1 if you have the `_fabsl' function. */
+/* #undef _GLIBCXX_HAVE__FABSL */
+
+/* Define to 1 if you have the `_finite' function. */
+/* #undef _GLIBCXX_HAVE__FINITE */
+
+/* Define to 1 if you have the `_finitef' function. */
+/* #undef _GLIBCXX_HAVE__FINITEF */
+
+/* Define to 1 if you have the `_finitel' function. */
+/* #undef _GLIBCXX_HAVE__FINITEL */
+
+/* Define to 1 if you have the `_floorf' function. */
+/* #undef _GLIBCXX_HAVE__FLOORF */
+
+/* Define to 1 if you have the `_floorl' function. */
+/* #undef _GLIBCXX_HAVE__FLOORL */
+
+/* Define to 1 if you have the `_fmodf' function. */
+/* #undef _GLIBCXX_HAVE__FMODF */
+
+/* Define to 1 if you have the `_fmodl' function. */
+/* #undef _GLIBCXX_HAVE__FMODL */
+
+/* Define to 1 if you have the `_fpclass' function. */
+/* #undef _GLIBCXX_HAVE__FPCLASS */
+
+/* Define to 1 if you have the `_frexpf' function. */
+/* #undef _GLIBCXX_HAVE__FREXPF */
+
+/* Define to 1 if you have the `_frexpl' function. */
+/* #undef _GLIBCXX_HAVE__FREXPL */
+
+/* Define to 1 if you have the `_hypot' function. */
+/* #undef _GLIBCXX_HAVE__HYPOT */
+
+/* Define to 1 if you have the `_hypotf' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTF */
+
+/* Define to 1 if you have the `_hypotl' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTL */
+
+/* Define to 1 if you have the `_isinf' function. */
+/* #undef _GLIBCXX_HAVE__ISINF */
+
+/* Define to 1 if you have the `_isinff' function. */
+/* #undef _GLIBCXX_HAVE__ISINFF */
+
+/* Define to 1 if you have the `_isinfl' function. */
+/* #undef _GLIBCXX_HAVE__ISINFL */
+
+/* Define to 1 if you have the `_isnan' function. */
+/* #undef _GLIBCXX_HAVE__ISNAN */
+
+/* Define to 1 if you have the `_isnanf' function. */
+/* #undef _GLIBCXX_HAVE__ISNANF */
+
+/* Define to 1 if you have the `_isnanl' function. */
+/* #undef _GLIBCXX_HAVE__ISNANL */
+
+/* Define to 1 if you have the `_ldexpf' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPF */
+
+/* Define to 1 if you have the `_ldexpl' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPL */
+
+/* Define to 1 if you have the `_log10f' function. */
+/* #undef _GLIBCXX_HAVE__LOG10F */
+
+/* Define to 1 if you have the `_log10l' function. */
+/* #undef _GLIBCXX_HAVE__LOG10L */
+
+/* Define to 1 if you have the `_logf' function. */
+/* #undef _GLIBCXX_HAVE__LOGF */
+
+/* Define to 1 if you have the `_logl' function. */
+/* #undef _GLIBCXX_HAVE__LOGL */
+
+/* Define to 1 if you have the `_modf' function. */
+/* #undef _GLIBCXX_HAVE__MODF */
+
+/* Define to 1 if you have the `_modff' function. */
+/* #undef _GLIBCXX_HAVE__MODFF */
+
+/* Define to 1 if you have the `_modfl' function. */
+/* #undef _GLIBCXX_HAVE__MODFL */
+
+/* Define to 1 if you have the `_powf' function. */
+/* #undef _GLIBCXX_HAVE__POWF */
+
+/* Define to 1 if you have the `_powl' function. */
+/* #undef _GLIBCXX_HAVE__POWL */
+
+/* Define to 1 if you have the `_qfpclass' function. */
+/* #undef _GLIBCXX_HAVE__QFPCLASS */
+
+/* Define to 1 if you have the `_sincos' function. */
+/* #undef _GLIBCXX_HAVE__SINCOS */
+
+/* Define to 1 if you have the `_sincosf' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSF */
+
+/* Define to 1 if you have the `_sincosl' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSL */
+
+/* Define to 1 if you have the `_sinf' function. */
+/* #undef _GLIBCXX_HAVE__SINF */
+
+/* Define to 1 if you have the `_sinhf' function. */
+/* #undef _GLIBCXX_HAVE__SINHF */
+
+/* Define to 1 if you have the `_sinhl' function. */
+/* #undef _GLIBCXX_HAVE__SINHL */
+
+/* Define to 1 if you have the `_sinl' function. */
+/* #undef _GLIBCXX_HAVE__SINL */
+
+/* Define to 1 if you have the `_sqrtf' function. */
+/* #undef _GLIBCXX_HAVE__SQRTF */
+
+/* Define to 1 if you have the `_sqrtl' function. */
+/* #undef _GLIBCXX_HAVE__SQRTL */
+
+/* Define to 1 if you have the `_tanf' function. */
+/* #undef _GLIBCXX_HAVE__TANF */
+
+/* Define to 1 if you have the `_tanhf' function. */
+/* #undef _GLIBCXX_HAVE__TANHF */
+
+/* Define to 1 if you have the `_tanhl' function. */
+/* #undef _GLIBCXX_HAVE__TANHL */
+
+/* Define to 1 if you have the `_tanl' function. */
+/* #undef _GLIBCXX_HAVE__TANL */
+
+/* Define as const if the declaration of iconv() needs const. */
+#define _GLIBCXX_ICONV_CONST 
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+/* #undef _GLIBCXX_PACKAGE */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define _GLIBCXX_PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define _GLIBCXX_PACKAGE_NAME "package-unused"
+
+/* Define to the full name and version of this package. */
+#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused"
+
+/* Define to the one symbol short name of this package. */
+#define _GLIBCXX_PACKAGE_TARNAME "libstdc++"
+
+/* Define to the home page for this package. */
+#define _GLIBCXX_PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused"
+
+/* The size of `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of `void *', as computed by sizeof. */
+/* #undef SIZEOF_VOID_P */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+/* #undef _GLIBCXX_VERSION */
+
+/* Define if builtin atomic operations for bool are supported on this host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_1 1
+
+/* Define if builtin atomic operations for short are supported on this host.
+   */
+#define _GLIBCXX_ATOMIC_BUILTINS_2 1
+
+/* Define if builtin atomic operations for int are supported on this host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_4 1
+
+/* Define if builtin atomic operations for long long are supported on this
+   host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_8 */
+
+/* Define to use concept checking code from the boost libraries. */
+/* #undef _GLIBCXX_CONCEPT_CHECKS */
+
+/* Define to 1 if building for use with CSLIBC, or 0 otherwise. */
+#define _GLIBCXX_CSLIBC 0
+
+/* Define if a fully dynamic basic_string is wanted. */
+/* #undef _GLIBCXX_FULLY_DYNAMIC_STRING */
+
+/* Define if gthreads library is available. */
+#define _GLIBCXX_HAS_GTHREADS 1
+
+/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
+#define _GLIBCXX_HOSTED 1
+
+/* Define if compatibility should be provided for -mlong-double-64. */
+
+/* Define if ptrdiff_t is int. */
+#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+
+/* Define if using setrlimit to set resource limits during "make check" */
+/* #undef _GLIBCXX_RES_LIMITS */
+
+/* Define if size_t is unsigned int. */
+#define _GLIBCXX_SIZE_T_IS_UINT 1
+
+/* Define if the compiler is configured for setjmp/longjmp exceptions. */
+/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
+
+/* Define if EOF == -1, SEEK_CUR == 1, SEEK_END == 2. */
+#define _GLIBCXX_STDIO_MACROS 1
+
+/* Define to use symbol versioning in the shared library. */
+#define _GLIBCXX_SYMVER 1
+
+/* Define to use darwin versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_DARWIN */
+
+/* Define to use GNU versioning in the shared library. */
+#define _GLIBCXX_SYMVER_GNU 1
+
+/* Define to use GNU namespace versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */
+
+/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
+   <stdio.h>, and <stdlib.h> can be used or exposed. */
+#define _GLIBCXX_USE_C99 1
+
+/* Define if C99 functions in <complex.h> should be used in <complex>. Using
+   compiler builtins for these functions requires corresponding C99 library
+   functions to be present. */
+#define _GLIBCXX_USE_C99_COMPLEX 1
+
+/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
+   Using compiler builtins for these functions requires corresponding C99
+   library functions to be present. */
+#define _GLIBCXX_USE_C99_COMPLEX_TR1 1
+
+/* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_CTYPE_TR1 1
+
+/* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_FENV_TR1 1
+
+/* Define if C99 functions in <inttypes.h> should be imported in
+   <tr1/cinttypes> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_INTTYPES_TR1 1
+
+/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
+   <tr1/cinttypes> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1
+
+/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
+   in namespace std. */
+#define _GLIBCXX_USE_C99_MATH 1
+
+/* Define if C99 functions or macros in <math.h> should be imported in
+   <tr1/cmath> in namespace std::tr1. */
+#define _GLIBCXX_USE_C99_MATH_TR1 1
+
+/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
+   namespace std::tr1. */
+#define _GLIBCXX_USE_C99_STDINT_TR1 1
+
+/* Defined if clock_gettime has monotonic clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */
+
+/* Defined if clock_gettime has realtime clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_REALTIME */
+
+/* Define if ISO/IEC TR 24733 decimal floating point types are supported on
+   this host. */
+/* #undef _GLIBCXX_USE_DECIMAL_FLOAT */
+
+/* Defined if gettimeofday is available. */
+#define _GLIBCXX_USE_GETTIMEOFDAY 1
+
+/* Define if LFS support is available. */
+#define _GLIBCXX_USE_LFS 1
+
+/* Define if code specialized for long long should be used. */
+#define _GLIBCXX_USE_LONG_LONG 1
+
+/* Defined if nanosleep is available. */
+/* #undef _GLIBCXX_USE_NANOSLEEP */
+
+/* Define if NLS translations are to be used. */
+/* #undef _GLIBCXX_USE_NLS */
+
+/* Define if /dev/random and /dev/urandom are available for the random_device
+   of TR1 (Chapter 5.1). */
+#define _GLIBCXX_USE_RANDOM_TR1 1
+
+/* Defined if sched_yield is available. */
+/* #undef _GLIBCXX_USE_SCHED_YIELD */
+
+/* Define if code specialized for wchar_t should be used. */
+#define _GLIBCXX_USE_WCHAR_T 1
+
+#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)
+# define _GLIBCXX_HAVE_ACOSF 1
+# define acosf _acosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL)
+# define _GLIBCXX_HAVE_ACOSL 1
+# define acosl _acosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF)
+# define _GLIBCXX_HAVE_ASINF 1
+# define asinf _asinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL)
+# define _GLIBCXX_HAVE_ASINL 1
+# define asinl _asinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F)
+# define _GLIBCXX_HAVE_ATAN2F 1
+# define atan2f _atan2f
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L)
+# define _GLIBCXX_HAVE_ATAN2L 1
+# define atan2l _atan2l
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF)
+# define _GLIBCXX_HAVE_ATANF 1
+# define atanf _atanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL)
+# define _GLIBCXX_HAVE_ATANL 1
+# define atanl _atanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF)
+# define _GLIBCXX_HAVE_CEILF 1
+# define ceilf _ceilf
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL)
+# define _GLIBCXX_HAVE_CEILL 1
+# define ceill _ceill
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF)
+# define _GLIBCXX_HAVE_COSF 1
+# define cosf _cosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF)
+# define _GLIBCXX_HAVE_COSHF 1
+# define coshf _coshf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL)
+# define _GLIBCXX_HAVE_COSHL 1
+# define coshl _coshl
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL)
+# define _GLIBCXX_HAVE_COSL 1
+# define cosl _cosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF)
+# define _GLIBCXX_HAVE_EXPF 1
+# define expf _expf
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL)
+# define _GLIBCXX_HAVE_EXPL 1
+# define expl _expl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF)
+# define _GLIBCXX_HAVE_FABSF 1
+# define fabsf _fabsf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL)
+# define _GLIBCXX_HAVE_FABSL 1
+# define fabsl _fabsl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE)
+# define _GLIBCXX_HAVE_FINITE 1
+# define finite _finite
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF)
+# define _GLIBCXX_HAVE_FINITEF 1
+# define finitef _finitef
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL)
+# define _GLIBCXX_HAVE_FINITEL 1
+# define finitel _finitel
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF)
+# define _GLIBCXX_HAVE_FLOORF 1
+# define floorf _floorf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL)
+# define _GLIBCXX_HAVE_FLOORL 1
+# define floorl _floorl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF)
+# define _GLIBCXX_HAVE_FMODF 1
+# define fmodf _fmodf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL)
+# define _GLIBCXX_HAVE_FMODL 1
+# define fmodl _fmodl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS)
+# define _GLIBCXX_HAVE_FPCLASS 1
+# define fpclass _fpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF)
+# define _GLIBCXX_HAVE_FREXPF 1
+# define frexpf _frexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL)
+# define _GLIBCXX_HAVE_FREXPL 1
+# define frexpl _frexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT)
+# define _GLIBCXX_HAVE_HYPOT 1
+# define hypot _hypot
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF)
+# define _GLIBCXX_HAVE_HYPOTF 1
+# define hypotf _hypotf
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL)
+# define _GLIBCXX_HAVE_HYPOTL 1
+# define hypotl _hypotl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF)
+# define _GLIBCXX_HAVE_ISINF 1
+# define isinf _isinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF)
+# define _GLIBCXX_HAVE_ISINFF 1
+# define isinff _isinff
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL)
+# define _GLIBCXX_HAVE_ISINFL 1
+# define isinfl _isinfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN)
+# define _GLIBCXX_HAVE_ISNAN 1
+# define isnan _isnan
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF)
+# define _GLIBCXX_HAVE_ISNANF 1
+# define isnanf _isnanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL)
+# define _GLIBCXX_HAVE_ISNANL 1
+# define isnanl _isnanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF)
+# define _GLIBCXX_HAVE_LDEXPF 1
+# define ldexpf _ldexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL)
+# define _GLIBCXX_HAVE_LDEXPL 1
+# define ldexpl _ldexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F)
+# define _GLIBCXX_HAVE_LOG10F 1
+# define log10f _log10f
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L)
+# define _GLIBCXX_HAVE_LOG10L 1
+# define log10l _log10l
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF)
+# define _GLIBCXX_HAVE_LOGF 1
+# define logf _logf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL)
+# define _GLIBCXX_HAVE_LOGL 1
+# define logl _logl
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF)
+# define _GLIBCXX_HAVE_MODF 1
+# define modf _modf
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF)
+# define _GLIBCXX_HAVE_MODFF 1
+# define modff _modff
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL)
+# define _GLIBCXX_HAVE_MODFL 1
+# define modfl _modfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF)
+# define _GLIBCXX_HAVE_POWF 1
+# define powf _powf
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL)
+# define _GLIBCXX_HAVE_POWL 1
+# define powl _powl
+#endif
+
+#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS)
+# define _GLIBCXX_HAVE_QFPCLASS 1
+# define qfpclass _qfpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS)
+# define _GLIBCXX_HAVE_SINCOS 1
+# define sincos _sincos
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF)
+# define _GLIBCXX_HAVE_SINCOSF 1
+# define sincosf _sincosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL)
+# define _GLIBCXX_HAVE_SINCOSL 1
+# define sincosl _sincosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF)
+# define _GLIBCXX_HAVE_SINF 1
+# define sinf _sinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF)
+# define _GLIBCXX_HAVE_SINHF 1
+# define sinhf _sinhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL)
+# define _GLIBCXX_HAVE_SINHL 1
+# define sinhl _sinhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL)
+# define _GLIBCXX_HAVE_SINL 1
+# define sinl _sinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF)
+# define _GLIBCXX_HAVE_SQRTF 1
+# define sqrtf _sqrtf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL)
+# define _GLIBCXX_HAVE_SQRTL 1
+# define sqrtl _sqrtl
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF)
+# define _GLIBCXX_HAVE_STRTOF 1
+# define strtof _strtof
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD)
+# define _GLIBCXX_HAVE_STRTOLD 1
+# define strtold _strtold
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF)
+# define _GLIBCXX_HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF)
+# define _GLIBCXX_HAVE_TANHF 1
+# define tanhf _tanhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL)
+# define _GLIBCXX_HAVE_TANHL 1
+# define tanhl _tanhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL)
+# define _GLIBCXX_HAVE_TANL 1
+# define tanl _tanl
+#endif
+
+#endif // _GLIBCXX_CXX_CONFIG_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++io.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++io.h
new file mode 100644
index 0000000..86ca53b
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++io.h
@@ -0,0 +1,49 @@
+// Underlying io library details -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++io.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// c_io_stdio.h - Defines for using "C" stdio.h
+
+#ifndef _GLIBCXX_CXX_IO_H
+#define _GLIBCXX_CXX_IO_H 1
+
+#include <cstdio>
+#include <cstddef>
+#include <bits/gthr.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  typedef __gthread_mutex_t __c_lock;
+
+  // for basic_file.h
+  typedef FILE __c_file;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++locale.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++locale.h
new file mode 100644
index 0000000..749a97a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/c++locale.h
@@ -0,0 +1,110 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++locale.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _GLIBCXX_CXX_LOCALE_H
+#define _GLIBCXX_CXX_LOCALE_H 1
+
+#pragma GCC system_header
+
+#include <clocale>
+#include <cstddef>
+
+#define _GLIBCXX_C_LOCALE_GNU 1
+
+#define _GLIBCXX_NUM_CATEGORIES 6
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  extern "C" __typeof(uselocale) __uselocale;
+
+_GLIBCXX_END_NAMESPACE
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  typedef __locale_t		__c_locale;
+
+  // Convert numeric value of type double and long double to string and
+  // return length of string.  If vsnprintf is available use it, otherwise
+  // fall back to the unsafe vsprintf which, in general, can be dangerous
+  // and should be avoided.
+  inline int
+  __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)),
+		   char* __out,
+		   const int __size __attribute__ ((__unused__)),
+		   const char* __fmt, ...)
+  {
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+#else
+    char* __old = std::setlocale(LC_NUMERIC, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	std::setlocale(LC_NUMERIC, "C");
+      }
+#endif
+
+    __builtin_va_list __args;
+    __builtin_va_start(__args, __fmt);
+
+#ifdef _GLIBCXX_USE_C99
+    const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+#else
+    const int __ret = __builtin_vsprintf(__out, __fmt, __args);
+#endif
+
+    __builtin_va_end(__args);
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __gnu_cxx::__uselocale(__old);
+#else
+    if (__sav)
+      {
+	std::setlocale(LC_NUMERIC, __sav);
+	delete [] __sav;
+      }
+#endif
+    return __ret;
+  }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/cpu_defines.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/cpu_defines.h
new file mode 100644
index 0000000..faf97e1
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/cpu_defines.h
@@ -0,0 +1,33 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cpu_defines.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CPU_DEFINES
+#define _GLIBCXX_CPU_DEFINES 1
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_base.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_base.h
new file mode 100644
index 0000000..ff1f157
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_base.h
@@ -0,0 +1,61 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+/** @file ctype_base.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Information as gleaned from /usr/include/ctype.h
+  
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /// @brief  Base class for ctype.
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype<char>::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned short 	mask;   
+    static const mask upper    	= _ISupper;
+    static const mask lower 	= _ISlower;
+    static const mask alpha 	= _ISalpha;
+    static const mask digit 	= _ISdigit;
+    static const mask xdigit 	= _ISxdigit;
+    static const mask space 	= _ISspace;
+    static const mask print 	= _ISprint;
+    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
+    static const mask cntrl 	= _IScntrl;
+    static const mask punct 	= _ISpunct;
+    static const mask alnum 	= _ISalpha | _ISdigit;
+  };
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_inline.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_inline.h
new file mode 100644
index 0000000..8ae8229
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_inline.h
@@ -0,0 +1,73 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 2002, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_inline.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+  
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  bool
+  ctype<char>::
+  is(mask __m, char __c) const
+  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
+
+  const char*
+  ctype<char>::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype<char>::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype<char>::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_noninline.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_noninline.h
new file mode 100644
index 0000000..4fc47a9
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/ctype_noninline.h
@@ -0,0 +1,190 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_noninline.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// Information as gleaned from /usr/include/ctype.h
+
+#if _GLIBCXX_C_LOCALE_GNU
+  const ctype_base::mask*
+  ctype<char>::classic_table() throw()
+  { return _S_get_c_locale()->__ctype_b; }
+#else
+  const ctype_base::mask*
+  ctype<char>::classic_table() throw()
+  {
+    const ctype_base::mask* __ret;
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    __ret = *__ctype_b_loc();
+#else
+    __ret = __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    return __ret;
+  }
+#endif
+
+#if _GLIBCXX_C_LOCALE_GNU
+  ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)), 
+  _M_del(__table != 0 && __del), 
+  _M_toupper(_M_c_locale_ctype->__ctype_toupper),  
+  _M_tolower(_M_c_locale_ctype->__ctype_tolower), 
+  _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), 
+  _M_widen_ok(0), _M_narrow_ok(0) 
+  {
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#else
+  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
+  {
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {    
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);    
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    _M_toupper = *__ctype_toupper_loc();
+    _M_tolower = *__ctype_tolower_loc();
+    _M_table = __table ? __table : *__ctype_b_loc();
+#else
+    _M_toupper = __ctype_toupper;
+    _M_tolower = __ctype_tolower;
+    _M_table = __table ? __table : __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#endif
+
+#if _GLIBCXX_C_LOCALE_GNU
+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del),
+  _M_toupper(_M_c_locale_ctype->__ctype_toupper),  
+  _M_tolower(_M_c_locale_ctype->__ctype_tolower), 
+  _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), 
+  _M_widen_ok(0), _M_narrow_ok(0) 
+  {
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#else
+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
+  {
+    char* __old = setlocale(LC_CTYPE, NULL);
+    char* __sav = NULL;
+    if (__builtin_strcmp(__old, "C"))
+      {
+	const size_t __len = __builtin_strlen(__old) + 1;
+	__sav = new char[__len];
+	__builtin_memcpy(__sav, __old, __len);
+	setlocale(LC_CTYPE, "C");
+      }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+    _M_toupper = *__ctype_toupper_loc();
+    _M_tolower = *__ctype_tolower_loc();
+    _M_table = __table ? __table : *__ctype_b_loc();
+#else
+    _M_toupper = __ctype_toupper;
+    _M_tolower = __ctype_tolower;
+    _M_table = __table ? __table : __ctype_b;
+#endif
+    if (__sav)
+      {
+	setlocale(LC_CTYPE, __sav);
+	delete [] __sav;
+      }
+    __builtin_memset(_M_widen, 0, sizeof(_M_widen));
+    __builtin_memset(_M_narrow, 0, sizeof(_M_narrow));
+  }
+#endif
+
+  char
+  ctype<char>::do_toupper(char __c) const
+  { return _M_toupper[static_cast<unsigned char>(__c)]; }
+
+  const char*
+  ctype<char>::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype<char>::do_tolower(char __c) const
+  { return _M_tolower[static_cast<unsigned char>(__c)]; }
+
+  const char* 
+  ctype<char>::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
+	++__low;
+      }
+    return __high;
+  }
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/cxxabi_tweaks.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/cxxabi_tweaks.h
new file mode 100644
index 0000000..1bfc588
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/cxxabi_tweaks.h
@@ -0,0 +1,81 @@
+// Control various target specific ABI tweaks.  ARM version.
+
+// Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cxxabi_tweaks.h
+ *  The header provides an CPU-variable interface to the C++ ABI.
+ */
+
+#ifndef _CXXABI_TWEAKS_H
+#define _CXXABI_TWEAKS_H 1
+
+#ifdef __cplusplus
+namespace __cxxabiv1
+{
+  extern "C" 
+  {
+#endif
+
+#ifdef __ARM_EABI__
+  // The ARM EABI uses the least significant bit of a 32-bit
+  // guard variable.  */
+#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(x) = 1
+#define _GLIBCXX_GUARD_BIT 1
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+  typedef int __guard;
+
+  // We also want the element size in array cookies.
+#define _GLIBCXX_ELTSIZE_IN_COOKIE 1
+  
+  // __cxa_vec_ctor should return a pointer to the array.
+  typedef void * __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x
+  // Constructors and destructors return the "this" pointer.
+  typedef void * __cxa_cdtor_return_type;
+
+#else // __ARM_EABI__
+
+  // The generic ABI uses the first byte of a 64-bit guard variable.
+#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+  __extension__ typedef int __guard __attribute__((mode (__DI__)));
+
+  // __cxa_vec_ctor has void return type.
+  typedef void __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
+  // Constructors and destructors do not return a value.
+  typedef void __cxa_cdtor_return_type;
+
+#endif //!__ARM_EABI__
+
+#ifdef __cplusplus
+  }
+} // namespace __cxxabiv1
+#endif
+
+#endif 
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/error_constants.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/error_constants.h
new file mode 100644
index 0000000..61c0349
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/error_constants.h
@@ -0,0 +1,175 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file error_constants.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ERROR_CONSTANTS
+#define _GLIBCXX_ERROR_CONSTANTS 1
+
+#include <bits/c++config.h>
+#include <cerrno>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  enum class errc
+    {
+      address_family_not_supported = 		EAFNOSUPPORT,
+      address_in_use = 				EADDRINUSE,
+      address_not_available = 			EADDRNOTAVAIL,
+      already_connected = 			EISCONN,
+      argument_list_too_long = 			E2BIG,
+      argument_out_of_domain = 			EDOM,
+      bad_address = 				EFAULT,
+      bad_file_descriptor = 			EBADF,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+      bad_message = 				EBADMSG,
+#endif
+
+      broken_pipe = 				EPIPE,
+      connection_aborted = 			ECONNABORTED,
+      connection_already_in_progress = 		EALREADY,
+      connection_refused = 			ECONNREFUSED,
+      connection_reset = 			ECONNRESET,
+      cross_device_link = 			EXDEV,
+      destination_address_required = 		EDESTADDRREQ,
+      device_or_resource_busy = 		EBUSY,
+      directory_not_empty = 			ENOTEMPTY,
+      executable_format_error = 		ENOEXEC,
+      file_exists = 	       			EEXIST,
+      file_too_large = 				EFBIG,
+      filename_too_long = 			ENAMETOOLONG,
+      function_not_supported = 			ENOSYS,
+      host_unreachable = 			EHOSTUNREACH,
+
+#ifdef _GLIBCXX_HAVE_EIDRM
+      identifier_removed = 			EIDRM,
+#endif
+
+      illegal_byte_sequence = 			EILSEQ,
+      inappropriate_io_control_operation = 	ENOTTY,
+      interrupted = 				EINTR,
+      invalid_argument = 			EINVAL,
+      invalid_seek = 				ESPIPE,
+      io_error = 				EIO,
+      is_a_directory = 				EISDIR,
+      message_size = 				EMSGSIZE,
+      network_down = 				ENETDOWN,
+      network_reset = 				ENETRESET,
+      network_unreachable = 			ENETUNREACH,
+      no_buffer_space = 			ENOBUFS,
+      no_child_process = 			ECHILD,
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+      no_link = 				ENOLINK,
+#endif
+
+      no_lock_available = 			ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+      no_message_available = 			ENODATA, 
+#endif
+
+      no_message = 				ENOMSG, 
+      no_protocol_option = 			ENOPROTOOPT,
+      no_space_on_device = 			ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+      no_stream_resources = 			ENOSR,
+#endif
+
+      no_such_device_or_address = 		ENXIO,
+      no_such_device = 				ENODEV,
+      no_such_file_or_directory = 		ENOENT,
+      no_such_process = 			ESRCH,
+      not_a_directory = 			ENOTDIR,
+      not_a_socket = 				ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+      not_a_stream = 				ENOSTR,
+#endif
+
+      not_connected = 				ENOTCONN,
+      not_enough_memory = 			ENOMEM,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
+      not_supported = 				ENOTSUP,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+      operation_canceled = 			ECANCELED,
+#endif
+
+      operation_in_progress = 			EINPROGRESS,
+      operation_not_permitted = 		EPERM,
+      operation_not_supported = 		EOPNOTSUPP,
+      operation_would_block = 			EWOULDBLOCK,
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+      owner_dead = 				EOWNERDEAD,
+#endif
+
+      permission_denied = 			EACCES,
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+      protocol_error = 				EPROTO,
+#endif
+
+      protocol_not_supported = 			EPROTONOSUPPORT,
+      read_only_file_system = 			EROFS,
+      resource_deadlock_would_occur = 		EDEADLK,
+      resource_unavailable_try_again = 		EAGAIN,
+      result_out_of_range = 			ERANGE,
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+      state_not_recoverable = 			ENOTRECOVERABLE,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+      stream_timeout = 				ETIME,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETXTBSY
+      text_file_busy = 				ETXTBSY,
+#endif
+
+      timed_out = 				ETIMEDOUT,
+      too_many_files_open_in_system = 		ENFILE,
+      too_many_files_open = 			EMFILE,
+      too_many_links = 				EMLINK,
+      too_many_symbolic_link_levels = 		ELOOP,
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+      value_too_large = 			EOVERFLOW,
+#endif
+
+      wrong_protocol_type = 			EPROTOTYPE
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/extc++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/extc++.h
new file mode 100644
index 0000000..03e5339
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/extc++.h
@@ -0,0 +1,71 @@
+// C++ includes used for precompiling extensions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file extc++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#include <bits/stdtr1c++.h>
+#endif
+
+#include <ext/algorithm>
+#include <ext/array_allocator.h>
+#include <ext/atomicity.h>
+#include <ext/bitmap_allocator.h>
+#include <ext/cast.h>
+#include <ext/concurrence.h>
+#include <ext/debug_allocator.h>
+#include <ext/extptr_allocator.h>
+#include <ext/functional>
+#include <ext/iterator>
+#include <ext/malloc_allocator.h>
+#include <ext/memory>
+#include <ext/mt_allocator.h>
+#include <ext/new_allocator.h>
+#include <ext/numeric>
+#include <ext/pod_char_traits.h>
+#include <ext/pointer.h>
+#include <ext/pool_allocator.h>
+#include <ext/rb_tree>
+#include <ext/rope>
+#include <ext/slist>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+#include <ext/throw_allocator.h>
+#include <ext/typelist.h>
+#include <ext/type_traits.h>
+#include <ext/vstring.h>
+#include <ext/pb_ds/assoc_container.hpp>
+#include <ext/pb_ds/priority_queue.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/hash_policy.hpp>
+#include <ext/pb_ds/list_update_policy.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/trie_policy.hpp>
+
+#ifdef _GLIBCXX_HAVE_ICONV
+ #include <ext/codecvt_specializations.h>
+ #include <ext/enc_filebuf.h>
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-default.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-default.h
new file mode 100644
index 0000000..2817cbd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-default.h
@@ -0,0 +1,895 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+   2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported.  Please look at comments
+   in gthr.h for details. */
+#define __GTHREAD_HAS_COND	1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+#  define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+  __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo.  */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+   map a subset of the POSIX pthread API to mangled versions of their
+   names.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+__gthrw(pthread_cancel)
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+   -pthreads is not specified.  The functions are dummies and most return an
+   error value.  However pthread_once returns 0 without invoking the routine
+   it is passed so we cannot pretend that the interface is active if -pthreads
+   is not specified.  On Solaris 2.5.1, the interface is not exposed at all so
+   we need to play the usual game with weak symbols.  On Solaris 10 and up, a
+   working interface is always exposed.  On FreeBSD 6 and later, libc also
+   exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+   to 9 does.  FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+   which means the alternate __gthread_active_p below cannot be used there.  */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+  __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      if (__gthrw_(pthread_once))
+	{
+	  /* If this really is a threaded program, then we must ensure that
+	     __gthread_active has been set to 1 before exiting this block.  */
+	  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+	  __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+	  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+	}
+
+      /* Make sure we'll never enter this block again.  */
+      if (__gthread_active < 0)
+	__gthread_active = 0;
+
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+  static void *const __gthread_active_ptr
+    = __extension__ (void *) &__gthrw_(pthread_cancel);
+  return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+   calls in shared flavors of the HP-UX C library.  Most of the stubs
+   have no functionality.  The details are described in the "libc cumulative
+   patch" for each subversion of HP-UX 11.  There are two special interfaces
+   provided for checking whether an application is linked to a pthread
+   library or not.  However, these interfaces aren't available in early
+   libc versions.  We also can't use pthread_once as some libc versions
+   call the init function.  So, we use pthread_create to check whether it
+   is possible to create a thread or not.  The stub implementation returns
+   the error number ENOSYS.  */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+  return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  pthread_t __t;
+  pthread_attr_t __a;
+  int __result;
+
+  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+  if (__gthread_active < 0)
+    {
+      __gthrw_(pthread_attr_init) (&__a);
+      __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+      __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+      if (__result != ENOSYS)
+	__gthread_active = 1;
+      else
+	__gthread_active = 0;
+      __gthrw_(pthread_attr_destroy) (&__a);
+    }
+  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      __gthread_active_init ();
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  if (__gthread_active_p ())
+    {
+      /* Initialize the thread storage key.  */
+      if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+	{
+	  /* The normal default detach state for threads is
+	   * PTHREAD_CREATE_JOINABLE which causes threads to not die
+	   * when you think they should.  */
+	  if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+	      && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+					      PTHREAD_CREATE_DETACHED) == 0)
+	    return 0;
+	}
+    }
+
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+      && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+    return 0;
+
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+  objc_thread_t thread_id;
+  pthread_t new_thread_handle;
+
+  if (!__gthread_active_p ())
+    return NULL;
+
+  if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+    thread_id = (objc_thread_t) new_thread_handle;
+  else
+    thread_id = NULL;
+
+  return thread_id;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+  if (!__gthread_active_p ())
+    return -1;
+  else
+    {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+      pthread_t thread_id = __gthrw_(pthread_self) ();
+      int policy;
+      struct sched_param params;
+      int priority_min, priority_max;
+
+      if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+	{
+	  if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+	    return -1;
+
+	  if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+	    return -1;
+
+	  if (priority > priority_max)
+	    priority = priority_max;
+	  else if (priority < priority_min)
+	    priority = priority_min;
+	  params.sched_priority = priority;
+
+	  /*
+	   * The solaris 7 and several other man pages incorrectly state that
+	   * this should be a pointer to policy but pthread.h is universally
+	   * at odds with this.
+	   */
+	  if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+	    return 0;
+	}
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+      return -1;
+    }
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+  if (__gthread_active_p ())
+    {
+      int policy;
+      struct sched_param params;
+
+      if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+	return params.sched_priority;
+      else
+	return -1;
+    }
+  else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+    return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  if (__gthread_active_p ())
+    __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  if (__gthread_active_p ())
+    /* exit the thread */
+    __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+  /* Failed if we reached here */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  if (__gthread_active_p ())
+    return (objc_thread_t) __gthrw_(pthread_self) ();
+  else
+    return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+  else
+    {
+      thread_local_storage = value;
+      return 0;
+    }
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+  else
+    return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+      if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+	{
+	  objc_free (mutex->backend);
+	  mutex->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      int count;
+
+      /*
+       * Posix Threads specifically require that the thread be unlocked
+       * for __gthrw_(pthread_mutex_destroy) to work.
+       */
+
+      do
+	{
+	  count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+	  if (count < 0)
+	    return -1;
+	}
+      while (count);
+
+      if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+	return -1;
+
+      objc_free (mutex->backend);
+      mutex->backend = NULL;
+    }
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+      if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+	{
+	  objc_free (condition->backend);
+	  condition->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+	return -1;
+
+      objc_free (condition->backend);
+      condition->backend = NULL;
+    }
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+			      (pthread_mutex_t *) mutex->backend);
+  else
+    return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+		  void *__args)
+{
+  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+  return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+  return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+  return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+  return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+  return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+			   const __gthread_time_t *__abs_timeout)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+  else
+    return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+				     const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+  return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+			  const __gthread_time_t *__abs_timeout)
+{
+  return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+			       __gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+				    __gthread_recursive_mutex_t *__mutex,
+				    const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+  return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-posix.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-posix.h
new file mode 100644
index 0000000..2817cbd
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-posix.h
@@ -0,0 +1,895 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+   2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported.  Please look at comments
+   in gthr.h for details. */
+#define __GTHREAD_HAS_COND	1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+#  define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+  __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo.  */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+   map a subset of the POSIX pthread API to mangled versions of their
+   names.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+__gthrw(pthread_cancel)
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C.  */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+   -pthreads is not specified.  The functions are dummies and most return an
+   error value.  However pthread_once returns 0 without invoking the routine
+   it is passed so we cannot pretend that the interface is active if -pthreads
+   is not specified.  On Solaris 2.5.1, the interface is not exposed at all so
+   we need to play the usual game with weak symbols.  On Solaris 10 and up, a
+   working interface is always exposed.  On FreeBSD 6 and later, libc also
+   exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+   to 9 does.  FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+   which means the alternate __gthread_active_p below cannot be used there.  */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+  __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      if (__gthrw_(pthread_once))
+	{
+	  /* If this really is a threaded program, then we must ensure that
+	     __gthread_active has been set to 1 before exiting this block.  */
+	  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+	  __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+	  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+	}
+
+      /* Make sure we'll never enter this block again.  */
+      if (__gthread_active < 0)
+	__gthread_active = 0;
+
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+  static void *const __gthread_active_ptr
+    = __extension__ (void *) &__gthrw_(pthread_cancel);
+  return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+   calls in shared flavors of the HP-UX C library.  Most of the stubs
+   have no functionality.  The details are described in the "libc cumulative
+   patch" for each subversion of HP-UX 11.  There are two special interfaces
+   provided for checking whether an application is linked to a pthread
+   library or not.  However, these interfaces aren't available in early
+   libc versions.  We also can't use pthread_once as some libc versions
+   call the init function.  So, we use pthread_create to check whether it
+   is possible to create a thread or not.  The stub implementation returns
+   the error number ENOSYS.  */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+  return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+  pthread_t __t;
+  pthread_attr_t __a;
+  int __result;
+
+  __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+  if (__gthread_active < 0)
+    {
+      __gthrw_(pthread_attr_init) (&__a);
+      __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+      __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+      if (__result != ENOSYS)
+	__gthread_active = 1;
+      else
+	__gthread_active = 0;
+      __gthrw_(pthread_attr_destroy) (&__a);
+    }
+  __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+  /* Avoid reading __gthread_active twice on the main code path.  */
+  int __gthread_active_latest_value = __gthread_active;
+
+  /* This test is not protected to avoid taking a lock on the main code
+     path so every update of __gthread_active in a threaded program must
+     be atomic with regard to the result of the test.  */
+  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+    {
+      __gthread_active_init ();
+      __gthread_active_latest_value = __gthread_active;
+    }
+
+  return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  if (__gthread_active_p ())
+    {
+      /* Initialize the thread storage key.  */
+      if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+	{
+	  /* The normal default detach state for threads is
+	   * PTHREAD_CREATE_JOINABLE which causes threads to not die
+	   * when you think they should.  */
+	  if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+	      && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+					      PTHREAD_CREATE_DETACHED) == 0)
+	    return 0;
+	}
+    }
+
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+      && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+    return 0;
+
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+  objc_thread_t thread_id;
+  pthread_t new_thread_handle;
+
+  if (!__gthread_active_p ())
+    return NULL;
+
+  if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+    thread_id = (objc_thread_t) new_thread_handle;
+  else
+    thread_id = NULL;
+
+  return thread_id;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+  if (!__gthread_active_p ())
+    return -1;
+  else
+    {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+      pthread_t thread_id = __gthrw_(pthread_self) ();
+      int policy;
+      struct sched_param params;
+      int priority_min, priority_max;
+
+      if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+	{
+	  if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+	    return -1;
+
+	  if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+	    return -1;
+
+	  if (priority > priority_max)
+	    priority = priority_max;
+	  else if (priority < priority_min)
+	    priority = priority_min;
+	  params.sched_priority = priority;
+
+	  /*
+	   * The solaris 7 and several other man pages incorrectly state that
+	   * this should be a pointer to policy but pthread.h is universally
+	   * at odds with this.
+	   */
+	  if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+	    return 0;
+	}
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+      return -1;
+    }
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+  if (__gthread_active_p ())
+    {
+      int policy;
+      struct sched_param params;
+
+      if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+	return params.sched_priority;
+      else
+	return -1;
+    }
+  else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+    return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  if (__gthread_active_p ())
+    __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  if (__gthread_active_p ())
+    /* exit the thread */
+    __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+  /* Failed if we reached here */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  if (__gthread_active_p ())
+    return (objc_thread_t) __gthrw_(pthread_self) ();
+  else
+    return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+  else
+    {
+      thread_local_storage = value;
+      return 0;
+    }
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+  else
+    return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+      if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+	{
+	  objc_free (mutex->backend);
+	  mutex->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    {
+      int count;
+
+      /*
+       * Posix Threads specifically require that the thread be unlocked
+       * for __gthrw_(pthread_mutex_destroy) to work.
+       */
+
+      do
+	{
+	  count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+	  if (count < 0)
+	    return -1;
+	}
+      while (count);
+
+      if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+	return -1;
+
+      objc_free (mutex->backend);
+      mutex->backend = NULL;
+    }
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+  if (__gthread_active_p ()
+      && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+      if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+	{
+	  objc_free (condition->backend);
+	  condition->backend = NULL;
+	  return -1;
+	}
+    }
+
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    {
+      if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+	return -1;
+
+      objc_free (condition->backend);
+      condition->backend = NULL;
+    }
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+			      (pthread_mutex_t *) mutex->backend);
+  else
+    return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+  else
+    return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+		  void *__args)
+{
+  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+  return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+  return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+  return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+  return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+  return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+			   const __gthread_time_t *__abs_timeout)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+  else
+    return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__gthread_active_p ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+				     const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+  return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+  return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+			  const __gthread_time_t *__abs_timeout)
+{
+  return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+			       __gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+				    __gthread_recursive_mutex_t *__mutex,
+				    const __gthread_time_t *__abs_timeout)
+{
+  return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+  return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-single.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-single.h
new file mode 100644
index 0000000..692688f
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-single.h
@@ -0,0 +1,292 @@
+/* Threads compatibility routines for libgcc2 and libobjc.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
+#define _GLIBCXX_GCC_GTHR_SINGLE_H
+
+/* Just provide compatibility for mutex handling.  */
+
+typedef int __gthread_key_t;
+typedef int __gthread_once_t;
+typedef int __gthread_mutex_t;
+typedef int __gthread_recursive_mutex_t;
+
+#define __GTHREAD_ONCE_INIT 0
+#define __GTHREAD_MUTEX_INIT 0
+#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
+
+#define _GLIBCXX_UNUSED __attribute__((unused))
+
+#ifdef _LIBOBJC
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem.  */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Close the threads subsystem.  */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution.  */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED)
+{
+  /* No thread support available */
+  return NULL;
+}
+
+/* Set the current thread's priority.  */
+static inline int
+__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED)
+{
+  /* No thread support available */
+  return -1;
+}
+
+/* Return the current thread's priority.  */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+  return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread.  */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+  return;
+}
+
+/* Terminate the current thread.  */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+  /* No thread support available */
+  /* Should we really exit the program */
+  /* exit (&__objc_thread_exit_status); */
+  return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread.  */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+  /* No thread support, use 1.  */
+  return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer.  */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+  thread_local_storage = value;
+  return 0;
+}
+
+/* Returns the thread's local storage pointer.  */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+  return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex.  */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Deallocate a mutex.  */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  /* There can only be one thread, so we always get the lock */
+  return 0;
+}
+
+/* Try to grab a lock on a mutex.  */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  /* There can only be one thread, so we always get the lock */
+  return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition.  */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Deallocate a condition.  */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED,
+			       objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wake up all threads waiting on this condition.  */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+/* Wake up one thread waiting on this condition.  */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_active_p (void)
+{
+  return 0;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int _GLIBCXX_UNUSED
+__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static int _GLIBCXX_UNUSED
+__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+  return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_trylock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  return __gthread_mutex_unlock (__mutex);
+}
+
+#endif /* _LIBOBJC */
+
+#undef _GLIBCXX_UNUSED
+
+#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-tpf.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-tpf.h
new file mode 100644
index 0000000..df194e6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr-tpf.h
@@ -0,0 +1,229 @@
+/* Threads compatibility routines for libgcc2 and libobjc.
+   Compile this one with gcc.
+   Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+/* TPF needs its own version of gthr-*.h because TPF always links to
+   the thread library.  However, for performance reasons we still do not
+   want to issue thread api calls unless a check is made to see that we
+   are running as a thread.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_TPF_H
+#define _GLIBCXX_GCC_GTHR_TPF_H
+
+/* POSIX threads specific definitions.
+   Easy, since the interface is just one-to-one mapping.  */
+
+#define __GTHREADS 1
+
+/* Some implementations of <pthread.h> require this to be defined.  */
+#ifndef _REENTRANT
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#endif
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+
+#define NOTATHREAD   00
+#define ECBBASEPTR (unsigned long int) *(unsigned int *)0x00000514u
+#define ECBPG2PTR  ECBBASEPTR + 0x1000
+#define CE2THRCPTR *((unsigned char *)(ECBPG2PTR + 16))
+#define __tpf_pthread_active() (CE2THRCPTR != NOTATHREAD)
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# define __gthrw(name) \
+  static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name)));
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw(name)
+# define __gthrw_(name) name
+#endif
+
+__gthrw(pthread_once)
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+__gthrw(pthread_create)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+static inline int
+__gthread_active_p (void)
+{
+  return 1;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_once) (__once, __func);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_key_create) (__key, __dtor);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_key_delete) (__key);
+  else
+    return -1;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_getspecific) (__key);
+  else
+    return NULL;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_setspecific) (__key, __ptr);
+  else
+    return -1;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_destroy) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_lock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_trylock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthrw_(pthread_mutex_unlock) (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_lock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_trylock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    return __gthread_mutex_unlock (__mutex);
+  else
+    return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+  if (__tpf_pthread_active ())
+    {
+      pthread_mutexattr_t __attr;
+      int __r;
+
+      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+						   PTHREAD_MUTEX_RECURSIVE);
+      if (!__r)
+	__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+      if (!__r)
+	__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+      return __r;
+    }
+  return 0;
+}
+
+
+#endif /* ! _GLIBCXX_GCC_GTHR_TPF_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr.h
new file mode 100644
index 0000000..a466c11
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/gthr.h
@@ -0,0 +1,173 @@
+/* Threads compatibility routines for libgcc2.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1997, 1998, 2004, 2008, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _GLIBCXX_GCC_GTHR_H
+#define _GLIBCXX_GCC_GTHR_H
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility push(default)
+#endif
+
+/* If this file is compiled with threads support, it must
+       #define __GTHREADS 1
+   to indicate that threads support is present.  Also it has define
+   function
+     int __gthread_active_p ()
+   that returns 1 if thread system is active, 0 if not.
+
+   The threads interface must define the following types:
+     __gthread_key_t
+     __gthread_once_t
+     __gthread_mutex_t
+     __gthread_recursive_mutex_t
+
+   The threads interface must define the following macros:
+
+     __GTHREAD_ONCE_INIT
+     		to initialize __gthread_once_t
+     __GTHREAD_MUTEX_INIT
+     		to initialize __gthread_mutex_t to get a fast
+		non-recursive mutex.
+     __GTHREAD_MUTEX_INIT_FUNCTION
+     		some systems can't initialize a mutex without a
+		function call.  On such systems, define this to a
+		function which looks like this:
+		  void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
+		Don't define __GTHREAD_MUTEX_INIT in this case
+     __GTHREAD_RECURSIVE_MUTEX_INIT
+     __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
+     		as above, but for a recursive mutex.
+
+   The threads interface must define the following static functions:
+
+     int __gthread_once (__gthread_once_t *once, void (*func) ())
+
+     int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
+     int __gthread_key_delete (__gthread_key_t key)
+
+     void *__gthread_getspecific (__gthread_key_t key)
+     int __gthread_setspecific (__gthread_key_t key, const void *ptr)
+
+     int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
+
+     int __gthread_mutex_lock (__gthread_mutex_t *mutex);
+     int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
+     int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
+
+     int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
+     int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
+     int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
+
+   The following are supported in POSIX threads only. They are required to
+   fix a deadlock in static initialization inside libsupc++. The header file
+   gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra
+   features are supported.
+
+   Types:
+     __gthread_cond_t
+
+   Macros:
+     __GTHREAD_COND_INIT
+     __GTHREAD_COND_INIT_FUNCTION
+
+   Interface:
+     int __gthread_cond_broadcast (__gthread_cond_t *cond);
+     int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex);
+     int __gthread_cond_wait_recursive (__gthread_cond_t *cond,
+					__gthread_recursive_mutex_t *mutex);
+
+   All functions returning int should return zero on success or the error
+   number.  If the operation is not supported, -1 is returned.
+
+   If the following are also defined, you should
+     #define __GTHREADS_CXX0X 1
+   to enable the c++0x thread library.
+
+   Types:
+     __gthread_t
+     __gthread_time_t
+
+   Interface:
+     int __gthread_create (__gthread_t *thread, void *(*func) (void*),
+                           void *args);
+     int __gthread_join (__gthread_t thread, void **value_ptr);
+     int __gthread_detach (__gthread_t thread);
+     int __gthread_equal (__gthread_t t1, __gthread_t t2);
+     __gthread_t __gthread_self (void);
+     int __gthread_yield (void);
+
+     int __gthread_mutex_timedlock (__gthread_mutex_t *m,
+                                    const __gthread_time_t *abs_timeout);
+     int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m,
+                                          const __gthread_time_t *abs_time);
+
+     int __gthread_cond_signal (__gthread_cond_t *cond);
+     int __gthread_cond_timedwait (__gthread_cond_t *cond,
+                                   __gthread_mutex_t *mutex,
+                                   const __gthread_time_t *abs_timeout);
+     int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
+                                             __gthread_recursive_mutex_t *mutex,
+                                             const __gthread_time_t *abs_time)
+
+   Currently supported threads packages are
+     TPF threads with -D__tpf__
+     POSIX/Unix98 threads with -D_PTHREADS
+     POSIX/Unix95 threads with -D_PTHREADS95
+     DCE threads with -D_DCE_THREADS
+     Solaris/UI threads with -D_SOLARIS_THREADS
+
+*/
+
+/* Check first for thread specific defines.  */
+#if defined (_GLIBCXX___tpf_GLIBCXX___)
+#include <bits/gthr-tpf.h>
+#elif _GLIBCXX__PTHREADS
+#include <bits/gthr-posix.h>
+#elif _GLIBCXX__PTHREADS95
+#include <bits/gthr-posix95.h>
+#elif _GLIBCXX__DCE_THREADS
+#include <bits/gthr-dce.h>
+#elif _GLIBCXX__SOLARIS_THREADS
+#include <bits/gthr-solaris.h>
+
+/* Include GTHREAD_FILE if one is defined.  */
+#elif defined(_GLIBCXX_HAVE_GTHR_DEFAULT)
+#if __GXX_WEAK__
+#ifndef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 1
+#endif
+#endif
+#include <bits/gthr-default.h>
+
+/* Fallback to single thread definitions.  */
+#else
+#include <bits/gthr-single.h>
+#endif
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility pop
+#endif
+
+#endif /* ! _GLIBCXX_GCC_GTHR_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/messages_members.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/messages_members.h
new file mode 100644
index 0000000..8773562
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/messages_members.h
@@ -0,0 +1,128 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file messages_members.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.7.1.2  messages functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#include <libintl.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Non-virtual member functions.
+  template<typename _CharT>
+     messages<_CharT>::messages(size_t __refs)
+     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
+       _M_name_messages(_S_get_c_name())
+     { }
+
+  template<typename _CharT>
+     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
+				size_t __refs) 
+     : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
+     {
+       if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+	 {
+	   const size_t __len = __builtin_strlen(__s) + 1;
+	   char* __tmp = new char[__len];
+	   __builtin_memcpy(__tmp, __s, __len);
+	   _M_name_messages = __tmp;
+	 }
+       else
+	 _M_name_messages = _S_get_c_name();
+
+       // Last to avoid leaking memory if new throws.
+       _M_c_locale_messages = _S_clone_c_locale(__cloc);
+     }
+
+  template<typename _CharT>
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
+			   const char* __dir) const
+    { 
+      bindtextdomain(__s.c_str(), __dir);
+      return this->do_open(__s, __loc); 
+    }
+
+  // Virtual member functions.
+  template<typename _CharT>
+    messages<_CharT>::~messages()
+    { 
+      if (_M_name_messages != _S_get_c_name())
+	delete [] _M_name_messages;
+      _S_destroy_c_locale(_M_c_locale_messages); 
+    }
+
+  template<typename _CharT>
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::do_open(const basic_string<char>& __s, 
+			      const locale&) const
+    { 
+      // No error checking is done, assume the catalog exists and can
+      // be used.
+      textdomain(__s.c_str());
+      return 0;
+    }
+
+  template<typename _CharT>
+    void    
+    messages<_CharT>::do_close(catalog) const 
+    { }
+
+   // messages_byname
+   template<typename _CharT>
+     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
+     : messages<_CharT>(__refs) 
+     { 
+       if (this->_M_name_messages != locale::facet::_S_get_c_name())
+	 {
+	   delete [] this->_M_name_messages;
+	   if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0)
+	     {
+	       const size_t __len = __builtin_strlen(__s) + 1;
+	       char* __tmp = new char[__len];
+	       __builtin_memcpy(__tmp, __s, __len);
+	       this->_M_name_messages = __tmp;
+	     }
+	   else
+	     this->_M_name_messages = locale::facet::_S_get_c_name();
+	 }
+
+       if (__builtin_strcmp(__s, "C") != 0
+	   && __builtin_strcmp(__s, "POSIX") != 0)
+	 {
+	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
+	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
+	 }
+     }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/os_defines.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/os_defines.h
new file mode 100644
index 0000000..9c42b3a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/os_defines.h
@@ -0,0 +1,41 @@
+// Specific definitions for GNU/Linux  -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file os_defines.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here.  This
+// file will come before all others.
+
+// This keeps isanum, et al from being propagated as macros.
+#define __NO_CTYPE 1
+
+#include <features.h>
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/stdc++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/stdc++.h
new file mode 100644
index 0000000..c19c938
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/stdc++.h
@@ -0,0 +1,115 @@
+// C++ includes used for precompiling -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdc++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+// 17.4.1.2 Headers
+
+// C
+#ifndef _GLIBCXX_NO_ASSERT
+#include <cassert>
+#endif
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <ccomplex>
+#include <cfenv>
+#include <cinttypes>
+#include <cstdbool>
+#include <cstdint>
+#include <ctgmath>
+#include <cwchar>
+#include <cwctype>
+#endif
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <array>
+#include <atomic>
+#include <chrono>
+#include <condition_variable>
+#include <forward_list>
+#include <future>
+#include <initializer_list>
+#include <mutex>
+#include <random>
+#include <ratio>
+#include <regex>
+#include <system_error>
+#include <thread>
+#include <tuple>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/stdtr1c++.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/stdtr1c++.h
new file mode 100644
index 0000000..8ed9cb6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/stdtr1c++.h
@@ -0,0 +1,53 @@
+// C++ includes used for precompiling TR1 -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdtr1c++.h
+ *  This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdc++.h>
+
+#include <tr1/array>
+#include <tr1/cctype>
+#include <tr1/cfenv>
+#include <tr1/cfloat>
+#include <tr1/cinttypes>
+#include <tr1/climits>
+#include <tr1/cmath>
+#include <tr1/complex>
+#include <tr1/cstdarg>
+#include <tr1/cstdbool>
+#include <tr1/cstdint>
+#include <tr1/cstdio>
+#include <tr1/cstdlib>
+#include <tr1/ctgmath>
+#include <tr1/ctime>
+#include <tr1/cwchar>
+#include <tr1/cwctype>
+#include <tr1/functional>
+#include <tr1/random>
+#include <tr1/tuple>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+#include <tr1/utility>
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/time_members.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/time_members.h
new file mode 100644
index 0000000..90bc0ce
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi/thumb2/bits/time_members.h
@@ -0,0 +1,87 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file time_members.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(size_t __refs) 
+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(_S_get_c_name())
+    { _M_initialize_timepunct(); }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
+    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(_S_get_c_name())
+    { _M_initialize_timepunct(); }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+				     size_t __refs) 
+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
+      _M_name_timepunct(NULL)
+    {
+      if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+	{
+	  const size_t __len = __builtin_strlen(__s) + 1;
+	  char* __tmp = new char[__len];
+	  __builtin_memcpy(__tmp, __s, __len);
+	  _M_name_timepunct = __tmp;
+	}
+      else
+	_M_name_timepunct = _S_get_c_name();
+
+      __try
+	{ _M_initialize_timepunct(__cloc); }
+      __catch(...)
+	{
+	  if (_M_name_timepunct != _S_get_c_name())
+	    delete [] _M_name_timepunct;
+	  __throw_exception_again;
+	}
+    }
+
+  template<typename _CharT>
+    __timepunct<_CharT>::~__timepunct()
+    { 
+      if (_M_name_timepunct != _S_get_c_name())
+	delete [] _M_name_timepunct;
+      delete _M_data; 
+      _S_destroy_c_locale(_M_c_locale_timepunct); 
+    }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/array b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/array
new file mode 100644
index 0000000..d374c88
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/array
@@ -0,0 +1,60 @@
+// <array> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/array
+ *  This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_ARRAY
+#define _GLIBCXX_ARRAY 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <bits/c++0x_warning.h>
+#else
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+#  error C++0x header cannot be included from TR1 header
+#endif
+
+#include <bits/stl_algobase.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+#  include <tr1_impl/array>
+#else
+#  define _GLIBCXX_INCLUDE_AS_CXX0X
+#  define _GLIBCXX_BEGIN_NAMESPACE_TR1
+#  define _GLIBCXX_END_NAMESPACE_TR1
+#  define _GLIBCXX_TR1
+#  include <tr1_impl/array>
+#  undef _GLIBCXX_TR1
+#  undef _GLIBCXX_END_NAMESPACE_TR1
+#  undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+#  undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_ARRAY
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/atomic b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/atomic
new file mode 100644
index 0000000..c77fd0c
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/atomic
@@ -0,0 +1,822 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file atomic
+ *  This is a Standard C++ Library header.
+ */
+
+// Based on "C++ Atomic Types and Operations" by Hans Boehm and Lawrence Crowl.
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
+
+#ifndef _GLIBCXX_ATOMIC
+#define _GLIBCXX_ATOMIC 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <bits/c++0x_warning.h>
+#endif
+
+#include <bits/atomic_base.h>
+#include <cstddef>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup atomics
+   * @{
+   */
+
+  /// kill_dependency
+  template<typename _Tp>
+    inline _Tp
+    kill_dependency(_Tp __y)
+    {
+      _Tp ret(__y);
+      return ret;
+    }
+
+  inline memory_order
+  __calculate_memory_order(memory_order __m)
+  {
+    const bool __cond1 = __m == memory_order_release;
+    const bool __cond2 = __m == memory_order_acq_rel;
+    memory_order __mo1(__cond1 ? memory_order_relaxed : __m);
+    memory_order __mo2(__cond2 ? memory_order_acquire : __mo1);
+    return __mo2;
+  }
+
+  //
+  // Three nested namespaces for atomic implementation details.
+  //
+  // The nested namespace inlined into std:: is determined by the value
+  // of the _GLIBCXX_ATOMIC_PROPERTY macro and the resulting
+  // ATOMIC_*_LOCK_FREE macros. See file atomic_base.h.
+  //
+  // 0 == __atomic0 == Never lock-free
+  // 1 == __atomic1 == Best available, sometimes lock-free
+  // 2 == __atomic2 == Always lock-free
+#include <bits/atomic_0.h>
+#include <bits/atomic_2.h>
+
+  /// atomic
+  /// 29.4.3, Generic atomic type, primary class template.
+  template<typename _Tp>
+    struct atomic
+    {
+    private:
+      _Tp _M_i;
+
+    public:
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(_Tp __i) : _M_i(__i) { }
+
+      operator _Tp() const;
+
+      _Tp
+      operator=(_Tp __i) { store(__i); return __i; }
+
+      bool
+      is_lock_free() const volatile;
+
+      void
+      store(_Tp, memory_order = memory_order_seq_cst) volatile;
+
+      _Tp
+      load(memory_order = memory_order_seq_cst) const volatile;
+
+      _Tp
+      exchange(_Tp __i, memory_order = memory_order_seq_cst) volatile;
+
+      bool
+      compare_exchange_weak(_Tp&, _Tp, memory_order, memory_order) volatile;
+
+      bool
+      compare_exchange_strong(_Tp&, _Tp, memory_order, memory_order) volatile;
+
+      bool
+      compare_exchange_weak(_Tp&, _Tp,
+			    memory_order = memory_order_seq_cst) volatile;
+
+      bool
+      compare_exchange_strong(_Tp&, _Tp,
+			      memory_order = memory_order_seq_cst) volatile;
+    };
+
+
+  /// Partial specialization for pointer types.
+  template<typename _Tp>
+    struct atomic<_Tp*> : atomic_address
+    {
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(_Tp* __v) : atomic_address(__v) { }
+
+      void
+      store(_Tp* __v, memory_order __m = memory_order_seq_cst)
+      { atomic_address::store(__v, __m); }
+
+      _Tp*
+      load(memory_order __m = memory_order_seq_cst) const
+      { return static_cast<_Tp*>(atomic_address::load(__m)); }
+
+      _Tp*
+      exchange(_Tp* __v, memory_order __m = memory_order_seq_cst)
+      { return static_cast<_Tp*>(atomic_address::exchange(__v, __m)); }
+
+      bool
+      compare_exchange_weak(_Tp*&, _Tp*, memory_order, memory_order);
+
+      bool
+      compare_exchange_strong(_Tp*&, _Tp*, memory_order, memory_order);
+
+      bool
+      compare_exchange_weak(_Tp*&, _Tp*, memory_order = memory_order_seq_cst);
+
+      bool
+      compare_exchange_strong(_Tp*&, _Tp*, memory_order = memory_order_seq_cst);
+
+      _Tp*
+      fetch_add(ptrdiff_t, memory_order = memory_order_seq_cst);
+
+      _Tp*
+      fetch_sub(ptrdiff_t, memory_order = memory_order_seq_cst);
+
+      operator _Tp*() const
+      { return load(); }
+
+      _Tp*
+      operator=(_Tp* __v)
+      {
+	store(__v);
+	return __v;
+      }
+
+      _Tp*
+      operator++(int) { return fetch_add(1); }
+
+      _Tp*
+      operator--(int) { return fetch_sub(1); }
+
+      _Tp*
+      operator++() { return fetch_add(1) + 1; }
+
+      _Tp*
+      operator--() { return fetch_sub(1) - 1; }
+
+      _Tp*
+      operator+=(ptrdiff_t __d)
+      { return fetch_add(__d) + __d; }
+
+      _Tp*
+      operator-=(ptrdiff_t __d)
+      { return fetch_sub(__d) - __d; }
+    };
+
+
+  /// Explicit specialization for void*
+  template<>
+    struct atomic<void*> : public atomic_address
+    {
+      typedef void* 			__integral_type;
+      typedef atomic_address 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for bool.
+  template<>
+    struct atomic<bool> : public atomic_bool
+    {
+      typedef bool 			__integral_type;
+      typedef atomic_bool 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for char.
+  template<>
+    struct atomic<char> : public atomic_char
+    {
+      typedef char 			__integral_type;
+      typedef atomic_char 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for signed char.
+  template<>
+    struct atomic<signed char> : public atomic_schar
+    {
+      typedef signed char 		__integral_type;
+      typedef atomic_schar 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for unsigned char.
+  template<>
+    struct atomic<unsigned char> : public atomic_uchar
+    {
+      typedef unsigned char 		__integral_type;
+      typedef atomic_uchar 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for short.
+  template<>
+    struct atomic<short> : public atomic_short
+    {
+      typedef short 			__integral_type;
+      typedef atomic_short 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for unsigned short.
+  template<>
+    struct atomic<unsigned short> : public atomic_ushort
+    {
+      typedef unsigned short 	      	__integral_type;
+      typedef atomic_ushort 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for int.
+  template<>
+    struct atomic<int> : atomic_int
+    {
+      typedef int 			__integral_type;
+      typedef atomic_int 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for unsigned int.
+  template<>
+    struct atomic<unsigned int> : public atomic_uint
+    {
+      typedef unsigned int		__integral_type;
+      typedef atomic_uint 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for long.
+  template<>
+    struct atomic<long> : public atomic_long
+    {
+      typedef long 			__integral_type;
+      typedef atomic_long 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for unsigned long.
+  template<>
+    struct atomic<unsigned long> : public atomic_ulong
+    {
+      typedef unsigned long 		__integral_type;
+      typedef atomic_ulong 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for long long.
+  template<>
+    struct atomic<long long> : public atomic_llong
+    {
+      typedef long long 		__integral_type;
+      typedef atomic_llong 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for unsigned long long.
+  template<>
+    struct atomic<unsigned long long> : public atomic_ullong
+    {
+      typedef unsigned long long       	__integral_type;
+      typedef atomic_ullong 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for wchar_t.
+  template<>
+    struct atomic<wchar_t> : public atomic_wchar_t
+    {
+      typedef wchar_t 			__integral_type;
+      typedef atomic_wchar_t 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for char16_t.
+  template<>
+    struct atomic<char16_t> : public atomic_char16_t
+    {
+      typedef char16_t 			__integral_type;
+      typedef atomic_char16_t 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  /// Explicit specialization for char32_t.
+  template<>
+    struct atomic<char32_t> : public atomic_char32_t
+    {
+      typedef char32_t 			__integral_type;
+      typedef atomic_char32_t 		__base_type;
+
+      atomic() = default;
+      ~atomic() = default;
+      atomic(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
+
+      atomic(__integral_type __i) : __base_type(__i) { }
+
+      using __base_type::operator __integral_type;
+      using __base_type::operator=;
+    };
+
+  template<typename _Tp>
+    bool
+    atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v, memory_order __m1,
+					memory_order __m2)
+    {
+      void** __vr = reinterpret_cast<void**>(&__r);
+      void* __vv = static_cast<void*>(__v);
+      return atomic_address::compare_exchange_weak(*__vr, __vv, __m1, __m2);
+    }
+
+  template<typename _Tp>
+    bool
+    atomic<_Tp*>::compare_exchange_strong(_Tp*& __r, _Tp* __v,
+					  memory_order __m1,
+					  memory_order __m2)
+    {
+      void** __vr = reinterpret_cast<void**>(&__r);
+      void* __vv = static_cast<void*>(__v);
+      return atomic_address::compare_exchange_strong(*__vr, __vv, __m1, __m2);
+    }
+
+  template<typename _Tp>
+    bool
+    atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v,
+					memory_order __m)
+    {
+      return compare_exchange_weak(__r, __v, __m,
+				   __calculate_memory_order(__m));
+    }
+
+  template<typename _Tp>
+    bool
+    atomic<_Tp*>::compare_exchange_strong(_Tp*& __r, _Tp* __v,
+					memory_order __m)
+    {
+      return compare_exchange_strong(__r, __v, __m,
+				     __calculate_memory_order(__m));
+    }
+
+  template<typename _Tp>
+    _Tp*
+    atomic<_Tp*>::fetch_add(ptrdiff_t __d, memory_order __m)
+    {
+      void* __p = atomic_fetch_add_explicit(this, sizeof(_Tp) * __d, __m);
+      return static_cast<_Tp*>(__p);
+    }
+
+  template<typename _Tp>
+    _Tp*
+    atomic<_Tp*>::fetch_sub(ptrdiff_t __d, memory_order __m)
+    {
+      void* __p = atomic_fetch_sub_explicit(this, sizeof(_Tp) * __d, __m);
+      return static_cast<_Tp*>(__p);
+    }
+
+  // Convenience function definitions, atomic_flag.
+  inline bool
+  atomic_flag_test_and_set_explicit(atomic_flag* __a, memory_order __m)
+  { return __a->test_and_set(__m); }
+
+  inline void
+  atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m)
+  { return __a->clear(__m); }
+
+
+  // Convenience function definitions, atomic_address.
+  inline bool
+  atomic_is_lock_free(const atomic_address* __a)
+  { return __a->is_lock_free(); }
+
+  inline void
+  atomic_store(atomic_address* __a, void* __v)
+  { __a->store(__v); }
+
+  inline void
+  atomic_store_explicit(atomic_address* __a, void* __v, memory_order __m)
+  { __a->store(__v, __m); }
+
+  inline void*
+  atomic_load(const atomic_address* __a)
+  { return __a->load(); }
+
+  inline void*
+  atomic_load_explicit(const atomic_address* __a, memory_order __m)
+  { return __a->load(__m); }
+
+  inline void*
+  atomic_exchange(atomic_address* __a, void* __v)
+  { return __a->exchange(__v); }
+
+  inline void*
+  atomic_exchange_explicit(atomic_address* __a, void* __v, memory_order __m)
+  { return __a->exchange(__v, __m); }
+
+  inline bool
+  atomic_compare_exchange_weak(atomic_address* __a, void** __v1, void* __v2)
+  {
+    return __a->compare_exchange_weak(*__v1, __v2, memory_order_seq_cst,
+				      memory_order_seq_cst);
+  }
+
+  inline bool
+  atomic_compare_exchange_strong(atomic_address* __a,
+			       void** __v1, void* __v2)
+  {
+    return __a->compare_exchange_strong(*__v1, __v2, memory_order_seq_cst,
+				      memory_order_seq_cst);
+  }
+
+  inline bool
+  atomic_compare_exchange_weak_explicit(atomic_address* __a,
+					void** __v1, void* __v2,
+					memory_order __m1, memory_order __m2)
+  { return __a->compare_exchange_weak(*__v1, __v2, __m1, __m2); }
+
+  inline bool
+  atomic_compare_exchange_strong_explicit(atomic_address* __a,
+					  void** __v1, void* __v2,
+					  memory_order __m1, memory_order __m2)
+  { return __a->compare_exchange_strong(*__v1, __v2, __m1, __m2); }
+
+  inline void*
+  atomic_fetch_add_explicit(atomic_address* __a, ptrdiff_t __d,
+			    memory_order __m)
+  { return __a->fetch_add(__d, __m); }
+
+  inline void*
+  atomic_fetch_add(atomic_address* __a, ptrdiff_t __d)
+  { return __a->fetch_add(__d); }
+
+  inline void*
+  atomic_fetch_sub_explicit(atomic_address* __a, ptrdiff_t __d,
+			    memory_order __m)
+  { return __a->fetch_sub(__d, __m); }
+
+  inline void*
+  atomic_fetch_sub(atomic_address* __a, ptrdiff_t __d)
+  { return __a->fetch_sub(__d); }
+
+
+  // Convenience function definitions, atomic_bool.
+  inline bool
+  atomic_is_lock_free(const atomic_bool* __a)
+  { return __a->is_lock_free(); }
+
+  inline void
+  atomic_store(atomic_bool* __a, bool __i)
+  { __a->store(__i); }
+
+  inline void
+  atomic_store_explicit(atomic_bool* __a, bool __i, memory_order __m)
+  { __a->store(__i, __m); }
+
+  inline bool
+  atomic_load(const atomic_bool* __a)
+  { return __a->load(); }
+
+  inline bool
+  atomic_load_explicit(const atomic_bool* __a, memory_order __m)
+  { return __a->load(__m); }
+
+  inline bool
+  atomic_exchange(atomic_bool* __a, bool __i)
+  { return __a->exchange(__i); }
+
+  inline bool
+  atomic_exchange_explicit(atomic_bool* __a, bool __i, memory_order __m)
+  { return __a->exchange(__i, __m); }
+
+  inline bool
+  atomic_compare_exchange_weak(atomic_bool* __a, bool* __i1, bool __i2)
+  {
+    return __a->compare_exchange_weak(*__i1, __i2, memory_order_seq_cst,
+				      memory_order_seq_cst);
+  }
+
+  inline bool
+  atomic_compare_exchange_strong(atomic_bool* __a, bool* __i1, bool __i2)
+  {
+    return __a->compare_exchange_strong(*__i1, __i2, memory_order_seq_cst,
+					memory_order_seq_cst);
+  }
+
+  inline bool
+  atomic_compare_exchange_weak_explicit(atomic_bool* __a, bool* __i1,
+					bool __i2, memory_order __m1,
+					memory_order __m2)
+  { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
+
+  inline bool
+  atomic_compare_exchange_strong_explicit(atomic_bool* __a,
+					  bool* __i1, bool __i2,
+					  memory_order __m1, memory_order __m2)
+  { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
+
+
+
+  // Free standing functions. Template argument should be constricted
+  // to intergral types as specified in the standard.
+  template<typename _ITp>
+    inline void
+    atomic_store_explicit(__atomic_base<_ITp>* __a, _ITp __i, memory_order __m)
+    { __a->store(__i, __m); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_load_explicit(const __atomic_base<_ITp>* __a, memory_order __m)
+    { return __a->load(__m); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_exchange_explicit(__atomic_base<_ITp>* __a, _ITp __i,
+			     memory_order __m)
+    { return __a->exchange(__i, __m); }
+
+  template<typename _ITp>
+    inline bool
+    atomic_compare_exchange_weak_explicit(__atomic_base<_ITp>* __a,
+					  _ITp* __i1, _ITp __i2,
+					  memory_order __m1, memory_order __m2)
+    { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
+
+  template<typename _ITp>
+    inline bool
+    atomic_compare_exchange_strong_explicit(__atomic_base<_ITp>* __a,
+					    _ITp* __i1, _ITp __i2,
+					    memory_order __m1,
+					    memory_order __m2)
+    { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_add_explicit(__atomic_base<_ITp>* __a, _ITp __i,
+			      memory_order __m)
+    { return __a->fetch_add(__i, __m); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_sub_explicit(__atomic_base<_ITp>* __a, _ITp __i,
+			      memory_order __m)
+    { return __a->fetch_sub(__i, __m); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, _ITp __i,
+			      memory_order __m)
+    { return __a->fetch_and(__i, __m); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, _ITp __i,
+			     memory_order __m)
+    { return __a->fetch_or(__i, __m); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, _ITp __i,
+			      memory_order __m)
+    { return __a->fetch_xor(__i, __m); }
+
+  template<typename _ITp>
+    inline bool
+    atomic_is_lock_free(const __atomic_base<_ITp>* __a)
+    { return __a->is_lock_free(); }
+
+  template<typename _ITp>
+    inline void
+    atomic_store(__atomic_base<_ITp>* __a, _ITp __i)
+    { atomic_store_explicit(__a, __i, memory_order_seq_cst); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_load(const __atomic_base<_ITp>* __a)
+    { return atomic_load_explicit(__a, memory_order_seq_cst); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_exchange(__atomic_base<_ITp>* __a, _ITp __i)
+    { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); }
+
+  template<typename _ITp>
+    inline bool
+    atomic_compare_exchange_weak(__atomic_base<_ITp>* __a,
+				 _ITp* __i1, _ITp __i2)
+    {
+      return atomic_compare_exchange_weak_explicit(__a, __i1, __i2,
+						   memory_order_seq_cst,
+						   memory_order_seq_cst);
+    }
+
+  template<typename _ITp>
+    inline bool
+    atomic_compare_exchange_strong(__atomic_base<_ITp>* __a,
+				   _ITp* __i1, _ITp __i2)
+    {
+      return atomic_compare_exchange_strong_explicit(__a, __i1, __i2,
+						     memory_order_seq_cst,
+						     memory_order_seq_cst);
+    }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_add(__atomic_base<_ITp>* __a, _ITp __i)
+    { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_sub(__atomic_base<_ITp>* __a, _ITp __i)
+    { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_and(__atomic_base<_ITp>* __a, _ITp __i)
+    { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_or(__atomic_base<_ITp>* __a, _ITp __i)
+    { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); }
+
+  template<typename _ITp>
+    inline _ITp
+    atomic_fetch_xor(__atomic_base<_ITp>* __a, _ITp __i)
+    { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); }
+
+  // @} group atomics
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/auto_ptr.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/auto_ptr.h
new file mode 100644
index 0000000..d60bad3
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/auto_ptr.h
@@ -0,0 +1,292 @@
+// auto_ptr implementation -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file backward/auto_ptr.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _BACKWARD_AUTO_PTR_H
+#define _BACKWARD_AUTO_PTR_H 1
+
+#include <bits/c++config.h>
+#include <debug/debug.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  A wrapper class to provide auto_ptr with reference semantics.
+   *  For example, an auto_ptr can be assigned (or constructed from)
+   *  the result of a function which returns an auto_ptr by value.
+   *
+   *  All the auto_ptr_ref stuff should happen behind the scenes.
+   */
+  template<typename _Tp1>
+    struct auto_ptr_ref
+    {
+      _Tp1* _M_ptr;
+      
+      explicit
+      auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
+    } _GLIBCXX_DEPRECATED_ATTR;
+
+
+  /**
+   *  @brief  A simple smart pointer providing strict ownership semantics.
+   *
+   *  The Standard says:
+   *  <pre>
+   *  An @c auto_ptr owns the object it holds a pointer to.  Copying
+   *  an @c auto_ptr copies the pointer and transfers ownership to the
+   *  destination.  If more than one @c auto_ptr owns the same object
+   *  at the same time the behavior of the program is undefined.
+   *
+   *  The uses of @c auto_ptr include providing temporary
+   *  exception-safety for dynamically allocated memory, passing
+   *  ownership of dynamically allocated memory to a function, and
+   *  returning dynamically allocated memory from a function.  @c
+   *  auto_ptr does not meet the CopyConstructible and Assignable
+   *  requirements for Standard Library <a
+   *  href="tables.html#65">container</a> elements and thus
+   *  instantiating a Standard Library container with an @c auto_ptr
+   *  results in undefined behavior.
+   *  </pre>
+   *  Quoted from [20.4.5]/3.
+   *
+   *  Good examples of what can and cannot be done with auto_ptr can
+   *  be found in the libstdc++ testsuite.
+   *
+   *  _GLIBCXX_RESOLVE_LIB_DEFECTS
+   *  127.  auto_ptr<> conversion issues
+   *  These resolutions have all been incorporated.
+   */
+  template<typename _Tp>
+    class auto_ptr
+    {
+    private:
+      _Tp* _M_ptr;
+      
+    public:
+      /// The pointed-to type.
+      typedef _Tp element_type;
+      
+      /**
+       *  @brief  An %auto_ptr is usually constructed from a raw pointer.
+       *  @param  p  A pointer (defaults to NULL).
+       *
+       *  This object now @e owns the object pointed to by @a p.
+       */
+      explicit
+      auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
+
+      /**
+       *  @brief  An %auto_ptr can be constructed from another %auto_ptr.
+       *  @param  a  Another %auto_ptr of the same type.
+       *
+       *  This object now @e owns the object previously owned by @a a,
+       *  which has given up ownership.
+       */
+      auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { }
+
+      /**
+       *  @brief  An %auto_ptr can be constructed from another %auto_ptr.
+       *  @param  a  Another %auto_ptr of a different but related type.
+       *
+       *  A pointer-to-Tp1 must be convertible to a
+       *  pointer-to-Tp/element_type.
+       *
+       *  This object now @e owns the object previously owned by @a a,
+       *  which has given up ownership.
+       */
+      template<typename _Tp1>
+        auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { }
+
+      /**
+       *  @brief  %auto_ptr assignment operator.
+       *  @param  a  Another %auto_ptr of the same type.
+       *
+       *  This object now @e owns the object previously owned by @a a,
+       *  which has given up ownership.  The object that this one @e
+       *  used to own and track has been deleted.
+       */
+      auto_ptr&
+      operator=(auto_ptr& __a) throw()
+      {
+	reset(__a.release());
+	return *this;
+      }
+
+      /**
+       *  @brief  %auto_ptr assignment operator.
+       *  @param  a  Another %auto_ptr of a different but related type.
+       *
+       *  A pointer-to-Tp1 must be convertible to a pointer-to-Tp/element_type.
+       *
+       *  This object now @e owns the object previously owned by @a a,
+       *  which has given up ownership.  The object that this one @e
+       *  used to own and track has been deleted.
+       */
+      template<typename _Tp1>
+        auto_ptr&
+        operator=(auto_ptr<_Tp1>& __a) throw()
+        {
+	  reset(__a.release());
+	  return *this;
+	}
+
+      /**
+       *  When the %auto_ptr goes out of scope, the object it owns is
+       *  deleted.  If it no longer owns anything (i.e., @c get() is
+       *  @c NULL), then this has no effect.
+       *
+       *  The C++ standard says there is supposed to be an empty throw
+       *  specification here, but omitting it is standard conforming.  Its
+       *  presence can be detected only if _Tp::~_Tp() throws, but this is
+       *  prohibited.  [17.4.3.6]/2
+       */
+      ~auto_ptr() { delete _M_ptr; }
+      
+      /**
+       *  @brief  Smart pointer dereferencing.
+       *
+       *  If this %auto_ptr no longer owns anything, then this
+       *  operation will crash.  (For a smart pointer, <em>no longer owns
+       *  anything</em> is the same as being a null pointer, and you know
+       *  what happens when you dereference one of those...)
+       */
+      element_type&
+      operator*() const throw() 
+      {
+	_GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+	return *_M_ptr; 
+      }
+      
+      /**
+       *  @brief  Smart pointer dereferencing.
+       *
+       *  This returns the pointer itself, which the language then will
+       *  automatically cause to be dereferenced.
+       */
+      element_type*
+      operator->() const throw() 
+      {
+	_GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+	return _M_ptr; 
+      }
+      
+      /**
+       *  @brief  Bypassing the smart pointer.
+       *  @return  The raw pointer being managed.
+       *
+       *  You can get a copy of the pointer that this object owns, for
+       *  situations such as passing to a function which only accepts
+       *  a raw pointer.
+       *
+       *  @note  This %auto_ptr still owns the memory.
+       */
+      element_type*
+      get() const throw() { return _M_ptr; }
+      
+      /**
+       *  @brief  Bypassing the smart pointer.
+       *  @return  The raw pointer being managed.
+       *
+       *  You can get a copy of the pointer that this object owns, for
+       *  situations such as passing to a function which only accepts
+       *  a raw pointer.
+       *
+       *  @note  This %auto_ptr no longer owns the memory.  When this object
+       *  goes out of scope, nothing will happen.
+       */
+      element_type*
+      release() throw()
+      {
+	element_type* __tmp = _M_ptr;
+	_M_ptr = 0;
+	return __tmp;
+      }
+      
+      /**
+       *  @brief  Forcibly deletes the managed object.
+       *  @param  p  A pointer (defaults to NULL).
+       *
+       *  This object now @e owns the object pointed to by @a p.  The
+       *  previous object has been deleted.
+       */
+      void
+      reset(element_type* __p = 0) throw()
+      {
+	if (__p != _M_ptr)
+	  {
+	    delete _M_ptr;
+	    _M_ptr = __p;
+	  }
+      }
+      
+      /** 
+       *  @brief  Automatic conversions
+       *
+       *  These operations convert an %auto_ptr into and from an auto_ptr_ref
+       *  automatically as needed.  This allows constructs such as
+       *  @code
+       *    auto_ptr<Derived>  func_returning_auto_ptr(.....);
+       *    ...
+       *    auto_ptr<Base> ptr = func_returning_auto_ptr(.....);
+       *  @endcode
+       */
+      auto_ptr(auto_ptr_ref<element_type> __ref) throw()
+      : _M_ptr(__ref._M_ptr) { }
+      
+      auto_ptr&
+      operator=(auto_ptr_ref<element_type> __ref) throw()
+      {
+	if (__ref._M_ptr != this->get())
+	  {
+	    delete _M_ptr;
+	    _M_ptr = __ref._M_ptr;
+	  }
+	return *this;
+      }
+      
+      template<typename _Tp1>
+        operator auto_ptr_ref<_Tp1>() throw()
+        { return auto_ptr_ref<_Tp1>(this->release()); }
+
+      template<typename _Tp1>
+        operator auto_ptr<_Tp1>() throw()
+        { return auto_ptr<_Tp1>(this->release()); }
+    } _GLIBCXX_DEPRECATED_ATTR;
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 541. shared_ptr template assignment and void
+  template<>
+    class auto_ptr<void>
+    {
+    public:
+      typedef void element_type;
+    } _GLIBCXX_DEPRECATED_ATTR;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _BACKWARD_AUTO_PTR_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/backward_warning.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/backward_warning.h
new file mode 100644
index 0000000..53df521
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/backward_warning.h
@@ -0,0 +1,56 @@
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef _BACKWARD_BACKWARD_WARNING_H
+#define _BACKWARD_BACKWARD_WARNING_H 1
+
+#ifdef __DEPRECATED
+#warning \
+  This file includes at least one deprecated or antiquated header which \
+  may be removed without further notice at a future date. Please use a \
+  non-deprecated interface with equivalent functionality instead. For a \
+  listing of replacement headers and interfaces, consult the file \
+  backward_warning.h. To disable this warning use -Wno-deprecated.
+
+/*
+  A list of valid replacements is as follows:
+
+  Use:					Instead of:
+  <sstream>, basic_stringbuf	   	<strstream>, strstreambuf
+  <sstream>, basic_istringstream	<strstream>, istrstream
+  <sstream>, basic_ostringstream	<strstream>, ostrstream
+  <sstream>, basic_stringstream		<strstream>, strstream
+  <unordered_set>, unordered_set     	<ext/hash_set>, hash_set
+  <unordered_set>, unordered_multiset	<ext/hash_set>, hash_multiset
+  <unordered_map>, unordered_map	<ext/hash_map>, hash_map
+  <unordered_map>, unordered_multimap	<ext/hash_map>, hash_multimap
+  <functional>, bind			<functional>, binder1st
+  <functional>, bind			<functional>, binder2nd
+  <functional>, bind			<functional>, bind1st
+  <functional>, bind			<functional>, bind2nd
+  <memory>, unique_ptr       		<memory>, auto_ptr
+*/
+
+#endif
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/binders.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/binders.h
new file mode 100644
index 0000000..a65eb8a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/binders.h
@@ -0,0 +1,169 @@
+// Functor implementations -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file backward/binders.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _BACKWARD_BINDERS_H
+#define _BACKWARD_BINDERS_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // 20.3.6 binders
+  /** @defgroup binders Binder Classes
+   * @ingroup functors
+   *
+   *  Binders turn functions/functors with two arguments into functors
+   *  with a single argument, storing an argument to be applied later.
+   *  For example, a variable @c B of type @c binder1st is constructed
+   *  from a functor @c f and an argument @c x. Later, B's @c
+   *  operator() is called with a single argument @c y. The return
+   *  value is the value of @c f(x,y). @c B can be @a called with
+   *  various arguments (y1, y2, ...) and will in turn call @c
+   *  f(x,y1), @c f(x,y2), ...
+   *
+   *  The function @c bind1st is provided to save some typing. It takes the
+   *  function and an argument as parameters, and returns an instance of
+   *  @c binder1st.
+   *
+   *  The type @c binder2nd and its creator function @c bind2nd do the same
+   *  thing, but the stored argument is passed as the second parameter instead
+   *  of the first, e.g., @c bind2nd(std::minus<float>,1.3) will create a
+   *  functor whose @c operator() accepts a floating-point number, subtracts
+   *  1.3 from it, and returns the result. (If @c bind1st had been used,
+   *  the functor would perform <em>1.3 - x</em> instead.
+   *
+   *  Creator-wrapper functions like @c bind1st are intended to be used in
+   *  calling algorithms. Their return values will be temporary objects.
+   *  (The goal is to not require you to type names like
+   *  @c std::binder1st<std::plus<int>> for declaring a variable to hold the
+   *  return value from @c bind1st(std::plus<int>,5).
+   *
+   *  These become more useful when combined with the composition functions.
+   *
+   *  @{
+   */
+  /// One of the @link binders binder functors@endlink.
+  template<typename _Operation>
+    class binder1st
+    : public unary_function<typename _Operation::second_argument_type,
+			    typename _Operation::result_type>
+    {
+    protected:
+      _Operation op;
+      typename _Operation::first_argument_type value;
+
+    public:
+      binder1st(const _Operation& __x,
+		const typename _Operation::first_argument_type& __y)
+      : op(__x), value(__y) { }
+
+      typename _Operation::result_type
+      operator()(const typename _Operation::second_argument_type& __x) const
+      { return op(value, __x); }
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 109.  Missing binders for non-const sequence elements
+      typename _Operation::result_type
+      operator()(typename _Operation::second_argument_type& __x) const
+      { return op(value, __x); }
+    } _GLIBCXX_DEPRECATED_ATTR;
+
+  /// One of the @link binders binder functors@endlink.
+  template<typename _Operation, typename _Tp>
+    inline binder1st<_Operation>
+    bind1st(const _Operation& __fn, const _Tp& __x)
+    {
+      typedef typename _Operation::first_argument_type _Arg1_type;
+      return binder1st<_Operation>(__fn, _Arg1_type(__x));
+    }
+
+  /// One of the @link binders binder functors@endlink.
+  template<typename _Operation>
+    class binder2nd
+    : public unary_function<typename _Operation::first_argument_type,
+			    typename _Operation::result_type>
+    {
+    protected:
+      _Operation op;
+      typename _Operation::second_argument_type value;
+
+    public:
+      binder2nd(const _Operation& __x,
+		const typename _Operation::second_argument_type& __y)
+      : op(__x), value(__y) { }
+
+      typename _Operation::result_type
+      operator()(const typename _Operation::first_argument_type& __x) const
+      { return op(__x, value); }
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 109.  Missing binders for non-const sequence elements
+      typename _Operation::result_type
+      operator()(typename _Operation::first_argument_type& __x) const
+      { return op(__x, value); }
+    } _GLIBCXX_DEPRECATED_ATTR;
+
+  /// One of the @link binders binder functors@endlink.
+  template<typename _Operation, typename _Tp>
+    inline binder2nd<_Operation>
+    bind2nd(const _Operation& __fn, const _Tp& __x)
+    {
+      typedef typename _Operation::second_argument_type _Arg2_type;
+      return binder2nd<_Operation>(__fn, _Arg2_type(__x));
+    } 
+  /** @}  */
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _BACKWARD_BINDERS_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_fun.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_fun.h
new file mode 100644
index 0000000..b7b14a1
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_fun.h
@@ -0,0 +1,168 @@
+// 'struct hash' from SGI -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file backward/hash_fun.h
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _BACKWARD_HASH_FUN_H
+#define _BACKWARD_HASH_FUN_H 1
+
+#include <cstddef>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  using std::size_t;
+
+  template<class _Key>
+    struct hash { };
+
+  inline size_t
+  __stl_hash_string(const char* __s)
+  {
+    unsigned long __h = 0;
+    for ( ; *__s; ++__s)
+      __h = 5 * __h + *__s;
+    return size_t(__h);
+  }
+
+  template<>
+    struct hash<char*>
+    {
+      size_t
+      operator()(const char* __s) const
+      { return __stl_hash_string(__s); }
+    };
+
+  template<>
+    struct hash<const char*>
+    {
+      size_t
+      operator()(const char* __s) const
+      { return __stl_hash_string(__s); }
+    };
+
+  template<>
+    struct hash<char>
+    { 
+      size_t
+      operator()(char __x) const
+      { return __x; }
+    };
+
+  template<>
+    struct hash<unsigned char>
+    { 
+      size_t
+      operator()(unsigned char __x) const
+      { return __x; }
+    };
+
+  template<>
+    struct hash<signed char>
+    {
+      size_t
+      operator()(unsigned char __x) const
+      { return __x; }
+    };
+
+  template<>
+    struct hash<short>
+    {
+      size_t
+      operator()(short __x) const
+      { return __x; }
+    };
+
+  template<>
+    struct hash<unsigned short>
+    {
+      size_t
+      operator()(unsigned short __x) const
+      { return __x; }
+    };
+
+  template<>
+    struct hash<int>
+    { 
+      size_t 
+      operator()(int __x) const 
+      { return __x; }
+    };
+
+  template<>
+    struct hash<unsigned int>
+    { 
+      size_t
+      operator()(unsigned int __x) const
+      { return __x; }
+    };
+
+  template<>
+    struct hash<long>
+    {
+      size_t
+      operator()(long __x) const
+      { return __x; }
+    };
+
+  template<>
+    struct hash<unsigned long>
+    {
+      size_t
+      operator()(unsigned long __x) const
+      { return __x; }
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_map b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_map
new file mode 100644
index 0000000..813ec47
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_map
@@ -0,0 +1,591 @@
+// Hashing map implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file backward/hash_map
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _BACKWARD_HASH_MAP
+#define _BACKWARD_HASH_MAP 1
+
+#include "backward_warning.h"
+#include <bits/c++config.h>
+#include <backward/hashtable.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  using std::equal_to;
+  using std::allocator;
+  using std::pair;
+  using std::_Select1st;
+
+  /**
+   *  This is an SGI extension.
+   *  @ingroup SGIextensions
+   *  @doctodo
+   */
+  template<class _Key, class _Tp, class _HashFn = hash<_Key>,
+	   class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
+    class hash_map
+    {
+    private:
+      typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFn,
+			_Select1st<pair<const _Key, _Tp> >,
+			_EqualKey, _Alloc> _Ht;
+
+      _Ht _M_ht;
+
+    public:
+      typedef typename _Ht::key_type key_type;
+      typedef _Tp data_type;
+      typedef _Tp mapped_type;
+      typedef typename _Ht::value_type value_type;
+      typedef typename _Ht::hasher hasher;
+      typedef typename _Ht::key_equal key_equal;
+      
+      typedef typename _Ht::size_type size_type;
+      typedef typename _Ht::difference_type difference_type;
+      typedef typename _Ht::pointer pointer;
+      typedef typename _Ht::const_pointer const_pointer;
+      typedef typename _Ht::reference reference;
+      typedef typename _Ht::const_reference const_reference;
+      
+      typedef typename _Ht::iterator iterator;
+      typedef typename _Ht::const_iterator const_iterator;
+      
+      typedef typename _Ht::allocator_type allocator_type;
+      
+      hasher
+      hash_funct() const
+      { return _M_ht.hash_funct(); }
+
+      key_equal
+      key_eq() const
+      { return _M_ht.key_eq(); }
+
+      allocator_type
+      get_allocator() const
+      { return _M_ht.get_allocator(); }
+
+      hash_map()
+      : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+  
+      explicit
+      hash_map(size_type __n)
+      : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+      hash_map(size_type __n, const hasher& __hf)
+      : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+      hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
+	       const allocator_type& __a = allocator_type())
+      : _M_ht(__n, __hf, __eql, __a) {}
+
+      template<class _InputIterator>
+        hash_map(_InputIterator __f, _InputIterator __l)
+	: _M_ht(100, hasher(), key_equal(), allocator_type())
+        { _M_ht.insert_unique(__f, __l); }
+
+      template<class _InputIterator>
+        hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
+	: _M_ht(__n, hasher(), key_equal(), allocator_type())
+        { _M_ht.insert_unique(__f, __l); }
+
+      template<class _InputIterator>
+        hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+		 const hasher& __hf)
+	: _M_ht(__n, __hf, key_equal(), allocator_type())
+        { _M_ht.insert_unique(__f, __l); }
+
+      template<class _InputIterator>
+        hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+		 const hasher& __hf, const key_equal& __eql,
+		 const allocator_type& __a = allocator_type())
+	: _M_ht(__n, __hf, __eql, __a)
+        { _M_ht.insert_unique(__f, __l); }
+
+      size_type
+      size() const
+      { return _M_ht.size(); }
+      
+      size_type
+      max_size() const
+      { return _M_ht.max_size(); }
+      
+      bool
+      empty() const
+      { return _M_ht.empty(); }
+  
+      void
+      swap(hash_map& __hs)
+      { _M_ht.swap(__hs._M_ht); }
+
+      template<class _K1, class _T1, class _HF, class _EqK, class _Al>
+        friend bool
+        operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
+		    const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
+
+      iterator
+      begin()
+      { return _M_ht.begin(); }
+
+      iterator
+      end()
+      { return _M_ht.end(); }
+
+      const_iterator
+      begin() const
+      { return _M_ht.begin(); }
+
+      const_iterator
+      end() const
+      { return _M_ht.end(); }
+
+      pair<iterator, bool>
+      insert(const value_type& __obj)
+      { return _M_ht.insert_unique(__obj); }
+
+      template<class _InputIterator>
+        void
+        insert(_InputIterator __f, _InputIterator __l)
+        { _M_ht.insert_unique(__f, __l); }
+
+      pair<iterator, bool>
+      insert_noresize(const value_type& __obj)
+      { return _M_ht.insert_unique_noresize(__obj); }
+
+      iterator
+      find(const key_type& __key)
+      { return _M_ht.find(__key); }
+
+      const_iterator
+      find(const key_type& __key) const
+      { return _M_ht.find(__key); }
+
+      _Tp&
+      operator[](const key_type& __key)
+      { return _M_ht.find_or_insert(value_type(__key, _Tp())).second; }
+
+      size_type
+      count(const key_type& __key) const
+      { return _M_ht.count(__key); }
+
+      pair<iterator, iterator>
+      equal_range(const key_type& __key)
+      { return _M_ht.equal_range(__key); }
+
+      pair<const_iterator, const_iterator>
+      equal_range(const key_type& __key) const
+      { return _M_ht.equal_range(__key); }
+
+      size_type
+      erase(const key_type& __key)
+      {return _M_ht.erase(__key); }
+
+      void
+      erase(iterator __it)
+      { _M_ht.erase(__it); }
+
+      void
+      erase(iterator __f, iterator __l)
+      { _M_ht.erase(__f, __l); }
+
+      void
+      clear()
+      { _M_ht.clear(); }
+
+      void
+      resize(size_type __hint)
+      { _M_ht.resize(__hint); }
+
+      size_type
+      bucket_count() const
+      { return _M_ht.bucket_count(); }
+
+      size_type
+      max_bucket_count() const
+      { return _M_ht.max_bucket_count(); }
+
+      size_type
+      elems_in_bucket(size_type __n) const
+      { return _M_ht.elems_in_bucket(__n); }
+    };
+
+  template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+    inline bool
+    operator==(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+	       const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+    { return __hm1._M_ht == __hm2._M_ht; }
+
+  template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+    inline bool
+    operator!=(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+	       const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+    { return !(__hm1 == __hm2); }
+
+  template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+    inline void
+    swap(hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+	 hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+    { __hm1.swap(__hm2); }
+
+
+  /**
+   *  This is an SGI extension.
+   *  @ingroup SGIextensions
+   *  @doctodo
+   */
+  template<class _Key, class _Tp,
+	   class _HashFn = hash<_Key>,
+	   class _EqualKey = equal_to<_Key>,
+	   class _Alloc = allocator<_Tp> >
+    class hash_multimap
+    {
+      // concept requirements
+      __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+      __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+      __glibcxx_class_requires3(_HashFn, size_t, _Key, _UnaryFunctionConcept)
+      __glibcxx_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept)
+	
+    private:
+      typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFn,
+			_Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc>
+          _Ht;
+
+      _Ht _M_ht;
+
+    public:
+      typedef typename _Ht::key_type key_type;
+      typedef _Tp data_type;
+      typedef _Tp mapped_type;
+      typedef typename _Ht::value_type value_type;
+      typedef typename _Ht::hasher hasher;
+      typedef typename _Ht::key_equal key_equal;
+      
+      typedef typename _Ht::size_type size_type;
+      typedef typename _Ht::difference_type difference_type;
+      typedef typename _Ht::pointer pointer;
+      typedef typename _Ht::const_pointer const_pointer;
+      typedef typename _Ht::reference reference;
+      typedef typename _Ht::const_reference const_reference;
+      
+      typedef typename _Ht::iterator iterator;
+      typedef typename _Ht::const_iterator const_iterator;
+      
+      typedef typename _Ht::allocator_type allocator_type;
+      
+      hasher
+      hash_funct() const
+      { return _M_ht.hash_funct(); }
+
+      key_equal
+      key_eq() const
+      { return _M_ht.key_eq(); }
+
+      allocator_type
+      get_allocator() const
+      { return _M_ht.get_allocator(); }
+
+      hash_multimap()
+      : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+      explicit
+      hash_multimap(size_type __n)
+      : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+      hash_multimap(size_type __n, const hasher& __hf)
+      : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+      hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
+		    const allocator_type& __a = allocator_type())
+      : _M_ht(__n, __hf, __eql, __a) {}
+
+      template<class _InputIterator>
+        hash_multimap(_InputIterator __f, _InputIterator __l)
+	: _M_ht(100, hasher(), key_equal(), allocator_type())
+        { _M_ht.insert_equal(__f, __l); }
+
+      template<class _InputIterator>
+        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
+	: _M_ht(__n, hasher(), key_equal(), allocator_type())
+        { _M_ht.insert_equal(__f, __l); }
+
+      template<class _InputIterator>
+        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+		      const hasher& __hf)
+	: _M_ht(__n, __hf, key_equal(), allocator_type())
+        { _M_ht.insert_equal(__f, __l); }
+
+      template<class _InputIterator>
+        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+		      const hasher& __hf, const key_equal& __eql,
+		      const allocator_type& __a = allocator_type())
+	: _M_ht(__n, __hf, __eql, __a)
+        { _M_ht.insert_equal(__f, __l); }
+
+      size_type
+      size() const
+      { return _M_ht.size(); }
+
+      size_type
+      max_size() const
+      { return _M_ht.max_size(); }
+
+      bool
+      empty() const
+      { return _M_ht.empty(); }
+
+      void
+      swap(hash_multimap& __hs)
+      { _M_ht.swap(__hs._M_ht); }
+
+      template<class _K1, class _T1, class _HF, class _EqK, class _Al>
+        friend bool
+        operator==(const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&,
+		   const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&);
+
+      iterator
+      begin()
+      { return _M_ht.begin(); }
+
+      iterator
+      end()
+      { return _M_ht.end(); }
+
+      const_iterator
+      begin() const
+      { return _M_ht.begin(); }
+
+      const_iterator
+      end() const
+      { return _M_ht.end(); }
+
+      iterator
+      insert(const value_type& __obj)
+      { return _M_ht.insert_equal(__obj); }
+
+      template<class _InputIterator>
+        void
+        insert(_InputIterator __f, _InputIterator __l)
+        { _M_ht.insert_equal(__f,__l); }
+
+      iterator
+      insert_noresize(const value_type& __obj)
+      { return _M_ht.insert_equal_noresize(__obj); }
+
+      iterator
+      find(const key_type& __key)
+      { return _M_ht.find(__key); }
+
+      const_iterator
+      find(const key_type& __key) const
+      { return _M_ht.find(__key); }
+
+      size_type
+      count(const key_type& __key) const
+      { return _M_ht.count(__key); }
+
+      pair<iterator, iterator>
+      equal_range(const key_type& __key)
+      { return _M_ht.equal_range(__key); }
+
+      pair<const_iterator, const_iterator>
+      equal_range(const key_type& __key) const
+      { return _M_ht.equal_range(__key); }
+
+      size_type
+      erase(const key_type& __key)
+      { return _M_ht.erase(__key); }
+
+      void
+      erase(iterator __it)
+      { _M_ht.erase(__it); }
+
+      void
+      erase(iterator __f, iterator __l)
+      { _M_ht.erase(__f, __l); }
+
+      void
+      clear()
+      { _M_ht.clear(); }
+
+      void
+      resize(size_type __hint)
+      { _M_ht.resize(__hint); }
+
+      size_type
+      bucket_count() const
+      { return _M_ht.bucket_count(); }
+
+      size_type
+      max_bucket_count() const
+      { return _M_ht.max_bucket_count(); }
+      
+      size_type
+      elems_in_bucket(size_type __n) const
+      { return _M_ht.elems_in_bucket(__n); }
+    };
+
+  template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
+    inline bool
+    operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
+	       const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
+    { return __hm1._M_ht == __hm2._M_ht; }
+
+  template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
+    inline bool
+    operator!=(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
+	       const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
+    { return !(__hm1 == __hm2); }
+
+  template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+    inline void
+    swap(hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+	 hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+    { __hm1.swap(__hm2); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Specialization of insert_iterator so that it will work for hash_map
+  // and hash_multimap.
+  template<class _Key, class _Tp, class _HashFn,  class _EqKey, class _Alloc>
+    class insert_iterator<__gnu_cxx::hash_map<_Key, _Tp, _HashFn, 
+					      _EqKey, _Alloc> >
+    {
+    protected:
+      typedef __gnu_cxx::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>
+        _Container;
+      _Container* container;
+
+    public:
+      typedef _Container          container_type;
+      typedef output_iterator_tag iterator_category;
+      typedef void                value_type;
+      typedef void                difference_type;
+      typedef void                pointer;
+      typedef void                reference;
+      
+      insert_iterator(_Container& __x)
+      : container(&__x) {}
+
+      insert_iterator(_Container& __x, typename _Container::iterator)
+      : container(&__x) {}
+
+      insert_iterator<_Container>&
+      operator=(const typename _Container::value_type& __value)
+      {
+	container->insert(__value);
+	return *this;
+      }
+
+      insert_iterator<_Container>&
+      operator*()
+      { return *this; }
+
+      insert_iterator<_Container>&
+      operator++() { return *this; }
+
+      insert_iterator<_Container>&
+      operator++(int)
+      { return *this; }
+    };
+
+  template<class _Key, class _Tp, class _HashFn,  class _EqKey, class _Alloc>
+    class insert_iterator<__gnu_cxx::hash_multimap<_Key, _Tp, _HashFn,
+						   _EqKey, _Alloc> >
+    {
+    protected:
+      typedef __gnu_cxx::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc>
+        _Container;
+      _Container* container;
+      typename _Container::iterator iter;
+
+    public:
+      typedef _Container          container_type;
+      typedef output_iterator_tag iterator_category;
+      typedef void                value_type;
+      typedef void                difference_type;
+      typedef void                pointer;
+      typedef void                reference;
+
+      insert_iterator(_Container& __x)
+      : container(&__x) {}
+
+      insert_iterator(_Container& __x, typename _Container::iterator)
+      : container(&__x) {}
+
+      insert_iterator<_Container>&
+      operator=(const typename _Container::value_type& __value)
+      {
+	container->insert(__value);
+	return *this;
+      }
+
+      insert_iterator<_Container>&
+      operator*()
+      { return *this; }
+
+      insert_iterator<_Container>&
+      operator++()
+      { return *this; }
+
+      insert_iterator<_Container>&
+      operator++(int)
+      { return *this; }
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_set b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_set
new file mode 100644
index 0000000..5a2ade7
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hash_set
@@ -0,0 +1,559 @@
+// Hashing set implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file backward/hash_set
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _BACKWARD_HASH_SET
+#define _BACKWARD_HASH_SET 1
+
+#include "backward_warning.h"
+#include <bits/c++config.h>
+#include <backward/hashtable.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  using std::equal_to;
+  using std::allocator;
+  using std::pair;
+  using std::_Identity;
+
+  /**
+   *  This is an SGI extension.
+   *  @ingroup SGIextensions
+   *  @doctodo
+   */
+  template<class _Value, class _HashFcn  = hash<_Value>,
+	   class _EqualKey = equal_to<_Value>,
+	   class _Alloc = allocator<_Value> >
+    class hash_set
+    {
+      // concept requirements
+      __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+      __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+      __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
+
+    private:
+      typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+			_EqualKey, _Alloc> _Ht;
+      _Ht _M_ht;
+
+    public:
+      typedef typename _Ht::key_type key_type;
+      typedef typename _Ht::value_type value_type;
+      typedef typename _Ht::hasher hasher;
+      typedef typename _Ht::key_equal key_equal;
+      
+      typedef typename _Ht::size_type size_type;
+      typedef typename _Ht::difference_type difference_type;
+      typedef typename _Alloc::pointer pointer;
+      typedef typename _Alloc::const_pointer const_pointer;
+      typedef typename _Alloc::reference reference;
+      typedef typename _Alloc::const_reference const_reference;
+      
+      typedef typename _Ht::const_iterator iterator;
+      typedef typename _Ht::const_iterator const_iterator;
+      
+      typedef typename _Ht::allocator_type allocator_type;
+      
+      hasher
+      hash_funct() const
+      { return _M_ht.hash_funct(); }
+
+      key_equal
+      key_eq() const
+      { return _M_ht.key_eq(); }
+
+      allocator_type
+      get_allocator() const
+      { return _M_ht.get_allocator(); }
+
+      hash_set()
+      : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+      explicit
+      hash_set(size_type __n)
+      : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+      hash_set(size_type __n, const hasher& __hf)
+      : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+      hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
+	       const allocator_type& __a = allocator_type())
+      : _M_ht(__n, __hf, __eql, __a) {}
+
+      template<class _InputIterator>
+        hash_set(_InputIterator __f, _InputIterator __l)
+	: _M_ht(100, hasher(), key_equal(), allocator_type())
+        { _M_ht.insert_unique(__f, __l); }
+
+      template<class _InputIterator>
+        hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
+	: _M_ht(__n, hasher(), key_equal(), allocator_type())
+        { _M_ht.insert_unique(__f, __l); }
+
+      template<class _InputIterator>
+        hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+		 const hasher& __hf)
+	: _M_ht(__n, __hf, key_equal(), allocator_type())
+        { _M_ht.insert_unique(__f, __l); }
+
+      template<class _InputIterator>
+        hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+		 const hasher& __hf, const key_equal& __eql,
+		 const allocator_type& __a = allocator_type())
+	: _M_ht(__n, __hf, __eql, __a)
+        { _M_ht.insert_unique(__f, __l); }
+
+      size_type
+      size() const
+      { return _M_ht.size(); }
+
+      size_type
+      max_size() const
+      { return _M_ht.max_size(); }
+      
+      bool
+      empty() const
+      { return _M_ht.empty(); }
+      
+      void
+      swap(hash_set& __hs)
+      { _M_ht.swap(__hs._M_ht); }
+
+      template<class _Val, class _HF, class _EqK, class _Al>
+        friend bool
+        operator==(const hash_set<_Val, _HF, _EqK, _Al>&,
+		   const hash_set<_Val, _HF, _EqK, _Al>&);
+
+      iterator
+      begin() const
+      { return _M_ht.begin(); }
+      
+      iterator
+      end() const
+      { return _M_ht.end(); }
+
+      pair<iterator, bool>
+      insert(const value_type& __obj)
+      {
+	pair<typename _Ht::iterator, bool> __p = _M_ht.insert_unique(__obj);
+	return pair<iterator,bool>(__p.first, __p.second);
+      }
+
+      template<class _InputIterator>
+        void
+        insert(_InputIterator __f, _InputIterator __l)
+        { _M_ht.insert_unique(__f, __l); }
+
+      pair<iterator, bool>
+      insert_noresize(const value_type& __obj)
+      {
+	pair<typename _Ht::iterator, bool> __p
+	  = _M_ht.insert_unique_noresize(__obj);
+	return pair<iterator, bool>(__p.first, __p.second);
+      }
+
+      iterator
+      find(const key_type& __key) const
+      { return _M_ht.find(__key); }
+
+      size_type
+      count(const key_type& __key) const
+      { return _M_ht.count(__key); }
+
+      pair<iterator, iterator>
+      equal_range(const key_type& __key) const
+      { return _M_ht.equal_range(__key); }
+
+      size_type
+      erase(const key_type& __key)
+      {return _M_ht.erase(__key); }
+      
+      void
+      erase(iterator __it)
+      { _M_ht.erase(__it); }
+      
+      void
+      erase(iterator __f, iterator __l)
+      { _M_ht.erase(__f, __l); }
+      
+      void
+      clear()
+      { _M_ht.clear(); }
+
+      void
+      resize(size_type __hint)
+      { _M_ht.resize(__hint); }
+      
+      size_type
+      bucket_count() const
+      { return _M_ht.bucket_count(); }
+      
+      size_type
+      max_bucket_count() const
+      { return _M_ht.max_bucket_count(); }
+      
+      size_type
+      elems_in_bucket(size_type __n) const
+      { return _M_ht.elems_in_bucket(__n); }
+    };
+
+  template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+    inline bool
+    operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
+	       const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
+    { return __hs1._M_ht == __hs2._M_ht; }
+
+  template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+    inline bool
+    operator!=(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
+	       const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
+    { return !(__hs1 == __hs2); }
+
+  template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+    inline void
+    swap(hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+	 hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+    { __hs1.swap(__hs2); }
+
+
+  /**
+   *  This is an SGI extension.
+   *  @ingroup SGIextensions
+   *  @doctodo
+   */
+  template<class _Value,
+	   class _HashFcn = hash<_Value>,
+	   class _EqualKey = equal_to<_Value>,
+	   class _Alloc = allocator<_Value> >
+    class hash_multiset
+    {
+      // concept requirements
+      __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+      __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+      __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
+
+    private:
+      typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+			_EqualKey, _Alloc> _Ht;
+      _Ht _M_ht;
+
+    public:
+      typedef typename _Ht::key_type key_type;
+      typedef typename _Ht::value_type value_type;
+      typedef typename _Ht::hasher hasher;
+      typedef typename _Ht::key_equal key_equal;
+      
+      typedef typename _Ht::size_type size_type;
+      typedef typename _Ht::difference_type difference_type;
+      typedef typename _Alloc::pointer pointer;
+      typedef typename _Alloc::const_pointer const_pointer;
+      typedef typename _Alloc::reference reference;
+      typedef typename _Alloc::const_reference const_reference;
+
+      typedef typename _Ht::const_iterator iterator;
+      typedef typename _Ht::const_iterator const_iterator;
+      
+      typedef typename _Ht::allocator_type allocator_type;
+      
+      hasher
+      hash_funct() const
+      { return _M_ht.hash_funct(); }
+      
+      key_equal
+      key_eq() const
+      { return _M_ht.key_eq(); }
+      
+      allocator_type
+      get_allocator() const
+      { return _M_ht.get_allocator(); }
+
+      hash_multiset()
+      : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+      explicit
+      hash_multiset(size_type __n)
+      : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+      hash_multiset(size_type __n, const hasher& __hf)
+      : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+      
+      hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
+		    const allocator_type& __a = allocator_type())
+      : _M_ht(__n, __hf, __eql, __a) {}
+
+      template<class _InputIterator>
+        hash_multiset(_InputIterator __f, _InputIterator __l)
+	: _M_ht(100, hasher(), key_equal(), allocator_type())
+        { _M_ht.insert_equal(__f, __l); }
+
+      template<class _InputIterator>
+        hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
+	: _M_ht(__n, hasher(), key_equal(), allocator_type())
+        { _M_ht.insert_equal(__f, __l); }
+
+      template<class _InputIterator>
+        hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+		      const hasher& __hf)
+	: _M_ht(__n, __hf, key_equal(), allocator_type())
+        { _M_ht.insert_equal(__f, __l); }
+
+      template<class _InputIterator>
+        hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+		      const hasher& __hf, const key_equal& __eql,
+		      const allocator_type& __a = allocator_type())
+	: _M_ht(__n, __hf, __eql, __a)
+        { _M_ht.insert_equal(__f, __l); }
+
+      size_type
+      size() const
+      { return _M_ht.size(); }
+
+      size_type
+      max_size() const
+      { return _M_ht.max_size(); }
+
+      bool
+      empty() const
+      { return _M_ht.empty(); }
+
+      void
+      swap(hash_multiset& hs)
+      { _M_ht.swap(hs._M_ht); }
+
+      template<class _Val, class _HF, class _EqK, class _Al>
+        friend bool
+        operator==(const hash_multiset<_Val, _HF, _EqK, _Al>&,
+		   const hash_multiset<_Val, _HF, _EqK, _Al>&);
+
+      iterator
+      begin() const
+      { return _M_ht.begin(); }
+      
+      iterator
+      end() const
+      { return _M_ht.end(); }
+
+      iterator
+      insert(const value_type& __obj)
+      { return _M_ht.insert_equal(__obj); }
+  
+      template<class _InputIterator>
+        void
+        insert(_InputIterator __f, _InputIterator __l)
+        { _M_ht.insert_equal(__f,__l); }
+  
+      iterator
+      insert_noresize(const value_type& __obj)
+      { return _M_ht.insert_equal_noresize(__obj); }
+
+      iterator
+      find(const key_type& __key) const
+      { return _M_ht.find(__key); }
+
+      size_type
+      count(const key_type& __key) const
+      { return _M_ht.count(__key); }
+
+      pair<iterator, iterator>
+      equal_range(const key_type& __key) const
+      { return _M_ht.equal_range(__key); }
+
+      size_type
+      erase(const key_type& __key)
+      { return _M_ht.erase(__key); }
+  
+      void
+      erase(iterator __it)
+      { _M_ht.erase(__it); }
+  
+      void
+      erase(iterator __f, iterator __l)
+      { _M_ht.erase(__f, __l); }
+  
+      void
+      clear()
+      { _M_ht.clear(); }
+
+      void
+      resize(size_type __hint)
+      { _M_ht.resize(__hint); }
+  
+      size_type
+      bucket_count() const
+      { return _M_ht.bucket_count(); }
+
+      size_type
+      max_bucket_count() const
+      { return _M_ht.max_bucket_count(); }
+
+      size_type
+      elems_in_bucket(size_type __n) const
+      { return _M_ht.elems_in_bucket(__n); }
+    };
+
+  template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+    inline bool
+    operator==(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+	       const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+    { return __hs1._M_ht == __hs2._M_ht; }
+
+  template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+    inline bool
+    operator!=(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+	       const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+    { return !(__hs1 == __hs2); }
+
+  template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+    inline void
+    swap(hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+	 hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+    { __hs1.swap(__hs2); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Specialization of insert_iterator so that it will work for hash_set
+  // and hash_multiset.
+  template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+    class insert_iterator<__gnu_cxx::hash_set<_Value, _HashFcn,
+					      _EqualKey, _Alloc> >
+    {
+    protected:
+      typedef __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>
+        _Container;
+      _Container* container;
+
+    public:
+      typedef _Container          container_type;
+      typedef output_iterator_tag iterator_category;
+      typedef void                value_type;
+      typedef void                difference_type;
+      typedef void                pointer;
+      typedef void                reference;
+
+      insert_iterator(_Container& __x)
+      : container(&__x) {}
+      
+      insert_iterator(_Container& __x, typename _Container::iterator)
+      : container(&__x) {}
+
+      insert_iterator<_Container>&
+      operator=(const typename _Container::value_type& __value)
+      {
+	container->insert(__value);
+	return *this;
+      }
+
+      insert_iterator<_Container>&
+      operator*()
+      { return *this; }
+      
+      insert_iterator<_Container>&
+      operator++()
+      { return *this; }
+      
+      insert_iterator<_Container>&
+      operator++(int)
+      { return *this; }
+    };
+
+  template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+    class insert_iterator<__gnu_cxx::hash_multiset<_Value, _HashFcn,
+						   _EqualKey, _Alloc> >
+    {
+    protected:
+      typedef __gnu_cxx::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>
+        _Container;
+      _Container* container;
+      typename _Container::iterator iter;
+
+    public:
+      typedef _Container          container_type;
+      typedef output_iterator_tag iterator_category;
+      typedef void                value_type;
+      typedef void                difference_type;
+      typedef void                pointer;
+      typedef void                reference;
+      
+      insert_iterator(_Container& __x)
+      : container(&__x) {}
+      
+      insert_iterator(_Container& __x, typename _Container::iterator)
+      : container(&__x) {}
+
+      insert_iterator<_Container>&
+      operator=(const typename _Container::value_type& __value)
+      {
+	container->insert(__value);
+	return *this;
+      }
+
+      insert_iterator<_Container>&
+      operator*()
+      { return *this; }
+
+      insert_iterator<_Container>&
+      operator++()
+      { return *this; }
+
+      insert_iterator<_Container>&
+      operator++(int) { return *this; }
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hashtable.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hashtable.h
new file mode 100644
index 0000000..55c1d99
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/hashtable.h
@@ -0,0 +1,1146 @@
+// Hashtable implementation used by containers -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file backward/hashtable.h
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _BACKWARD_HASHTABLE_H
+#define _BACKWARD_HASHTABLE_H 1
+
+// Hashtable class, used to implement the hashed associative containers
+// hash_set, hash_map, hash_multiset, and hash_multimap.
+
+#include <vector>
+#include <iterator>
+#include <algorithm>
+#include <bits/stl_function.h>
+#include <backward/hash_fun.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  using std::size_t;
+  using std::ptrdiff_t;
+  using std::forward_iterator_tag;
+  using std::input_iterator_tag;
+  using std::_Construct;
+  using std::_Destroy;
+  using std::distance;
+  using std::vector;
+  using std::pair;
+  using std::__iterator_category;
+
+  template<class _Val>
+    struct _Hashtable_node
+    {
+      _Hashtable_node* _M_next;
+      _Val _M_val;
+    };
+
+  template<class _Val, class _Key, class _HashFcn, class _ExtractKey, 
+	   class _EqualKey, class _Alloc = std::allocator<_Val> >
+    class hashtable;
+
+  template<class _Val, class _Key, class _HashFcn,
+	   class _ExtractKey, class _EqualKey, class _Alloc>
+    struct _Hashtable_iterator;
+
+  template<class _Val, class _Key, class _HashFcn,
+	   class _ExtractKey, class _EqualKey, class _Alloc>
+    struct _Hashtable_const_iterator;
+
+  template<class _Val, class _Key, class _HashFcn,
+	   class _ExtractKey, class _EqualKey, class _Alloc>
+    struct _Hashtable_iterator
+    {
+      typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
+        _Hashtable;
+      typedef _Hashtable_iterator<_Val, _Key, _HashFcn,
+				  _ExtractKey, _EqualKey, _Alloc>
+        iterator;
+      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+					_ExtractKey, _EqualKey, _Alloc>
+        const_iterator;
+      typedef _Hashtable_node<_Val> _Node;
+      typedef forward_iterator_tag iterator_category;
+      typedef _Val value_type;
+      typedef ptrdiff_t difference_type;
+      typedef size_t size_type;
+      typedef _Val& reference;
+      typedef _Val* pointer;
+      
+      _Node* _M_cur;
+      _Hashtable* _M_ht;
+
+      _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
+      : _M_cur(__n), _M_ht(__tab) { }
+
+      _Hashtable_iterator() { }
+
+      reference
+      operator*() const
+      { return _M_cur->_M_val; }
+
+      pointer
+      operator->() const
+      { return &(operator*()); }
+
+      iterator&
+      operator++();
+
+      iterator
+      operator++(int);
+
+      bool
+      operator==(const iterator& __it) const
+      { return _M_cur == __it._M_cur; }
+
+      bool
+      operator!=(const iterator& __it) const
+      { return _M_cur != __it._M_cur; }
+    };
+
+  template<class _Val, class _Key, class _HashFcn,
+	   class _ExtractKey, class _EqualKey, class _Alloc>
+    struct _Hashtable_const_iterator
+    {
+      typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
+        _Hashtable;
+      typedef _Hashtable_iterator<_Val,_Key,_HashFcn,
+				  _ExtractKey,_EqualKey,_Alloc>
+        iterator;
+      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+					_ExtractKey, _EqualKey, _Alloc>
+        const_iterator;
+      typedef _Hashtable_node<_Val> _Node;
+
+      typedef forward_iterator_tag iterator_category;
+      typedef _Val value_type;
+      typedef ptrdiff_t difference_type;
+      typedef size_t size_type;
+      typedef const _Val& reference;
+      typedef const _Val* pointer;
+      
+      const _Node* _M_cur;
+      const _Hashtable* _M_ht;
+
+      _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
+      : _M_cur(__n), _M_ht(__tab) { }
+
+      _Hashtable_const_iterator() { }
+
+      _Hashtable_const_iterator(const iterator& __it)
+      : _M_cur(__it._M_cur), _M_ht(__it._M_ht) { }
+
+      reference
+      operator*() const
+      { return _M_cur->_M_val; }
+
+      pointer
+      operator->() const
+      { return &(operator*()); }
+
+      const_iterator&
+      operator++();
+
+      const_iterator
+      operator++(int);
+
+      bool
+      operator==(const const_iterator& __it) const
+      { return _M_cur == __it._M_cur; }
+
+      bool
+      operator!=(const const_iterator& __it) const
+      { return _M_cur != __it._M_cur; }
+    };
+
+  // Note: assumes long is at least 32 bits.
+  enum { _S_num_primes = 29 };
+
+  static const unsigned long __stl_prime_list[_S_num_primes] =
+    {
+      5ul,          53ul,         97ul,         193ul,       389ul,
+      769ul,        1543ul,       3079ul,       6151ul,      12289ul,
+      24593ul,      49157ul,      98317ul,      196613ul,    393241ul,
+      786433ul,     1572869ul,    3145739ul,    6291469ul,   12582917ul,
+      25165843ul,   50331653ul,   100663319ul,  201326611ul, 402653189ul,
+      805306457ul,  1610612741ul, 3221225473ul, 4294967291ul
+    };
+
+  inline unsigned long
+  __stl_next_prime(unsigned long __n)
+  {
+    const unsigned long* __first = __stl_prime_list;
+    const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
+    const unsigned long* pos = std::lower_bound(__first, __last, __n);
+    return pos == __last ? *(__last - 1) : *pos;
+  }
+
+  // Forward declaration of operator==.  
+  template<class _Val, class _Key, class _HF, class _Ex,
+	   class _Eq, class _All>
+    class hashtable;
+
+  template<class _Val, class _Key, class _HF, class _Ex,
+	   class _Eq, class _All>
+    bool
+    operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+	       const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2);
+
+  // Hashtables handle allocators a bit differently than other
+  // containers do.  If we're using standard-conforming allocators, then
+  // a hashtable unconditionally has a member variable to hold its
+  // allocator, even if it so happens that all instances of the
+  // allocator type are identical.  This is because, for hashtables,
+  // this extra storage is negligible.  Additionally, a base class
+  // wouldn't serve any other purposes; it wouldn't, for example,
+  // simplify the exception-handling code.  
+  template<class _Val, class _Key, class _HashFcn,
+	   class _ExtractKey, class _EqualKey, class _Alloc>
+    class hashtable
+    {
+    public:
+      typedef _Key key_type;
+      typedef _Val value_type;
+      typedef _HashFcn hasher;
+      typedef _EqualKey key_equal;
+
+      typedef size_t            size_type;
+      typedef ptrdiff_t         difference_type;
+      typedef value_type*       pointer;
+      typedef const value_type* const_pointer;
+      typedef value_type&       reference;
+      typedef const value_type& const_reference;
+
+      hasher
+      hash_funct() const
+      { return _M_hash; }
+
+      key_equal
+      key_eq() const
+      { return _M_equals; }
+
+    private:
+      typedef _Hashtable_node<_Val> _Node;
+
+    public:
+      typedef typename _Alloc::template rebind<value_type>::other allocator_type;
+      allocator_type
+      get_allocator() const
+      { return _M_node_allocator; }
+
+    private:
+      typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
+      typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
+      typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
+
+      _Node_Alloc _M_node_allocator;
+
+      _Node*
+      _M_get_node()
+      { return _M_node_allocator.allocate(1); }
+
+      void
+      _M_put_node(_Node* __p)
+      { _M_node_allocator.deallocate(__p, 1); }
+
+    private:
+      hasher                _M_hash;
+      key_equal             _M_equals;
+      _ExtractKey           _M_get_key;
+      _Vector_type          _M_buckets;
+      size_type             _M_num_elements;
+      
+    public:
+      typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+				  _EqualKey, _Alloc>
+        iterator;
+      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+					_EqualKey, _Alloc>
+        const_iterator;
+
+      friend struct
+      _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>;
+
+      friend struct
+      _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+				_EqualKey, _Alloc>;
+
+    public:
+      hashtable(size_type __n, const _HashFcn& __hf,
+		const _EqualKey& __eql, const _ExtractKey& __ext,
+		const allocator_type& __a = allocator_type())
+      : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
+	_M_get_key(__ext), _M_buckets(__a), _M_num_elements(0)
+      { _M_initialize_buckets(__n); }
+
+      hashtable(size_type __n, const _HashFcn& __hf,
+		const _EqualKey& __eql,
+		const allocator_type& __a = allocator_type())
+      : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
+	_M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0)
+      { _M_initialize_buckets(__n); }
+
+      hashtable(const hashtable& __ht)
+      : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash),
+      _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key),
+      _M_buckets(__ht.get_allocator()), _M_num_elements(0)
+      { _M_copy_from(__ht); }
+
+      hashtable&
+      operator= (const hashtable& __ht)
+      {
+	if (&__ht != this)
+	  {
+	    clear();
+	    _M_hash = __ht._M_hash;
+	    _M_equals = __ht._M_equals;
+	    _M_get_key = __ht._M_get_key;
+	    _M_copy_from(__ht);
+	  }
+	return *this;
+      }
+
+      ~hashtable()
+      { clear(); }
+
+      size_type
+      size() const
+      { return _M_num_elements; }
+
+      size_type
+      max_size() const
+      { return size_type(-1); }
+
+      bool
+      empty() const
+      { return size() == 0; }
+
+      void
+      swap(hashtable& __ht)
+      {
+	std::swap(_M_hash, __ht._M_hash);
+	std::swap(_M_equals, __ht._M_equals);
+	std::swap(_M_get_key, __ht._M_get_key);
+	_M_buckets.swap(__ht._M_buckets);
+	std::swap(_M_num_elements, __ht._M_num_elements);
+      }
+
+      iterator
+      begin()
+      {
+	for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+	  if (_M_buckets[__n])
+	    return iterator(_M_buckets[__n], this);
+	return end();
+      }
+
+      iterator
+      end()
+      { return iterator(0, this); }
+
+      const_iterator
+      begin() const
+      {
+	for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+	  if (_M_buckets[__n])
+	    return const_iterator(_M_buckets[__n], this);
+	return end();
+      }
+
+      const_iterator
+      end() const
+      { return const_iterator(0, this); }
+
+      template<class _Vl, class _Ky, class _HF, class _Ex, class _Eq,
+		class _Al>
+        friend bool
+        operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
+		   const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
+
+    public:
+      size_type
+      bucket_count() const
+      { return _M_buckets.size(); }
+
+      size_type
+      max_bucket_count() const
+      { return __stl_prime_list[(int)_S_num_primes - 1]; }
+
+      size_type
+      elems_in_bucket(size_type __bucket) const
+      {
+	size_type __result = 0;
+	for (_Node* __n = _M_buckets[__bucket]; __n; __n = __n->_M_next)
+	  __result += 1;
+	return __result;
+      }
+
+      pair<iterator, bool>
+      insert_unique(const value_type& __obj)
+      {
+	resize(_M_num_elements + 1);
+	return insert_unique_noresize(__obj);
+      }
+
+      iterator
+      insert_equal(const value_type& __obj)
+      {
+	resize(_M_num_elements + 1);
+	return insert_equal_noresize(__obj);
+      }
+
+      pair<iterator, bool>
+      insert_unique_noresize(const value_type& __obj);
+
+      iterator
+      insert_equal_noresize(const value_type& __obj);
+
+      template<class _InputIterator>
+        void
+        insert_unique(_InputIterator __f, _InputIterator __l)
+        { insert_unique(__f, __l, __iterator_category(__f)); }
+
+      template<class _InputIterator>
+        void
+        insert_equal(_InputIterator __f, _InputIterator __l)
+        { insert_equal(__f, __l, __iterator_category(__f)); }
+
+      template<class _InputIterator>
+        void
+        insert_unique(_InputIterator __f, _InputIterator __l,
+		      input_iterator_tag)
+        {
+	  for ( ; __f != __l; ++__f)
+	    insert_unique(*__f);
+	}
+
+      template<class _InputIterator>
+        void
+        insert_equal(_InputIterator __f, _InputIterator __l,
+		     input_iterator_tag)
+        {
+	  for ( ; __f != __l; ++__f)
+	    insert_equal(*__f);
+	}
+
+      template<class _ForwardIterator>
+        void
+        insert_unique(_ForwardIterator __f, _ForwardIterator __l,
+		      forward_iterator_tag)
+        {
+	  size_type __n = distance(__f, __l);
+	  resize(_M_num_elements + __n);
+	  for ( ; __n > 0; --__n, ++__f)
+	    insert_unique_noresize(*__f);
+	}
+
+      template<class _ForwardIterator>
+        void
+        insert_equal(_ForwardIterator __f, _ForwardIterator __l,
+		     forward_iterator_tag)
+        {
+	  size_type __n = distance(__f, __l);
+	  resize(_M_num_elements + __n);
+	  for ( ; __n > 0; --__n, ++__f)
+	    insert_equal_noresize(*__f);
+	}
+
+      reference
+      find_or_insert(const value_type& __obj);
+
+      iterator
+      find(const key_type& __key)
+      {
+	size_type __n = _M_bkt_num_key(__key);
+	_Node* __first;
+	for (__first = _M_buckets[__n];
+	     __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+	     __first = __first->_M_next)
+	  { }
+	return iterator(__first, this);
+      }
+
+      const_iterator
+      find(const key_type& __key) const
+      {
+	size_type __n = _M_bkt_num_key(__key);
+	const _Node* __first;
+	for (__first = _M_buckets[__n];
+	     __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+	     __first = __first->_M_next)
+	  { }
+	return const_iterator(__first, this);
+      }
+
+      size_type
+      count(const key_type& __key) const
+      {
+	const size_type __n = _M_bkt_num_key(__key);
+	size_type __result = 0;
+	
+	for (const _Node* __cur = _M_buckets[__n]; __cur;
+	     __cur = __cur->_M_next)
+	  if (_M_equals(_M_get_key(__cur->_M_val), __key))
+	    ++__result;
+	return __result;
+      }
+
+      pair<iterator, iterator>
+      equal_range(const key_type& __key);
+
+      pair<const_iterator, const_iterator>
+      equal_range(const key_type& __key) const;
+
+      size_type
+      erase(const key_type& __key);
+      
+      void
+      erase(const iterator& __it);
+
+      void
+      erase(iterator __first, iterator __last);
+
+      void
+      erase(const const_iterator& __it);
+
+      void
+      erase(const_iterator __first, const_iterator __last);
+
+      void
+      resize(size_type __num_elements_hint);
+
+      void
+      clear();
+
+    private:
+      size_type
+      _M_next_size(size_type __n) const
+      { return __stl_next_prime(__n); }
+
+      void
+      _M_initialize_buckets(size_type __n)
+      {
+	const size_type __n_buckets = _M_next_size(__n);
+	_M_buckets.reserve(__n_buckets);
+	_M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
+	_M_num_elements = 0;
+      }
+
+      size_type
+      _M_bkt_num_key(const key_type& __key) const
+      { return _M_bkt_num_key(__key, _M_buckets.size()); }
+
+      size_type
+      _M_bkt_num(const value_type& __obj) const
+      { return _M_bkt_num_key(_M_get_key(__obj)); }
+
+      size_type
+      _M_bkt_num_key(const key_type& __key, size_t __n) const
+      { return _M_hash(__key) % __n; }
+
+      size_type
+      _M_bkt_num(const value_type& __obj, size_t __n) const
+      { return _M_bkt_num_key(_M_get_key(__obj), __n); }
+
+      _Node*
+      _M_new_node(const value_type& __obj)
+      {
+	_Node* __n = _M_get_node();
+	__n->_M_next = 0;
+	__try
+	  {
+	    this->get_allocator().construct(&__n->_M_val, __obj);
+	    return __n;
+	  }
+	__catch(...)
+	  {
+	    _M_put_node(__n);
+	    __throw_exception_again;
+	  }
+      }
+
+      void
+      _M_delete_node(_Node* __n)
+      {
+	this->get_allocator().destroy(&__n->_M_val);
+	_M_put_node(__n);
+      }
+      
+      void
+      _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
+
+      void
+      _M_erase_bucket(const size_type __n, _Node* __last);
+
+      void
+      _M_copy_from(const hashtable& __ht);
+    };
+
+  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+	    class _All>
+    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
+    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+    operator++()
+    {
+      const _Node* __old = _M_cur;
+      _M_cur = _M_cur->_M_next;
+      if (!_M_cur)
+	{
+	  size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+	  while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+	    _M_cur = _M_ht->_M_buckets[__bucket];
+	}
+      return *this;
+    }
+
+  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+	    class _All>
+    inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
+    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+    operator++(int)
+    {
+      iterator __tmp = *this;
+      ++*this;
+      return __tmp;
+    }
+
+  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+	    class _All>
+    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
+    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+    operator++()
+    {
+      const _Node* __old = _M_cur;
+      _M_cur = _M_cur->_M_next;
+      if (!_M_cur)
+	{
+	  size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+	  while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+	    _M_cur = _M_ht->_M_buckets[__bucket];
+	}
+      return *this;
+    }
+
+  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+	    class _All>
+    inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
+    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+    operator++(int)
+    {
+      const_iterator __tmp = *this;
+      ++*this;
+      return __tmp;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    bool
+    operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+	       const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
+    {
+      typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node;
+
+      if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
+	return false;
+
+      for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n)
+	{
+	  _Node* __cur1 = __ht1._M_buckets[__n];
+	  _Node* __cur2 = __ht2._M_buckets[__n];
+	  // Check same length of lists
+	  for (; __cur1 && __cur2;
+	       __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
+	    { } 
+	  if (__cur1 || __cur2)
+	    return false;
+	  // Now check one's elements are in the other
+	  for (__cur1 = __ht1._M_buckets[__n] ; __cur1;
+	       __cur1 = __cur1->_M_next)
+	    {
+	      bool _found__cur1 = false;
+	      for (__cur2 = __ht2._M_buckets[__n];
+		   __cur2; __cur2 = __cur2->_M_next)
+		{
+		  if (__cur1->_M_val == __cur2->_M_val)
+		    {
+		      _found__cur1 = true;
+		      break;
+		    }
+		}
+	      if (!_found__cur1)
+		return false;
+	    }
+	}
+      return true;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    inline bool
+    operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+	       const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
+    { return !(__ht1 == __ht2); }
+
+  template<class _Val, class _Key, class _HF, class _Extract, class _EqKey,
+	    class _All>
+    inline void
+    swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
+	 hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2)
+    { __ht1.swap(__ht2); }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator, bool>
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    insert_unique_noresize(const value_type& __obj)
+    {
+      const size_type __n = _M_bkt_num(__obj);
+      _Node* __first = _M_buckets[__n];
+      
+      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+	if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+	  return pair<iterator, bool>(iterator(__cur, this), false);
+      
+      _Node* __tmp = _M_new_node(__obj);
+      __tmp->_M_next = __first;
+      _M_buckets[__n] = __tmp;
+      ++_M_num_elements;
+      return pair<iterator, bool>(iterator(__tmp, this), true);
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    insert_equal_noresize(const value_type& __obj)
+    {
+      const size_type __n = _M_bkt_num(__obj);
+      _Node* __first = _M_buckets[__n];
+      
+      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+	if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+	  {
+	    _Node* __tmp = _M_new_node(__obj);
+	    __tmp->_M_next = __cur->_M_next;
+	    __cur->_M_next = __tmp;
+	    ++_M_num_elements;
+	    return iterator(__tmp, this);
+	  }
+
+      _Node* __tmp = _M_new_node(__obj);
+      __tmp->_M_next = __first;
+      _M_buckets[__n] = __tmp;
+      ++_M_num_elements;
+      return iterator(__tmp, this);
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    find_or_insert(const value_type& __obj)
+    {
+      resize(_M_num_elements + 1);
+
+      size_type __n = _M_bkt_num(__obj);
+      _Node* __first = _M_buckets[__n];
+      
+      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+	if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+	  return __cur->_M_val;
+      
+      _Node* __tmp = _M_new_node(__obj);
+      __tmp->_M_next = __first;
+      _M_buckets[__n] = __tmp;
+      ++_M_num_elements;
+      return __tmp->_M_val;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator,
+	 typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator>
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    equal_range(const key_type& __key)
+    {
+      typedef pair<iterator, iterator> _Pii;
+      const size_type __n = _M_bkt_num_key(__key);
+
+      for (_Node* __first = _M_buckets[__n]; __first;
+	   __first = __first->_M_next)
+	if (_M_equals(_M_get_key(__first->_M_val), __key))
+	  {
+	    for (_Node* __cur = __first->_M_next; __cur;
+		 __cur = __cur->_M_next)
+	      if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+		return _Pii(iterator(__first, this), iterator(__cur, this));
+	    for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+	      if (_M_buckets[__m])
+		return _Pii(iterator(__first, this),
+			    iterator(_M_buckets[__m], this));
+	    return _Pii(iterator(__first, this), end());
+	  }
+      return _Pii(end(), end());
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator,
+	 typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator>
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    equal_range(const key_type& __key) const
+    {
+      typedef pair<const_iterator, const_iterator> _Pii;
+      const size_type __n = _M_bkt_num_key(__key);
+
+      for (const _Node* __first = _M_buckets[__n]; __first;
+	   __first = __first->_M_next)
+	{
+	  if (_M_equals(_M_get_key(__first->_M_val), __key))
+	    {
+	      for (const _Node* __cur = __first->_M_next; __cur;
+		   __cur = __cur->_M_next)
+		if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+		  return _Pii(const_iterator(__first, this),
+			      const_iterator(__cur, this));
+	      for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+		if (_M_buckets[__m])
+		  return _Pii(const_iterator(__first, this),
+			      const_iterator(_M_buckets[__m], this));
+	      return _Pii(const_iterator(__first, this), end());
+	    }
+	}
+      return _Pii(end(), end());
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(const key_type& __key)
+    {
+      const size_type __n = _M_bkt_num_key(__key);
+      _Node* __first = _M_buckets[__n];
+      _Node* __saved_slot = 0;
+      size_type __erased = 0;
+
+      if (__first)
+	{
+	  _Node* __cur = __first;
+	  _Node* __next = __cur->_M_next;
+	  while (__next)
+	    {
+	      if (_M_equals(_M_get_key(__next->_M_val), __key))
+		{
+		  if (&_M_get_key(__next->_M_val) != &__key)
+		    {
+		      __cur->_M_next = __next->_M_next;
+		      _M_delete_node(__next);
+		      __next = __cur->_M_next;
+		      ++__erased;
+		      --_M_num_elements;
+		    }
+		  else
+		    {
+		      __saved_slot = __cur;
+		      __cur = __next;
+		      __next = __cur->_M_next;
+		    }
+		}
+	      else
+		{
+		  __cur = __next;
+		  __next = __cur->_M_next;
+		}
+	    }
+	  if (_M_equals(_M_get_key(__first->_M_val), __key))
+	    {
+	      _M_buckets[__n] = __first->_M_next;
+	      _M_delete_node(__first);
+	      ++__erased;
+	      --_M_num_elements;
+	    }
+	  if (__saved_slot)
+	    {
+	      __next = __saved_slot->_M_next;
+	      __saved_slot->_M_next = __next->_M_next;
+	      _M_delete_node(__next);
+	      ++__erased;
+	      --_M_num_elements;
+	    }
+	}
+      return __erased;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(const iterator& __it)
+    {
+      _Node* __p = __it._M_cur;
+      if (__p)
+	{
+	  const size_type __n = _M_bkt_num(__p->_M_val);
+	  _Node* __cur = _M_buckets[__n];
+	  
+	  if (__cur == __p)
+	    {
+	      _M_buckets[__n] = __cur->_M_next;
+	      _M_delete_node(__cur);
+	      --_M_num_elements;
+	    }
+	  else
+	    {
+	      _Node* __next = __cur->_M_next;
+	      while (__next)
+		{
+		  if (__next == __p)
+		    {
+		      __cur->_M_next = __next->_M_next;
+		      _M_delete_node(__next);
+		      --_M_num_elements;
+		      break;
+		    }
+		  else
+		    {
+		      __cur = __next;
+		      __next = __cur->_M_next;
+		    }
+		}
+	    }
+	}
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(iterator __first, iterator __last)
+    {
+      size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val)
+	                                    : _M_buckets.size();
+
+      size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val)
+	                                   : _M_buckets.size();
+
+      if (__first._M_cur == __last._M_cur)
+	return;
+      else if (__f_bucket == __l_bucket)
+	_M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
+      else
+	{
+	  _M_erase_bucket(__f_bucket, __first._M_cur, 0);
+	  for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
+	    _M_erase_bucket(__n, 0);
+	  if (__l_bucket != _M_buckets.size())
+	    _M_erase_bucket(__l_bucket, __last._M_cur);
+	}
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    inline void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(const_iterator __first, const_iterator __last)
+    {
+      erase(iterator(const_cast<_Node*>(__first._M_cur),
+		     const_cast<hashtable*>(__first._M_ht)),
+	    iterator(const_cast<_Node*>(__last._M_cur),
+		     const_cast<hashtable*>(__last._M_ht)));
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    inline void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(const const_iterator& __it)
+    { erase(iterator(const_cast<_Node*>(__it._M_cur),
+		     const_cast<hashtable*>(__it._M_ht))); }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    resize(size_type __num_elements_hint)
+    {
+      const size_type __old_n = _M_buckets.size();
+      if (__num_elements_hint > __old_n)
+	{
+	  const size_type __n = _M_next_size(__num_elements_hint);
+	  if (__n > __old_n)
+	    {
+	      _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
+	      __try
+		{
+		  for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
+		    {
+		      _Node* __first = _M_buckets[__bucket];
+		      while (__first)
+			{
+			  size_type __new_bucket = _M_bkt_num(__first->_M_val,
+							      __n);
+			  _M_buckets[__bucket] = __first->_M_next;
+			  __first->_M_next = __tmp[__new_bucket];
+			  __tmp[__new_bucket] = __first;
+			  __first = _M_buckets[__bucket];
+			}
+		    }
+		  _M_buckets.swap(__tmp);
+		}
+	      __catch(...)
+		{
+		  for (size_type __bucket = 0; __bucket < __tmp.size();
+		       ++__bucket)
+		    {
+		      while (__tmp[__bucket])
+			{
+			  _Node* __next = __tmp[__bucket]->_M_next;
+			  _M_delete_node(__tmp[__bucket]);
+			  __tmp[__bucket] = __next;
+			}
+		    }
+		  __throw_exception_again;
+		}
+	    }
+	}
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
+    {
+      _Node* __cur = _M_buckets[__n];
+      if (__cur == __first)
+	_M_erase_bucket(__n, __last);
+      else
+	{
+	  _Node* __next;
+	  for (__next = __cur->_M_next;
+	       __next != __first;
+	       __cur = __next, __next = __cur->_M_next)
+	    ;
+	  while (__next != __last)
+	    {
+	      __cur->_M_next = __next->_M_next;
+	      _M_delete_node(__next);
+	      __next = __cur->_M_next;
+	      --_M_num_elements;
+	    }
+	}
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    _M_erase_bucket(const size_type __n, _Node* __last)
+    {
+      _Node* __cur = _M_buckets[__n];
+      while (__cur != __last)
+	{
+	  _Node* __next = __cur->_M_next;
+	  _M_delete_node(__cur);
+	  __cur = __next;
+	  _M_buckets[__n] = __cur;
+	  --_M_num_elements;
+	}
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    clear()
+    {
+      if (_M_num_elements == 0)
+	return;
+
+      for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
+	{
+	  _Node* __cur = _M_buckets[__i];
+	  while (__cur != 0)
+	    {
+	      _Node* __next = __cur->_M_next;
+	      _M_delete_node(__cur);
+	      __cur = __next;
+	    }
+	  _M_buckets[__i] = 0;
+	}
+      _M_num_elements = 0;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    _M_copy_from(const hashtable& __ht)
+    {
+      _M_buckets.clear();
+      _M_buckets.reserve(__ht._M_buckets.size());
+      _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
+      __try
+	{
+	  for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
+	    const _Node* __cur = __ht._M_buckets[__i];
+	    if (__cur)
+	      {
+		_Node* __local_copy = _M_new_node(__cur->_M_val);
+		_M_buckets[__i] = __local_copy;
+		
+		for (_Node* __next = __cur->_M_next;
+		     __next;
+		     __cur = __next, __next = __cur->_M_next)
+		  {
+		    __local_copy->_M_next = _M_new_node(__next->_M_val);
+		    __local_copy = __local_copy->_M_next;
+		  }
+	      }
+	  }
+	  _M_num_elements = __ht._M_num_elements;
+	}
+      __catch(...)
+	{
+	  clear();
+	  __throw_exception_again;
+	}
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/strstream b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/strstream
new file mode 100644
index 0000000..3221ba9
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward/strstream
@@ -0,0 +1,177 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+// WARNING: The classes defined in this header are DEPRECATED.  This
+// header is defined in section D.7.1 of the C++ standard, and it
+// MAY BE REMOVED in a future standard revision.  One should use the
+// header <sstream> instead.
+
+#ifndef _BACKWARD_STRSTREAM
+#define _BACKWARD_STRSTREAM
+
+#include "backward_warning.h"
+#include <iosfwd>
+#include <ios>
+#include <istream>
+#include <ostream>
+#include <string>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Class strstreambuf, a streambuf class that manages an array of char.
+  // Note that this class is not a template.
+  class strstreambuf : public basic_streambuf<char, char_traits<char> >
+  {
+  public:
+    // Types.
+    typedef char_traits<char>              _Traits;
+    typedef basic_streambuf<char, _Traits> _Base;
+
+  public:
+    // Constructor, destructor
+    explicit strstreambuf(streamsize __initial_capacity = 0);
+    strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*));
+
+    strstreambuf(char* __get, streamsize __n, char* __put = 0) throw ();
+    strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0) throw ();
+    strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0) throw ();
+
+    strstreambuf(const char* __get, streamsize __n) throw ();
+    strstreambuf(const signed char* __get, streamsize __n) throw ();
+    strstreambuf(const unsigned char* __get, streamsize __n) throw ();
+
+    virtual ~strstreambuf();
+
+  public:
+    void freeze(bool = true) throw ();
+    char* str() throw ();
+    _GLIBCXX_PURE int pcount() const throw ();
+
+  protected:
+    virtual int_type overflow(int_type __c  = _Traits::eof());
+    virtual int_type pbackfail(int_type __c = _Traits::eof());
+    virtual int_type underflow();
+    virtual _Base* setbuf(char* __buf, streamsize __n);
+    virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
+			     ios_base::openmode __mode
+			     = ios_base::in | ios_base::out);
+    virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
+			     = ios_base::in | ios_base::out);
+
+  private:
+    strstreambuf&
+    operator=(const strstreambuf&);
+
+    strstreambuf(const strstreambuf&);
+
+    // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
+    char* _M_alloc(size_t);
+    void  _M_free(char*);
+
+    // Helper function used in constructors.
+    void _M_setup(char* __get, char* __put, streamsize __n) throw ();
+
+  private:
+    // Data members.
+    void* (*_M_alloc_fun)(size_t);
+    void  (*_M_free_fun)(void*);
+
+    bool _M_dynamic  : 1;
+    bool _M_frozen   : 1;
+    bool _M_constant : 1;
+  };
+
+  // Class istrstream, an istream that manages a strstreambuf.
+  class istrstream : public basic_istream<char>
+  {
+  public:
+    explicit istrstream(char*);
+    explicit istrstream(const char*);
+    istrstream(char* , streamsize);
+    istrstream(const char*, streamsize);
+    virtual ~istrstream();
+
+    _GLIBCXX_CONST strstreambuf* rdbuf() const throw ();
+    char* str() throw ();
+
+  private:
+    strstreambuf _M_buf;
+  };
+
+  // Class ostrstream
+  class ostrstream : public basic_ostream<char>
+  {
+  public:
+    ostrstream();
+    ostrstream(char*, int, ios_base::openmode = ios_base::out);
+    virtual ~ostrstream();
+
+    _GLIBCXX_CONST strstreambuf* rdbuf() const throw ();
+    void freeze(bool = true) throw();
+    char* str() throw ();
+    _GLIBCXX_PURE int pcount() const throw ();
+
+  private:
+    strstreambuf _M_buf;
+  };
+
+  // Class strstream
+  class strstream : public basic_iostream<char>
+  {
+  public:
+    typedef char                        char_type;
+    typedef char_traits<char>::int_type int_type;
+    typedef char_traits<char>::pos_type pos_type;
+    typedef char_traits<char>::off_type off_type;
+
+    strstream();
+    strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out);
+    virtual ~strstream();
+
+    _GLIBCXX_CONST strstreambuf* rdbuf() const throw ();
+    void freeze(bool = true) throw ();
+    _GLIBCXX_PURE int pcount() const throw ();
+    char* str() throw ();
+
+  private:
+    strstreambuf _M_buf;
+  };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/algorithmfwd.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/algorithmfwd.h
new file mode 100644
index 0000000..cbd7f6f
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/algorithmfwd.h
@@ -0,0 +1,803 @@
+// <algorithm> declarations  -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/algorithmfwd.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ALGORITHMFWD_H
+#define _GLIBCXX_ALGORITHMFWD_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stl_pair.h>
+#include <bits/stl_iterator_base_types.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /*
+    adjacent_find
+    all_of (C++0x)
+    any_of (C++0x)
+    binary_search
+    copy
+    copy_backward
+    copy_if (C++0x)
+    copy_n (C++0x)
+    count
+    count_if
+    equal
+    equal_range
+    fill
+    fill_n
+    find
+    find_end
+    find_first_of
+    find_if
+    find_if_not (C++0x)
+    for_each
+    generate
+    generate_n
+    includes
+    inplace_merge
+    is_heap (C++0x)
+    is_heap_until (C++0x)
+    is_partitioned (C++0x)
+    is_sorted (C++0x)
+    is_sorted_until (C++0x)
+    iter_swap
+    lexicographical_compare
+    lower_bound
+    make_heap
+    max
+    max_element
+    merge
+    min
+    min_element
+    minmax (C++0x)
+    minmax_element (C++0x)
+    mismatch
+    next_permutation
+    none_of (C++0x)
+    nth_element
+    partial_sort
+    partial_sort_copy
+    partition
+    partition_copy (C++0x)
+    partition_point (C++0x)
+    pop_heap
+    prev_permutation
+    push_heap
+    random_shuffle
+    remove
+    remove_copy
+    remove_copy_if
+    remove_if
+    replace
+    replace_copy
+    replace_copy_if
+    replace_if
+    reverse
+    reverse_copy
+    rotate
+    rotate_copy
+    search
+    search_n
+    set_difference
+    set_intersection
+    set_symmetric_difference
+    set_union
+    shuffle (C++0x)
+    sort
+    sort_heap
+    stable_partition
+    stable_sort
+    swap
+    swap_ranges
+    transform
+    unique
+    unique_copy
+    upper_bound
+  */
+
+  /**
+   * @defgroup algorithms Algorithms
+   *
+   * Components for performing algorithmic operations. Includes
+   * non-modifying sequence, modifying (mutating) sequence, sorting,
+   * searching, merge, partition, heap, set, minima, maxima, and
+   * permutation operations.
+   */
+
+  /**
+   * @defgroup mutating_algorithms Mutating
+   * @ingroup algorithms
+   */
+
+  /**
+   * @defgroup non_mutating_algorithms Non-Mutating
+   * @ingroup algorithms
+   */
+
+  /**
+   * @defgroup sorting_algorithms Sorting
+   * @ingroup algorithms
+   */
+
+  /**
+   * @defgroup set_algorithms Set Operation
+   * @ingroup sorting_algorithms
+   *
+   * These algorithms are common set operations performed on sequences
+   * that are already sorted. The number of comparisons will be
+   * linear.
+   */
+
+  /**
+   * @defgroup binary_search_algorithms Binary Search
+   * @ingroup sorting_algorithms
+   *
+   * These algorithms are variations of a classic binary search, and
+   * all assume that the sequence being searched is already sorted.
+   * 
+   * The number of comparisons will be logarithmic (and as few as
+   * possible).  The number of steps through the sequence will be
+   * logarithmic for random-access iterators (e.g., pointers), and
+   * linear otherwise.
+   * 
+   * The LWG has passed Defect Report 270, which notes: <em>The
+   * proposed resolution reinterprets binary search. Instead of
+   * thinking about searching for a value in a sorted range, we view
+   * that as an important special case of a more general algorithm:
+   * searching for the partition point in a partitioned range.  We
+   * also add a guarantee that the old wording did not: we ensure that
+   * the upper bound is no earlier than the lower bound, that the pair
+   * returned by equal_range is a valid range, and that the first part
+   * of that pair is the lower bound.</em>
+   *
+   * The actual effect of the first sentence is that a comparison
+   * functor passed by the user doesn't necessarily need to induce a
+   * strict weak ordering relation.  Rather, it partitions the range.
+   */
+
+  // adjacent_find
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _IIter, typename _Predicate>
+    bool
+    all_of(_IIter, _IIter, _Predicate);
+
+  template<typename _IIter, typename _Predicate>
+    bool
+    any_of(_IIter, _IIter, _Predicate);
+#endif
+
+  template<typename _FIter, typename _Tp>
+    bool 
+    binary_search(_FIter, _FIter, const _Tp&);
+
+  template<typename _FIter, typename _Tp, typename _Compare>
+    bool 
+    binary_search(_FIter, _FIter, const _Tp&, _Compare);
+
+  template<typename _IIter, typename _OIter>
+    _OIter 
+    copy(_IIter, _IIter, _OIter);
+
+  template<typename _BIter1, typename _BIter2>
+    _BIter2
+    copy_backward(_BIter1, _BIter1, _BIter2);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _IIter, typename _OIter, typename _Predicate>
+    _OIter
+    copy_if(_IIter, _IIter, _OIter, _Predicate);
+
+  template<typename _IIter, typename _Size, typename _OIter>
+    _OIter
+    copy_n(_IIter, _Size, _OIter);
+#endif
+
+  // count
+  // count_if
+
+  template<typename _FIter, typename _Tp>
+    pair<_FIter, _FIter>
+    equal_range(_FIter, _FIter, const _Tp&);
+
+  template<typename _FIter, typename _Tp, typename _Compare>
+    pair<_FIter, _FIter>
+    equal_range(_FIter, _FIter, const _Tp&, _Compare);
+
+  template<typename _FIter, typename _Tp>
+    void 
+    fill(_FIter, _FIter, const _Tp&);
+
+  template<typename _OIter, typename _Size, typename _Tp>
+    _OIter
+    fill_n(_OIter, _Size, const _Tp&);
+
+  // find
+
+  template<typename _FIter1, typename _FIter2>
+    _FIter1
+    find_end(_FIter1, _FIter1, _FIter2, _FIter2);
+
+  template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+    _FIter1
+    find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+  // find_first_of
+  // find_if
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _IIter, typename _Predicate>
+    _IIter
+    find_if_not(_IIter, _IIter, _Predicate);
+#endif
+
+  // for_each
+  // generate
+  // generate_n
+
+  template<typename _IIter1, typename _IIter2>
+    bool 
+    includes(_IIter1, _IIter1, _IIter2, _IIter2);
+
+  template<typename _IIter1, typename _IIter2, typename _Compare>
+    bool 
+    includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
+
+  template<typename _BIter>
+    void 
+    inplace_merge(_BIter, _BIter, _BIter);
+
+  template<typename _BIter, typename _Compare>
+    void 
+    inplace_merge(_BIter, _BIter, _BIter, _Compare);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _RAIter>
+    bool 
+    is_heap(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    bool 
+    is_heap(_RAIter, _RAIter, _Compare);
+
+  template<typename _RAIter>
+    _RAIter 
+    is_heap_until(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    _RAIter 
+    is_heap_until(_RAIter, _RAIter, _Compare);
+
+  template<typename _IIter, typename _Predicate>
+    bool
+    is_partitioned(_IIter, _IIter, _Predicate);
+
+  template<typename _FIter>
+    bool 
+    is_sorted(_FIter, _FIter);
+
+  template<typename _FIter, typename _Compare>
+    bool 
+    is_sorted(_FIter, _FIter, _Compare);
+
+  template<typename _FIter>
+    _FIter 
+    is_sorted_until(_FIter, _FIter);
+
+  template<typename _FIter, typename _Compare>
+    _FIter 
+    is_sorted_until(_FIter, _FIter, _Compare);
+#endif
+
+  template<typename _FIter1, typename _FIter2>
+    void 
+    iter_swap(_FIter1, _FIter2);
+
+  template<typename _FIter, typename _Tp>
+    _FIter 
+    lower_bound(_FIter, _FIter, const _Tp&);
+
+  template<typename _FIter, typename _Tp, typename _Compare>
+    _FIter 
+    lower_bound(_FIter, _FIter, const _Tp&, _Compare);
+
+  template<typename _RAIter>
+    void 
+    make_heap(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    void 
+    make_heap(_RAIter, _RAIter, _Compare);
+
+  template<typename _Tp> 
+    const _Tp& 
+    max(const _Tp&, const _Tp&);
+
+  template<typename _Tp, typename _Compare>
+    const _Tp& 
+    max(const _Tp&, const _Tp&, _Compare);
+
+  // max_element
+  // merge
+
+  template<typename _Tp> 
+    const _Tp& 
+    min(const _Tp&, const _Tp&);
+
+  template<typename _Tp, typename _Compare>
+    const _Tp& 
+    min(const _Tp&, const _Tp&, _Compare);
+
+  // min_element
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp>
+    pair<const _Tp&, const _Tp&> 
+    minmax(const _Tp&, const _Tp&);
+
+  template<typename _Tp, typename _Compare>
+    pair<const _Tp&, const _Tp&>
+    minmax(const _Tp&, const _Tp&, _Compare);
+
+  template<typename _FIter>
+    pair<_FIter, _FIter>
+    minmax_element(_FIter, _FIter);
+
+  template<typename _FIter, typename _Compare>
+    pair<_FIter, _FIter>
+    minmax_element(_FIter, _FIter, _Compare);
+
+  template<typename _Tp>
+    _Tp
+    min(initializer_list<_Tp>);
+
+  template<typename _Tp, typename _Compare>
+    _Tp
+    min(initializer_list<_Tp>, _Compare);
+
+  template<typename _Tp>
+    _Tp
+    max(initializer_list<_Tp>);
+
+  template<typename _Tp, typename _Compare>
+    _Tp
+    max(initializer_list<_Tp>, _Compare);
+
+  template<typename _Tp>
+    pair<_Tp, _Tp>
+    minmax(initializer_list<_Tp>);
+
+  template<typename _Tp, typename _Compare>
+    pair<_Tp, _Tp>
+    minmax(initializer_list<_Tp>, _Compare);
+#endif
+
+  // mismatch
+
+  template<typename _BIter>
+    bool 
+    next_permutation(_BIter, _BIter);
+
+  template<typename _BIter, typename _Compare>
+    bool 
+    next_permutation(_BIter, _BIter, _Compare);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _IIter, typename _Predicate>
+    bool
+    none_of(_IIter, _IIter, _Predicate);
+#endif
+
+  // nth_element
+  // partial_sort
+
+  template<typename _IIter, typename _RAIter>
+    _RAIter
+    partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter);
+
+  template<typename _IIter, typename _RAIter, typename _Compare>
+    _RAIter
+    partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare);
+
+  // partition
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _IIter, typename _OIter1,
+	   typename _OIter2, typename _Predicate>
+    pair<_OIter1, _OIter2>
+    partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate);
+
+  template<typename _FIter, typename _Predicate>
+    _FIter
+    partition_point(_FIter, _FIter, _Predicate);
+#endif
+
+  template<typename _RAIter>
+    void 
+    pop_heap(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    void 
+    pop_heap(_RAIter, _RAIter, _Compare);
+
+  template<typename _BIter>
+    bool 
+    prev_permutation(_BIter, _BIter);
+
+  template<typename _BIter, typename _Compare>
+    bool 
+    prev_permutation(_BIter, _BIter, _Compare);
+
+  template<typename _RAIter>
+    void 
+    push_heap(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    void 
+    push_heap(_RAIter, _RAIter, _Compare);
+
+  // random_shuffle
+
+  template<typename _FIter, typename _Tp>
+    _FIter 
+    remove(_FIter, _FIter, const _Tp&);
+
+  template<typename _FIter, typename _Predicate>
+    _FIter 
+    remove_if(_FIter, _FIter, _Predicate);
+
+  template<typename _IIter, typename _OIter, typename _Tp>
+    _OIter 
+    remove_copy(_IIter, _IIter, _OIter, const _Tp&);
+
+  template<typename _IIter, typename _OIter, typename _Predicate>
+    _OIter 
+    remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
+
+  // replace
+
+  template<typename _IIter, typename _OIter, typename _Tp>
+    _OIter 
+    replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&);
+
+  template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp>
+    _OIter 
+    replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&);
+
+  // replace_if
+
+  template<typename _BIter>
+    void 
+    reverse(_BIter, _BIter);
+
+  template<typename _BIter, typename _OIter>
+    _OIter 
+    reverse_copy(_BIter, _BIter, _OIter);
+
+  template<typename _FIter>
+    void 
+    rotate(_FIter, _FIter, _FIter);
+
+  template<typename _FIter, typename _OIter>
+    _OIter 
+    rotate_copy(_FIter, _FIter, _FIter, _OIter);
+
+  // search
+  // search_n
+  // set_difference
+  // set_intersection
+  // set_symmetric_difference
+  // set_union
+
+#if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
+  template<typename _RAIter, typename _UGenerator>
+    void
+    shuffle(_RAIter, _RAIter, _UGenerator&);
+#endif
+
+  template<typename _RAIter>
+    void 
+    sort_heap(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    void 
+    sort_heap(_RAIter, _RAIter, _Compare);
+
+  template<typename _BIter, typename _Predicate>
+    _BIter 
+    stable_partition(_BIter, _BIter, _Predicate);
+
+  template<typename _Tp> 
+    void 
+    swap(_Tp&, _Tp&);
+
+  template<typename _Tp, size_t _Nm>
+    void
+    swap(_Tp (&)[_Nm], _Tp (&)[_Nm]);
+
+  template<typename _FIter1, typename _FIter2>
+    _FIter2 
+    swap_ranges(_FIter1, _FIter1, _FIter2);
+
+  // transform
+
+  template<typename _FIter>
+    _FIter 
+    unique(_FIter, _FIter);
+
+  template<typename _FIter, typename _BinaryPredicate>
+    _FIter 
+    unique(_FIter, _FIter, _BinaryPredicate);
+
+  // unique_copy
+
+  template<typename _FIter, typename _Tp>
+    _FIter 
+    upper_bound(_FIter, _FIter, const _Tp&);
+
+  template<typename _FIter, typename _Tp, typename _Compare>
+    _FIter 
+    upper_bound(_FIter, _FIter, const _Tp&, _Compare);
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+  template<typename _FIter>
+    _FIter 
+    adjacent_find(_FIter, _FIter);
+
+  template<typename _FIter, typename _BinaryPredicate>
+    _FIter 
+    adjacent_find(_FIter, _FIter, _BinaryPredicate);
+
+  template<typename _IIter, typename _Tp>
+    typename iterator_traits<_IIter>::difference_type
+    count(_IIter, _IIter, const _Tp&);
+
+  template<typename _IIter, typename _Predicate>
+    typename iterator_traits<_IIter>::difference_type
+    count_if(_IIter, _IIter, _Predicate);
+
+  template<typename _IIter1, typename _IIter2>
+    bool 
+    equal(_IIter1, _IIter1, _IIter2);
+
+  template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+    bool 
+    equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
+
+  template<typename _IIter, typename _Tp>
+    _IIter 
+    find(_IIter, _IIter, const _Tp&);
+
+  template<typename _FIter1, typename _FIter2>
+    _FIter1
+    find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
+
+  template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+    _FIter1
+    find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+  template<typename _IIter, typename _Predicate>
+    _IIter
+    find_if(_IIter, _IIter, _Predicate);
+
+  template<typename _IIter, typename _Funct>
+    _Funct 
+    for_each(_IIter, _IIter, _Funct);
+
+  template<typename _FIter, typename _Generator>
+    void 
+    generate(_FIter, _FIter, _Generator);
+
+  template<typename _OIter, typename _Size, typename _Generator>
+    _OIter
+    generate_n(_OIter, _Size, _Generator);
+
+  template<typename _IIter1, typename _IIter2>
+    bool 
+    lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
+
+  template<typename _IIter1, typename _IIter2, typename _Compare>
+    bool 
+    lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
+
+  template<typename _FIter>
+    _FIter 
+    max_element(_FIter, _FIter);
+
+  template<typename _FIter, typename _Compare>
+    _FIter 
+    max_element(_FIter, _FIter, _Compare);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter>
+    _OIter 
+    merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter, 
+	   typename _Compare>
+    _OIter 
+    merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+  template<typename _FIter>
+    _FIter 
+    min_element(_FIter, _FIter);
+
+  template<typename _FIter, typename _Compare>
+    _FIter 
+    min_element(_FIter, _FIter, _Compare);
+
+  template<typename _IIter1, typename _IIter2>
+    pair<_IIter1, _IIter2>
+    mismatch(_IIter1, _IIter1, _IIter2);
+
+  template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+    pair<_IIter1, _IIter2>
+    mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
+
+  template<typename _RAIter>
+    void 
+    nth_element(_RAIter, _RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    void 
+    nth_element(_RAIter, _RAIter, _RAIter, _Compare);
+
+  template<typename _RAIter>
+    void 
+    partial_sort(_RAIter, _RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    void 
+    partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
+
+  template<typename _BIter, typename _Predicate>
+    _BIter 
+    partition(_BIter, _BIter, _Predicate);
+
+  template<typename _RAIter>
+    void 
+    random_shuffle(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Generator>
+    void 
+    random_shuffle(_RAIter, _RAIter,
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+		   _Generator&&);
+#else
+		   _Generator&);
+#endif
+
+  template<typename _FIter, typename _Tp>
+    void 
+    replace(_FIter, _FIter, const _Tp&, const _Tp&);
+
+  template<typename _FIter, typename _Predicate, typename _Tp>
+    void 
+    replace_if(_FIter, _FIter, _Predicate, const _Tp&);
+
+  template<typename _FIter1, typename _FIter2>
+    _FIter1 
+    search(_FIter1, _FIter1, _FIter2, _FIter2);
+
+  template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+    _FIter1 
+    search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+  template<typename _FIter, typename _Size, typename _Tp>
+    _FIter 
+    search_n(_FIter, _FIter, _Size, const _Tp&);
+
+  template<typename _FIter, typename _Size, typename _Tp, 
+	   typename _BinaryPredicate>
+    _FIter 
+    search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter>
+    _OIter 
+    set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter, 
+	   typename _Compare>
+    _OIter 
+    set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter>
+    _OIter 
+    set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter,
+	   typename _Compare>
+    _OIter 
+    set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter>
+    _OIter
+    set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter, 
+	   typename _Compare>
+    _OIter
+    set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, 
+			     _OIter, _Compare);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter>
+    _OIter 
+    set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter,
+	   typename _Compare>
+    _OIter 
+    set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+  template<typename _RAIter>
+    void 
+    sort(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    void 
+    sort(_RAIter, _RAIter, _Compare);
+
+  template<typename _RAIter>
+    void 
+    stable_sort(_RAIter, _RAIter);
+
+  template<typename _RAIter, typename _Compare>
+    void 
+    stable_sort(_RAIter, _RAIter, _Compare);
+
+  template<typename _IIter, typename _OIter, typename _UnaryOperation>
+    _OIter 
+    transform(_IIter, _IIter, _OIter, _UnaryOperation);
+
+  template<typename _IIter1, typename _IIter2, typename _OIter, 
+	   typename _BinaryOperation>
+    _OIter 
+    transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
+
+  template<typename _IIter, typename _OIter>
+    _OIter 
+    unique_copy(_IIter, _IIter, _OIter);
+
+  template<typename _IIter, typename _OIter, typename _BinaryPredicate>
+    _OIter 
+    unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#ifdef _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+# include <parallel/algorithmfwd.h>
+#endif
+
+#endif
+
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/allocator.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/allocator.h
new file mode 100644
index 0000000..ddf48db
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/allocator.h
@@ -0,0 +1,206 @@
+// Allocators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996-1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file allocator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _ALLOCATOR_H
+#define _ALLOCATOR_H 1
+
+// Define the base class to std::allocator.
+#include <bits/c++allocator.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @defgroup allocators Allocators
+   * @ingroup memory
+   *
+   * Classes encapsulating memory operations.
+   */
+
+  template<typename _Tp>
+    class allocator;
+
+  /// allocator<void> specialization.
+  template<>
+    class allocator<void>
+    {
+    public:
+      typedef size_t      size_type;
+      typedef ptrdiff_t   difference_type;
+      typedef void*       pointer;
+      typedef const void* const_pointer;
+      typedef void        value_type;
+
+      template<typename _Tp1>
+        struct rebind
+        { typedef allocator<_Tp1> other; };
+    };
+
+  /**
+   * @brief  The @a standard allocator, as per [20.4].
+   * @ingroup allocators
+   *
+   *  Further details:
+   *  http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html
+   */
+  template<typename _Tp>
+    class allocator: public __glibcxx_base_allocator<_Tp>
+    {
+   public:
+      typedef size_t     size_type;
+      typedef ptrdiff_t  difference_type;
+      typedef _Tp*       pointer;
+      typedef const _Tp* const_pointer;
+      typedef _Tp&       reference;
+      typedef const _Tp& const_reference;
+      typedef _Tp        value_type;
+
+      template<typename _Tp1>
+        struct rebind
+        { typedef allocator<_Tp1> other; };
+
+      allocator() throw() { }
+
+      allocator(const allocator& __a) throw()
+      : __glibcxx_base_allocator<_Tp>(__a) { }
+
+      template<typename _Tp1>
+        allocator(const allocator<_Tp1>&) throw() { }
+
+      ~allocator() throw() { }
+
+      // Inherit everything else.
+    };
+
+  template<typename _T1, typename _T2>
+    inline bool
+    operator==(const allocator<_T1>&, const allocator<_T2>&)
+    { return true; }
+
+  template<typename _Tp>
+    inline bool
+    operator==(const allocator<_Tp>&, const allocator<_Tp>&)
+    { return true; }
+
+  template<typename _T1, typename _T2>
+    inline bool
+    operator!=(const allocator<_T1>&, const allocator<_T2>&)
+    { return false; }
+
+  template<typename _Tp>
+    inline bool
+    operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
+    { return false; }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class allocator<char>;
+  extern template class allocator<wchar_t>;
+#endif
+
+  // Undefine.
+#undef __glibcxx_base_allocator
+
+  // To implement Option 3 of DR 431.
+  template<typename _Alloc, bool = __is_empty(_Alloc)>
+    struct __alloc_swap
+    { static void _S_do_it(_Alloc&, _Alloc&) { } };
+
+  template<typename _Alloc>
+    struct __alloc_swap<_Alloc, false>
+    {
+      static void
+      _S_do_it(_Alloc& __one, _Alloc& __two)
+      {
+	// Precondition: swappable allocators.
+	if (__one != __two)
+	  swap(__one, __two);
+      }
+    };
+
+  // Optimize for stateless allocators.
+  template<typename _Alloc, bool = __is_empty(_Alloc)>
+    struct __alloc_neq
+    {
+      static bool
+      _S_do_it(const _Alloc&, const _Alloc&)
+      { return false; }
+    };
+
+  template<typename _Alloc>
+    struct __alloc_neq<_Alloc, false>
+    {
+      static bool
+      _S_do_it(const _Alloc& __one, const _Alloc& __two)
+      { return __one != __two; }
+    };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+   // A very basic implementation for now.  In general we have to wait for
+   // the availability of the infrastructure described in N2983:  we should
+   // try when either T has a move constructor which cannot throw or T is
+   // CopyContructible.
+   // NB: This code doesn't properly belong here, we should find a more
+   // suited place common to std::vector and std::deque.
+   template<typename _Tp,
+	    bool = __has_trivial_copy(typename _Tp::value_type)>
+     struct __shrink_to_fit
+     { static void _S_do_it(_Tp&) { } };
+
+   template<typename _Tp>
+     struct __shrink_to_fit<_Tp, true>
+     {
+       static void
+       _S_do_it(_Tp& __v)
+       {
+	 __try
+	   { _Tp(__v).swap(__v); }
+	 __catch(...) { }
+       }
+     };
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_0.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_0.h
new file mode 100644
index 0000000..a39de4a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_0.h
@@ -0,0 +1,457 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomic_0.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_0_H
+#define _GLIBCXX_ATOMIC_0_H 1
+
+#pragma GCC system_header
+
+// _GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // 0 == __atomic0 == Never lock-free
+namespace __atomic0
+{
+  struct atomic_flag;
+
+  // Implementation specific defines.
+#define _ATOMIC_LOAD_(__a, __x)						   \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;	   		   \
+    __atomic_flag_base* __g = __atomic_flag_for_address(__p);	  	   \
+    __atomic_flag_wait_explicit(__g, __x);				   \
+    __typeof__ _ATOMIC_MEMBER_ __r = *__p;				   \
+    atomic_flag_clear_explicit(__g, __x);		       		   \
+    __r; })
+
+#define _ATOMIC_STORE_(__a, __m, __x)					   \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;	   		   \
+    __typeof__(__m) __v = (__m);			       		   \
+    __atomic_flag_base* __g = __atomic_flag_for_address(__p);	  	   \
+    __atomic_flag_wait_explicit(__g, __x);				   \
+    *__p = __v;								   \
+    atomic_flag_clear_explicit(__g, __x);		       		   \
+    __v; })
+
+#define _ATOMIC_MODIFY_(__a, __o, __m, __x)				   \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;	   		   \
+    __typeof__(__m) __v = (__m);			       		   \
+    __atomic_flag_base* __g = __atomic_flag_for_address(__p);	  	   \
+    __atomic_flag_wait_explicit(__g, __x);				   \
+    __typeof__ _ATOMIC_MEMBER_ __r = *__p;				   \
+    *__p __o __v;					       		   \
+    atomic_flag_clear_explicit(__g, __x);		       		   \
+    __r; })
+
+#define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)				   \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;	   		   \
+    __typeof__(__e) __q = (__e);			       		   \
+    __typeof__(__m) __v = (__m);			       		   \
+    bool __r;						       		   \
+    __atomic_flag_base* __g = __atomic_flag_for_address(__p);	   	   \
+    __atomic_flag_wait_explicit(__g, __x);				   \
+    __typeof__ _ATOMIC_MEMBER_ __t__ = *__p;		       		   \
+    if (__t__ == *__q) { *__p = __v; __r = true; }			   \
+    else { *__q = __t__; __r = false; }		       			   \
+    atomic_flag_clear_explicit(__g, __x);		       		   \
+    __r; })
+
+  /// atomic_flag
+  struct atomic_flag : public __atomic_flag_base
+  {
+    atomic_flag() = default;
+    ~atomic_flag() = default;
+    atomic_flag(const atomic_flag&) = delete;
+    atomic_flag& operator=(const atomic_flag&) volatile = delete;
+
+    // Conversion to ATOMIC_FLAG_INIT.
+    atomic_flag(bool __i): __atomic_flag_base({ __i }) { }
+
+    bool
+    test_and_set(memory_order __m = memory_order_seq_cst);
+
+    void
+    clear(memory_order __m = memory_order_seq_cst);
+  };
+
+  /// 29.4.2, address types
+  struct atomic_address
+  {
+  private:
+    void* _M_i;
+
+  public:
+    atomic_address() = default;
+    ~atomic_address() = default;
+    atomic_address(const atomic_address&) = delete;
+    atomic_address& operator=(const atomic_address&) volatile = delete;
+
+    atomic_address(void* __v) { _M_i = __v; }
+
+    bool
+    is_lock_free() const
+    { return false; }
+
+    void
+    store(void* __v, memory_order __m = memory_order_seq_cst)
+    {
+      __glibcxx_assert(__m != memory_order_acquire);
+      __glibcxx_assert(__m != memory_order_acq_rel);
+      __glibcxx_assert(__m != memory_order_consume);
+      _ATOMIC_STORE_(this, __v, __m);
+    }
+
+    void*
+    load(memory_order __m = memory_order_seq_cst) const
+    {
+      __glibcxx_assert(__m != memory_order_release);
+      __glibcxx_assert(__m != memory_order_acq_rel);
+      return _ATOMIC_LOAD_(this, __m);
+    }
+
+    void*
+    exchange(void* __v, memory_order __m = memory_order_seq_cst)
+    { return _ATOMIC_MODIFY_(this, =, __v, __m); }
+
+    bool
+    compare_exchange_weak(void*& __v1, void* __v2, memory_order __m1,
+			  memory_order __m2)
+    {
+      __glibcxx_assert(__m2 != memory_order_release);
+      __glibcxx_assert(__m2 != memory_order_acq_rel);
+      __glibcxx_assert(__m2 <= __m1);
+      return _ATOMIC_CMPEXCHNG_(this, &__v1, __v2, __m1);
+    }
+
+    bool
+    compare_exchange_weak(void*& __v1, void* __v2,
+			  memory_order __m = memory_order_seq_cst)
+    {
+      return compare_exchange_weak(__v1, __v2, __m,
+				   __calculate_memory_order(__m));
+    }
+
+    bool
+    compare_exchange_strong(void*& __v1, void* __v2, memory_order __m1,
+			    memory_order __m2)
+    {
+      __glibcxx_assert(__m2 != memory_order_release);
+      __glibcxx_assert(__m2 != memory_order_acq_rel);
+      __glibcxx_assert(__m2 <= __m1);
+      return _ATOMIC_CMPEXCHNG_(this, &__v1, __v2, __m1);
+    }
+
+    bool
+    compare_exchange_strong(void*& __v1, void* __v2,
+			  memory_order __m = memory_order_seq_cst)
+    {
+      return compare_exchange_strong(__v1, __v2, __m,
+				     __calculate_memory_order(__m));
+    }
+
+    void*
+    fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst)
+    {
+      void** __p = &(_M_i);
+      __atomic_flag_base* __g = __atomic_flag_for_address(__p);
+      __atomic_flag_wait_explicit(__g, __m);
+      void* __r = *__p;
+      *__p = (void*)((char*)(*__p) + __d);
+      atomic_flag_clear_explicit(__g, __m);
+      return __r;
+    }
+
+    void*
+    fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst)
+    {
+      void** __p = &(_M_i);
+      __atomic_flag_base* __g = __atomic_flag_for_address(__p);
+      __atomic_flag_wait_explicit(__g, __m);
+      void* __r = *__p;
+      *__p = (void*)((char*)(*__p) - __d);
+      atomic_flag_clear_explicit(__g, __m);
+      return __r;
+    }
+
+    operator void*() const
+    { return load(); }
+
+    void*
+    operator=(void* __v)
+    {
+      store(__v);
+      return __v;
+    }
+
+    void*
+    operator+=(ptrdiff_t __d)
+    { return fetch_add(__d) + __d; }
+
+    void*
+    operator-=(ptrdiff_t __d)
+    { return fetch_sub(__d) - __d; }
+  };
+
+
+  // 29.3.1 atomic integral types
+  // For each of the integral types, define atomic_[integral type] struct
+  //
+  // atomic_bool     bool
+  // atomic_char     char
+  // atomic_schar    signed char
+  // atomic_uchar    unsigned char
+  // atomic_short    short
+  // atomic_ushort   unsigned short
+  // atomic_int      int
+  // atomic_uint     unsigned int
+  // atomic_long     long
+  // atomic_ulong    unsigned long
+  // atomic_llong    long long
+  // atomic_ullong   unsigned long long
+  // atomic_char16_t char16_t
+  // atomic_char32_t char32_t
+  // atomic_wchar_t  wchar_t
+
+  // Base type.
+  // NB: Assuming _ITp is an integral scalar type that is 1, 2, 4, or 8 bytes,
+  // since that is what GCC built-in functions for atomic memory access work on.
+  template<typename _ITp>
+    struct __atomic_base
+    {
+    private:
+      typedef _ITp 	__integral_type;
+
+      __integral_type 	_M_i;
+
+    public:
+      __atomic_base() = default;
+      ~__atomic_base() = default;
+      __atomic_base(const __atomic_base&) = delete;
+      __atomic_base& operator=(const __atomic_base&) volatile = delete;
+
+      // Requires __integral_type convertible to _M_base._M_i.
+      __atomic_base(__integral_type __i) { _M_i = __i; }
+
+      operator __integral_type() const
+      { return load(); }
+
+      __integral_type
+      operator=(__integral_type __i)
+      {
+	store(__i);
+	return __i;
+      }
+
+      __integral_type
+      operator++(int)
+      { return fetch_add(1); }
+
+      __integral_type
+      operator--(int)
+      { return fetch_sub(1); }
+
+      __integral_type
+      operator++()
+      { return fetch_add(1) + 1; }
+
+      __integral_type
+      operator--()
+      { return fetch_sub(1) - 1; }
+
+      __integral_type
+      operator+=(__integral_type __i)
+      { return fetch_add(__i) + __i; }
+
+      __integral_type
+      operator-=(__integral_type __i)
+      { return fetch_sub(__i) - __i; }
+
+      __integral_type
+      operator&=(__integral_type __i)
+      { return fetch_and(__i) & __i; }
+
+      __integral_type
+      operator|=(__integral_type __i)
+      { return fetch_or(__i) | __i; }
+
+      __integral_type
+      operator^=(__integral_type __i)
+      { return fetch_xor(__i) ^ __i; }
+
+      bool
+      is_lock_free() const
+      { return false; }
+
+      void
+      store(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      {
+	__glibcxx_assert(__m != memory_order_acquire);
+	__glibcxx_assert(__m != memory_order_acq_rel);
+	__glibcxx_assert(__m != memory_order_consume);
+	_ATOMIC_STORE_(this, __i, __m);
+      }
+
+      __integral_type
+      load(memory_order __m = memory_order_seq_cst) const
+      {
+	__glibcxx_assert(__m != memory_order_release);
+	__glibcxx_assert(__m != memory_order_acq_rel);
+	return _ATOMIC_LOAD_(this, __m);
+      }
+
+      __integral_type
+      exchange(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      { return _ATOMIC_MODIFY_(this, =, __i, __m); }
+
+      bool
+      compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
+			    memory_order __m1, memory_order __m2)
+      {
+	__glibcxx_assert(__m2 != memory_order_release);
+	__glibcxx_assert(__m2 != memory_order_acq_rel);
+	__glibcxx_assert(__m2 <= __m1);
+	return _ATOMIC_CMPEXCHNG_(this, &__i1, __i2, __m1);
+      }
+
+      bool
+      compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
+			    memory_order __m = memory_order_seq_cst)
+      {
+	return compare_exchange_weak(__i1, __i2, __m,
+				     __calculate_memory_order(__m));
+      }
+
+      bool
+      compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
+			      memory_order __m1, memory_order __m2)
+      {
+	__glibcxx_assert(__m2 != memory_order_release);
+	__glibcxx_assert(__m2 != memory_order_acq_rel);
+	__glibcxx_assert(__m2 <= __m1);
+	return _ATOMIC_CMPEXCHNG_(this, &__i1, __i2, __m1);
+      }
+
+      bool
+      compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
+			      memory_order __m = memory_order_seq_cst)
+      {
+	return compare_exchange_strong(__i1, __i2, __m,
+				       __calculate_memory_order(__m));
+      }
+
+      __integral_type
+      fetch_add(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      { return _ATOMIC_MODIFY_(this, +=, __i, __m); }
+
+      __integral_type
+      fetch_sub(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      { return _ATOMIC_MODIFY_(this, -=, __i, __m); }
+
+      __integral_type
+      fetch_and(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      { return _ATOMIC_MODIFY_(this, &=, __i, __m); }
+
+      __integral_type
+      fetch_or(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      { return _ATOMIC_MODIFY_(this, |=, __i, __m); }
+
+      __integral_type
+      fetch_xor(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      { return _ATOMIC_MODIFY_(this, ^=, __i, __m); }
+    };
+
+
+  /// atomic_bool
+  // NB: No operators or fetch-operations for this type.
+  struct atomic_bool
+  {
+  private:
+    __atomic_base<bool>	_M_base;
+
+  public:
+    atomic_bool() = default;
+    ~atomic_bool() = default;
+    atomic_bool(const atomic_bool&) = delete;
+    atomic_bool& operator=(const atomic_bool&) volatile = delete;
+
+    atomic_bool(bool __i) : _M_base(__i) { }
+
+    bool
+    operator=(bool __i)
+    { return _M_base.operator=(__i); }
+
+    operator bool() const
+    { return _M_base.load(); }
+
+    bool
+    is_lock_free() const
+    { return _M_base.is_lock_free(); }
+
+    void
+    store(bool __i, memory_order __m = memory_order_seq_cst)
+    { _M_base.store(__i, __m); }
+
+    bool
+    load(memory_order __m = memory_order_seq_cst) const
+    { return _M_base.load(__m); }
+
+    bool
+    exchange(bool __i, memory_order __m = memory_order_seq_cst)
+    { return _M_base.exchange(__i, __m); }
+
+    bool
+    compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
+			  memory_order __m2)
+    { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
+
+    bool
+    compare_exchange_weak(bool& __i1, bool __i2,
+			  memory_order __m = memory_order_seq_cst)
+    { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
+
+    bool
+    compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
+			    memory_order __m2)
+    { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
+
+
+    bool
+    compare_exchange_strong(bool& __i1, bool __i2,
+			    memory_order __m = memory_order_seq_cst)
+    { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
+  };
+
+#undef _ATOMIC_LOAD_
+#undef _ATOMIC_STORE_
+#undef _ATOMIC_MODIFY_
+#undef _ATOMIC_CMPEXCHNG_
+} // namespace __atomic0
+
+// _GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_2.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_2.h
new file mode 100644
index 0000000..fa6c0d5
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_2.h
@@ -0,0 +1,452 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomic_2.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_2_H
+#define _GLIBCXX_ATOMIC_2_H 1
+
+#pragma GCC system_header
+
+// _GLIBCXX_BEGIN_NAMESPACE(std)
+
+// 2 == __atomic2 == Always lock-free
+// Assumed:
+// _GLIBCXX_ATOMIC_BUILTINS_1
+// _GLIBCXX_ATOMIC_BUILTINS_2
+// _GLIBCXX_ATOMIC_BUILTINS_4
+// _GLIBCXX_ATOMIC_BUILTINS_8
+namespace __atomic2
+{
+  /// atomic_flag
+  struct atomic_flag : public __atomic_flag_base
+  {
+    atomic_flag() = default;
+    ~atomic_flag() = default;
+    atomic_flag(const atomic_flag&) = delete;
+    atomic_flag& operator=(const atomic_flag&) volatile = delete;
+
+    // Conversion to ATOMIC_FLAG_INIT.
+    atomic_flag(bool __i): __atomic_flag_base({ __i }) { }
+
+    bool
+    test_and_set(memory_order __m = memory_order_seq_cst)
+    {
+      // Redundant synchronize if built-in for lock is a full barrier.
+      if (__m != memory_order_acquire && __m != memory_order_acq_rel)
+	__sync_synchronize();
+      return __sync_lock_test_and_set(&_M_i, 1);
+    }
+
+    void
+    clear(memory_order __m = memory_order_seq_cst)
+    {
+      __glibcxx_assert(__m != memory_order_consume);
+      __glibcxx_assert(__m != memory_order_acquire);
+      __glibcxx_assert(__m != memory_order_acq_rel);
+
+      __sync_lock_release(&_M_i);
+      if (__m != memory_order_acquire && __m != memory_order_acq_rel)
+	__sync_synchronize();
+    }
+  };
+
+
+  /// 29.4.2, address types
+  struct atomic_address
+  {
+  private:
+    void* _M_i;
+
+  public:
+    atomic_address() = default;
+    ~atomic_address() = default;
+    atomic_address(const atomic_address&) = delete;
+    atomic_address& operator=(const atomic_address&) volatile = delete;
+
+    atomic_address(void* __v) { _M_i = __v; }
+
+    bool
+    is_lock_free() const
+    { return true; }
+
+    void
+    store(void* __v, memory_order __m = memory_order_seq_cst)
+    {
+      __glibcxx_assert(__m != memory_order_acquire);
+      __glibcxx_assert(__m != memory_order_acq_rel);
+      __glibcxx_assert(__m != memory_order_consume);
+
+      if (__m == memory_order_relaxed)
+	_M_i = __v;
+      else
+	{
+	  // write_mem_barrier();
+	  _M_i = __v;
+	  if (__m == memory_order_seq_cst)
+	    __sync_synchronize();
+	}
+    }
+
+    void*
+    load(memory_order __m = memory_order_seq_cst) const
+    {
+      __glibcxx_assert(__m != memory_order_release);
+      __glibcxx_assert(__m != memory_order_acq_rel);
+
+      __sync_synchronize();
+      void* __ret = _M_i;
+      __sync_synchronize();
+      return __ret;
+    }
+
+    void*
+    exchange(void* __v, memory_order __m = memory_order_seq_cst)
+    {
+      // XXX built-in assumes memory_order_acquire.
+      return __sync_lock_test_and_set(&_M_i, __v);
+    }
+
+    bool
+    compare_exchange_weak(void*& __v1, void* __v2, memory_order __m1,
+			  memory_order __m2)
+    { return compare_exchange_strong(__v1, __v2, __m1, __m2); }
+
+    bool
+    compare_exchange_weak(void*& __v1, void* __v2,
+			  memory_order __m = memory_order_seq_cst)
+    {
+      return compare_exchange_weak(__v1, __v2, __m,
+				   __calculate_memory_order(__m));
+    }
+
+    bool
+    compare_exchange_strong(void*& __v1, void* __v2, memory_order __m1,
+			    memory_order __m2)
+    {
+      __glibcxx_assert(__m2 != memory_order_release);
+      __glibcxx_assert(__m2 != memory_order_acq_rel);
+      __glibcxx_assert(__m2 <= __m1);
+
+      void* __v1o = __v1;
+      void* __v1n = __sync_val_compare_and_swap(&_M_i, __v1o, __v2);
+
+      // Assume extra stores (of same value) allowed in true case.
+      __v1 = __v1n;
+      return __v1o == __v1n;
+    }
+
+    bool
+    compare_exchange_strong(void*& __v1, void* __v2,
+			  memory_order __m = memory_order_seq_cst)
+    {
+      return compare_exchange_strong(__v1, __v2, __m,
+				     __calculate_memory_order(__m));
+    }
+
+    void*
+    fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst)
+    { return __sync_fetch_and_add(&_M_i, __d); }
+
+    void*
+    fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst)
+    { return __sync_fetch_and_sub(&_M_i, __d); }
+
+    operator void*() const
+    { return load(); }
+
+    void*
+    operator=(void* __v)
+    {
+      store(__v);
+      return __v;
+    }
+
+    void*
+    operator+=(ptrdiff_t __d)
+    { return __sync_add_and_fetch(&_M_i, __d); }
+
+    void*
+    operator-=(ptrdiff_t __d)
+    { return __sync_sub_and_fetch(&_M_i, __d); }
+  };
+
+  // 29.3.1 atomic integral types
+  // For each of the integral types, define atomic_[integral type] struct
+  //
+  // atomic_bool     bool
+  // atomic_char     char
+  // atomic_schar    signed char
+  // atomic_uchar    unsigned char
+  // atomic_short    short
+  // atomic_ushort   unsigned short
+  // atomic_int      int
+  // atomic_uint     unsigned int
+  // atomic_long     long
+  // atomic_ulong    unsigned long
+  // atomic_llong    long long
+  // atomic_ullong   unsigned long long
+  // atomic_char16_t char16_t
+  // atomic_char32_t char32_t
+  // atomic_wchar_t  wchar_t
+
+  // Base type.
+  // NB: Assuming _ITp is an integral scalar type that is 1, 2, 4, or 8 bytes,
+  // since that is what GCC built-in functions for atomic memory access work on.
+  template<typename _ITp>
+    struct __atomic_base
+    {
+    private:
+      typedef _ITp 	__integral_type;
+
+      __integral_type 	_M_i;
+
+    public:
+      __atomic_base() = default;
+      ~__atomic_base() = default;
+      __atomic_base(const __atomic_base&) = delete;
+      __atomic_base& operator=(const __atomic_base&) volatile = delete;
+
+      // Requires __integral_type convertible to _M_base._M_i.
+      __atomic_base(__integral_type __i) { _M_i = __i; }
+
+      operator __integral_type() const
+      { return load(); }
+
+      __integral_type
+      operator=(__integral_type __i)
+      {
+	store(__i);
+	return __i;
+      }
+
+      __integral_type
+      operator++(int)
+      { return fetch_add(1); }
+
+      __integral_type
+      operator--(int)
+      { return fetch_sub(1); }
+
+      __integral_type
+      operator++()
+      { return __sync_add_and_fetch(&_M_i, 1); }
+
+      __integral_type
+      operator--()
+      { return __sync_sub_and_fetch(&_M_i, 1); }
+
+      __integral_type
+      operator+=(__integral_type __i)
+      { return __sync_add_and_fetch(&_M_i, __i); }
+
+      __integral_type
+      operator-=(__integral_type __i)
+      { return __sync_sub_and_fetch(&_M_i, __i); }
+
+      __integral_type
+      operator&=(__integral_type __i)
+      { return __sync_and_and_fetch(&_M_i, __i); }
+
+      __integral_type
+      operator|=(__integral_type __i)
+      { return __sync_or_and_fetch(&_M_i, __i); }
+
+      __integral_type
+      operator^=(__integral_type __i)
+      { return __sync_xor_and_fetch(&_M_i, __i); }
+
+      bool
+      is_lock_free() const
+      { return true; }
+
+      void
+      store(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      {
+	__glibcxx_assert(__m != memory_order_acquire);
+	__glibcxx_assert(__m != memory_order_acq_rel);
+	__glibcxx_assert(__m != memory_order_consume);
+
+	if (__m == memory_order_relaxed)
+	  _M_i = __i;
+	else
+	  {
+	    // write_mem_barrier();
+	    _M_i = __i;
+	    if (__m == memory_order_seq_cst)
+	      __sync_synchronize();
+	  }
+      }
+
+      __integral_type
+      load(memory_order __m = memory_order_seq_cst) const 
+      {
+	__glibcxx_assert(__m != memory_order_release);
+	__glibcxx_assert(__m != memory_order_acq_rel);
+
+	__sync_synchronize();
+	__integral_type __ret = _M_i;
+	__sync_synchronize();
+	return __ret;
+      }
+
+      __integral_type
+      exchange(__integral_type __i, memory_order __m = memory_order_seq_cst)
+      {
+	// XXX built-in assumes memory_order_acquire.
+	return __sync_lock_test_and_set(&_M_i, __i);
+      }
+
+      bool
+      compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
+			    memory_order __m1, memory_order __m2)
+      { return compare_exchange_strong(__i1, __i2, __m1, __m2); }
+
+      bool
+      compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
+			    memory_order __m = memory_order_seq_cst)
+      {
+	return compare_exchange_weak(__i1, __i2, __m,
+				     __calculate_memory_order(__m));
+      }
+
+      bool
+      compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
+			      memory_order __m1, memory_order __m2) 
+      {
+	__glibcxx_assert(__m2 != memory_order_release);
+	__glibcxx_assert(__m2 != memory_order_acq_rel);
+	__glibcxx_assert(__m2 <= __m1);
+
+	__integral_type __i1o = __i1;
+	__integral_type __i1n = __sync_val_compare_and_swap(&_M_i, __i1o, __i2);
+
+	// Assume extra stores (of same value) allowed in true case.
+	__i1 = __i1n;
+	return __i1o == __i1n;
+      }
+
+      bool
+      compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
+			      memory_order __m = memory_order_seq_cst)
+      {
+	return compare_exchange_strong(__i1, __i2, __m,
+				       __calculate_memory_order(__m));
+      }
+
+      __integral_type
+      fetch_add(__integral_type __i,
+		memory_order __m = memory_order_seq_cst)
+      { return __sync_fetch_and_add(&_M_i, __i); }
+
+      __integral_type
+      fetch_sub(__integral_type __i,
+		memory_order __m = memory_order_seq_cst) 
+      { return __sync_fetch_and_sub(&_M_i, __i); }
+
+      __integral_type
+      fetch_and(__integral_type __i,
+		memory_order __m = memory_order_seq_cst) 
+      { return __sync_fetch_and_and(&_M_i, __i); }
+
+      __integral_type
+      fetch_or(__integral_type __i,
+	       memory_order __m = memory_order_seq_cst) 
+      { return __sync_fetch_and_or(&_M_i, __i); }
+
+      __integral_type
+      fetch_xor(__integral_type __i,
+		memory_order __m = memory_order_seq_cst)
+      { return __sync_fetch_and_xor(&_M_i, __i); }
+    };
+
+
+  /// atomic_bool
+  // NB: No operators or fetch-operations for this type.
+  struct atomic_bool
+  {
+  private:
+    __atomic_base<bool>	_M_base;
+
+  public:
+    atomic_bool() = default;
+    ~atomic_bool() = default;
+    atomic_bool(const atomic_bool&) = delete;
+    atomic_bool& operator=(const atomic_bool&) volatile = delete;
+
+    atomic_bool(bool __i) : _M_base(__i) { }
+
+    bool
+    operator=(bool __i)
+    { return _M_base.operator=(__i); }
+
+    operator bool() const 
+    { return _M_base.load(); }
+
+    bool
+    is_lock_free() const
+    { return _M_base.is_lock_free(); }
+
+    void
+    store(bool __i, memory_order __m = memory_order_seq_cst)
+    { _M_base.store(__i, __m); }
+
+    bool
+    load(memory_order __m = memory_order_seq_cst) const
+    { return _M_base.load(__m); }
+
+    bool
+    exchange(bool __i, memory_order __m = memory_order_seq_cst)
+    { return _M_base.exchange(__i, __m); }
+
+    bool
+    compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
+			  memory_order __m2)
+    { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
+
+    bool
+    compare_exchange_weak(bool& __i1, bool __i2,
+			  memory_order __m = memory_order_seq_cst)
+    { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
+
+    bool
+    compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
+			    memory_order __m2)
+    { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
+
+
+    bool
+    compare_exchange_strong(bool& __i1, bool __i2,
+			    memory_order __m = memory_order_seq_cst)
+    { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
+  };
+} // namespace __atomic2
+
+// _GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_base.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_base.h
new file mode 100644
index 0000000..454699f
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomic_base.h
@@ -0,0 +1,224 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomic_base.h
+ *  This is a Standard C++ Library header.
+ */
+
+#include <bits/c++config.h>
+#include <stddef.h>
+#include <stdbool.h> // XXX need to define bool w/o stdbool.h in tr1/cstdbool
+
+#ifndef _GLIBCXX_ATOMIC_BASE_H
+#define _GLIBCXX_ATOMIC_BASE_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+_GLIBCXX_BEGIN_EXTERN_C
+
+  /**
+   * @defgroup atomics Atomics
+   *
+   * Components for performing atomic operations.
+   * @{
+   */
+
+  /// Enumeration for memory_order
+  typedef enum memory_order
+    {
+      memory_order_relaxed,
+      memory_order_consume,
+      memory_order_acquire,
+      memory_order_release,
+      memory_order_acq_rel,
+      memory_order_seq_cst
+    } memory_order;
+
+  // Base for atomic_flag.
+  typedef struct __atomic_flag_base
+  {
+    bool _M_i;
+  } __atomic_flag_base;
+
+#define ATOMIC_FLAG_INIT { false }
+
+  /// 29.2 Lock-free Property
+#if defined(_GLIBCXX_ATOMIC_BUILTINS_1) && defined(_GLIBCXX_ATOMIC_BUILTINS_2) \
+  && defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_ATOMIC_BUILTINS_8)
+# define _GLIBCXX_ATOMIC_PROPERTY 2
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic2
+#elif defined(_GLIBCXX_ATOMIC_BUILTINS_1)
+# define _GLIBCXX_ATOMIC_PROPERTY 1
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic1
+#else
+# define _GLIBCXX_ATOMIC_PROPERTY 0
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic0
+#endif
+
+#define ATOMIC_INTEGRAL_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
+#define ATOMIC_ADDRESS_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
+
+  // Switch atomic integral base types based on C or C++.  In
+  // addition, for "C" only provide type-generic macros for atomic
+  // operations. (As C++ accomplishes the same thing with sets of
+  // overloaded functions.
+#ifdef __cplusplus
+  inline namespace _GLIBCXX_ATOMIC_NAMESPACE { }
+# include <bits/atomicfwd_cxx.h>
+#else
+# include <bits/atomicfwd_c.h>
+#endif
+
+  // Typedefs for other atomic integral types.
+  typedef atomic_schar 		atomic_int_least8_t;
+  typedef atomic_uchar 		atomic_uint_least8_t;
+  typedef atomic_short 		atomic_int_least16_t;
+  typedef atomic_ushort 	atomic_uint_least16_t;
+  typedef atomic_int 		atomic_int_least32_t;
+  typedef atomic_uint 		atomic_uint_least32_t;
+  typedef atomic_llong 		atomic_int_least64_t;
+  typedef atomic_ullong 	atomic_uint_least64_t;
+
+  typedef atomic_schar 		atomic_int_fast8_t;
+  typedef atomic_uchar 		atomic_uint_fast8_t;
+  typedef atomic_short 		atomic_int_fast16_t;
+  typedef atomic_ushort 	atomic_uint_fast16_t;
+  typedef atomic_int 		atomic_int_fast32_t;
+  typedef atomic_uint 		atomic_uint_fast32_t;
+  typedef atomic_llong 		atomic_int_fast64_t;
+  typedef atomic_ullong 	atomic_uint_fast64_t;
+
+  typedef atomic_long 		atomic_intptr_t;
+  typedef atomic_ulong 		atomic_uintptr_t;
+
+  typedef atomic_long 		atomic_ssize_t;
+  typedef atomic_ulong 		atomic_size_t;
+
+  typedef atomic_llong 		atomic_intmax_t;
+  typedef atomic_ullong 	atomic_uintmax_t;
+
+  typedef atomic_long 		atomic_ptrdiff_t;
+
+  // Accessor functions for base atomic_flag type.
+  bool
+  atomic_flag_test_and_set_explicit(__atomic_flag_base*, memory_order)
+  _GLIBCXX_NOTHROW;
+
+  inline bool
+  atomic_flag_test_and_set(__atomic_flag_base* __a)
+  { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); }
+
+  void
+  atomic_flag_clear_explicit(__atomic_flag_base*, memory_order)
+  _GLIBCXX_NOTHROW;
+
+  inline void
+  atomic_flag_clear(__atomic_flag_base* __a)
+  { atomic_flag_clear_explicit(__a, memory_order_seq_cst); }
+
+  void
+  __atomic_flag_wait_explicit(__atomic_flag_base*, memory_order)
+  _GLIBCXX_NOTHROW;
+
+  _GLIBCXX_CONST __atomic_flag_base*
+  __atomic_flag_for_address(const void* __z) _GLIBCXX_NOTHROW;
+
+  // Implementation specific defines.
+#define _ATOMIC_LOAD_(__a, __x)						\
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;			\
+    atomic_flag* __g = __atomic_flag_for_address(__p); 			\
+    __atomic_flag_wait_explicit(__g, __x);				\
+    __typeof__ _ATOMIC_MEMBER_ __r = *__p;				\
+    atomic_flag_clear_explicit(__g, __x);		       		\
+    __r; })
+
+#define _ATOMIC_STORE_(__a, __m, __x)					\
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;			\
+    __typeof__(__m) __v = (__m);			       		\
+    atomic_flag* __g = __atomic_flag_for_address(__p); 			\
+    __atomic_flag_wait_explicit(__g, __x);				\
+    *__p = __v;								\
+    atomic_flag_clear_explicit(__g, __x);		       		\
+    __v; })
+
+#define _ATOMIC_MODIFY_(__a, __o, __m, __x)				\
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;			\
+    __typeof__(__m) __v = (__m);			       		\
+    atomic_flag* __g = __atomic_flag_for_address(__p); 			\
+    __atomic_flag_wait_explicit(__g, __x);				\
+    __typeof__ _ATOMIC_MEMBER_ __r = *__p;				\
+    *__p __o __v;					       		\
+    atomic_flag_clear_explicit(__g, __x);		       		\
+    __r; })
+
+#define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)				\
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;			\
+    __typeof__(__e) __q = (__e);			       		\
+    __typeof__(__m) __v = (__m);			       		\
+    bool __r;						       		\
+    atomic_flag* __g = __atomic_flag_for_address(__p); 			\
+    __atomic_flag_wait_explicit(__g, __x);				\
+    __typeof__ _ATOMIC_MEMBER_ __t__ = *__p;		       		\
+    if (__t__ == *__q) { *__p = __v; __r = true; }			\
+    else { *__q = __t__; __r = false; }		       			\
+    atomic_flag_clear_explicit(__g, __x);		       		\
+    __r; })
+
+  // @} group atomics
+
+_GLIBCXX_END_EXTERN_C
+_GLIBCXX_END_NAMESPACE
+
+// Inject into global namespace.
+#ifdef __cplusplus
+
+#include <atomic>
+
+using std::memory_order;
+using std::memory_order_relaxed;
+using std::memory_order_consume;
+using std::memory_order_acquire;
+using std::memory_order_release;
+using std::memory_order_acq_rel;
+using std::memory_order_seq_cst;
+using std::atomic_flag;
+using std::atomic_bool;
+using std::atomic_char;
+using std::atomic_schar;
+using std::atomic_uchar;
+using std::atomic_short;
+using std::atomic_ushort;
+using std::atomic_int;
+using std::atomic_uint;
+using std::atomic_long;
+using std::atomic_ulong;
+using std::atomic_llong;
+using std::atomic_ullong;
+using std::atomic_wchar_t;
+using std::atomic_char16_t;
+using std::atomic_char32_t;
+using std::atomic_address;
+using std::atomic;
+#endif
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomicfwd_c.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomicfwd_c.h
new file mode 100644
index 0000000..0841843
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomicfwd_c.h
@@ -0,0 +1,174 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomicfwd_c.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// "C" only bits.
+
+#define _ATOMIC_MEMBER_ ((__a)->_M_i)
+
+  // POD base classes for atomic intgral types.
+  struct __atomic_bool_base
+  {
+    bool _M_i;
+  };
+
+  struct __atomic_char_base
+  {
+    char _M_i;
+  };
+
+  struct __atomic_schar_base
+  {
+    signed char _M_i;
+  };
+
+  struct __atomic_uchar_base
+  {
+    unsigned char _M_i;
+  };
+
+  struct __atomic_short_base
+  {
+    short _M_i;
+  };
+
+  struct __atomic_ushort_base
+  {
+    unsigned short _M_i;
+  };
+
+  struct __atomic_int_base
+  {
+    int _M_i;
+  };
+
+  struct __atomic_uint_base
+  {
+    unsigned int _M_i;
+  };
+
+  struct __atomic_long_base
+  {
+    long _M_i;
+  };
+
+  struct __atomic_ulong_base
+  {
+    unsigned long _M_i;
+  };
+
+  struct __atomic_llong_base
+  {
+    long long _M_i;
+  };
+
+  struct __atomic_ullong_base
+  {
+    unsigned long long	_M_i;
+  };
+
+  struct __atomic_wchar_t_base
+  {
+    wchar_t _M_i;
+  };
+
+  typedef struct __atomic_flag_base 		atomic_flag;
+  typedef struct __atomic_address_base 		atomic_address;
+  typedef struct __atomic_bool_base		atomic_bool;
+  typedef struct __atomic_char_base 		atomic_char;
+  typedef struct __atomic_schar_base 		atomic_schar;
+  typedef struct __atomic_uchar_base 		atomic_uchar;
+  typedef struct __atomic_short_base 		atomic_short;
+  typedef struct __atomic_ushort_base 		atomic_ushort;
+  typedef struct __atomic_int_base 		atomic_int;
+  typedef struct __atomic_uint_base 		atomic_uint;
+  typedef struct __atomic_long_base 		atomic_long;
+  typedef struct __atomic_ulong_base 		atomic_ulong;
+  typedef struct __atomic_llong_base 		atomic_llong;
+  typedef struct __atomic_ullong_base 		atomic_ullong;
+  typedef struct __atomic_wchar_t_base 		atomic_wchar_t;
+  typedef struct __atomic_short_base 		atomic_char16_t;
+  typedef struct __atomic_int_base 		atomic_char32_t;
+
+#define atomic_is_lock_free(__a)					\
+  false
+
+#define atomic_load_explicit(__a, __x)					\
+  _ATOMIC_LOAD_(__a, __x)
+
+#define atomic_load(__a)						\
+  atomic_load_explicit(__a, memory_order_seq_cst)
+
+#define atomic_store_explicit(__a, __m, __x)				\
+  _ATOMIC_STORE_(__a, __m, __x)
+
+#define atomic_store(__a, __m)						\
+  atomic_store_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_exchange_explicit(__a, __m, __x)				\
+  _ATOMIC_MODIFY_(__a, =, __m, __x)
+
+#define atomic_exchange(__a, __m)					\
+  atomic_exchange_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_compare_exchange_explicit(__a, __e, __m, __x, __y)	\
+  _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)
+
+#define atomic_compare_exchange(__a, __e, __m)				\
+  _ATOMIC_CMPEXCHNG_(__a, __e, __m, memory_order_seq_cst)
+
+#define atomic_fetch_add_explicit(__a, __m, __x)			\
+  _ATOMIC_MODIFY_(__a, +=, __m, __x)
+
+#define atomic_fetch_add(__a, __m)					\
+  atomic_fetch_add_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_fetch_sub_explicit(__a, __m, __x)			\
+  _ATOMIC_MODIFY_(__a, -=, __m, __x)
+
+#define atomic_fetch_sub(__a, __m)					\
+  atomic_fetch_sub_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_fetch_and_explicit(__a, __m, __x)			\
+  _ATOMIC_MODIFY_(__a, &=, __m, __x)
+
+#define atomic_fetch_and(__a, __m)					\
+  atomic_fetch_and_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_fetch_or_explicit(__a, __m, __x) 			\
+  _ATOMIC_MODIFY_(__a, |=, __m, __x)
+
+#define atomic_fetch_or(__a, __m)					\
+  atomic_fetch_or_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_fetch_xor_explicit(__a, __m, __x)			\
+  _ATOMIC_MODIFY_(__a, ^=, __m, __x)
+
+#define atomic_fetch_xor(__a, __m)					\
+  atomic_fetch_xor_explicit(__a, __m, memory_order_seq_cst)
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomicfwd_cxx.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomicfwd_cxx.h
new file mode 100644
index 0000000..8ef25e6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/atomicfwd_cxx.h
@@ -0,0 +1,117 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomicfwd_cxx.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// "C++" only bits.
+
+#define _ATOMIC_MEMBER_ _M_i
+
+_GLIBCXX_END_EXTERN_C
+
+  namespace __atomic0
+  {
+    template<typename _IntTp>
+      struct __atomic_base;
+
+    struct atomic_flag;
+    struct atomic_address;
+    struct atomic_bool;
+  } 
+
+  namespace __atomic2
+  {
+    template<typename _IntTp>
+      struct __atomic_base;
+
+    struct atomic_flag;
+    struct atomic_address;
+    struct atomic_bool;
+  } 
+
+  namespace __atomic1
+  {
+    using __atomic2::atomic_flag;
+    using __atomic2::atomic_bool;
+    using __atomic0::atomic_address;
+    using __atomic0::__atomic_base;
+  } 
+
+  /**
+   * @addtogroup atomics
+   * @{
+   */
+
+  /// atomic_char
+  typedef __atomic_base<char>  	       		atomic_char;
+
+  /// atomic_schar
+  typedef __atomic_base<signed char>         	atomic_schar;
+
+  /// atomic_uchar
+  typedef __atomic_base<unsigned char>  	atomic_uchar;
+
+  /// atomic_short
+  typedef __atomic_base<short>  		atomic_short;
+
+  /// atomic_ushort
+  typedef __atomic_base<unsigned short>  	atomic_ushort;
+
+  /// atomic_int
+  typedef __atomic_base<int>  	       		atomic_int;
+
+  /// atomic_uint
+  typedef __atomic_base<unsigned int>        	atomic_uint;
+
+  /// atomic_long
+  typedef __atomic_base<long>  	       		atomic_long;
+
+  /// atomic_ulong
+  typedef __atomic_base<unsigned long>  	atomic_ulong;
+
+  /// atomic_llong
+  typedef __atomic_base<long long>  		atomic_llong;
+
+  /// atomic_ullong
+  typedef __atomic_base<unsigned long long> 	atomic_ullong;
+
+  /// atomic_wchar_t
+  typedef __atomic_base<wchar_t>  		atomic_wchar_t;
+
+  /// atomic_char16_t
+  typedef __atomic_base<char16_t>  		atomic_char16_t;
+
+  /// atomic_char32_t
+  typedef __atomic_base<char32_t>  		atomic_char32_t;
+
+  template<typename _Tp>
+    struct atomic;
+
+  // @} group atomics
+
+_GLIBCXX_BEGIN_EXTERN_C
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_ios.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_ios.h
new file mode 100644
index 0000000..ba06316
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_ios.h
@@ -0,0 +1,474 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file basic_ios.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _BASIC_IOS_H
+#define _BASIC_IOS_H 1
+
+#pragma GCC system_header
+
+#include <bits/localefwd.h>
+#include <bits/locale_classes.h>
+#include <bits/locale_facets.h>
+#include <bits/streambuf_iterator.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _Facet>
+    inline const _Facet&
+    __check_facet(const _Facet* __f)
+    {
+      if (!__f)
+	__throw_bad_cast();
+      return *__f;
+    }
+
+  // 27.4.5  Template class basic_ios
+  /**
+   *  @brief  Virtual base class for all stream classes.
+   *  @ingroup io
+   *
+   *  Most of the member functions called dispatched on stream objects
+   *  (e.g., @c std::cout.foo(bar);) are consolidated in this class.
+  */
+  template<typename _CharT, typename _Traits>
+    class basic_ios : public ios_base
+    {
+    public:
+      //@{
+      /**
+       *  These are standard types.  They permit a standardized way of
+       *  referring to names of (or names dependant on) the template
+       *  parameters, which are specific to the implementation.
+      */
+      typedef _CharT                                 char_type;
+      typedef typename _Traits::int_type             int_type;
+      typedef typename _Traits::pos_type             pos_type;
+      typedef typename _Traits::off_type             off_type;
+      typedef _Traits                                traits_type;
+      //@}
+
+      //@{
+      /**
+       *  These are non-standard types.
+      */
+      typedef ctype<_CharT>                          __ctype_type;
+      typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
+						     __num_put_type;
+      typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
+						     __num_get_type;
+      //@}
+
+      // Data members:
+    protected:
+      basic_ostream<_CharT, _Traits>*                _M_tie;
+      mutable char_type                              _M_fill;
+      mutable bool                                   _M_fill_init;
+      basic_streambuf<_CharT, _Traits>*              _M_streambuf;
+
+      // Cached use_facet<ctype>, which is based on the current locale info.
+      const __ctype_type*                            _M_ctype;
+      // For ostream.
+      const __num_put_type*                          _M_num_put;
+      // For istream.
+      const __num_get_type*                          _M_num_get;
+
+    public:
+      //@{
+      /**
+       *  @brief  The quick-and-easy status check.
+       *
+       *  This allows you to write constructs such as
+       *  <code>if (!a_stream) ...</code> and <code>while (a_stream) ...</code>
+      */
+      operator void*() const
+      { return this->fail() ? 0 : const_cast<basic_ios*>(this); }
+
+      bool
+      operator!() const
+      { return this->fail(); }
+      //@}
+
+      /**
+       *  @brief  Returns the error state of the stream buffer.
+       *  @return  A bit pattern (well, isn't everything?)
+       *
+       *  See std::ios_base::iostate for the possible bit values.  Most
+       *  users will call one of the interpreting wrappers, e.g., good().
+      */
+      iostate
+      rdstate() const
+      { return _M_streambuf_state; }
+
+      /**
+       *  @brief  [Re]sets the error state.
+       *  @param  state  The new state flag(s) to set.
+       *
+       *  See std::ios_base::iostate for the possible bit values.  Most
+       *  users will not need to pass an argument.
+      */
+      void
+      clear(iostate __state = goodbit);
+
+      /**
+       *  @brief  Sets additional flags in the error state.
+       *  @param  state  The additional state flag(s) to set.
+       *
+       *  See std::ios_base::iostate for the possible bit values.
+      */
+      void
+      setstate(iostate __state)
+      { this->clear(this->rdstate() | __state); }
+
+      // Flip the internal state on for the proper state bits, then re
+      // throws the propagated exception if bit also set in
+      // exceptions().
+      void
+      _M_setstate(iostate __state)
+      {
+	// 27.6.1.2.1 Common requirements.
+	// Turn this on without causing an ios::failure to be thrown.
+	_M_streambuf_state |= __state;
+	if (this->exceptions() & __state)
+	  __throw_exception_again;
+      }
+
+      /**
+       *  @brief  Fast error checking.
+       *  @return  True if no error flags are set.
+       *
+       *  A wrapper around rdstate.
+      */
+      bool
+      good() const
+      { return this->rdstate() == 0; }
+
+      /**
+       *  @brief  Fast error checking.
+       *  @return  True if the eofbit is set.
+       *
+       *  Note that other iostate flags may also be set.
+      */
+      bool
+      eof() const
+      { return (this->rdstate() & eofbit) != 0; }
+
+      /**
+       *  @brief  Fast error checking.
+       *  @return  True if either the badbit or the failbit is set.
+       *
+       *  Checking the badbit in fail() is historical practice.
+       *  Note that other iostate flags may also be set.
+      */
+      bool
+      fail() const
+      { return (this->rdstate() & (badbit | failbit)) != 0; }
+
+      /**
+       *  @brief  Fast error checking.
+       *  @return  True if the badbit is set.
+       *
+       *  Note that other iostate flags may also be set.
+      */
+      bool
+      bad() const
+      { return (this->rdstate() & badbit) != 0; }
+
+      /**
+       *  @brief  Throwing exceptions on errors.
+       *  @return  The current exceptions mask.
+       *
+       *  This changes nothing in the stream.  See the one-argument version
+       *  of exceptions(iostate) for the meaning of the return value.
+      */
+      iostate
+      exceptions() const
+      { return _M_exception; }
+
+      /**
+       *  @brief  Throwing exceptions on errors.
+       *  @param  except  The new exceptions mask.
+       *
+       *  By default, error flags are set silently.  You can set an
+       *  exceptions mask for each stream; if a bit in the mask becomes set
+       *  in the error flags, then an exception of type
+       *  std::ios_base::failure is thrown.
+       *
+       *  If the error flag is already set when the exceptions mask is
+       *  added, the exception is immediately thrown.  Try running the
+       *  following under GCC 3.1 or later:
+       *  @code
+       *  #include <iostream>
+       *  #include <fstream>
+       *  #include <exception>
+       *
+       *  int main()
+       *  {
+       *      std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
+       *
+       *      std::ifstream f ("/etc/motd");
+       *
+       *      std::cerr << "Setting badbit\n";
+       *      f.setstate (std::ios_base::badbit);
+       *
+       *      std::cerr << "Setting exception mask\n";
+       *      f.exceptions (std::ios_base::badbit);
+       *  }
+       *  @endcode
+      */
+      void
+      exceptions(iostate __except)
+      {
+        _M_exception = __except;
+        this->clear(_M_streambuf_state);
+      }
+
+      // Constructor/destructor:
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  The parameter is passed by derived streams.
+      */
+      explicit
+      basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
+      : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
+	_M_ctype(0), _M_num_put(0), _M_num_get(0)
+      { this->init(__sb); }
+
+      /**
+       *  @brief  Empty.
+       *
+       *  The destructor does nothing.  More specifically, it does not
+       *  destroy the streambuf held by rdbuf().
+      */
+      virtual
+      ~basic_ios() { }
+
+      // Members:
+      /**
+       *  @brief  Fetches the current @e tied stream.
+       *  @return  A pointer to the tied stream, or NULL if the stream is
+       *           not tied.
+       *
+       *  A stream may be @e tied (or synchronized) to a second output
+       *  stream.  When this stream performs any I/O, the tied stream is
+       *  first flushed.  For example, @c std::cin is tied to @c std::cout.
+      */
+      basic_ostream<_CharT, _Traits>*
+      tie() const
+      { return _M_tie; }
+
+      /**
+       *  @brief  Ties this stream to an output stream.
+       *  @param  tiestr  The output stream.
+       *  @return  The previously tied output stream, or NULL if the stream
+       *           was not tied.
+       *
+       *  This sets up a new tie; see tie() for more.
+      */
+      basic_ostream<_CharT, _Traits>*
+      tie(basic_ostream<_CharT, _Traits>* __tiestr)
+      {
+        basic_ostream<_CharT, _Traits>* __old = _M_tie;
+        _M_tie = __tiestr;
+        return __old;
+      }
+
+      /**
+       *  @brief  Accessing the underlying buffer.
+       *  @return  The current stream buffer.
+       *
+       *  This does not change the state of the stream.
+      */
+      basic_streambuf<_CharT, _Traits>*
+      rdbuf() const
+      { return _M_streambuf; }
+
+      /**
+       *  @brief  Changing the underlying buffer.
+       *  @param  sb  The new stream buffer.
+       *  @return  The previous stream buffer.
+       *
+       *  Associates a new buffer with the current stream, and clears the
+       *  error state.
+       *
+       *  Due to historical accidents which the LWG refuses to correct, the
+       *  I/O library suffers from a design error:  this function is hidden
+       *  in derived classes by overrides of the zero-argument @c rdbuf(),
+       *  which is non-virtual for hysterical raisins.  As a result, you
+       *  must use explicit qualifications to access this function via any
+       *  derived class.  For example:
+       *
+       *  @code
+       *  std::fstream     foo;         // or some other derived type
+       *  std::streambuf*  p = .....;
+       *
+       *  foo.ios::rdbuf(p);            // ios == basic_ios<char>
+       *  @endcode
+      */
+      basic_streambuf<_CharT, _Traits>*
+      rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
+
+      /**
+       *  @brief  Copies fields of __rhs into this.
+       *  @param  __rhs  The source values for the copies.
+       *  @return  Reference to this object.
+       *
+       *  All fields of __rhs are copied into this object except that rdbuf()
+       *  and rdstate() remain unchanged.  All values in the pword and iword
+       *  arrays are copied.  Before copying, each callback is invoked with
+       *  erase_event.  After copying, each (new) callback is invoked with
+       *  copyfmt_event.  The final step is to copy exceptions().
+      */
+      basic_ios&
+      copyfmt(const basic_ios& __rhs);
+
+      /**
+       *  @brief  Retrieves the @a empty character.
+       *  @return  The current fill character.
+       *
+       *  It defaults to a space (' ') in the current locale.
+      */
+      char_type
+      fill() const
+      {
+	if (!_M_fill_init)
+	  {
+	    _M_fill = this->widen(' ');
+	    _M_fill_init = true;
+	  }
+	return _M_fill;
+      }
+
+      /**
+       *  @brief  Sets a new @a empty character.
+       *  @param  ch  The new character.
+       *  @return  The previous fill character.
+       *
+       *  The fill character is used to fill out space when P+ characters
+       *  have been requested (e.g., via setw), Q characters are actually
+       *  used, and Q<P.  It defaults to a space (' ') in the current locale.
+      */
+      char_type
+      fill(char_type __ch)
+      {
+	char_type __old = this->fill();
+	_M_fill = __ch;
+	return __old;
+      }
+
+      // Locales:
+      /**
+       *  @brief  Moves to a new locale.
+       *  @param  loc  The new locale.
+       *  @return  The previous locale.
+       *
+       *  Calls @c ios_base::imbue(loc), and if a stream buffer is associated
+       *  with this stream, calls that buffer's @c pubimbue(loc).
+       *
+       *  Additional l10n notes are at
+       *  http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html
+      */
+      locale
+      imbue(const locale& __loc);
+
+      /**
+       *  @brief  Squeezes characters.
+       *  @param  c  The character to narrow.
+       *  @param  dfault  The character to narrow.
+       *  @return  The narrowed character.
+       *
+       *  Maps a character of @c char_type to a character of @c char,
+       *  if possible.
+       *
+       *  Returns the result of
+       *  @code
+       *    std::use_facet<ctype<char_type> >(getloc()).narrow(c,dfault)
+       *  @endcode
+       *
+       *  Additional l10n notes are at
+       *  http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html
+      */
+      char
+      narrow(char_type __c, char __dfault) const
+      { return __check_facet(_M_ctype).narrow(__c, __dfault); }
+
+      /**
+       *  @brief  Widens characters.
+       *  @param  c  The character to widen.
+       *  @return  The widened character.
+       *
+       *  Maps a character of @c char to a character of @c char_type.
+       *
+       *  Returns the result of
+       *  @code
+       *    std::use_facet<ctype<char_type> >(getloc()).widen(c)
+       *  @endcode
+       *
+       *  Additional l10n notes are at
+       *  http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html
+      */
+      char_type
+      widen(char __c) const
+      { return __check_facet(_M_ctype).widen(__c); }
+
+    protected:
+      // 27.4.5.1  basic_ios constructors
+      /**
+       *  @brief  Empty.
+       *
+       *  The default constructor does nothing and is not normally
+       *  accessible to users.
+      */
+      basic_ios()
+      : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), 
+	_M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
+      { }
+
+      /**
+       *  @brief  All setup is performed here.
+       *
+       *  This is called from the public constructor.  It is not virtual and
+       *  cannot be redefined.
+      */
+      void
+      init(basic_streambuf<_CharT, _Traits>* __sb);
+
+      void
+      _M_cache_locale(const locale& __loc);
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+#include <bits/basic_ios.tcc>
+#endif
+
+#endif /* _BASIC_IOS_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_ios.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_ios.tcc
new file mode 100644
index 0000000..a0dc67e
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_ios.tcc
@@ -0,0 +1,187 @@
+// basic_ios member functions -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+// 2009  Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file basic_ios.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _BASIC_IOS_TCC
+#define _BASIC_IOS_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT, typename _Traits>
+    void
+    basic_ios<_CharT, _Traits>::clear(iostate __state)
+    {
+      if (this->rdbuf())
+	_M_streambuf_state = __state;
+      else
+	  _M_streambuf_state = __state | badbit;
+      if (this->exceptions() & this->rdstate())
+	__throw_ios_failure(__N("basic_ios::clear"));
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_streambuf<_CharT, _Traits>*
+    basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
+    {
+      basic_streambuf<_CharT, _Traits>* __old = _M_streambuf;
+      _M_streambuf = __sb;
+      this->clear();
+      return __old;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ios<_CharT, _Traits>&
+    basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 292. effects of a.copyfmt (a)
+      if (this != &__rhs)
+	{
+	  // Per 27.1.1, do not call imbue, yet must trash all caches
+	  // associated with imbue()
+
+	  // Alloc any new word array first, so if it fails we have "rollback".
+	  _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
+	                     _M_local_word : new _Words[__rhs._M_word_size];
+
+	  // Bump refs before doing callbacks, for safety.
+	  _Callback_list* __cb = __rhs._M_callbacks;
+	  if (__cb)
+	    __cb->_M_add_reference();
+	  _M_call_callbacks(erase_event);
+	  if (_M_word != _M_local_word)
+	    {
+	      delete [] _M_word;
+	      _M_word = 0;
+	    }
+	  _M_dispose_callbacks();
+
+	  // NB: Don't want any added during above.
+	  _M_callbacks = __cb;
+	  for (int __i = 0; __i < __rhs._M_word_size; ++__i)
+	    __words[__i] = __rhs._M_word[__i];
+	  _M_word = __words;
+	  _M_word_size = __rhs._M_word_size;
+
+	  this->flags(__rhs.flags());
+	  this->width(__rhs.width());
+	  this->precision(__rhs.precision());
+	  this->tie(__rhs.tie());
+	  this->fill(__rhs.fill());
+	  _M_ios_locale = __rhs.getloc();
+	  _M_cache_locale(_M_ios_locale);
+
+	  _M_call_callbacks(copyfmt_event);
+
+	  // The next is required to be the last assignment.
+	  this->exceptions(__rhs.exceptions());
+	}
+      return *this;
+    }
+
+  // Locales:
+  template<typename _CharT, typename _Traits>
+    locale
+    basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
+    {
+      locale __old(this->getloc());
+      ios_base::imbue(__loc);
+      _M_cache_locale(__loc);
+      if (this->rdbuf() != 0)
+	this->rdbuf()->pubimbue(__loc);
+      return __old;
+    }
+
+  template<typename _CharT, typename _Traits>
+    void
+    basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb)
+    {
+      // NB: This may be called more than once on the same object.
+      ios_base::_M_init();
+
+      // Cache locale data and specific facets used by iostreams.
+      _M_cache_locale(_M_ios_locale);
+
+      // NB: The 27.4.4.1 Postconditions Table specifies requirements
+      // after basic_ios::init() has been called. As part of this,
+      // fill() must return widen(' ') any time after init() has been
+      // called, which needs an imbued ctype facet of char_type to
+      // return without throwing an exception. Unfortunately,
+      // ctype<char_type> is not necessarily a required facet, so
+      // streams with char_type != [char, wchar_t] will not have it by
+      // default. Because of this, the correct value for _M_fill is
+      // constructed on the first call of fill(). That way,
+      // unformatted input and output with non-required basic_ios
+      // instantiations is possible even without imbuing the expected
+      // ctype<char_type> facet.
+      _M_fill = _CharT();
+      _M_fill_init = false;
+
+      _M_tie = 0;
+      _M_exception = goodbit;
+      _M_streambuf = __sb;
+      _M_streambuf_state = __sb ? goodbit : badbit;
+    }
+
+  template<typename _CharT, typename _Traits>
+    void
+    basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc)
+    {
+      if (__builtin_expect(has_facet<__ctype_type>(__loc), true))
+	_M_ctype = &use_facet<__ctype_type>(__loc);
+      else
+	_M_ctype = 0;
+
+      if (__builtin_expect(has_facet<__num_put_type>(__loc), true))
+	_M_num_put = &use_facet<__num_put_type>(__loc);
+      else
+	_M_num_put = 0;
+
+      if (__builtin_expect(has_facet<__num_get_type>(__loc), true))
+	_M_num_get = &use_facet<__num_get_type>(__loc);
+      else
+	_M_num_get = 0;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB:  This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class basic_ios<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class basic_ios<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_string.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_string.h
new file mode 100644
index 0000000..d6d9989
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_string.h
@@ -0,0 +1,2936 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file basic_string.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
+#ifndef _BASIC_STRING_H
+#define _BASIC_STRING_H 1
+
+#pragma GCC system_header
+
+#include <ext/atomicity.h>
+#include <debug/debug.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  @class basic_string basic_string.h <string>
+   *  @brief  Managing sequences of characters and character-like objects.
+   *
+   *  @ingroup strings
+   *  @ingroup sequences
+   *
+   *  Meets the requirements of a <a href="tables.html#65">container</a>, a
+   *  <a href="tables.html#66">reversible container</a>, and a
+   *  <a href="tables.html#67">sequence</a>.  Of the
+   *  <a href="tables.html#68">optional sequence requirements</a>, only
+   *  @c push_back, @c at, and @c %array access are supported.
+   *
+   *  @doctodo
+   *
+   *
+   *  Documentation?  What's that?
+   *  Nathan Myers <ncm@cantrip.org>.
+   *
+   *  A string looks like this:
+   *
+   *  @code
+   *                                        [_Rep]
+   *                                        _M_length
+   *   [basic_string<char_type>]            _M_capacity
+   *   _M_dataplus                          _M_refcount
+   *   _M_p ---------------->               unnamed array of char_type
+   *  @endcode
+   *
+   *  Where the _M_p points to the first character in the string, and
+   *  you cast it to a pointer-to-_Rep and subtract 1 to get a
+   *  pointer to the header.
+   *
+   *  This approach has the enormous advantage that a string object
+   *  requires only one allocation.  All the ugliness is confined
+   *  within a single %pair of inline functions, which each compile to
+   *  a single @a add instruction: _Rep::_M_data(), and
+   *  string::_M_rep(); and the allocation function which gets a
+   *  block of raw bytes and with room enough and constructs a _Rep
+   *  object at the front.
+   *
+   *  The reason you want _M_data pointing to the character %array and
+   *  not the _Rep is so that the debugger can see the string
+   *  contents. (Probably we should add a non-inline member to get
+   *  the _Rep for the debugger to use, so users can check the actual
+   *  string length.)
+   *
+   *  Note that the _Rep object is a POD so that you can have a
+   *  static <em>empty string</em> _Rep object already @a constructed before
+   *  static constructors have run.  The reference-count encoding is
+   *  chosen so that a 0 indicates one reference, so you never try to
+   *  destroy the empty-string _Rep object.
+   *
+   *  All but the last paragraph is considered pretty conventional
+   *  for a C++ string implementation.
+  */
+  // 21.3  Template class basic_string
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    class basic_string
+    {
+      typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
+
+      // Types:
+    public:
+      typedef _Traits					    traits_type;
+      typedef typename _Traits::char_type		    value_type;
+      typedef _Alloc					    allocator_type;
+      typedef typename _CharT_alloc_type::size_type	    size_type;
+      typedef typename _CharT_alloc_type::difference_type   difference_type;
+      typedef typename _CharT_alloc_type::reference	    reference;
+      typedef typename _CharT_alloc_type::const_reference   const_reference;
+      typedef typename _CharT_alloc_type::pointer	    pointer;
+      typedef typename _CharT_alloc_type::const_pointer	    const_pointer;
+      typedef __gnu_cxx::__normal_iterator<pointer, basic_string>  iterator;
+      typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string>
+                                                            const_iterator;
+      typedef std::reverse_iterator<const_iterator>	const_reverse_iterator;
+      typedef std::reverse_iterator<iterator>		    reverse_iterator;
+
+    private:
+      // _Rep: string representation
+      //   Invariants:
+      //   1. String really contains _M_length + 1 characters: due to 21.3.4
+      //      must be kept null-terminated.
+      //   2. _M_capacity >= _M_length
+      //      Allocated memory is always (_M_capacity + 1) * sizeof(_CharT).
+      //   3. _M_refcount has three states:
+      //      -1: leaked, one reference, no ref-copies allowed, non-const.
+      //       0: one reference, non-const.
+      //     n>0: n + 1 references, operations require a lock, const.
+      //   4. All fields==0 is an empty string, given the extra storage
+      //      beyond-the-end for a null terminator; thus, the shared
+      //      empty string representation needs no constructor.
+
+      struct _Rep_base
+      {
+	size_type		_M_length;
+	size_type		_M_capacity;
+	_Atomic_word		_M_refcount;
+      };
+
+      struct _Rep : _Rep_base
+      {
+	// Types:
+	typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc;
+
+	// (Public) Data members:
+
+	// The maximum number of individual char_type elements of an
+	// individual string is determined by _S_max_size. This is the
+	// value that will be returned by max_size().  (Whereas npos
+	// is the maximum number of bytes the allocator can allocate.)
+	// If one was to divvy up the theoretical largest size string,
+	// with a terminating character and m _CharT elements, it'd
+	// look like this:
+	// npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT)
+	// Solving for m:
+	// m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1
+	// In addition, this implementation quarters this amount.
+	static const size_type	_S_max_size;
+	static const _CharT	_S_terminal;
+
+	// The following storage is init'd to 0 by the linker, resulting
+        // (carefully) in an empty string with one reference.
+        static size_type _S_empty_rep_storage[];
+
+        static _Rep&
+        _S_empty_rep()
+        { 
+	  // NB: Mild hack to avoid strict-aliasing warnings.  Note that
+	  // _S_empty_rep_storage is never modified and the punning should
+	  // be reasonably safe in this case.
+	  void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);
+	  return *reinterpret_cast<_Rep*>(__p);
+	}
+
+        bool
+	_M_is_leaked() const
+        { return this->_M_refcount < 0; }
+
+        bool
+	_M_is_shared() const
+        { return this->_M_refcount > 0; }
+
+        void
+	_M_set_leaked()
+        { this->_M_refcount = -1; }
+
+        void
+	_M_set_sharable()
+        { this->_M_refcount = 0; }
+
+	void
+	_M_set_length_and_sharable(size_type __n)
+	{
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+	  if (__builtin_expect(this != &_S_empty_rep(), false))
+#endif
+	    {
+	      this->_M_set_sharable();  // One reference.
+	      this->_M_length = __n;
+	      traits_type::assign(this->_M_refdata()[__n], _S_terminal);
+	      // grrr. (per 21.3.4)
+	      // You cannot leave those LWG people alone for a second.
+	    }
+	}
+
+	_CharT*
+	_M_refdata() throw()
+	{ return reinterpret_cast<_CharT*>(this + 1); }
+
+	_CharT*
+	_M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2)
+	{
+	  return (!_M_is_leaked() && __alloc1 == __alloc2)
+	          ? _M_refcopy() : _M_clone(__alloc1);
+	}
+
+	// Create & Destroy
+	static _Rep*
+	_S_create(size_type, size_type, const _Alloc&);
+
+	void
+	_M_dispose(const _Alloc& __a)
+	{
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+	  if (__builtin_expect(this != &_S_empty_rep(), false))
+#endif
+	    if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount,
+						       -1) <= 0)
+	      _M_destroy(__a);
+	}  // XXX MT
+
+	void
+	_M_destroy(const _Alloc&) throw();
+
+	_CharT*
+	_M_refcopy() throw()
+	{
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+	  if (__builtin_expect(this != &_S_empty_rep(), false))
+#endif
+            __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1);
+	  return _M_refdata();
+	}  // XXX MT
+
+	_CharT*
+	_M_clone(const _Alloc&, size_type __res = 0);
+      };
+
+      // Use empty-base optimization: http://www.cantrip.org/emptyopt.html
+      struct _Alloc_hider : _Alloc
+      {
+	_Alloc_hider(_CharT* __dat, const _Alloc& __a)
+	: _Alloc(__a), _M_p(__dat) { }
+
+	_CharT* _M_p; // The actual data.
+      };
+
+    public:
+      // Data Members (public):
+      // NB: This is an unsigned type, and thus represents the maximum
+      // size that the allocator can hold.
+      ///  Value returned by various member functions when they fail.
+      static const size_type	npos = static_cast<size_type>(-1);
+
+    private:
+      // Data Members (private):
+      mutable _Alloc_hider	_M_dataplus;
+
+      _CharT*
+      _M_data() const
+      { return  _M_dataplus._M_p; }
+
+      _CharT*
+      _M_data(_CharT* __p)
+      { return (_M_dataplus._M_p = __p); }
+
+      _Rep*
+      _M_rep() const
+      { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); }
+
+      // For the internal use we have functions similar to `begin'/`end'
+      // but they do not call _M_leak.
+      iterator
+      _M_ibegin() const
+      { return iterator(_M_data()); }
+
+      iterator
+      _M_iend() const
+      { return iterator(_M_data() + this->size()); }
+
+      void
+      _M_leak()    // for use in begin() & non-const op[]
+      {
+	if (!_M_rep()->_M_is_leaked())
+	  _M_leak_hard();
+      }
+
+      size_type
+      _M_check(size_type __pos, const char* __s) const
+      {
+	if (__pos > this->size())
+	  __throw_out_of_range(__N(__s));
+	return __pos;
+      }
+
+      void
+      _M_check_length(size_type __n1, size_type __n2, const char* __s) const
+      {
+	if (this->max_size() - (this->size() - __n1) < __n2)
+	  __throw_length_error(__N(__s));
+      }
+
+      // NB: _M_limit doesn't check for a bad __pos value.
+      size_type
+      _M_limit(size_type __pos, size_type __off) const
+      {
+	const bool __testoff =  __off < this->size() - __pos;
+	return __testoff ? __off : this->size() - __pos;
+      }
+
+      // True if _Rep and source do not overlap.
+      bool
+      _M_disjunct(const _CharT* __s) const
+      {
+	return (less<const _CharT*>()(__s, _M_data())
+		|| less<const _CharT*>()(_M_data() + this->size(), __s));
+      }
+
+      // When __n = 1 way faster than the general multichar
+      // traits_type::copy/move/assign.
+      static void
+      _M_copy(_CharT* __d, const _CharT* __s, size_type __n)
+      {
+	if (__n == 1)
+	  traits_type::assign(*__d, *__s);
+	else
+	  traits_type::copy(__d, __s, __n);
+      }
+
+      static void
+      _M_move(_CharT* __d, const _CharT* __s, size_type __n)
+      {
+	if (__n == 1)
+	  traits_type::assign(*__d, *__s);
+	else
+	  traits_type::move(__d, __s, __n);	  
+      }
+
+      static void
+      _M_assign(_CharT* __d, size_type __n, _CharT __c)
+      {
+	if (__n == 1)
+	  traits_type::assign(*__d, __c);
+	else
+	  traits_type::assign(__d, __n, __c);	  
+      }
+
+      // _S_copy_chars is a separate template to permit specialization
+      // to optimize for the common case of pointers as iterators.
+      template<class _Iterator>
+        static void
+        _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)
+        {
+	  for (; __k1 != __k2; ++__k1, ++__p)
+	    traits_type::assign(*__p, *__k1); // These types are off.
+	}
+
+      static void
+      _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2)
+      { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+      static void
+      _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)
+      { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+      static void
+      _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2)
+      { _M_copy(__p, __k1, __k2 - __k1); }
+
+      static void
+      _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)
+      { _M_copy(__p, __k1, __k2 - __k1); }
+
+      static int
+      _S_compare(size_type __n1, size_type __n2)
+      {
+	const difference_type __d = difference_type(__n1 - __n2);
+
+	if (__d > __gnu_cxx::__numeric_traits<int>::__max)
+	  return __gnu_cxx::__numeric_traits<int>::__max;
+	else if (__d < __gnu_cxx::__numeric_traits<int>::__min)
+	  return __gnu_cxx::__numeric_traits<int>::__min;
+	else
+	  return int(__d);
+      }
+
+      void
+      _M_mutate(size_type __pos, size_type __len1, size_type __len2);
+
+      void
+      _M_leak_hard();
+
+      static _Rep&
+      _S_empty_rep()
+      { return _Rep::_S_empty_rep(); }
+
+    public:
+      // Construct/copy/destroy:
+      // NB: We overload ctors in some cases instead of using default
+      // arguments, per 17.4.4.4 para. 2 item 2.
+
+      /**
+       *  @brief  Default constructor creates an empty string.
+       */
+      basic_string()
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+      : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { }
+#else
+      : _M_dataplus(_S_construct(size_type(), _CharT(), _Alloc()), _Alloc()){ }
+#endif
+
+      /**
+       *  @brief  Construct an empty string using allocator @a a.
+       */
+      explicit
+      basic_string(const _Alloc& __a);
+
+      // NB: per LWG issue 42, semantics different from IS:
+      /**
+       *  @brief  Construct string with copy of value of @a str.
+       *  @param  str  Source string.
+       */
+      basic_string(const basic_string& __str);
+      /**
+       *  @brief  Construct string as copy of a substring.
+       *  @param  str  Source string.
+       *  @param  pos  Index of first character to copy from.
+       *  @param  n  Number of characters to copy (default remainder).
+       */
+      basic_string(const basic_string& __str, size_type __pos,
+		   size_type __n = npos);
+      /**
+       *  @brief  Construct string as copy of a substring.
+       *  @param  str  Source string.
+       *  @param  pos  Index of first character to copy from.
+       *  @param  n  Number of characters to copy.
+       *  @param  a  Allocator to use.
+       */
+      basic_string(const basic_string& __str, size_type __pos,
+		   size_type __n, const _Alloc& __a);
+
+      /**
+       *  @brief  Construct string initialized by a character %array.
+       *  @param  s  Source character %array.
+       *  @param  n  Number of characters to copy.
+       *  @param  a  Allocator to use (default is default allocator).
+       *
+       *  NB: @a s must have at least @a n characters, &apos;\\0&apos;
+       *  has no special meaning.
+       */
+      basic_string(const _CharT* __s, size_type __n,
+		   const _Alloc& __a = _Alloc());
+      /**
+       *  @brief  Construct string as copy of a C string.
+       *  @param  s  Source C string.
+       *  @param  a  Allocator to use (default is default allocator).
+       */
+      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
+      /**
+       *  @brief  Construct string as multiple characters.
+       *  @param  n  Number of characters.
+       *  @param  c  Character to use.
+       *  @param  a  Allocator to use (default is default allocator).
+       */
+      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Move construct string.
+       *  @param  str  Source string.
+       *
+       *  The newly-created string contains the exact contents of @a str.
+       *  @a str is a valid, but unspecified string.
+       **/
+      basic_string(basic_string&& __str)
+      : _M_dataplus(__str._M_dataplus)
+      {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING	
+	__str._M_data(_S_empty_rep()._M_refdata());
+#else
+	__str._M_data(_S_construct(size_type(), _CharT(), get_allocator()));
+#endif
+      }
+
+      /**
+       *  @brief  Construct string from an initializer %list.
+       *  @param  l  std::initializer_list of characters.
+       *  @param  a  Allocator to use (default is default allocator).
+       */
+      basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc());
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+      /**
+       *  @brief  Construct string as copy of a range.
+       *  @param  beg  Start of range.
+       *  @param  end  End of range.
+       *  @param  a  Allocator to use (default is default allocator).
+       */
+      template<class _InputIterator>
+        basic_string(_InputIterator __beg, _InputIterator __end,
+		     const _Alloc& __a = _Alloc());
+
+      /**
+       *  @brief  Destroy the string instance.
+       */
+      ~basic_string()
+      { _M_rep()->_M_dispose(this->get_allocator()); }
+
+      /**
+       *  @brief  Assign the value of @a str to this string.
+       *  @param  str  Source string.
+       */
+      basic_string&
+      operator=(const basic_string& __str) 
+      { return this->assign(__str); }
+
+      /**
+       *  @brief  Copy contents of @a s into this string.
+       *  @param  s  Source null-terminated string.
+       */
+      basic_string&
+      operator=(const _CharT* __s) 
+      { return this->assign(__s); }
+
+      /**
+       *  @brief  Set value to string of length 1.
+       *  @param  c  Source character.
+       *
+       *  Assigning to a character makes this string length 1 and
+       *  (*this)[0] == @a c.
+       */
+      basic_string&
+      operator=(_CharT __c) 
+      { 
+	this->assign(1, __c); 
+	return *this;
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Move assign the value of @a str to this string.
+       *  @param  str  Source string.
+       *
+       *  The contents of @a str are moved into this string (without copying).
+       *  @a str is a valid, but unspecified string.
+       **/
+      basic_string&
+      operator=(basic_string&& __str)
+      {
+	// NB: DR 1204.
+	this->swap(__str);
+	return *this;
+      }
+
+      /**
+       *  @brief  Set value to string constructed from initializer %list.
+       *  @param  l  std::initializer_list.
+       */
+      basic_string&
+      operator=(initializer_list<_CharT> __l)
+      {
+	this->assign(__l.begin(), __l.size());
+	return *this;
+      }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+      // Iterators:
+      /**
+       *  Returns a read/write iterator that points to the first character in
+       *  the %string.  Unshares the string.
+       */
+      iterator
+      begin()
+      {
+	_M_leak();
+	return iterator(_M_data());
+      }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  character in the %string.
+       */
+      const_iterator
+      begin() const
+      { return const_iterator(_M_data()); }
+
+      /**
+       *  Returns a read/write iterator that points one past the last
+       *  character in the %string.  Unshares the string.
+       */
+      iterator
+      end()
+      {
+	_M_leak();
+	return iterator(_M_data() + this->size());
+      }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the
+       *  last character in the %string.
+       */
+      const_iterator
+      end() const
+      { return const_iterator(_M_data() + this->size()); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to the last
+       *  character in the %string.  Iteration is done in reverse element
+       *  order.  Unshares the string.
+       */
+      reverse_iterator
+      rbegin()
+      { return reverse_iterator(this->end()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to the last character in the %string.  Iteration is done in
+       *  reverse element order.
+       */
+      const_reverse_iterator
+      rbegin() const
+      { return const_reverse_iterator(this->end()); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to one before the
+       *  first character in the %string.  Iteration is done in reverse
+       *  element order.  Unshares the string.
+       */
+      reverse_iterator
+      rend()
+      { return reverse_iterator(this->begin()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to one before the first character in the %string.  Iteration
+       *  is done in reverse element order.
+       */
+      const_reverse_iterator
+      rend() const
+      { return const_reverse_iterator(this->begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  character in the %string.
+       */
+      const_iterator
+      cbegin() const
+      { return const_iterator(this->_M_data()); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the
+       *  last character in the %string.
+       */
+      const_iterator
+      cend() const
+      { return const_iterator(this->_M_data() + this->size()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to the last character in the %string.  Iteration is done in
+       *  reverse element order.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(this->end()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to one before the first character in the %string.  Iteration
+       *  is done in reverse element order.
+       */
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(this->begin()); }
+#endif
+
+    public:
+      // Capacity:
+      ///  Returns the number of characters in the string, not including any
+      ///  null-termination.
+      size_type
+      size() const
+      { return _M_rep()->_M_length; }
+
+      ///  Returns the number of characters in the string, not including any
+      ///  null-termination.
+      size_type
+      length() const
+      { return _M_rep()->_M_length; }
+
+      ///  Returns the size() of the largest possible %string.
+      size_type
+      max_size() const
+      { return _Rep::_S_max_size; }
+
+      /**
+       *  @brief  Resizes the %string to the specified number of characters.
+       *  @param  n  Number of characters the %string should contain.
+       *  @param  c  Character to fill any new elements.
+       *
+       *  This function will %resize the %string to the specified
+       *  number of characters.  If the number is smaller than the
+       *  %string's current size the %string is truncated, otherwise
+       *  the %string is extended and new elements are %set to @a c.
+       */
+      void
+      resize(size_type __n, _CharT __c);
+
+      /**
+       *  @brief  Resizes the %string to the specified number of characters.
+       *  @param  n  Number of characters the %string should contain.
+       *
+       *  This function will resize the %string to the specified length.  If
+       *  the new size is smaller than the %string's current size the %string
+       *  is truncated, otherwise the %string is extended and new characters
+       *  are default-constructed.  For basic types such as char, this means
+       *  setting them to 0.
+       */
+      void
+      resize(size_type __n)
+      { this->resize(__n, _CharT()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      ///  A non-binding request to reduce capacity() to size().
+      void
+      shrink_to_fit()
+      {
+	__try
+	  { reserve(0); }
+	__catch(...)
+	  { }
+      }
+#endif
+
+      /**
+       *  Returns the total number of characters that the %string can hold
+       *  before needing to allocate more memory.
+       */
+      size_type
+      capacity() const
+      { return _M_rep()->_M_capacity; }
+
+      /**
+       *  @brief  Attempt to preallocate enough memory for specified number of
+       *          characters.
+       *  @param  res_arg  Number of characters required.
+       *  @throw  std::length_error  If @a res_arg exceeds @c max_size().
+       *
+       *  This function attempts to reserve enough memory for the
+       *  %string to hold the specified number of characters.  If the
+       *  number requested is more than max_size(), length_error is
+       *  thrown.
+       *
+       *  The advantage of this function is that if optimal code is a
+       *  necessity and the user can determine the string length that will be
+       *  required, the user can reserve the memory in %advance, and thus
+       *  prevent a possible reallocation of memory and copying of %string
+       *  data.
+       */
+      void
+      reserve(size_type __res_arg = 0);
+
+      /**
+       *  Erases the string, making it empty.
+       */
+      void
+      clear()
+      { _M_mutate(0, this->size(), 0); }
+
+      /**
+       *  Returns true if the %string is empty.  Equivalent to 
+       *  <code>*this == ""</code>.
+       */
+      bool
+      empty() const
+      { return this->size() == 0; }
+
+      // Element access:
+      /**
+       *  @brief  Subscript access to the data contained in the %string.
+       *  @param  pos  The index of the character to access.
+       *  @return  Read-only (constant) reference to the character.
+       *
+       *  This operator allows for easy, array-style, data access.
+       *  Note that data access with this operator is unchecked and
+       *  out_of_range lookups are not defined. (For checked lookups
+       *  see at().)
+       */
+      const_reference
+      operator[] (size_type __pos) const
+      {
+	_GLIBCXX_DEBUG_ASSERT(__pos <= size());
+	return _M_data()[__pos];
+      }
+
+      /**
+       *  @brief  Subscript access to the data contained in the %string.
+       *  @param  pos  The index of the character to access.
+       *  @return  Read/write reference to the character.
+       *
+       *  This operator allows for easy, array-style, data access.
+       *  Note that data access with this operator is unchecked and
+       *  out_of_range lookups are not defined. (For checked lookups
+       *  see at().)  Unshares the string.
+       */
+      reference
+      operator[](size_type __pos)
+      {
+        // allow pos == size() as v3 extension:
+	_GLIBCXX_DEBUG_ASSERT(__pos <= size());
+        // but be strict in pedantic mode:
+	_GLIBCXX_DEBUG_PEDASSERT(__pos < size());
+	_M_leak();
+	return _M_data()[__pos];
+      }
+
+      /**
+       *  @brief  Provides access to the data contained in the %string.
+       *  @param n The index of the character to access.
+       *  @return  Read-only (const) reference to the character.
+       *  @throw  std::out_of_range  If @a n is an invalid index.
+       *
+       *  This function provides for safer data access.  The parameter is
+       *  first checked that it is in the range of the string.  The function
+       *  throws out_of_range if the check fails.
+       */
+      const_reference
+      at(size_type __n) const
+      {
+	if (__n >= this->size())
+	  __throw_out_of_range(__N("basic_string::at"));
+	return _M_data()[__n];
+      }
+
+      /**
+       *  @brief  Provides access to the data contained in the %string.
+       *  @param n The index of the character to access.
+       *  @return  Read/write reference to the character.
+       *  @throw  std::out_of_range  If @a n is an invalid index.
+       *
+       *  This function provides for safer data access.  The parameter is
+       *  first checked that it is in the range of the string.  The function
+       *  throws out_of_range if the check fails.  Success results in
+       *  unsharing the string.
+       */
+      reference
+      at(size_type __n)
+      {
+	if (__n >= size())
+	  __throw_out_of_range(__N("basic_string::at"));
+	_M_leak();
+	return _M_data()[__n];
+      }
+
+      // Modifiers:
+      /**
+       *  @brief  Append a string to this string.
+       *  @param str  The string to append.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      operator+=(const basic_string& __str)
+      { return this->append(__str); }
+
+      /**
+       *  @brief  Append a C string.
+       *  @param s  The C string to append.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      operator+=(const _CharT* __s)
+      { return this->append(__s); }
+
+      /**
+       *  @brief  Append a character.
+       *  @param c  The character to append.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      operator+=(_CharT __c)
+      { 
+	this->push_back(__c);
+	return *this;
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Append an initializer_list of characters.
+       *  @param l  The initializer_list of characters to be appended.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      operator+=(initializer_list<_CharT> __l)
+      { return this->append(__l.begin(), __l.size()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+      /**
+       *  @brief  Append a string to this string.
+       *  @param str  The string to append.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      append(const basic_string& __str);
+
+      /**
+       *  @brief  Append a substring.
+       *  @param str  The string to append.
+       *  @param pos  Index of the first character of str to append.
+       *  @param n  The number of characters to append.
+       *  @return  Reference to this string.
+       *  @throw  std::out_of_range if @a pos is not a valid index.
+       *
+       *  This function appends @a n characters from @a str starting at @a pos
+       *  to this string.  If @a n is is larger than the number of available
+       *  characters in @a str, the remainder of @a str is appended.
+       */
+      basic_string&
+      append(const basic_string& __str, size_type __pos, size_type __n);
+
+      /**
+       *  @brief  Append a C substring.
+       *  @param s  The C string to append.
+       *  @param n  The number of characters to append.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      append(const _CharT* __s, size_type __n);
+
+      /**
+       *  @brief  Append a C string.
+       *  @param s  The C string to append.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      append(const _CharT* __s)
+      {
+	__glibcxx_requires_string(__s);
+	return this->append(__s, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Append multiple characters.
+       *  @param n  The number of characters to append.
+       *  @param c  The character to use.
+       *  @return  Reference to this string.
+       *
+       *  Appends n copies of c to this string.
+       */
+      basic_string&
+      append(size_type __n, _CharT __c);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Append an initializer_list of characters.
+       *  @param l  The initializer_list of characters to append.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      append(initializer_list<_CharT> __l)
+      { return this->append(__l.begin(), __l.size()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+      /**
+       *  @brief  Append a range of characters.
+       *  @param first  Iterator referencing the first character to append.
+       *  @param last  Iterator marking the end of the range.
+       *  @return  Reference to this string.
+       *
+       *  Appends characters in the range [first,last) to this string.
+       */
+      template<class _InputIterator>
+        basic_string&
+        append(_InputIterator __first, _InputIterator __last)
+        { return this->replace(_M_iend(), _M_iend(), __first, __last); }
+
+      /**
+       *  @brief  Append a single character.
+       *  @param c  Character to append.
+       */
+      void
+      push_back(_CharT __c)
+      { 
+	const size_type __len = 1 + this->size();
+	if (__len > this->capacity() || _M_rep()->_M_is_shared())
+	  this->reserve(__len);
+	traits_type::assign(_M_data()[this->size()], __c);
+	_M_rep()->_M_set_length_and_sharable(__len);
+      }
+
+      /**
+       *  @brief  Set value to contents of another string.
+       *  @param  str  Source string to use.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      assign(const basic_string& __str);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Set value to contents of another string.
+       *  @param  str  Source string to use.
+       *  @return  Reference to this string.
+       *
+       *  This function sets this string to the exact contents of @a str.
+       *  @a str is a valid, but unspecified string.
+       */
+      basic_string&
+      assign(basic_string&& __str)
+      {
+	this->swap(__str);
+	return *this;
+      }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+      /**
+       *  @brief  Set value to a substring of a string.
+       *  @param str  The string to use.
+       *  @param pos  Index of the first character of str.
+       *  @param n  Number of characters to use.
+       *  @return  Reference to this string.
+       *  @throw  std::out_of_range if @a pos is not a valid index.
+       *
+       *  This function sets this string to the substring of @a str consisting
+       *  of @a n characters at @a pos.  If @a n is is larger than the number
+       *  of available characters in @a str, the remainder of @a str is used.
+       */
+      basic_string&
+      assign(const basic_string& __str, size_type __pos, size_type __n)
+      { return this->assign(__str._M_data()
+			    + __str._M_check(__pos, "basic_string::assign"),
+			    __str._M_limit(__pos, __n)); }
+
+      /**
+       *  @brief  Set value to a C substring.
+       *  @param s  The C string to use.
+       *  @param n  Number of characters to use.
+       *  @return  Reference to this string.
+       *
+       *  This function sets the value of this string to the first @a n
+       *  characters of @a s.  If @a n is is larger than the number of
+       *  available characters in @a s, the remainder of @a s is used.
+       */
+      basic_string&
+      assign(const _CharT* __s, size_type __n);
+
+      /**
+       *  @brief  Set value to contents of a C string.
+       *  @param s  The C string to use.
+       *  @return  Reference to this string.
+       *
+       *  This function sets the value of this string to the value of @a s.
+       *  The data is copied, so there is no dependence on @a s once the
+       *  function returns.
+       */
+      basic_string&
+      assign(const _CharT* __s)
+      {
+	__glibcxx_requires_string(__s);
+	return this->assign(__s, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Set value to multiple characters.
+       *  @param n  Length of the resulting string.
+       *  @param c  The character to use.
+       *  @return  Reference to this string.
+       *
+       *  This function sets the value of this string to @a n copies of
+       *  character @a c.
+       */
+      basic_string&
+      assign(size_type __n, _CharT __c)
+      { return _M_replace_aux(size_type(0), this->size(), __n, __c); }
+
+      /**
+       *  @brief  Set value to a range of characters.
+       *  @param first  Iterator referencing the first character to append.
+       *  @param last  Iterator marking the end of the range.
+       *  @return  Reference to this string.
+       *
+       *  Sets value of string to characters in the range [first,last).
+      */
+      template<class _InputIterator>
+        basic_string&
+        assign(_InputIterator __first, _InputIterator __last)
+        { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Set value to an initializer_list of characters.
+       *  @param l  The initializer_list of characters to assign.
+       *  @return  Reference to this string.
+       */
+      basic_string&
+      assign(initializer_list<_CharT> __l)
+      { return this->assign(__l.begin(), __l.size()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+      /**
+       *  @brief  Insert multiple characters.
+       *  @param p  Iterator referencing location in string to insert at.
+       *  @param n  Number of characters to insert
+       *  @param c  The character to insert.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Inserts @a n copies of character @a c starting at the position
+       *  referenced by iterator @a p.  If adding characters causes the length
+       *  to exceed max_size(), length_error is thrown.  The value of the
+       *  string doesn't change if an error is thrown.
+      */
+      void
+      insert(iterator __p, size_type __n, _CharT __c)
+      {	this->replace(__p, __p, __n, __c);  }
+
+      /**
+       *  @brief  Insert a range of characters.
+       *  @param p  Iterator referencing location in string to insert at.
+       *  @param beg  Start of range.
+       *  @param end  End of range.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Inserts characters in range [beg,end).  If adding characters causes
+       *  the length to exceed max_size(), length_error is thrown.  The value
+       *  of the string doesn't change if an error is thrown.
+      */
+      template<class _InputIterator>
+        void
+        insert(iterator __p, _InputIterator __beg, _InputIterator __end)
+        { this->replace(__p, __p, __beg, __end); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Insert an initializer_list of characters.
+       *  @param p  Iterator referencing location in string to insert at.
+       *  @param l  The initializer_list of characters to insert.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       */
+      void
+      insert(iterator __p, initializer_list<_CharT> __l)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
+	this->insert(__p - _M_ibegin(), __l.begin(), __l.size());
+      }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+      /**
+       *  @brief  Insert value of a string.
+       *  @param pos1  Iterator referencing location in string to insert at.
+       *  @param str  The string to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Inserts value of @a str starting at @a pos1.  If adding characters
+       *  causes the length to exceed max_size(), length_error is thrown.  The
+       *  value of the string doesn't change if an error is thrown.
+      */
+      basic_string&
+      insert(size_type __pos1, const basic_string& __str)
+      { return this->insert(__pos1, __str, size_type(0), __str.size()); }
+
+      /**
+       *  @brief  Insert a substring.
+       *  @param pos1  Iterator referencing location in string to insert at.
+       *  @param str  The string to insert.
+       *  @param pos2  Start of characters in str to insert.
+       *  @param n  Number of characters to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *  @throw  std::out_of_range  If @a pos1 > size() or
+       *  @a pos2 > @a str.size().
+       *
+       *  Starting at @a pos1, insert @a n character of @a str beginning with
+       *  @a pos2.  If adding characters causes the length to exceed
+       *  max_size(), length_error is thrown.  If @a pos1 is beyond the end of
+       *  this string or @a pos2 is beyond the end of @a str, out_of_range is
+       *  thrown.  The value of the string doesn't change if an error is
+       *  thrown.
+      */
+      basic_string&
+      insert(size_type __pos1, const basic_string& __str,
+	     size_type __pos2, size_type __n)
+      { return this->insert(__pos1, __str._M_data()
+			    + __str._M_check(__pos2, "basic_string::insert"),
+			    __str._M_limit(__pos2, __n)); }
+
+      /**
+       *  @brief  Insert a C substring.
+       *  @param pos  Iterator referencing location in string to insert at.
+       *  @param s  The C string to insert.
+       *  @param n  The number of characters to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *  @throw  std::out_of_range  If @a pos is beyond the end of this
+       *  string.
+       *
+       *  Inserts the first @a n characters of @a s starting at @a pos.  If
+       *  adding characters causes the length to exceed max_size(),
+       *  length_error is thrown.  If @a pos is beyond end(), out_of_range is
+       *  thrown.  The value of the string doesn't change if an error is
+       *  thrown.
+      */
+      basic_string&
+      insert(size_type __pos, const _CharT* __s, size_type __n);
+
+      /**
+       *  @brief  Insert a C string.
+       *  @param pos  Iterator referencing location in string to insert at.
+       *  @param s  The C string to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *  @throw  std::out_of_range  If @a pos is beyond the end of this
+       *  string.
+       *
+       *  Inserts the first @a n characters of @a s starting at @a pos.  If
+       *  adding characters causes the length to exceed max_size(),
+       *  length_error is thrown.  If @a pos is beyond end(), out_of_range is
+       *  thrown.  The value of the string doesn't change if an error is
+       *  thrown.
+      */
+      basic_string&
+      insert(size_type __pos, const _CharT* __s)
+      {
+	__glibcxx_requires_string(__s);
+	return this->insert(__pos, __s, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Insert multiple characters.
+       *  @param pos  Index in string to insert at.
+       *  @param n  Number of characters to insert
+       *  @param c  The character to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *  @throw  std::out_of_range  If @a pos is beyond the end of this
+       *  string.
+       *
+       *  Inserts @a n copies of character @a c starting at index @a pos.  If
+       *  adding characters causes the length to exceed max_size(),
+       *  length_error is thrown.  If @a pos > length(), out_of_range is
+       *  thrown.  The value of the string doesn't change if an error is
+       *  thrown.
+      */
+      basic_string&
+      insert(size_type __pos, size_type __n, _CharT __c)
+      { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),
+			      size_type(0), __n, __c); }
+
+      /**
+       *  @brief  Insert one character.
+       *  @param p  Iterator referencing position in string to insert at.
+       *  @param c  The character to insert.
+       *  @return  Iterator referencing newly inserted char.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Inserts character @a c at position referenced by @a p.  If adding
+       *  character causes the length to exceed max_size(), length_error is
+       *  thrown.  If @a p is beyond end of string, out_of_range is thrown.
+       *  The value of the string doesn't change if an error is thrown.
+      */
+      iterator
+      insert(iterator __p, _CharT __c)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
+	const size_type __pos = __p - _M_ibegin();
+	_M_replace_aux(__pos, size_type(0), size_type(1), __c);
+	_M_rep()->_M_set_leaked();
+	return iterator(_M_data() + __pos);
+      }
+
+      /**
+       *  @brief  Remove characters.
+       *  @param pos  Index of first character to remove (default 0).
+       *  @param n  Number of characters to remove (default remainder).
+       *  @return  Reference to this string.
+       *  @throw  std::out_of_range  If @a pos is beyond the end of this
+       *  string.
+       *
+       *  Removes @a n characters from this string starting at @a pos.  The
+       *  length of the string is reduced by @a n.  If there are < @a n
+       *  characters to remove, the remainder of the string is truncated.  If
+       *  @a p is beyond end of string, out_of_range is thrown.  The value of
+       *  the string doesn't change if an error is thrown.
+      */
+      basic_string&
+      erase(size_type __pos = 0, size_type __n = npos)
+      { 
+	_M_mutate(_M_check(__pos, "basic_string::erase"),
+		  _M_limit(__pos, __n), size_type(0));
+	return *this;
+      }
+
+      /**
+       *  @brief  Remove one character.
+       *  @param position  Iterator referencing the character to remove.
+       *  @return  iterator referencing same location after removal.
+       *
+       *  Removes the character at @a position from this string. The value
+       *  of the string doesn't change if an error is thrown.
+      */
+      iterator
+      erase(iterator __position)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(__position >= _M_ibegin()
+				 && __position < _M_iend());
+	const size_type __pos = __position - _M_ibegin();
+	_M_mutate(__pos, size_type(1), size_type(0));
+	_M_rep()->_M_set_leaked();
+	return iterator(_M_data() + __pos);
+      }
+
+      /**
+       *  @brief  Remove a range of characters.
+       *  @param first  Iterator referencing the first character to remove.
+       *  @param last  Iterator referencing the end of the range.
+       *  @return  Iterator referencing location of first after removal.
+       *
+       *  Removes the characters in the range [first,last) from this string.
+       *  The value of the string doesn't change if an error is thrown.
+      */
+      iterator
+      erase(iterator __first, iterator __last);
+ 
+      /**
+       *  @brief  Replace characters with value from another string.
+       *  @param pos  Index of first character to replace.
+       *  @param n  Number of characters to be replaced.
+       *  @param str  String to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::out_of_range  If @a pos is beyond the end of this
+       *  string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [pos,pos+n) from this string.
+       *  In place, the value of @a str is inserted.  If @a pos is beyond end
+       *  of string, out_of_range is thrown.  If the length of the result
+       *  exceeds max_size(), length_error is thrown.  The value of the string
+       *  doesn't change if an error is thrown.
+      */
+      basic_string&
+      replace(size_type __pos, size_type __n, const basic_string& __str)
+      { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
+
+      /**
+       *  @brief  Replace characters with value from another string.
+       *  @param pos1  Index of first character to replace.
+       *  @param n1  Number of characters to be replaced.
+       *  @param str  String to insert.
+       *  @param pos2  Index of first character of str to use.
+       *  @param n2  Number of characters from str to use.
+       *  @return  Reference to this string.
+       *  @throw  std::out_of_range  If @a pos1 > size() or @a pos2 >
+       *  str.size().
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [pos1,pos1 + n) from this
+       *  string.  In place, the value of @a str is inserted.  If @a pos is
+       *  beyond end of string, out_of_range is thrown.  If the length of the
+       *  result exceeds max_size(), length_error is thrown.  The value of the
+       *  string doesn't change if an error is thrown.
+      */
+      basic_string&
+      replace(size_type __pos1, size_type __n1, const basic_string& __str,
+	      size_type __pos2, size_type __n2)
+      { return this->replace(__pos1, __n1, __str._M_data()
+			     + __str._M_check(__pos2, "basic_string::replace"),
+			     __str._M_limit(__pos2, __n2)); }
+
+      /**
+       *  @brief  Replace characters with value of a C substring.
+       *  @param pos  Index of first character to replace.
+       *  @param n1  Number of characters to be replaced.
+       *  @param s  C string to insert.
+       *  @param n2  Number of characters from @a s to use.
+       *  @return  Reference to this string.
+       *  @throw  std::out_of_range  If @a pos1 > size().
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [pos,pos + n1) from this string.
+       *  In place, the first @a n2 characters of @a s are inserted, or all
+       *  of @a s if @a n2 is too large.  If @a pos is beyond end of string,
+       *  out_of_range is thrown.  If the length of result exceeds max_size(),
+       *  length_error is thrown.  The value of the string doesn't change if
+       *  an error is thrown.
+      */
+      basic_string&
+      replace(size_type __pos, size_type __n1, const _CharT* __s,
+	      size_type __n2);
+
+      /**
+       *  @brief  Replace characters with value of a C string.
+       *  @param pos  Index of first character to replace.
+       *  @param n1  Number of characters to be replaced.
+       *  @param s  C string to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::out_of_range  If @a pos > size().
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [pos,pos + n1) from this string.
+       *  In place, the characters of @a s are inserted.  If @a pos is beyond
+       *  end of string, out_of_range is thrown.  If the length of result
+       *  exceeds max_size(), length_error is thrown.  The value of the string
+       *  doesn't change if an error is thrown.
+      */
+      basic_string&
+      replace(size_type __pos, size_type __n1, const _CharT* __s)
+      {
+	__glibcxx_requires_string(__s);
+	return this->replace(__pos, __n1, __s, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Replace characters with multiple characters.
+       *  @param pos  Index of first character to replace.
+       *  @param n1  Number of characters to be replaced.
+       *  @param n2  Number of characters to insert.
+       *  @param c  Character to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::out_of_range  If @a pos > size().
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [pos,pos + n1) from this string.
+       *  In place, @a n2 copies of @a c are inserted.  If @a pos is beyond
+       *  end of string, out_of_range is thrown.  If the length of result
+       *  exceeds max_size(), length_error is thrown.  The value of the string
+       *  doesn't change if an error is thrown.
+      */
+      basic_string&
+      replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
+      { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),
+			      _M_limit(__pos, __n1), __n2, __c); }
+
+      /**
+       *  @brief  Replace range of characters with string.
+       *  @param i1  Iterator referencing start of range to replace.
+       *  @param i2  Iterator referencing end of range to replace.
+       *  @param str  String value to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [i1,i2).  In place, the value of
+       *  @a str is inserted.  If the length of result exceeds max_size(),
+       *  length_error is thrown.  The value of the string doesn't change if
+       *  an error is thrown.
+      */
+      basic_string&
+      replace(iterator __i1, iterator __i2, const basic_string& __str)
+      { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
+
+      /**
+       *  @brief  Replace range of characters with C substring.
+       *  @param i1  Iterator referencing start of range to replace.
+       *  @param i2  Iterator referencing end of range to replace.
+       *  @param s  C string value to insert.
+       *  @param n  Number of characters from s to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [i1,i2).  In place, the first @a
+       *  n characters of @a s are inserted.  If the length of result exceeds
+       *  max_size(), length_error is thrown.  The value of the string doesn't
+       *  change if an error is thrown.
+      */
+      basic_string&
+      replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+				 && __i2 <= _M_iend());
+	return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
+      }
+
+      /**
+       *  @brief  Replace range of characters with C string.
+       *  @param i1  Iterator referencing start of range to replace.
+       *  @param i2  Iterator referencing end of range to replace.
+       *  @param s  C string value to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [i1,i2).  In place, the
+       *  characters of @a s are inserted.  If the length of result exceeds
+       *  max_size(), length_error is thrown.  The value of the string doesn't
+       *  change if an error is thrown.
+      */
+      basic_string&
+      replace(iterator __i1, iterator __i2, const _CharT* __s)
+      {
+	__glibcxx_requires_string(__s);
+	return this->replace(__i1, __i2, __s, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Replace range of characters with multiple characters
+       *  @param i1  Iterator referencing start of range to replace.
+       *  @param i2  Iterator referencing end of range to replace.
+       *  @param n  Number of characters to insert.
+       *  @param c  Character to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [i1,i2).  In place, @a n copies
+       *  of @a c are inserted.  If the length of result exceeds max_size(),
+       *  length_error is thrown.  The value of the string doesn't change if
+       *  an error is thrown.
+      */
+      basic_string&
+      replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+				 && __i2 <= _M_iend());
+	return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
+      }
+
+      /**
+       *  @brief  Replace range of characters with range.
+       *  @param i1  Iterator referencing start of range to replace.
+       *  @param i2  Iterator referencing end of range to replace.
+       *  @param k1  Iterator referencing start of range to insert.
+       *  @param k2  Iterator referencing end of range to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [i1,i2).  In place, characters
+       *  in the range [k1,k2) are inserted.  If the length of result exceeds
+       *  max_size(), length_error is thrown.  The value of the string doesn't
+       *  change if an error is thrown.
+      */
+      template<class _InputIterator>
+        basic_string&
+        replace(iterator __i1, iterator __i2,
+		_InputIterator __k1, _InputIterator __k2)
+        {
+	  _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+				   && __i2 <= _M_iend());
+	  __glibcxx_requires_valid_range(__k1, __k2);
+	  typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	  return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());
+	}
+
+      // Specializations for the common case of pointer and iterator:
+      // useful to avoid the overhead of temporary buffering in _M_replace.
+      basic_string&
+      replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+				 && __i2 <= _M_iend());
+	__glibcxx_requires_valid_range(__k1, __k2);
+	return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+			     __k1, __k2 - __k1);
+      }
+
+      basic_string&
+      replace(iterator __i1, iterator __i2,
+	      const _CharT* __k1, const _CharT* __k2)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+				 && __i2 <= _M_iend());
+	__glibcxx_requires_valid_range(__k1, __k2);
+	return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+			     __k1, __k2 - __k1);
+      }
+
+      basic_string&
+      replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+				 && __i2 <= _M_iend());
+	__glibcxx_requires_valid_range(__k1, __k2);
+	return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+			     __k1.base(), __k2 - __k1);
+      }
+
+      basic_string&
+      replace(iterator __i1, iterator __i2,
+	      const_iterator __k1, const_iterator __k2)
+      {
+	_GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+				 && __i2 <= _M_iend());
+	__glibcxx_requires_valid_range(__k1, __k2);
+	return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+			     __k1.base(), __k2 - __k1);
+      }
+      
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Replace range of characters with initializer_list.
+       *  @param i1  Iterator referencing start of range to replace.
+       *  @param i2  Iterator referencing end of range to replace.
+       *  @param l  The initializer_list of characters to insert.
+       *  @return  Reference to this string.
+       *  @throw  std::length_error  If new length exceeds @c max_size().
+       *
+       *  Removes the characters in the range [i1,i2).  In place, characters
+       *  in the range [k1,k2) are inserted.  If the length of result exceeds
+       *  max_size(), length_error is thrown.  The value of the string doesn't
+       *  change if an error is thrown.
+      */
+      basic_string& replace(iterator __i1, iterator __i2,
+			    initializer_list<_CharT> __l)
+      { return this->replace(__i1, __i2, __l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+    private:
+      template<class _Integer>
+	basic_string&
+	_M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n,
+			    _Integer __val, __true_type)
+        { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }
+
+      template<class _InputIterator>
+	basic_string&
+	_M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
+			    _InputIterator __k2, __false_type);
+
+      basic_string&
+      _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+		     _CharT __c);
+
+      basic_string&
+      _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
+		      size_type __n2);
+
+      // _S_construct_aux is used to implement the 21.3.1 para 15 which
+      // requires special behaviour if _InIter is an integral type
+      template<class _InIterator>
+        static _CharT*
+        _S_construct_aux(_InIterator __beg, _InIterator __end,
+			 const _Alloc& __a, __false_type)
+	{
+          typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
+          return _S_construct(__beg, __end, __a, _Tag());
+	}
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 438. Ambiguity in the "do the right thing" clause
+      template<class _Integer>
+        static _CharT*
+        _S_construct_aux(_Integer __beg, _Integer __end,
+			 const _Alloc& __a, __true_type)
+        { return _S_construct_aux_2(static_cast<size_type>(__beg),
+				    __end, __a); }
+
+      static _CharT*
+      _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a)
+      { return _S_construct(__req, __c, __a); }
+
+      template<class _InIterator>
+        static _CharT*
+        _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
+	{
+	  typedef typename std::__is_integer<_InIterator>::__type _Integral;
+	  return _S_construct_aux(__beg, __end, __a, _Integral());
+        }
+
+      // For Input Iterators, used in istreambuf_iterators, etc.
+      template<class _InIterator>
+        static _CharT*
+         _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+		      input_iterator_tag);
+
+      // For forward_iterators up to random_access_iterators, used for
+      // string::iterator, _CharT*, etc.
+      template<class _FwdIterator>
+        static _CharT*
+        _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
+		     forward_iterator_tag);
+
+      static _CharT*
+      _S_construct(size_type __req, _CharT __c, const _Alloc& __a);
+
+    public:
+
+      /**
+       *  @brief  Copy substring into C string.
+       *  @param s  C string to copy value into.
+       *  @param n  Number of characters to copy.
+       *  @param pos  Index of first character to copy.
+       *  @return  Number of characters actually copied
+       *  @throw  std::out_of_range  If pos > size().
+       *
+       *  Copies up to @a n characters starting at @a pos into the C string @a
+       *  s.  If @a pos is %greater than size(), out_of_range is thrown.
+      */
+      size_type
+      copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
+
+      /**
+       *  @brief  Swap contents with another string.
+       *  @param s  String to swap with.
+       *
+       *  Exchanges the contents of this string with that of @a s in constant
+       *  time.
+      */
+      void
+      swap(basic_string& __s);
+
+      // String operations:
+      /**
+       *  @brief  Return const pointer to null-terminated contents.
+       *
+       *  This is a handle to internal data.  Do not modify or dire things may
+       *  happen.
+      */
+      const _CharT*
+      c_str() const
+      { return _M_data(); }
+
+      /**
+       *  @brief  Return const pointer to contents.
+       *
+       *  This is a handle to internal data.  Do not modify or dire things may
+       *  happen.
+      */
+      const _CharT*
+      data() const
+      { return _M_data(); }
+
+      /**
+       *  @brief  Return copy of allocator used to construct this string.
+      */
+      allocator_type
+      get_allocator() const
+      { return _M_dataplus; }
+
+      /**
+       *  @brief  Find position of a C substring.
+       *  @param s  C string to locate.
+       *  @param pos  Index of character to search from.
+       *  @param n  Number of characters from @a s to search for.
+       *  @return  Index of start of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for the first @a n characters
+       *  in @a s within this string.  If found, returns the index where it
+       *  begins.  If not found, returns npos.
+      */
+      size_type
+      find(const _CharT* __s, size_type __pos, size_type __n) const;
+
+      /**
+       *  @brief  Find position of a string.
+       *  @param str  String to locate.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of start of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for value of @a str within
+       *  this string.  If found, returns the index where it begins.  If not
+       *  found, returns npos.
+      */
+      size_type
+      find(const basic_string& __str, size_type __pos = 0) const
+      { return this->find(__str.data(), __pos, __str.size()); }
+
+      /**
+       *  @brief  Find position of a C string.
+       *  @param s  C string to locate.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of start of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for the value of @a s within
+       *  this string.  If found, returns the index where it begins.  If not
+       *  found, returns npos.
+      */
+      size_type
+      find(const _CharT* __s, size_type __pos = 0) const
+      {
+	__glibcxx_requires_string(__s);
+	return this->find(__s, __pos, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Find position of a character.
+       *  @param c  Character to locate.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for @a c within this string.
+       *  If found, returns the index where it was found.  If not found,
+       *  returns npos.
+      */
+      size_type
+      find(_CharT __c, size_type __pos = 0) const;
+
+      /**
+       *  @brief  Find last position of a string.
+       *  @param str  String to locate.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of start of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for value of @a str within
+       *  this string.  If found, returns the index where it begins.  If not
+       *  found, returns npos.
+      */
+      size_type
+      rfind(const basic_string& __str, size_type __pos = npos) const
+      { return this->rfind(__str.data(), __pos, __str.size()); }
+
+      /**
+       *  @brief  Find last position of a C substring.
+       *  @param s  C string to locate.
+       *  @param pos  Index of character to search back from.
+       *  @param n  Number of characters from s to search for.
+       *  @return  Index of start of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for the first @a n
+       *  characters in @a s within this string.  If found, returns the index
+       *  where it begins.  If not found, returns npos.
+      */
+      size_type
+      rfind(const _CharT* __s, size_type __pos, size_type __n) const;
+
+      /**
+       *  @brief  Find last position of a C string.
+       *  @param s  C string to locate.
+       *  @param pos  Index of character to start search at (default end).
+       *  @return  Index of start of  last occurrence.
+       *
+       *  Starting from @a pos, searches backward for the value of @a s within
+       *  this string.  If found, returns the index where it begins.  If not
+       *  found, returns npos.
+      */
+      size_type
+      rfind(const _CharT* __s, size_type __pos = npos) const
+      {
+	__glibcxx_requires_string(__s);
+	return this->rfind(__s, __pos, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Find last position of a character.
+       *  @param c  Character to locate.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for @a c within this string.
+       *  If found, returns the index where it was found.  If not found,
+       *  returns npos.
+      */
+      size_type
+      rfind(_CharT __c, size_type __pos = npos) const;
+
+      /**
+       *  @brief  Find position of a character of string.
+       *  @param str  String containing characters to locate.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for one of the characters of
+       *  @a str within this string.  If found, returns the index where it was
+       *  found.  If not found, returns npos.
+      */
+      size_type
+      find_first_of(const basic_string& __str, size_type __pos = 0) const
+      { return this->find_first_of(__str.data(), __pos, __str.size()); }
+
+      /**
+       *  @brief  Find position of a character of C substring.
+       *  @param s  String containing characters to locate.
+       *  @param pos  Index of character to search from.
+       *  @param n  Number of characters from s to search for.
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for one of the first @a n
+       *  characters of @a s within this string.  If found, returns the index
+       *  where it was found.  If not found, returns npos.
+      */
+      size_type
+      find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+      /**
+       *  @brief  Find position of a character of C string.
+       *  @param s  String containing characters to locate.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for one of the characters of
+       *  @a s within this string.  If found, returns the index where it was
+       *  found.  If not found, returns npos.
+      */
+      size_type
+      find_first_of(const _CharT* __s, size_type __pos = 0) const
+      {
+	__glibcxx_requires_string(__s);
+	return this->find_first_of(__s, __pos, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Find position of a character.
+       *  @param c  Character to locate.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for the character @a c within
+       *  this string.  If found, returns the index where it was found.  If
+       *  not found, returns npos.
+       *
+       *  Note: equivalent to find(c, pos).
+      */
+      size_type
+      find_first_of(_CharT __c, size_type __pos = 0) const
+      { return this->find(__c, __pos); }
+
+      /**
+       *  @brief  Find last position of a character of string.
+       *  @param str  String containing characters to locate.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for one of the characters of
+       *  @a str within this string.  If found, returns the index where it was
+       *  found.  If not found, returns npos.
+      */
+      size_type
+      find_last_of(const basic_string& __str, size_type __pos = npos) const
+      { return this->find_last_of(__str.data(), __pos, __str.size()); }
+
+      /**
+       *  @brief  Find last position of a character of C substring.
+       *  @param s  C string containing characters to locate.
+       *  @param pos  Index of character to search back from.
+       *  @param n  Number of characters from s to search for.
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for one of the first @a n
+       *  characters of @a s within this string.  If found, returns the index
+       *  where it was found.  If not found, returns npos.
+      */
+      size_type
+      find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+      /**
+       *  @brief  Find last position of a character of C string.
+       *  @param s  C string containing characters to locate.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for one of the characters of
+       *  @a s within this string.  If found, returns the index where it was
+       *  found.  If not found, returns npos.
+      */
+      size_type
+      find_last_of(const _CharT* __s, size_type __pos = npos) const
+      {
+	__glibcxx_requires_string(__s);
+	return this->find_last_of(__s, __pos, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Find last position of a character.
+       *  @param c  Character to locate.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for @a c within this string.
+       *  If found, returns the index where it was found.  If not found,
+       *  returns npos.
+       *
+       *  Note: equivalent to rfind(c, pos).
+      */
+      size_type
+      find_last_of(_CharT __c, size_type __pos = npos) const
+      { return this->rfind(__c, __pos); }
+
+      /**
+       *  @brief  Find position of a character not in string.
+       *  @param str  String containing characters to avoid.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for a character not contained
+       *  in @a str within this string.  If found, returns the index where it
+       *  was found.  If not found, returns npos.
+      */
+      size_type
+      find_first_not_of(const basic_string& __str, size_type __pos = 0) const
+      { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
+
+      /**
+       *  @brief  Find position of a character not in C substring.
+       *  @param s  C string containing characters to avoid.
+       *  @param pos  Index of character to search from.
+       *  @param n  Number of characters from s to consider.
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for a character not contained
+       *  in the first @a n characters of @a s within this string.  If found,
+       *  returns the index where it was found.  If not found, returns npos.
+      */
+      size_type
+      find_first_not_of(const _CharT* __s, size_type __pos,
+			size_type __n) const;
+
+      /**
+       *  @brief  Find position of a character not in C string.
+       *  @param s  C string containing characters to avoid.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for a character not contained
+       *  in @a s within this string.  If found, returns the index where it
+       *  was found.  If not found, returns npos.
+      */
+      size_type
+      find_first_not_of(const _CharT* __s, size_type __pos = 0) const
+      {
+	__glibcxx_requires_string(__s);
+	return this->find_first_not_of(__s, __pos, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Find position of a different character.
+       *  @param c  Character to avoid.
+       *  @param pos  Index of character to search from (default 0).
+       *  @return  Index of first occurrence.
+       *
+       *  Starting from @a pos, searches forward for a character other than @a c
+       *  within this string.  If found, returns the index where it was found.
+       *  If not found, returns npos.
+      */
+      size_type
+      find_first_not_of(_CharT __c, size_type __pos = 0) const;
+
+      /**
+       *  @brief  Find last position of a character not in string.
+       *  @param str  String containing characters to avoid.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for a character not
+       *  contained in @a str within this string.  If found, returns the index
+       *  where it was found.  If not found, returns npos.
+      */
+      size_type
+      find_last_not_of(const basic_string& __str, size_type __pos = npos) const
+      { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
+
+      /**
+       *  @brief  Find last position of a character not in C substring.
+       *  @param s  C string containing characters to avoid.
+       *  @param pos  Index of character to search back from.
+       *  @param n  Number of characters from s to consider.
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for a character not
+       *  contained in the first @a n characters of @a s within this string.
+       *  If found, returns the index where it was found.  If not found,
+       *  returns npos.
+      */
+      size_type
+      find_last_not_of(const _CharT* __s, size_type __pos,
+		       size_type __n) const;
+      /**
+       *  @brief  Find last position of a character not in C string.
+       *  @param s  C string containing characters to avoid.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for a character not
+       *  contained in @a s within this string.  If found, returns the index
+       *  where it was found.  If not found, returns npos.
+      */
+      size_type
+      find_last_not_of(const _CharT* __s, size_type __pos = npos) const
+      {
+	__glibcxx_requires_string(__s);
+	return this->find_last_not_of(__s, __pos, traits_type::length(__s));
+      }
+
+      /**
+       *  @brief  Find last position of a different character.
+       *  @param c  Character to avoid.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
+       *
+       *  Starting from @a pos, searches backward for a character other than
+       *  @a c within this string.  If found, returns the index where it was
+       *  found.  If not found, returns npos.
+      */
+      size_type
+      find_last_not_of(_CharT __c, size_type __pos = npos) const;
+
+      /**
+       *  @brief  Get a substring.
+       *  @param pos  Index of first character (default 0).
+       *  @param n  Number of characters in substring (default remainder).
+       *  @return  The new string.
+       *  @throw  std::out_of_range  If pos > size().
+       *
+       *  Construct and return a new string using the @a n characters starting
+       *  at @a pos.  If the string is too short, use the remainder of the
+       *  characters.  If @a pos is beyond the end of the string, out_of_range
+       *  is thrown.
+      */
+      basic_string
+      substr(size_type __pos = 0, size_type __n = npos) const
+      { return basic_string(*this,
+			    _M_check(__pos, "basic_string::substr"), __n); }
+
+      /**
+       *  @brief  Compare to a string.
+       *  @param str  String to compare against.
+       *  @return  Integer < 0, 0, or > 0.
+       *
+       *  Returns an integer < 0 if this string is ordered before @a str, 0 if
+       *  their values are equivalent, or > 0 if this string is ordered after
+       *  @a str.  Determines the effective length rlen of the strings to
+       *  compare as the smallest of size() and str.size().  The function
+       *  then compares the two strings by calling traits::compare(data(),
+       *  str.data(),rlen).  If the result of the comparison is nonzero returns
+       *  it, otherwise the shorter one is ordered first.
+      */
+      int
+      compare(const basic_string& __str) const
+      {
+	const size_type __size = this->size();
+	const size_type __osize = __str.size();
+	const size_type __len = std::min(__size, __osize);
+
+	int __r = traits_type::compare(_M_data(), __str.data(), __len);
+	if (!__r)
+	  __r = _S_compare(__size, __osize);
+	return __r;
+      }
+
+      /**
+       *  @brief  Compare substring to a string.
+       *  @param pos  Index of first character of substring.
+       *  @param n  Number of characters in substring.
+       *  @param str  String to compare against.
+       *  @return  Integer < 0, 0, or > 0.
+       *
+       *  Form the substring of this string from the @a n characters starting
+       *  at @a pos.  Returns an integer < 0 if the substring is ordered
+       *  before @a str, 0 if their values are equivalent, or > 0 if the
+       *  substring is ordered after @a str.  Determines the effective length
+       *  rlen of the strings to compare as the smallest of the length of the
+       *  substring and @a str.size().  The function then compares the two
+       *  strings by calling traits::compare(substring.data(),str.data(),rlen).
+       *  If the result of the comparison is nonzero returns it, otherwise the
+       *  shorter one is ordered first.
+      */
+      int
+      compare(size_type __pos, size_type __n, const basic_string& __str) const;
+
+      /**
+       *  @brief  Compare substring to a substring.
+       *  @param pos1  Index of first character of substring.
+       *  @param n1  Number of characters in substring.
+       *  @param str  String to compare against.
+       *  @param pos2  Index of first character of substring of str.
+       *  @param n2  Number of characters in substring of str.
+       *  @return  Integer < 0, 0, or > 0.
+       *
+       *  Form the substring of this string from the @a n1 characters starting
+       *  at @a pos1.  Form the substring of @a str from the @a n2 characters
+       *  starting at @a pos2.  Returns an integer < 0 if this substring is
+       *  ordered before the substring of @a str, 0 if their values are
+       *  equivalent, or > 0 if this substring is ordered after the substring
+       *  of @a str.  Determines the effective length rlen of the strings
+       *  to compare as the smallest of the lengths of the substrings.  The
+       *  function then compares the two strings by calling
+       *  traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen).
+       *  If the result of the comparison is nonzero returns it, otherwise the
+       *  shorter one is ordered first.
+      */
+      int
+      compare(size_type __pos1, size_type __n1, const basic_string& __str,
+	      size_type __pos2, size_type __n2) const;
+
+      /**
+       *  @brief  Compare to a C string.
+       *  @param s  C string to compare against.
+       *  @return  Integer < 0, 0, or > 0.
+       *
+       *  Returns an integer < 0 if this string is ordered before @a s, 0 if
+       *  their values are equivalent, or > 0 if this string is ordered after
+       *  @a s.  Determines the effective length rlen of the strings to
+       *  compare as the smallest of size() and the length of a string
+       *  constructed from @a s.  The function then compares the two strings
+       *  by calling traits::compare(data(),s,rlen).  If the result of the
+       *  comparison is nonzero returns it, otherwise the shorter one is
+       *  ordered first.
+      */
+      int
+      compare(const _CharT* __s) const;
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 5 String::compare specification questionable
+      /**
+       *  @brief  Compare substring to a C string.
+       *  @param pos  Index of first character of substring.
+       *  @param n1  Number of characters in substring.
+       *  @param s  C string to compare against.
+       *  @return  Integer < 0, 0, or > 0.
+       *
+       *  Form the substring of this string from the @a n1 characters starting
+       *  at @a pos.  Returns an integer < 0 if the substring is ordered
+       *  before @a s, 0 if their values are equivalent, or > 0 if the
+       *  substring is ordered after @a s.  Determines the effective length
+       *  rlen of the strings to compare as the smallest of the length of the 
+       *  substring and the length of a string constructed from @a s.  The
+       *  function then compares the two string by calling
+       *  traits::compare(substring.data(),s,rlen).  If the result of the
+       *  comparison is nonzero returns it, otherwise the shorter one is
+       *  ordered first.
+      */
+      int
+      compare(size_type __pos, size_type __n1, const _CharT* __s) const;
+
+      /**
+       *  @brief  Compare substring against a character %array.
+       *  @param pos1  Index of first character of substring.
+       *  @param n1  Number of characters in substring.
+       *  @param s  character %array to compare against.
+       *  @param n2  Number of characters of s.
+       *  @return  Integer < 0, 0, or > 0.
+       *
+       *  Form the substring of this string from the @a n1 characters starting
+       *  at @a pos1.  Form a string from the first @a n2 characters of @a s.
+       *  Returns an integer < 0 if this substring is ordered before the string
+       *  from @a s, 0 if their values are equivalent, or > 0 if this substring
+       *  is ordered after the string from @a s.   Determines the effective
+       *  length rlen of the strings to compare as the smallest of the length
+       *  of the substring and @a n2.  The function then compares the two
+       *  strings by calling traits::compare(substring.data(),s,rlen).  If the
+       *  result of the comparison is nonzero returns it, otherwise the shorter
+       *  one is ordered first.
+       *
+       *  NB: s must have at least n2 characters, &apos;\\0&apos; has
+       *  no special meaning.
+      */
+      int
+      compare(size_type __pos, size_type __n1, const _CharT* __s,
+	      size_type __n2) const;
+  };
+
+  // operator+
+  /**
+   *  @brief  Concatenate two strings.
+   *  @param lhs  First string.
+   *  @param rhs  Last string.
+   *  @return  New string with value of @a lhs followed by @a rhs.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>
+    operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    {
+      basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
+      __str.append(__rhs);
+      return __str;
+    }
+
+  /**
+   *  @brief  Concatenate C string and string.
+   *  @param lhs  First string.
+   *  @param rhs  Last string.
+   *  @return  New string with value of @a lhs followed by @a rhs.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT,_Traits,_Alloc>
+    operator+(const _CharT* __lhs,
+	      const basic_string<_CharT,_Traits,_Alloc>& __rhs);
+
+  /**
+   *  @brief  Concatenate character and string.
+   *  @param lhs  First string.
+   *  @param rhs  Last string.
+   *  @return  New string with @a lhs followed by @a rhs.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT,_Traits,_Alloc>
+    operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);
+
+  /**
+   *  @brief  Concatenate string and C string.
+   *  @param lhs  First string.
+   *  @param rhs  Last string.
+   *  @return  New string with @a lhs followed by @a rhs.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline basic_string<_CharT, _Traits, _Alloc>
+    operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	     const _CharT* __rhs)
+    {
+      basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
+      __str.append(__rhs);
+      return __str;
+    }
+
+  /**
+   *  @brief  Concatenate string and character.
+   *  @param lhs  First string.
+   *  @param rhs  Last string.
+   *  @return  New string with @a lhs followed by @a rhs.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline basic_string<_CharT, _Traits, _Alloc>
+    operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
+    {
+      typedef basic_string<_CharT, _Traits, _Alloc>	__string_type;
+      typedef typename __string_type::size_type		__size_type;
+      __string_type __str(__lhs);
+      __str.append(__size_type(1), __rhs);
+      return __str;
+    }
+
+  // operator ==
+  /**
+   *  @brief  Test equivalence of two strings.
+   *  @param lhs  First string.
+   *  @param rhs  Second string.
+   *  @return  True if @a lhs.compare(@a rhs) == 0.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) == 0; }
+
+  template<typename _CharT>
+    inline
+    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type
+    operator==(const basic_string<_CharT>& __lhs,
+	       const basic_string<_CharT>& __rhs)
+    { return (__lhs.size() == __rhs.size()
+	      && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(),
+						    __lhs.size())); }
+
+  /**
+   *  @brief  Test equivalence of C string and string.
+   *  @param lhs  C string.
+   *  @param rhs  String.
+   *  @return  True if @a rhs.compare(@a lhs) == 0.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator==(const _CharT* __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) == 0; }
+
+  /**
+   *  @brief  Test equivalence of string and C string.
+   *  @param lhs  String.
+   *  @param rhs  C string.
+   *  @return  True if @a lhs.compare(@a rhs) == 0.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const _CharT* __rhs)
+    { return __lhs.compare(__rhs) == 0; }
+
+  // operator !=
+  /**
+   *  @brief  Test difference of two strings.
+   *  @param lhs  First string.
+   *  @param rhs  Second string.
+   *  @return  True if @a lhs.compare(@a rhs) != 0.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return !(__lhs == __rhs); }
+
+  /**
+   *  @brief  Test difference of C string and string.
+   *  @param lhs  C string.
+   *  @param rhs  String.
+   *  @return  True if @a rhs.compare(@a lhs) != 0.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator!=(const _CharT* __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return !(__lhs == __rhs); }
+
+  /**
+   *  @brief  Test difference of string and C string.
+   *  @param lhs  String.
+   *  @param rhs  C string.
+   *  @return  True if @a lhs.compare(@a rhs) != 0.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const _CharT* __rhs)
+    { return !(__lhs == __rhs); }
+
+  // operator <
+  /**
+   *  @brief  Test if string precedes string.
+   *  @param lhs  First string.
+   *  @param rhs  Second string.
+   *  @return  True if @a lhs precedes @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) < 0; }
+
+  /**
+   *  @brief  Test if string precedes C string.
+   *  @param lhs  String.
+   *  @param rhs  C string.
+   *  @return  True if @a lhs precedes @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const _CharT* __rhs)
+    { return __lhs.compare(__rhs) < 0; }
+
+  /**
+   *  @brief  Test if C string precedes string.
+   *  @param lhs  C string.
+   *  @param rhs  String.
+   *  @return  True if @a lhs precedes @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator<(const _CharT* __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) > 0; }
+
+  // operator >
+  /**
+   *  @brief  Test if string follows string.
+   *  @param lhs  First string.
+   *  @param rhs  Second string.
+   *  @return  True if @a lhs follows @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) > 0; }
+
+  /**
+   *  @brief  Test if string follows C string.
+   *  @param lhs  String.
+   *  @param rhs  C string.
+   *  @return  True if @a lhs follows @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const _CharT* __rhs)
+    { return __lhs.compare(__rhs) > 0; }
+
+  /**
+   *  @brief  Test if C string follows string.
+   *  @param lhs  C string.
+   *  @param rhs  String.
+   *  @return  True if @a lhs follows @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator>(const _CharT* __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) < 0; }
+
+  // operator <=
+  /**
+   *  @brief  Test if string doesn't follow string.
+   *  @param lhs  First string.
+   *  @param rhs  Second string.
+   *  @return  True if @a lhs doesn't follow @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) <= 0; }
+
+  /**
+   *  @brief  Test if string doesn't follow C string.
+   *  @param lhs  String.
+   *  @param rhs  C string.
+   *  @return  True if @a lhs doesn't follow @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const _CharT* __rhs)
+    { return __lhs.compare(__rhs) <= 0; }
+
+  /**
+   *  @brief  Test if C string doesn't follow string.
+   *  @param lhs  C string.
+   *  @param rhs  String.
+   *  @return  True if @a lhs doesn't follow @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator<=(const _CharT* __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) >= 0; }
+
+  // operator >=
+  /**
+   *  @brief  Test if string doesn't precede string.
+   *  @param lhs  First string.
+   *  @param rhs  Second string.
+   *  @return  True if @a lhs doesn't precede @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) >= 0; }
+
+  /**
+   *  @brief  Test if string doesn't precede C string.
+   *  @param lhs  String.
+   *  @param rhs  C string.
+   *  @return  True if @a lhs doesn't precede @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const _CharT* __rhs)
+    { return __lhs.compare(__rhs) >= 0; }
+
+  /**
+   *  @brief  Test if C string doesn't precede string.
+   *  @param lhs  C string.
+   *  @param rhs  String.
+   *  @return  True if @a lhs doesn't precede @a rhs.  False otherwise.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline bool
+    operator>=(const _CharT* __lhs,
+	     const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) <= 0; }
+
+  /**
+   *  @brief  Swap contents of two strings.
+   *  @param lhs  First string.
+   *  @param rhs  Second string.
+   *
+   *  Exchanges the contents of @a lhs and @a rhs in constant time.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline void
+    swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	 basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { __lhs.swap(__rhs); }
+
+  /**
+   *  @brief  Read stream into a string.
+   *  @param is  Input stream.
+   *  @param str  Buffer to store into.
+   *  @return  Reference to the input stream.
+   *
+   *  Stores characters from @a is into @a str until whitespace is found, the
+   *  end of the stream is encountered, or str.max_size() is reached.  If
+   *  is.width() is non-zero, that is the limit on the number of characters
+   *  stored into @a str.  Any previous contents of @a str are erased.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __is,
+	       basic_string<_CharT, _Traits, _Alloc>& __str);
+
+  template<>
+    basic_istream<char>&
+    operator>>(basic_istream<char>& __is, basic_string<char>& __str);
+
+  /**
+   *  @brief  Write string to a stream.
+   *  @param os  Output stream.
+   *  @param str  String to write out.
+   *  @return  Reference to the output stream.
+   *
+   *  Output characters of @a str into os following the same rules as for
+   *  writing a C string.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __os,
+	       const basic_string<_CharT, _Traits, _Alloc>& __str)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 586. string inserter not a formatted function
+      return __ostream_insert(__os, __str.data(), __str.size());
+    }
+
+  /**
+   *  @brief  Read a line from stream into a string.
+   *  @param is  Input stream.
+   *  @param str  Buffer to store into.
+   *  @param delim  Character marking end of line.
+   *  @return  Reference to the input stream.
+   *
+   *  Stores characters from @a is into @a str until @a delim is found, the
+   *  end of the stream is encountered, or str.max_size() is reached.  If
+   *  is.width() is non-zero, that is the limit on the number of characters
+   *  stored into @a str.  Any previous contents of @a str are erased.  If @a
+   *  delim was encountered, it is extracted but not stored into @a str.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_istream<_CharT, _Traits>&
+    getline(basic_istream<_CharT, _Traits>& __is,
+	    basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);
+
+  /**
+   *  @brief  Read a line from stream into a string.
+   *  @param is  Input stream.
+   *  @param str  Buffer to store into.
+   *  @return  Reference to the input stream.
+   *
+   *  Stores characters from is into @a str until &apos;\n&apos; is
+   *  found, the end of the stream is encountered, or str.max_size()
+   *  is reached.  If is.width() is non-zero, that is the limit on the
+   *  number of characters stored into @a str.  Any previous contents
+   *  of @a str are erased.  If end of line was encountered, it is
+   *  extracted but not stored into @a str.
+   */
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    inline basic_istream<_CharT, _Traits>&
+    getline(basic_istream<_CharT, _Traits>& __is,
+	    basic_string<_CharT, _Traits, _Alloc>& __str)
+    { return getline(__is, __str, __is.widen('\n')); }
+
+  template<>
+    basic_istream<char>&
+    getline(basic_istream<char>& __in, basic_string<char>& __str,
+	    char __delim);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    basic_istream<wchar_t>&
+    getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str,
+	    wchar_t __delim);
+#endif  
+
+_GLIBCXX_END_NAMESPACE
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99) \
+     && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
+
+#include <ext/string_conversions.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // 21.4 Numeric Conversions [string.conversions].
+  inline int
+  stoi(const string& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
+					__idx, __base); }
+
+  inline long
+  stol(const string& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(),
+			     __idx, __base); }
+
+  inline unsigned long
+  stoul(const string& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(),
+			     __idx, __base); }
+
+  inline long long
+  stoll(const string& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
+			     __idx, __base); }
+
+  inline unsigned long long
+  stoull(const string& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),
+			     __idx, __base); }
+
+  // NB: strtof vs strtod.
+  inline float
+  stof(const string& __str, size_t* __idx = 0)
+  { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
+
+  inline double
+  stod(const string& __str, size_t* __idx = 0)
+  { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
+
+  inline long double
+  stold(const string& __str, size_t* __idx = 0)
+  { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
+
+  // NB: (v)snprintf vs sprintf.
+
+  // DR 1261.
+  inline string
+  to_string(int __val)
+  { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(int),
+					   "%d", __val); }
+
+  inline string
+  to_string(unsigned __val)
+  { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
+					   4 * sizeof(unsigned),
+					   "%u", __val); }
+
+  inline string
+  to_string(long __val)
+  { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long),
+					   "%ld", __val); }
+
+  inline string
+  to_string(unsigned long __val)
+  { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
+					   4 * sizeof(unsigned long),
+					   "%lu", __val); }
+
+  inline string
+  to_string(long long __val)
+  { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
+					   4 * sizeof(long long),
+					   "%lld", __val); }
+
+  inline string
+  to_string(unsigned long long __val)
+  { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
+					   4 * sizeof(unsigned long long),
+					   "%llu", __val); }
+
+  inline string
+  to_string(float __val)
+  {
+    const int __n = 
+      __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20;
+    return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
+					   "%f", __val);
+  }
+
+  inline string
+  to_string(double __val)
+  {
+    const int __n = 
+      __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20;
+    return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
+					   "%f", __val);
+  }
+
+  inline string
+  to_string(long double __val)
+  {
+    const int __n = 
+      __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20;
+    return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
+					   "%Lf", __val);
+  }
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  inline int 
+  stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
+					__idx, __base); }
+
+  inline long 
+  stol(const wstring& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(),
+			     __idx, __base); }
+
+  inline unsigned long
+  stoul(const wstring& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(),
+			     __idx, __base); }
+
+  inline long long
+  stoll(const wstring& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),
+			     __idx, __base); }
+
+  inline unsigned long long
+  stoull(const wstring& __str, size_t* __idx = 0, int __base = 10)
+  { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(),
+			     __idx, __base); }
+
+  // NB: wcstof vs wcstod.
+  inline float
+  stof(const wstring& __str, size_t* __idx = 0)
+  { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }
+
+  inline double
+  stod(const wstring& __str, size_t* __idx = 0)
+  { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); }
+
+  inline long double
+  stold(const wstring& __str, size_t* __idx = 0)
+  { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
+
+  // DR 1261.
+  inline wstring
+  to_wstring(int __val)
+  { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(int),
+					    L"%d", __val); }
+
+  inline wstring
+  to_wstring(unsigned __val)
+  { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,
+					    4 * sizeof(unsigned),
+					    L"%u", __val); }
+
+  inline wstring
+  to_wstring(long __val)
+  { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(long),
+					    L"%ld", __val); }
+
+  inline wstring
+  to_wstring(unsigned long __val)
+  { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,
+					    4 * sizeof(unsigned long),
+					    L"%lu", __val); }
+
+  inline wstring
+  to_wstring(long long __val)
+  { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,
+					    4 * sizeof(long long),
+					    L"%lld", __val); }
+
+  inline wstring
+  to_wstring(unsigned long long __val)
+  { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,
+					    4 * sizeof(unsigned long long),
+					    L"%llu", __val); }
+
+  inline wstring
+  to_wstring(float __val)
+  {
+    const int __n =
+      __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20;
+    return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,
+					    L"%f", __val);
+  }
+
+  inline wstring
+  to_wstring(double __val)
+  {
+    const int __n =
+      __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20;
+    return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,
+					    L"%f", __val);
+  }
+
+  inline wstring
+  to_wstring(long double __val)
+  {
+    const int __n =
+      __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20;
+    return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,
+					    L"%Lf", __val);
+  }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* __GXX_EXPERIMENTAL_CXX0X__ && _GLIBCXX_USE_C99 ... */
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+#include <bits/functional_hash.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // DR 1182.
+
+#ifndef _GLIBCXX_COMPATIBILITY_CXX0X
+  /// std::hash specialization for string.
+  template<>
+    struct hash<string>
+    : public std::unary_function<string, size_t>
+    {
+      size_t
+      operator()(const string& __s) const
+      { return std::_Fnv_hash::hash(__s.data(), __s.length()); }
+    };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  /// std::hash specialization for wstring.
+  template<>
+    struct hash<wstring>
+    : public std::unary_function<wstring, size_t>
+    {
+      size_t
+      operator()(const wstring& __s) const
+      { return std::_Fnv_hash::hash(__s.data(),
+				    __s.length() * sizeof(wchar_t)); }
+    };
+#endif
+#endif /* _GLIBCXX_COMPATIBILITY_CXX0X */
+
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
+  /// std::hash specialization for u16string.
+  template<>
+    struct hash<u16string>
+    : public std::unary_function<u16string, size_t>
+    {
+      size_t
+      operator()(const u16string& __s) const
+      { return std::_Fnv_hash::hash(__s.data(),
+				    __s.length() * sizeof(char16_t)); }
+    };
+
+  /// std::hash specialization for u32string.
+  template<>
+    struct hash<u32string>
+    : public std::unary_function<u32string, size_t>
+    {
+      size_t
+      operator()(const u32string& __s) const
+      { return std::_Fnv_hash::hash(__s.data(),
+				    __s.length() * sizeof(char32_t)); }
+    };
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* __GXX_EXPERIMENTAL_CXX0X__ */
+
+#endif /* _BASIC_STRING_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_string.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_string.tcc
new file mode 100644
index 0000000..d450a47
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/basic_string.tcc
@@ -0,0 +1,1166 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file basic_string.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 21  Strings library
+//
+
+// Written by Jason Merrill based upon the specification by Takanori Adachi
+// in ANSI X3J16/94-0013R2.  Rewritten by Nathan Myers to ISO-14882.
+
+#ifndef _BASIC_STRING_TCC
+#define _BASIC_STRING_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    const typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4;
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    const _CharT
+    basic_string<_CharT, _Traits, _Alloc>::
+    _Rep::_S_terminal = _CharT();
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    const typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::npos;
+
+  // Linker sets _S_empty_rep_storage to all 0s (one reference, empty string)
+  // at static init time (before static ctors are run).
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[
+    (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) /
+      sizeof(size_type)];
+
+  // NB: This is the special case for Input Iterators, used in
+  // istreambuf_iterators, etc.
+  // Input Iterators have a cost structure very different from
+  // pointers, calling for a different coding style.
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    template<typename _InIterator>
+      _CharT*
+      basic_string<_CharT, _Traits, _Alloc>::
+      _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+		   input_iterator_tag)
+      {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+	if (__beg == __end && __a == _Alloc())
+	  return _S_empty_rep()._M_refdata();
+#endif
+	// Avoid reallocation for common case.
+	_CharT __buf[128];
+	size_type __len = 0;
+	while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
+	  {
+	    __buf[__len++] = *__beg;
+	    ++__beg;
+	  }
+	_Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
+	_M_copy(__r->_M_refdata(), __buf, __len);
+	__try
+	  {
+	    while (__beg != __end)
+	      {
+		if (__len == __r->_M_capacity)
+		  {
+		    // Allocate more space.
+		    _Rep* __another = _Rep::_S_create(__len + 1, __len, __a);
+		    _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len);
+		    __r->_M_destroy(__a);
+		    __r = __another;
+		  }
+		__r->_M_refdata()[__len++] = *__beg;
+		++__beg;
+	      }
+	  }
+	__catch(...)
+	  {
+	    __r->_M_destroy(__a);
+	    __throw_exception_again;
+	  }
+	__r->_M_set_length_and_sharable(__len);
+	return __r->_M_refdata();
+      }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    template <typename _InIterator>
+      _CharT*
+      basic_string<_CharT, _Traits, _Alloc>::
+      _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+		   forward_iterator_tag)
+      {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+	if (__beg == __end && __a == _Alloc())
+	  return _S_empty_rep()._M_refdata();
+#endif
+	// NB: Not required, but considered best practice.
+	if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end)
+	  __throw_logic_error(__N("basic_string::_S_construct NULL not valid"));
+
+	const size_type __dnew = static_cast<size_type>(std::distance(__beg,
+								      __end));
+	// Check for out_of_range and length_error exceptions.
+	_Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
+	__try
+	  { _S_copy_chars(__r->_M_refdata(), __beg, __end); }
+	__catch(...)
+	  {
+	    __r->_M_destroy(__a);
+	    __throw_exception_again;
+	  }
+	__r->_M_set_length_and_sharable(__dnew);
+	return __r->_M_refdata();
+      }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    _CharT*
+    basic_string<_CharT, _Traits, _Alloc>::
+    _S_construct(size_type __n, _CharT __c, const _Alloc& __a)
+    {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+      if (__n == 0 && __a == _Alloc())
+	return _S_empty_rep()._M_refdata();
+#endif
+      // Check for out_of_range and length_error exceptions.
+      _Rep* __r = _Rep::_S_create(__n, size_type(0), __a);
+      if (__n)
+	_M_assign(__r->_M_refdata(), __n, __c);
+
+      __r->_M_set_length_and_sharable(__n);
+      return __r->_M_refdata();
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const basic_string& __str)
+    : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()),
+					  __str.get_allocator()),
+		  __str.get_allocator())
+    { }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const _Alloc& __a)
+    : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a)
+    { }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const basic_string& __str, size_type __pos, size_type __n)
+    : _M_dataplus(_S_construct(__str._M_data()
+			       + __str._M_check(__pos,
+						"basic_string::basic_string"),
+			       __str._M_data() + __str._M_limit(__pos, __n)
+			       + __pos, _Alloc()), _Alloc())
+    { }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const basic_string& __str, size_type __pos,
+		 size_type __n, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__str._M_data()
+			       + __str._M_check(__pos,
+						"basic_string::basic_string"),
+			       __str._M_data() + __str._M_limit(__pos, __n)
+			       + __pos, __a), __a)
+    { }
+
+  // TBD: DPG annotate
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const _CharT* __s, size_type __n, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__s, __s + __n, __a), __a)
+    { }
+
+  // TBD: DPG annotate
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const _CharT* __s, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) :
+			       __s + npos, __a), __a)
+    { }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(size_type __n, _CharT __c, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__n, __c, __a), __a)
+    { }
+
+  // TBD: DPG annotate
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    template<typename _InputIterator>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__beg, __end, __a), __a)
+    { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(initializer_list<_CharT> __l, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__l.begin(), __l.end(), __a), __a)
+    { }
+#endif
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    assign(const basic_string& __str)
+    {
+      if (_M_rep() != __str._M_rep())
+	{
+	  // XXX MT
+	  const allocator_type __a = this->get_allocator();
+	  _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator());
+	  _M_rep()->_M_dispose(__a);
+	  _M_data(__tmp);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    assign(const _CharT* __s, size_type __n)
+    {
+      __glibcxx_requires_string_len(__s, __n);
+      _M_check_length(this->size(), __n, "basic_string::assign");
+      if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
+	return _M_replace_safe(size_type(0), this->size(), __s, __n);
+      else
+	{
+	  // Work in-place.
+	  const size_type __pos = __s - _M_data();
+	  if (__pos >= __n)
+	    _M_copy(_M_data(), __s, __n);
+	  else if (__pos)
+	    _M_move(_M_data(), __s, __n);
+	  _M_rep()->_M_set_length_and_sharable(__n);
+	  return *this;
+	}
+     }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    append(size_type __n, _CharT __c)
+    {
+      if (__n)
+	{
+	  _M_check_length(size_type(0), __n, "basic_string::append");	  
+	  const size_type __len = __n + this->size();
+	  if (__len > this->capacity() || _M_rep()->_M_is_shared())
+	    this->reserve(__len);
+	  _M_assign(_M_data() + this->size(), __n, __c);
+	  _M_rep()->_M_set_length_and_sharable(__len);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    append(const _CharT* __s, size_type __n)
+    {
+      __glibcxx_requires_string_len(__s, __n);
+      if (__n)
+	{
+	  _M_check_length(size_type(0), __n, "basic_string::append");
+	  const size_type __len = __n + this->size();
+	  if (__len > this->capacity() || _M_rep()->_M_is_shared())
+	    {
+	      if (_M_disjunct(__s))
+		this->reserve(__len);
+	      else
+		{
+		  const size_type __off = __s - _M_data();
+		  this->reserve(__len);
+		  __s = _M_data() + __off;
+		}
+	    }
+	  _M_copy(_M_data() + this->size(), __s, __n);
+	  _M_rep()->_M_set_length_and_sharable(__len);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    append(const basic_string& __str)
+    {
+      const size_type __size = __str.size();
+      if (__size)
+	{
+	  const size_type __len = __size + this->size();
+	  if (__len > this->capacity() || _M_rep()->_M_is_shared())
+	    this->reserve(__len);
+	  _M_copy(_M_data() + this->size(), __str._M_data(), __size);
+	  _M_rep()->_M_set_length_and_sharable(__len);
+	}
+      return *this;
+    }    
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    append(const basic_string& __str, size_type __pos, size_type __n)
+    {
+      __str._M_check(__pos, "basic_string::append");
+      __n = __str._M_limit(__pos, __n);
+      if (__n)
+	{
+	  const size_type __len = __n + this->size();
+	  if (__len > this->capacity() || _M_rep()->_M_is_shared())
+	    this->reserve(__len);
+	  _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n);
+	  _M_rep()->_M_set_length_and_sharable(__len);	  
+	}
+      return *this;
+    }
+
+   template<typename _CharT, typename _Traits, typename _Alloc>
+     basic_string<_CharT, _Traits, _Alloc>&
+     basic_string<_CharT, _Traits, _Alloc>::
+     insert(size_type __pos, const _CharT* __s, size_type __n)
+     {
+       __glibcxx_requires_string_len(__s, __n);
+       _M_check(__pos, "basic_string::insert");
+       _M_check_length(size_type(0), __n, "basic_string::insert");
+       if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
+         return _M_replace_safe(__pos, size_type(0), __s, __n);
+       else
+         {
+           // Work in-place.
+           const size_type __off = __s - _M_data();
+           _M_mutate(__pos, 0, __n);
+           __s = _M_data() + __off;
+           _CharT* __p = _M_data() + __pos;
+           if (__s  + __n <= __p)
+             _M_copy(__p, __s, __n);
+           else if (__s >= __p)
+             _M_copy(__p, __s + __n, __n);
+           else
+             {
+	       const size_type __nleft = __p - __s;
+               _M_copy(__p, __s, __nleft);
+               _M_copy(__p + __nleft, __p + __n, __n - __nleft);
+             }
+           return *this;
+         }
+     }
+
+   template<typename _CharT, typename _Traits, typename _Alloc>
+     typename basic_string<_CharT, _Traits, _Alloc>::iterator
+     basic_string<_CharT, _Traits, _Alloc>::
+     erase(iterator __first, iterator __last)
+     {
+       _GLIBCXX_DEBUG_PEDASSERT(__first >= _M_ibegin() && __first <= __last
+				&& __last <= _M_iend());
+
+       // NB: This isn't just an optimization (bail out early when
+       // there is nothing to do, really), it's also a correctness
+       // issue vs MT, see libstdc++/40518.
+       const size_type __size = __last - __first;
+       if (__size)
+	 {
+	   const size_type __pos = __first - _M_ibegin();
+	   _M_mutate(__pos, __size, size_type(0));
+	   _M_rep()->_M_set_leaked();
+	   return iterator(_M_data() + __pos);
+	 }
+       else
+	 return __first;
+     }
+
+   template<typename _CharT, typename _Traits, typename _Alloc>
+     basic_string<_CharT, _Traits, _Alloc>&
+     basic_string<_CharT, _Traits, _Alloc>::
+     replace(size_type __pos, size_type __n1, const _CharT* __s,
+	     size_type __n2)
+     {
+       __glibcxx_requires_string_len(__s, __n2);
+       _M_check(__pos, "basic_string::replace");
+       __n1 = _M_limit(__pos, __n1);
+       _M_check_length(__n1, __n2, "basic_string::replace");
+       bool __left;
+       if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
+         return _M_replace_safe(__pos, __n1, __s, __n2);
+       else if ((__left = __s + __n2 <= _M_data() + __pos)
+		|| _M_data() + __pos + __n1 <= __s)
+	 {
+	   // Work in-place: non-overlapping case.
+	   size_type __off = __s - _M_data();
+	   __left ? __off : (__off += __n2 - __n1);
+	   _M_mutate(__pos, __n1, __n2);
+	   _M_copy(_M_data() + __pos, _M_data() + __off, __n2);
+	   return *this;
+	 }
+       else
+	 {
+	   // Todo: overlapping case.
+	   const basic_string __tmp(__s, __n2);
+	   return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2);
+	 }
+     }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    void
+    basic_string<_CharT, _Traits, _Alloc>::_Rep::
+    _M_destroy(const _Alloc& __a) throw ()
+    {
+      const size_type __size = sizeof(_Rep_base) +
+	                       (this->_M_capacity + 1) * sizeof(_CharT);
+      _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size);
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    void
+    basic_string<_CharT, _Traits, _Alloc>::
+    _M_leak_hard()
+    {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+      if (_M_rep() == &_S_empty_rep())
+	return;
+#endif
+      if (_M_rep()->_M_is_shared())
+	_M_mutate(0, 0, 0);
+      _M_rep()->_M_set_leaked();
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    void
+    basic_string<_CharT, _Traits, _Alloc>::
+    _M_mutate(size_type __pos, size_type __len1, size_type __len2)
+    {
+      const size_type __old_size = this->size();
+      const size_type __new_size = __old_size + __len2 - __len1;
+      const size_type __how_much = __old_size - __pos - __len1;
+
+      if (__new_size > this->capacity() || _M_rep()->_M_is_shared())
+	{
+	  // Must reallocate.
+	  const allocator_type __a = get_allocator();
+	  _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a);
+
+	  if (__pos)
+	    _M_copy(__r->_M_refdata(), _M_data(), __pos);
+	  if (__how_much)
+	    _M_copy(__r->_M_refdata() + __pos + __len2,
+		    _M_data() + __pos + __len1, __how_much);
+
+	  _M_rep()->_M_dispose(__a);
+	  _M_data(__r->_M_refdata());
+	}
+      else if (__how_much && __len1 != __len2)
+	{
+	  // Work in-place.
+	  _M_move(_M_data() + __pos + __len2,
+		  _M_data() + __pos + __len1, __how_much);
+	}
+      _M_rep()->_M_set_length_and_sharable(__new_size);
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    void
+    basic_string<_CharT, _Traits, _Alloc>::
+    reserve(size_type __res)
+    {
+      if (__res != this->capacity() || _M_rep()->_M_is_shared())
+        {
+	  // Make sure we don't shrink below the current size
+	  if (__res < this->size())
+	    __res = this->size();
+	  const allocator_type __a = get_allocator();
+	  _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size());
+	  _M_rep()->_M_dispose(__a);
+	  _M_data(__tmp);
+        }
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    void
+    basic_string<_CharT, _Traits, _Alloc>::
+    swap(basic_string& __s)
+    {
+      if (_M_rep()->_M_is_leaked())
+	_M_rep()->_M_set_sharable();
+      if (__s._M_rep()->_M_is_leaked())
+	__s._M_rep()->_M_set_sharable();
+      if (this->get_allocator() == __s.get_allocator())
+	{
+	  _CharT* __tmp = _M_data();
+	  _M_data(__s._M_data());
+	  __s._M_data(__tmp);
+	}
+      // The code below can usually be optimized away.
+      else
+	{
+	  const basic_string __tmp1(_M_ibegin(), _M_iend(),
+				    __s.get_allocator());
+	  const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(),
+				    this->get_allocator());
+	  *this = __tmp2;
+	  __s = __tmp1;
+	}
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
+    basic_string<_CharT, _Traits, _Alloc>::_Rep::
+    _S_create(size_type __capacity, size_type __old_capacity,
+	      const _Alloc& __alloc)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 83.  String::npos vs. string::max_size()
+      if (__capacity > _S_max_size)
+	__throw_length_error(__N("basic_string::_S_create"));
+
+      // The standard places no restriction on allocating more memory
+      // than is strictly needed within this layer at the moment or as
+      // requested by an explicit application call to reserve().
+
+      // Many malloc implementations perform quite poorly when an
+      // application attempts to allocate memory in a stepwise fashion
+      // growing each allocation size by only 1 char.  Additionally,
+      // it makes little sense to allocate less linear memory than the
+      // natural blocking size of the malloc implementation.
+      // Unfortunately, we would need a somewhat low-level calculation
+      // with tuned parameters to get this perfect for any particular
+      // malloc implementation.  Fortunately, generalizations about
+      // common features seen among implementations seems to suffice.
+
+      // __pagesize need not match the actual VM page size for good
+      // results in practice, thus we pick a common value on the low
+      // side.  __malloc_header_size is an estimate of the amount of
+      // overhead per memory allocation (in practice seen N * sizeof
+      // (void*) where N is 0, 2 or 4).  According to folklore,
+      // picking this value on the high side is better than
+      // low-balling it (especially when this algorithm is used with
+      // malloc implementations that allocate memory blocks rounded up
+      // to a size which is a power of 2).
+      const size_type __pagesize = 4096;
+      const size_type __malloc_header_size = 4 * sizeof(void*);
+
+      // The below implements an exponential growth policy, necessary to
+      // meet amortized linear time requirements of the library: see
+      // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html.
+      // It's active for allocations requiring an amount of memory above
+      // system pagesize. This is consistent with the requirements of the
+      // standard: http://gcc.gnu.org/ml/libstdc++/2001-07/msg00130.html
+      if (__capacity > __old_capacity && __capacity < 2 * __old_capacity)
+	__capacity = 2 * __old_capacity;
+
+      // NB: Need an array of char_type[__capacity], plus a terminating
+      // null char_type() element, plus enough for the _Rep data structure.
+      // Whew. Seemingly so needy, yet so elemental.
+      size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+
+      const size_type __adj_size = __size + __malloc_header_size;
+      if (__adj_size > __pagesize && __capacity > __old_capacity)
+	{
+	  const size_type __extra = __pagesize - __adj_size % __pagesize;
+	  __capacity += __extra / sizeof(_CharT);
+	  // Never allocate a string bigger than _S_max_size.
+	  if (__capacity > _S_max_size)
+	    __capacity = _S_max_size;
+	  __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+	}
+
+      // NB: Might throw, but no worries about a leak, mate: _Rep()
+      // does not throw.
+      void* __place = _Raw_bytes_alloc(__alloc).allocate(__size);
+      _Rep *__p = new (__place) _Rep;
+      __p->_M_capacity = __capacity;
+      // ABI compatibility - 3.4.x set in _S_create both
+      // _M_refcount and _M_length.  All callers of _S_create
+      // in basic_string.tcc then set just _M_length.
+      // In 4.0.x and later both _M_refcount and _M_length
+      // are initialized in the callers, unfortunately we can
+      // have 3.4.x compiled code with _S_create callers inlined
+      // calling 4.0.x+ _S_create.
+      __p->_M_set_sharable();
+      return __p;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    _CharT*
+    basic_string<_CharT, _Traits, _Alloc>::_Rep::
+    _M_clone(const _Alloc& __alloc, size_type __res)
+    {
+      // Requested capacity of the clone.
+      const size_type __requested_cap = this->_M_length + __res;
+      _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity,
+				  __alloc);
+      if (this->_M_length)
+	_M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length);
+
+      __r->_M_set_length_and_sharable(this->_M_length);
+      return __r->_M_refdata();
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    void
+    basic_string<_CharT, _Traits, _Alloc>::
+    resize(size_type __n, _CharT __c)
+    {
+      const size_type __size = this->size();
+      _M_check_length(__size, __n, "basic_string::resize");
+      if (__size < __n)
+	this->append(__n - __size, __c);
+      else if (__n < __size)
+	this->erase(__n);
+      // else nothing (in particular, avoid calling _M_mutate() unnecessarily.)
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    template<typename _InputIterator>
+      basic_string<_CharT, _Traits, _Alloc>&
+      basic_string<_CharT, _Traits, _Alloc>::
+      _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
+			  _InputIterator __k2, __false_type)
+      {
+	const basic_string __s(__k1, __k2);
+	const size_type __n1 = __i2 - __i1;
+	_M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch");
+	return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(),
+			       __s.size());
+      }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+		   _CharT __c)
+    {
+      _M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
+      _M_mutate(__pos1, __n1, __n2);
+      if (__n2)
+	_M_assign(_M_data() + __pos1, __n2, __c);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
+		    size_type __n2)
+    {
+      _M_mutate(__pos1, __n1, __n2);
+      if (__n2)
+	_M_copy(_M_data() + __pos1, __s, __n2);
+      return *this;
+    }
+   
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>
+    operator+(const _CharT* __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    {
+      __glibcxx_requires_string(__lhs);
+      typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+      typedef typename __string_type::size_type	  __size_type;
+      const __size_type __len = _Traits::length(__lhs);
+      __string_type __str;
+      __str.reserve(__len + __rhs.size());
+      __str.append(__lhs, __len);
+      __str.append(__rhs);
+      return __str;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>
+    operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    {
+      typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+      typedef typename __string_type::size_type	  __size_type;
+      __string_type __str;
+      const __size_type __len = __rhs.size();
+      __str.reserve(__len + 1);
+      __str.append(__size_type(1), __lhs);
+      __str.append(__rhs);
+      return __str;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    copy(_CharT* __s, size_type __n, size_type __pos) const
+    {
+      _M_check(__pos, "basic_string::copy");
+      __n = _M_limit(__pos, __n);
+      __glibcxx_requires_string_len(__s, __n);
+      if (__n)
+	_M_copy(__s, _M_data() + __pos, __n);
+      // 21.3.5.7 par 3: do not append null.  (good.)
+      return __n;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      __glibcxx_requires_string_len(__s, __n);
+      const size_type __size = this->size();
+      const _CharT* __data = _M_data();
+
+      if (__n == 0)
+	return __pos <= __size ? __pos : npos;
+
+      if (__n <= __size)
+	{
+	  for (; __pos <= __size - __n; ++__pos)
+	    if (traits_type::eq(__data[__pos], __s[0])
+		&& traits_type::compare(__data + __pos + 1,
+					__s + 1, __n - 1) == 0)
+	      return __pos;
+	}
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find(_CharT __c, size_type __pos) const
+    {
+      size_type __ret = npos;
+      const size_type __size = this->size();
+      if (__pos < __size)
+	{
+	  const _CharT* __data = _M_data();
+	  const size_type __n = __size - __pos;
+	  const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
+	  if (__p)
+	    __ret = __p - __data;
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    rfind(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      __glibcxx_requires_string_len(__s, __n);
+      const size_type __size = this->size();
+      if (__n <= __size)
+	{
+	  __pos = std::min(size_type(__size - __n), __pos);
+	  const _CharT* __data = _M_data();
+	  do
+	    {
+	      if (traits_type::compare(__data + __pos, __s, __n) == 0)
+		return __pos;
+	    }
+	  while (__pos-- > 0);
+	}
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    rfind(_CharT __c, size_type __pos) const
+    {
+      size_type __size = this->size();
+      if (__size)
+	{
+	  if (--__size > __pos)
+	    __size = __pos;
+	  for (++__size; __size-- > 0; )
+	    if (traits_type::eq(_M_data()[__size], __c))
+	      return __size;
+	}
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      __glibcxx_requires_string_len(__s, __n);
+      for (; __n && __pos < this->size(); ++__pos)
+	{
+	  const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]);
+	  if (__p)
+	    return __pos;
+	}
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      __glibcxx_requires_string_len(__s, __n);
+      size_type __size = this->size();
+      if (__size && __n)
+	{
+	  if (--__size > __pos)
+	    __size = __pos;
+	  do
+	    {
+	      if (traits_type::find(__s, __n, _M_data()[__size]))
+		return __size;
+	    }
+	  while (__size-- != 0);
+	}
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      __glibcxx_requires_string_len(__s, __n);
+      for (; __pos < this->size(); ++__pos)
+	if (!traits_type::find(__s, __n, _M_data()[__pos]))
+	  return __pos;
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_first_not_of(_CharT __c, size_type __pos) const
+    {
+      for (; __pos < this->size(); ++__pos)
+	if (!traits_type::eq(_M_data()[__pos], __c))
+	  return __pos;
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      __glibcxx_requires_string_len(__s, __n);
+      size_type __size = this->size();
+      if (__size)
+	{
+	  if (--__size > __pos)
+	    __size = __pos;
+	  do
+	    {
+	      if (!traits_type::find(__s, __n, _M_data()[__size]))
+		return __size;
+	    }
+	  while (__size--);
+	}
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_last_not_of(_CharT __c, size_type __pos) const
+    {
+      size_type __size = this->size();
+      if (__size)
+	{
+	  if (--__size > __pos)
+	    __size = __pos;
+	  do
+	    {
+	      if (!traits_type::eq(_M_data()[__size], __c))
+		return __size;
+	    }
+	  while (__size--);
+	}
+      return npos;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    int
+    basic_string<_CharT, _Traits, _Alloc>::
+    compare(size_type __pos, size_type __n, const basic_string& __str) const
+    {
+      _M_check(__pos, "basic_string::compare");
+      __n = _M_limit(__pos, __n);
+      const size_type __osize = __str.size();
+      const size_type __len = std::min(__n, __osize);
+      int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len);
+      if (!__r)
+	__r = _S_compare(__n, __osize);
+      return __r;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    int
+    basic_string<_CharT, _Traits, _Alloc>::
+    compare(size_type __pos1, size_type __n1, const basic_string& __str,
+	    size_type __pos2, size_type __n2) const
+    {
+      _M_check(__pos1, "basic_string::compare");
+      __str._M_check(__pos2, "basic_string::compare");
+      __n1 = _M_limit(__pos1, __n1);
+      __n2 = __str._M_limit(__pos2, __n2);
+      const size_type __len = std::min(__n1, __n2);
+      int __r = traits_type::compare(_M_data() + __pos1,
+				     __str.data() + __pos2, __len);
+      if (!__r)
+	__r = _S_compare(__n1, __n2);
+      return __r;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    int
+    basic_string<_CharT, _Traits, _Alloc>::
+    compare(const _CharT* __s) const
+    {
+      __glibcxx_requires_string(__s);
+      const size_type __size = this->size();
+      const size_type __osize = traits_type::length(__s);
+      const size_type __len = std::min(__size, __osize);
+      int __r = traits_type::compare(_M_data(), __s, __len);
+      if (!__r)
+	__r = _S_compare(__size, __osize);
+      return __r;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    int
+    basic_string <_CharT, _Traits, _Alloc>::
+    compare(size_type __pos, size_type __n1, const _CharT* __s) const
+    {
+      __glibcxx_requires_string(__s);
+      _M_check(__pos, "basic_string::compare");
+      __n1 = _M_limit(__pos, __n1);
+      const size_type __osize = traits_type::length(__s);
+      const size_type __len = std::min(__n1, __osize);
+      int __r = traits_type::compare(_M_data() + __pos, __s, __len);
+      if (!__r)
+	__r = _S_compare(__n1, __osize);
+      return __r;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    int
+    basic_string <_CharT, _Traits, _Alloc>::
+    compare(size_type __pos, size_type __n1, const _CharT* __s,
+	    size_type __n2) const
+    {
+      __glibcxx_requires_string_len(__s, __n2);
+      _M_check(__pos, "basic_string::compare");
+      __n1 = _M_limit(__pos, __n1);
+      const size_type __len = std::min(__n1, __n2);
+      int __r = traits_type::compare(_M_data() + __pos, __s, __len);
+      if (!__r)
+	__r = _S_compare(__n1, __n2);
+      return __r;
+    }
+
+  // 21.3.7.9 basic_string::getline and operators
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in,
+	       basic_string<_CharT, _Traits, _Alloc>& __str)
+    {
+      typedef basic_istream<_CharT, _Traits>		__istream_type;
+      typedef basic_string<_CharT, _Traits, _Alloc>	__string_type;
+      typedef typename __istream_type::ios_base         __ios_base;
+      typedef typename __istream_type::int_type		__int_type;
+      typedef typename __string_type::size_type		__size_type;
+      typedef ctype<_CharT>				__ctype_type;
+      typedef typename __ctype_type::ctype_base         __ctype_base;
+
+      __size_type __extracted = 0;
+      typename __ios_base::iostate __err = __ios_base::goodbit;
+      typename __istream_type::sentry __cerb(__in, false);
+      if (__cerb)
+	{
+	  __try
+	    {
+	      // Avoid reallocation for common case.
+	      __str.erase();
+	      _CharT __buf[128];
+	      __size_type __len = 0;	      
+	      const streamsize __w = __in.width();
+	      const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
+		                              : __str.max_size();
+	      const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+	      const __int_type __eof = _Traits::eof();
+	      __int_type __c = __in.rdbuf()->sgetc();
+
+	      while (__extracted < __n
+		     && !_Traits::eq_int_type(__c, __eof)
+		     && !__ct.is(__ctype_base::space,
+				 _Traits::to_char_type(__c)))
+		{
+		  if (__len == sizeof(__buf) / sizeof(_CharT))
+		    {
+		      __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
+		      __len = 0;
+		    }
+		  __buf[__len++] = _Traits::to_char_type(__c);
+		  ++__extracted;
+		  __c = __in.rdbuf()->snextc();
+		}
+	      __str.append(__buf, __len);
+
+	      if (_Traits::eq_int_type(__c, __eof))
+		__err |= __ios_base::eofbit;
+	      __in.width(0);
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      __in._M_setstate(__ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    {
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 91. Description of operator>> and getline() for string<>
+	      // might cause endless loop
+	      __in._M_setstate(__ios_base::badbit);
+	    }
+	}
+      // 211.  operator>>(istream&, string&) doesn't set failbit
+      if (!__extracted)
+	__err |= __ios_base::failbit;
+      if (__err)
+	__in.setstate(__err);
+      return __in;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_istream<_CharT, _Traits>&
+    getline(basic_istream<_CharT, _Traits>& __in,
+	    basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)
+    {
+      typedef basic_istream<_CharT, _Traits>		__istream_type;
+      typedef basic_string<_CharT, _Traits, _Alloc>	__string_type;
+      typedef typename __istream_type::ios_base         __ios_base;
+      typedef typename __istream_type::int_type		__int_type;
+      typedef typename __string_type::size_type		__size_type;
+
+      __size_type __extracted = 0;
+      const __size_type __n = __str.max_size();
+      typename __ios_base::iostate __err = __ios_base::goodbit;
+      typename __istream_type::sentry __cerb(__in, true);
+      if (__cerb)
+	{
+	  __try
+	    {
+	      __str.erase();
+	      const __int_type __idelim = _Traits::to_int_type(__delim);
+	      const __int_type __eof = _Traits::eof();
+	      __int_type __c = __in.rdbuf()->sgetc();
+
+	      while (__extracted < __n
+		     && !_Traits::eq_int_type(__c, __eof)
+		     && !_Traits::eq_int_type(__c, __idelim))
+		{
+		  __str += _Traits::to_char_type(__c);
+		  ++__extracted;
+		  __c = __in.rdbuf()->snextc();
+		}
+
+	      if (_Traits::eq_int_type(__c, __eof))
+		__err |= __ios_base::eofbit;
+	      else if (_Traits::eq_int_type(__c, __idelim))
+		{
+		  ++__extracted;		  
+		  __in.rdbuf()->sbumpc();
+		}
+	      else
+		__err |= __ios_base::failbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      __in._M_setstate(__ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    {
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 91. Description of operator>> and getline() for string<>
+	      // might cause endless loop
+	      __in._M_setstate(__ios_base::badbit);
+	    }
+	}
+      if (!__extracted)
+	__err |= __ios_base::failbit;
+      if (__err)
+	__in.setstate(__err);
+      return __in;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE > 0
+  extern template class basic_string<char>;
+  extern template
+    basic_istream<char>&
+    operator>>(basic_istream<char>&, string&);
+  extern template
+    basic_ostream<char>&
+    operator<<(basic_ostream<char>&, const string&);
+  extern template
+    basic_istream<char>&
+    getline(basic_istream<char>&, string&, char);
+  extern template
+    basic_istream<char>&
+    getline(basic_istream<char>&, string&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class basic_string<wchar_t>;
+  extern template
+    basic_istream<wchar_t>&
+    operator>>(basic_istream<wchar_t>&, wstring&);
+  extern template
+    basic_ostream<wchar_t>&
+    operator<<(basic_ostream<wchar_t>&, const wstring&);
+  extern template
+    basic_istream<wchar_t>&
+    getline(basic_istream<wchar_t>&, wstring&, wchar_t);
+  extern template
+    basic_istream<wchar_t>&
+    getline(basic_istream<wchar_t>&, wstring&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/boost_concept_check.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/boost_concept_check.h
new file mode 100644
index 0000000..054fcf2
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/boost_concept_check.h
@@ -0,0 +1,787 @@
+// -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+
+/** @file boost_concept_check.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// GCC Note:  based on version 1.12.0 of the Boost library.
+
+#ifndef _BOOST_CONCEPT_CHECK_H
+#define _BOOST_CONCEPT_CHECK_H 1
+
+#pragma GCC system_header
+
+#include <cstddef>                // for ptrdiff_t, used next
+#include <bits/stl_iterator_base_types.h>    // for traits and tags
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+#define _IsUnused __attribute__ ((__unused__))
+
+// When the C-C code is in use, we would like this function to do as little
+// as possible at runtime, use as few resources as possible, and hopefully
+// be elided out of existence... hmmm.
+template <class _Concept>
+inline void __function_requires()
+{
+  void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
+}
+
+// No definition: if this is referenced, there's a problem with
+// the instantiating type not being one of the required integer types.
+// Unfortunately, this results in a link-time error, not a compile-time error.
+void __error_type_must_be_an_integer_type();
+void __error_type_must_be_an_unsigned_integer_type();
+void __error_type_must_be_a_signed_integer_type();
+
+// ??? Should the "concept_checking*" structs begin with more than _ ?
+#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \
+  typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \
+  template <_func##_type_var##_concept _Tp1> \
+  struct _concept_checking##_type_var##_concept { }; \
+  typedef _concept_checking##_type_var##_concept< \
+    &_ns::_concept <_type_var>::__constraints> \
+    _concept_checking_typedef##_type_var##_concept
+
+#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \
+  typedef void (_ns::_concept <_type_var1,_type_var2>::* _func##_type_var1##_type_var2##_concept)(); \
+  template <_func##_type_var1##_type_var2##_concept _Tp1> \
+  struct _concept_checking##_type_var1##_type_var2##_concept { }; \
+  typedef _concept_checking##_type_var1##_type_var2##_concept< \
+    &_ns::_concept <_type_var1,_type_var2>::__constraints> \
+    _concept_checking_typedef##_type_var1##_type_var2##_concept
+
+#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \
+  typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>::* _func##_type_var1##_type_var2##_type_var3##_concept)(); \
+  template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \
+  struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; \
+  typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \
+    &_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints>  \
+  _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept
+
+#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \
+  typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \
+  template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept _Tp1> \
+  struct _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept { }; \
+  typedef _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \
+  &_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::__constraints> \
+    _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept
+
+
+template <class _Tp1, class _Tp2>
+struct _Aux_require_same { };
+
+template <class _Tp>
+struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
+
+  template <class _Tp1, class _Tp2>
+  struct _SameTypeConcept
+  {
+    void __constraints() {
+      typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required;
+    }
+  };
+
+  template <class _Tp>
+  struct _IntegerConcept {
+    void __constraints() {
+      __error_type_must_be_an_integer_type();
+    }
+  };
+  template <> struct _IntegerConcept<short> { void __constraints() {} };
+  template <> struct _IntegerConcept<unsigned short> { void __constraints(){} };
+  template <> struct _IntegerConcept<int> { void __constraints() {} };
+  template <> struct _IntegerConcept<unsigned int> { void __constraints() {} };
+  template <> struct _IntegerConcept<long> { void __constraints() {} };
+  template <> struct _IntegerConcept<unsigned long> { void __constraints() {} };
+  template <> struct _IntegerConcept<long long> { void __constraints() {} };
+  template <> struct _IntegerConcept<unsigned long long>
+                                                { void __constraints() {} };
+
+  template <class _Tp>
+  struct _SignedIntegerConcept {
+    void __constraints() {
+      __error_type_must_be_a_signed_integer_type();
+    }
+  };
+  template <> struct _SignedIntegerConcept<short> { void __constraints() {} };
+  template <> struct _SignedIntegerConcept<int> { void __constraints() {} };
+  template <> struct _SignedIntegerConcept<long> { void __constraints() {} };
+  template <> struct _SignedIntegerConcept<long long> { void __constraints(){}};
+
+  template <class _Tp>
+  struct _UnsignedIntegerConcept {
+    void __constraints() {
+      __error_type_must_be_an_unsigned_integer_type();
+    }
+  };
+  template <> struct _UnsignedIntegerConcept<unsigned short>
+    { void __constraints() {} };
+  template <> struct _UnsignedIntegerConcept<unsigned int>
+    { void __constraints() {} };
+  template <> struct _UnsignedIntegerConcept<unsigned long>
+    { void __constraints() {} };
+  template <> struct _UnsignedIntegerConcept<unsigned long long>
+    { void __constraints() {} };
+
+  //===========================================================================
+  // Basic Concepts
+
+  template <class _Tp>
+  struct _DefaultConstructibleConcept
+  {
+    void __constraints() {
+      _Tp __a _IsUnused;                // require default constructor
+    }
+  };
+
+  template <class _Tp>
+  struct _AssignableConcept
+  {
+    void __constraints() {
+      __a = __a;                        // require assignment operator
+      __const_constraints(__a);
+    }
+    void __const_constraints(const _Tp& __b) {
+      __a = __b;                   // const required for argument to assignment
+    }
+    _Tp __a;
+    // possibly should be "Tp* a;" and then dereference "a" in constraint
+    // functions?  present way would require a default ctor, i think...
+  };
+
+  template <class _Tp>
+  struct _CopyConstructibleConcept
+  {
+    void __constraints() {
+      _Tp __a(__b);                     // require copy constructor
+      _Tp* __ptr _IsUnused = &__a;      // require address of operator
+      __const_constraints(__a);
+    }
+    void __const_constraints(const _Tp& __a) {
+      _Tp __c _IsUnused(__a);           // require const copy constructor
+      const _Tp* __ptr _IsUnused = &__a; // require const address of operator
+    }
+    _Tp __b;
+  };
+
+  // The SGI STL version of Assignable requires copy constructor and operator=
+  template <class _Tp>
+  struct _SGIAssignableConcept
+  {
+    void __constraints() {
+      _Tp __b _IsUnused(__a);
+      __a = __a;                        // require assignment operator
+      __const_constraints(__a);
+    }
+    void __const_constraints(const _Tp& __b) {
+      _Tp __c _IsUnused(__b);
+      __a = __b;              // const required for argument to assignment
+    }
+    _Tp __a;
+  };
+
+  template <class _From, class _To>
+  struct _ConvertibleConcept
+  {
+    void __constraints() {
+      _To __y _IsUnused = __x;
+    }
+    _From __x;
+  };
+
+  // The C++ standard requirements for many concepts talk about return
+  // types that must be "convertible to bool".  The problem with this
+  // requirement is that it leaves the door open for evil proxies that
+  // define things like operator|| with strange return types.  Two
+  // possible solutions are:
+  // 1) require the return type to be exactly bool
+  // 2) stay with convertible to bool, and also
+  //    specify stuff about all the logical operators.
+  // For now we just test for convertible to bool.
+  template <class _Tp>
+  void __aux_require_boolean_expr(const _Tp& __t) {
+    bool __x _IsUnused = __t;
+  }
+
+// FIXME
+  template <class _Tp>
+  struct _EqualityComparableConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__a == __b);
+    }
+    _Tp __a, __b;
+  };
+
+  template <class _Tp>
+  struct _LessThanComparableConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__a < __b);
+    }
+    _Tp __a, __b;
+  };
+
+  // This is equivalent to SGI STL's LessThanComparable.
+  template <class _Tp>
+  struct _ComparableConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__a < __b);
+      __aux_require_boolean_expr(__a > __b);
+      __aux_require_boolean_expr(__a <= __b);
+      __aux_require_boolean_expr(__a >= __b);
+    }
+    _Tp __a, __b;
+  };
+
+#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \
+  template <class _First, class _Second> \
+  struct _NAME { \
+    void __constraints() { (void)__constraints_(); } \
+    bool __constraints_() {  \
+      return  __a _OP __b; \
+    } \
+    _First __a; \
+    _Second __b; \
+  }
+
+#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \
+  template <class _Ret, class _First, class _Second> \
+  struct _NAME { \
+    void __constraints() { (void)__constraints_(); } \
+    _Ret __constraints_() {  \
+      return __a _OP __b; \
+    } \
+    _First __a; \
+    _Second __b; \
+  }
+
+  _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept);
+  _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept);
+  _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept);
+  _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept);
+  _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept);
+  _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept);
+
+  _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept);
+  _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept);
+  _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept);
+  _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept);
+  _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept);
+
+#undef _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
+#undef _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT
+
+  //===========================================================================
+  // Function Object Concepts
+
+  template <class _Func, class _Return>
+  struct _GeneratorConcept
+  {
+    void __constraints() {
+      const _Return& __r _IsUnused = __f();// require operator() member function
+    }
+    _Func __f;
+  };
+
+
+  template <class _Func>
+  struct _GeneratorConcept<_Func,void>
+  {
+    void __constraints() {
+      __f();                            // require operator() member function
+    }
+    _Func __f;
+  };
+
+  template <class _Func, class _Return, class _Arg>
+  struct _UnaryFunctionConcept
+  {
+    void __constraints() {
+      __r = __f(__arg);                  // require operator()
+    }
+    _Func __f;
+    _Arg __arg;
+    _Return __r;
+  };
+
+  template <class _Func, class _Arg>
+  struct _UnaryFunctionConcept<_Func, void, _Arg> {
+    void __constraints() {
+      __f(__arg);                       // require operator()
+    }
+    _Func __f;
+    _Arg __arg;
+  };
+
+  template <class _Func, class _Return, class _First, class _Second>
+  struct _BinaryFunctionConcept
+  {
+    void __constraints() {
+      __r = __f(__first, __second);     // require operator()
+    }
+    _Func __f;
+    _First __first;
+    _Second __second;
+    _Return __r;
+  };
+
+  template <class _Func, class _First, class _Second>
+  struct _BinaryFunctionConcept<_Func, void, _First, _Second>
+  {
+    void __constraints() {
+      __f(__first, __second);           // require operator()
+    }
+    _Func __f;
+    _First __first;
+    _Second __second;
+  };
+
+  template <class _Func, class _Arg>
+  struct _UnaryPredicateConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__f(__arg)); // require op() returning bool
+    }
+    _Func __f;
+    _Arg __arg;
+  };
+
+  template <class _Func, class _First, class _Second>
+  struct _BinaryPredicateConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__f(__a, __b)); // require op() returning bool
+    }
+    _Func __f;
+    _First __a;
+    _Second __b;
+  };
+
+  // use this when functor is used inside a container class like std::set
+  template <class _Func, class _First, class _Second>
+  struct _Const_BinaryPredicateConcept {
+    void __constraints() {
+      __const_constraints(__f);
+    }
+    void __const_constraints(const _Func& __fun) {
+      __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >();
+      // operator() must be a const member function
+      __aux_require_boolean_expr(__fun(__a, __b));
+    }
+    _Func __f;
+    _First __a;
+    _Second __b;
+  };
+
+  //===========================================================================
+  // Iterator Concepts
+
+  template <class _Tp>
+  struct _TrivialIteratorConcept
+  {
+    void __constraints() {
+//    __function_requires< _DefaultConstructibleConcept<_Tp> >();
+      __function_requires< _AssignableConcept<_Tp> >();
+      __function_requires< _EqualityComparableConcept<_Tp> >();
+//      typedef typename std::iterator_traits<_Tp>::value_type _V;
+      (void)*__i;                       // require dereference operator
+    }
+    _Tp __i;
+  };
+
+  template <class _Tp>
+  struct _Mutable_TrivialIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _TrivialIteratorConcept<_Tp> >();
+      *__i = *__j;                      // require dereference and assignment
+    }
+    _Tp __i, __j;
+  };
+
+  template <class _Tp>
+  struct _InputIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _TrivialIteratorConcept<_Tp> >();
+      // require iterator_traits typedef's
+      typedef typename std::iterator_traits<_Tp>::difference_type _Diff;
+//      __function_requires< _SignedIntegerConcept<_Diff> >();
+      typedef typename std::iterator_traits<_Tp>::reference _Ref;
+      typedef typename std::iterator_traits<_Tp>::pointer _Pt;
+      typedef typename std::iterator_traits<_Tp>::iterator_category _Cat;
+      __function_requires< _ConvertibleConcept<
+        typename std::iterator_traits<_Tp>::iterator_category,
+        std::input_iterator_tag> >();
+      ++__i;                            // require preincrement operator
+      __i++;                            // require postincrement operator
+    }
+    _Tp __i;
+  };
+
+  template <class _Tp, class _ValueT>
+  struct _OutputIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _AssignableConcept<_Tp> >();
+      ++__i;                            // require preincrement operator
+      __i++;                            // require postincrement operator
+      *__i++ = __t;                     // require postincrement and assignment
+    }
+    _Tp __i;
+    _ValueT __t;
+  };
+
+  template <class _Tp>
+  struct _ForwardIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _InputIteratorConcept<_Tp> >();
+      __function_requires< _DefaultConstructibleConcept<_Tp> >();
+      __function_requires< _ConvertibleConcept<
+        typename std::iterator_traits<_Tp>::iterator_category,
+        std::forward_iterator_tag> >();
+      typedef typename std::iterator_traits<_Tp>::reference _Ref;
+      _Ref __r _IsUnused = *__i;
+    }
+    _Tp __i;
+  };
+
+  template <class _Tp>
+  struct _Mutable_ForwardIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _ForwardIteratorConcept<_Tp> >();
+      *__i++ = *__i;                    // require postincrement and assignment
+    }
+    _Tp __i;
+  };
+
+  template <class _Tp>
+  struct _BidirectionalIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _ForwardIteratorConcept<_Tp> >();
+      __function_requires< _ConvertibleConcept<
+        typename std::iterator_traits<_Tp>::iterator_category,
+        std::bidirectional_iterator_tag> >();
+      --__i;                            // require predecrement operator
+      __i--;                            // require postdecrement operator
+    }
+    _Tp __i;
+  };
+
+  template <class _Tp>
+  struct _Mutable_BidirectionalIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _BidirectionalIteratorConcept<_Tp> >();
+      __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >();
+      *__i-- = *__i;                    // require postdecrement and assignment
+    }
+    _Tp __i;
+  };
+
+
+  template <class _Tp>
+  struct _RandomAccessIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _BidirectionalIteratorConcept<_Tp> >();
+      __function_requires< _ComparableConcept<_Tp> >();
+      __function_requires< _ConvertibleConcept<
+        typename std::iterator_traits<_Tp>::iterator_category,
+        std::random_access_iterator_tag> >();
+      // ??? We don't use _Ref, are we just checking for "referenceability"?
+      typedef typename std::iterator_traits<_Tp>::reference _Ref;
+
+      __i += __n;                       // require assignment addition operator
+      __i = __i + __n; __i = __n + __i; // require addition with difference type
+      __i -= __n;                       // require assignment subtraction op
+      __i = __i - __n;                  // require subtraction with
+                                        //            difference type
+      __n = __i - __j;                  // require difference operator
+      (void)__i[__n];                   // require element access operator
+    }
+    _Tp __a, __b;
+    _Tp __i, __j;
+    typename std::iterator_traits<_Tp>::difference_type __n;
+  };
+
+  template <class _Tp>
+  struct _Mutable_RandomAccessIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _RandomAccessIteratorConcept<_Tp> >();
+      __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >();
+      __i[__n] = *__i;                  // require element access and assignment
+    }
+    _Tp __i;
+    typename std::iterator_traits<_Tp>::difference_type __n;
+  };
+
+  //===========================================================================
+  // Container Concepts
+
+  template <class _Container>
+  struct _ContainerConcept
+  {
+    typedef typename _Container::value_type _Value_type;
+    typedef typename _Container::difference_type _Difference_type;
+    typedef typename _Container::size_type _Size_type;
+    typedef typename _Container::const_reference _Const_reference;
+    typedef typename _Container::const_pointer _Const_pointer;
+    typedef typename _Container::const_iterator _Const_iterator;
+
+    void __constraints() {
+      __function_requires< _InputIteratorConcept<_Const_iterator> >();
+      __function_requires< _AssignableConcept<_Container> >();
+      const _Container __c;
+      __i = __c.begin();
+      __i = __c.end();
+      __n = __c.size();
+      __n = __c.max_size();
+      __b = __c.empty();
+    }
+    bool __b;
+    _Const_iterator __i;
+    _Size_type __n;
+  };
+
+  template <class _Container>
+  struct _Mutable_ContainerConcept
+  {
+    typedef typename _Container::value_type _Value_type;
+    typedef typename _Container::reference _Reference;
+    typedef typename _Container::iterator _Iterator;
+    typedef typename _Container::pointer _Pointer;
+
+    void __constraints() {
+      __function_requires< _ContainerConcept<_Container> >();
+      __function_requires< _AssignableConcept<_Value_type> >();
+      __function_requires< _InputIteratorConcept<_Iterator> >();
+
+      __i = __c.begin();
+      __i = __c.end();
+      __c.swap(__c2);
+    }
+    _Iterator __i;
+    _Container __c, __c2;
+  };
+
+  template <class _ForwardContainer>
+  struct _ForwardContainerConcept
+  {
+    void __constraints() {
+      __function_requires< _ContainerConcept<_ForwardContainer> >();
+      typedef typename _ForwardContainer::const_iterator _Const_iterator;
+      __function_requires< _ForwardIteratorConcept<_Const_iterator> >();
+    }
+  };
+
+  template <class _ForwardContainer>
+  struct _Mutable_ForwardContainerConcept
+  {
+    void __constraints() {
+      __function_requires< _ForwardContainerConcept<_ForwardContainer> >();
+      __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >();
+      typedef typename _ForwardContainer::iterator _Iterator;
+      __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >();
+    }
+  };
+
+  template <class _ReversibleContainer>
+  struct _ReversibleContainerConcept
+  {
+    typedef typename _ReversibleContainer::const_iterator _Const_iterator;
+    typedef typename _ReversibleContainer::const_reverse_iterator
+      _Const_reverse_iterator;
+
+    void __constraints() {
+      __function_requires< _ForwardContainerConcept<_ReversibleContainer> >();
+      __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >();
+      __function_requires<
+        _BidirectionalIteratorConcept<_Const_reverse_iterator> >();
+
+      const _ReversibleContainer __c;
+      _Const_reverse_iterator __i = __c.rbegin();
+      __i = __c.rend();
+    }
+  };
+
+  template <class _ReversibleContainer>
+  struct _Mutable_ReversibleContainerConcept
+  {
+    typedef typename _ReversibleContainer::iterator _Iterator;
+    typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator;
+
+    void __constraints() {
+      __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >();
+      __function_requires<
+        _Mutable_ForwardContainerConcept<_ReversibleContainer> >();
+      __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >();
+      __function_requires<
+        _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >();
+
+      _Reverse_iterator __i = __c.rbegin();
+      __i = __c.rend();
+    }
+    _ReversibleContainer __c;
+  };
+
+  template <class _RandomAccessContainer>
+  struct _RandomAccessContainerConcept
+  {
+    typedef typename _RandomAccessContainer::size_type _Size_type;
+    typedef typename _RandomAccessContainer::const_reference _Const_reference;
+    typedef typename _RandomAccessContainer::const_iterator _Const_iterator;
+    typedef typename _RandomAccessContainer::const_reverse_iterator
+      _Const_reverse_iterator;
+
+    void __constraints() {
+      __function_requires<
+        _ReversibleContainerConcept<_RandomAccessContainer> >();
+      __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >();
+      __function_requires<
+        _RandomAccessIteratorConcept<_Const_reverse_iterator> >();
+
+      const _RandomAccessContainer __c;
+      _Const_reference __r _IsUnused = __c[__n];
+    }
+    _Size_type __n;
+  };
+
+  template <class _RandomAccessContainer>
+  struct _Mutable_RandomAccessContainerConcept
+  {
+    typedef typename _RandomAccessContainer::size_type _Size_type;
+    typedef typename _RandomAccessContainer::reference _Reference;
+    typedef typename _RandomAccessContainer::iterator _Iterator;
+    typedef typename _RandomAccessContainer::reverse_iterator _Reverse_iterator;
+
+    void __constraints() {
+      __function_requires<
+        _RandomAccessContainerConcept<_RandomAccessContainer> >();
+      __function_requires<
+        _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >();
+      __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >();
+      __function_requires<
+        _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >();
+
+      _Reference __r _IsUnused = __c[__i];
+    }
+    _Size_type __i;
+    _RandomAccessContainer __c;
+  };
+
+  // A Sequence is inherently mutable
+  template <class _Sequence>
+  struct _SequenceConcept
+  {
+    typedef typename _Sequence::reference _Reference;
+    typedef typename _Sequence::const_reference _Const_reference;
+
+    void __constraints() {
+      // Matt Austern's book puts DefaultConstructible here, the C++
+      // standard places it in Container
+      //    function_requires< DefaultConstructible<Sequence> >();
+      __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >();
+      __function_requires< _DefaultConstructibleConcept<_Sequence> >();
+
+      _Sequence
+	__c _IsUnused(__n, __t),
+        __c2 _IsUnused(__first, __last);
+
+      __c.insert(__p, __t);
+      __c.insert(__p, __n, __t);
+      __c.insert(__p, __first, __last);
+
+      __c.erase(__p);
+      __c.erase(__p, __q);
+
+      _Reference __r _IsUnused = __c.front();
+
+      __const_constraints(__c);
+    }
+    void __const_constraints(const _Sequence& __c) {
+      _Const_reference __r _IsUnused = __c.front();
+    }
+    typename _Sequence::value_type __t;
+    typename _Sequence::size_type __n;
+    typename _Sequence::value_type *__first, *__last;
+    typename _Sequence::iterator __p, __q;
+  };
+
+  template <class _FrontInsertionSequence>
+  struct _FrontInsertionSequenceConcept
+  {
+    void __constraints() {
+      __function_requires< _SequenceConcept<_FrontInsertionSequence> >();
+
+      __c.push_front(__t);
+      __c.pop_front();
+    }
+    _FrontInsertionSequence __c;
+    typename _FrontInsertionSequence::value_type __t;
+  };
+
+  template <class _BackInsertionSequence>
+  struct _BackInsertionSequenceConcept
+  {
+    typedef typename _BackInsertionSequence::reference _Reference;
+    typedef typename _BackInsertionSequence::const_reference _Const_reference;
+
+    void __constraints() {
+      __function_requires< _SequenceConcept<_BackInsertionSequence> >();
+
+      __c.push_back(__t);
+      __c.pop_back();
+      _Reference __r _IsUnused = __c.back();
+    }
+    void __const_constraints(const _BackInsertionSequence& __c) {
+      _Const_reference __r _IsUnused = __c.back();
+    };
+    _BackInsertionSequence __c;
+    typename _BackInsertionSequence::value_type __t;
+  };
+
+_GLIBCXX_END_NAMESPACE
+
+#undef _IsUnused
+
+#endif // _GLIBCXX_BOOST_CONCEPT_CHECK
+
+
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/c++0x_warning.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/c++0x_warning.h
new file mode 100644
index 0000000..4f926a3
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/c++0x_warning.h
@@ -0,0 +1,36 @@
+// Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++0x_warning.h
+ *  This is a Standard C++ Library header.
+ */
+
+#ifndef _CXX0X_WARNING_H
+#define _CXX0X_WARNING_H 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#error This file requires compiler and library support for the upcoming \
+ISO C++ standard, C++0x. This support is currently experimental, and must be \
+enabled with the -std=c++0x or -std=gnu++0x compiler options.
+#endif
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/char_traits.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/char_traits.h
new file mode 100644
index 0000000..412e75a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/char_traits.h
@@ -0,0 +1,575 @@
+// Character Traits for use by standard string and iostream -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file char_traits.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 21  Strings library
+//
+
+#ifndef _CHAR_TRAITS_H
+#define _CHAR_TRAITS_H 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>  // std::copy, std::fill_n
+#include <bits/postypes.h>      // For streampos
+#include <cwchar>               // For WEOF, wmemmove, wmemset, etc.
+
+#ifndef _GLIBCXX_STDIO_MACROS
+# include <cstdio>              // For EOF
+# define _CHAR_TRAITS_EOF EOF
+#else
+# define _CHAR_TRAITS_EOF (-1)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  /**
+   *  @brief  Mapping from character type to associated types.
+   *
+   *  @note This is an implementation class for the generic version
+   *  of char_traits.  It defines int_type, off_type, pos_type, and
+   *  state_type.  By default these are unsigned long, streamoff,
+   *  streampos, and mbstate_t.  Users who need a different set of
+   *  types, but who don't need to change the definitions of any function
+   *  defined in char_traits, can specialize __gnu_cxx::_Char_types
+   *  while leaving __gnu_cxx::char_traits alone. */
+  template<typename _CharT>
+    struct _Char_types
+    {
+      typedef unsigned long   int_type;
+      typedef std::streampos  pos_type;
+      typedef std::streamoff  off_type;
+      typedef std::mbstate_t  state_type;
+    };
+
+
+  /**
+   *  @brief  Base class used to implement std::char_traits.
+   *
+   *  @note For any given actual character type, this definition is
+   *  probably wrong.  (Most of the member functions are likely to be
+   *  right, but the int_type and state_type typedefs, and the eof()
+   *  member function, are likely to be wrong.)  The reason this class
+   *  exists is so users can specialize it.  Classes in namespace std
+   *  may not be specialized for fundamental types, but classes in
+   *  namespace __gnu_cxx may be.
+   *
+   *  See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13s03.html
+   *  for advice on how to make use of this class for @a unusual character
+   *  types. Also, check out include/ext/pod_char_traits.h.  
+   */
+  template<typename _CharT>
+    struct char_traits
+    {
+      typedef _CharT                                    char_type;
+      typedef typename _Char_types<_CharT>::int_type    int_type;
+      typedef typename _Char_types<_CharT>::pos_type    pos_type;
+      typedef typename _Char_types<_CharT>::off_type    off_type;
+      typedef typename _Char_types<_CharT>::state_type  state_type;
+
+      static void
+      assign(char_type& __c1, const char_type& __c2)
+      { __c1 = __c2; }
+
+      static bool
+      eq(const char_type& __c1, const char_type& __c2)
+      { return __c1 == __c2; }
+
+      static bool
+      lt(const char_type& __c1, const char_type& __c2)
+      { return __c1 < __c2; }
+
+      static int
+      compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
+
+      static std::size_t
+      length(const char_type* __s);
+
+      static const char_type*
+      find(const char_type* __s, std::size_t __n, const char_type& __a);
+
+      static char_type*
+      move(char_type* __s1, const char_type* __s2, std::size_t __n);
+
+      static char_type*
+      copy(char_type* __s1, const char_type* __s2, std::size_t __n);
+
+      static char_type*
+      assign(char_type* __s, std::size_t __n, char_type __a);
+
+      static char_type
+      to_char_type(const int_type& __c)
+      { return static_cast<char_type>(__c); }
+
+      static int_type
+      to_int_type(const char_type& __c)
+      { return static_cast<int_type>(__c); }
+
+      static bool
+      eq_int_type(const int_type& __c1, const int_type& __c2)
+      { return __c1 == __c2; }
+
+      static int_type
+      eof()
+      { return static_cast<int_type>(_CHAR_TRAITS_EOF); }
+
+      static int_type
+      not_eof(const int_type& __c)
+      { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
+    };
+
+  template<typename _CharT>
+    int
+    char_traits<_CharT>::
+    compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
+    {
+      for (std::size_t __i = 0; __i < __n; ++__i)
+	if (lt(__s1[__i], __s2[__i]))
+	  return -1;
+	else if (lt(__s2[__i], __s1[__i]))
+	  return 1;
+      return 0;
+    }
+
+  template<typename _CharT>
+    std::size_t
+    char_traits<_CharT>::
+    length(const char_type* __p)
+    {
+      std::size_t __i = 0;
+      while (!eq(__p[__i], char_type()))
+        ++__i;
+      return __i;
+    }
+
+  template<typename _CharT>
+    const typename char_traits<_CharT>::char_type*
+    char_traits<_CharT>::
+    find(const char_type* __s, std::size_t __n, const char_type& __a)
+    {
+      for (std::size_t __i = 0; __i < __n; ++__i)
+        if (eq(__s[__i], __a))
+          return __s + __i;
+      return 0;
+    }
+
+  template<typename _CharT>
+    typename char_traits<_CharT>::char_type*
+    char_traits<_CharT>::
+    move(char_type* __s1, const char_type* __s2, std::size_t __n)
+    {
+      return static_cast<_CharT*>(__builtin_memmove(__s1, __s2,
+						    __n * sizeof(char_type)));
+    }
+
+  template<typename _CharT>
+    typename char_traits<_CharT>::char_type*
+    char_traits<_CharT>::
+    copy(char_type* __s1, const char_type* __s2, std::size_t __n)
+    {
+      // NB: Inline std::copy so no recursive dependencies.
+      std::copy(__s2, __s2 + __n, __s1);
+      return __s1;
+    }
+
+  template<typename _CharT>
+    typename char_traits<_CharT>::char_type*
+    char_traits<_CharT>::
+    assign(char_type* __s, std::size_t __n, char_type __a)
+    {
+      // NB: Inline std::fill_n so no recursive dependencies.
+      std::fill_n(__s, __n, __a);
+      return __s;
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // 21.1
+  /**
+   *  @brief  Basis for explicit traits specializations.
+   *
+   *  @note  For any given actual character type, this definition is
+   *  probably wrong.  Since this is just a thin wrapper around
+   *  __gnu_cxx::char_traits, it is possible to achieve a more
+   *  appropriate definition by specializing __gnu_cxx::char_traits.
+   *
+   *  See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13s03.html
+   *  for advice on how to make use of this class for @a unusual character
+   *  types. Also, check out include/ext/pod_char_traits.h.
+  */
+  template<class _CharT>
+    struct char_traits : public __gnu_cxx::char_traits<_CharT>
+    { };
+
+
+  /// 21.1.3.1  char_traits specializations
+  template<>
+    struct char_traits<char>
+    {
+      typedef char              char_type;
+      typedef int               int_type;
+      typedef streampos         pos_type;
+      typedef streamoff         off_type;
+      typedef mbstate_t         state_type;
+
+      static void
+      assign(char_type& __c1, const char_type& __c2)
+      { __c1 = __c2; }
+
+      static bool
+      eq(const char_type& __c1, const char_type& __c2)
+      { return __c1 == __c2; }
+
+      static bool
+      lt(const char_type& __c1, const char_type& __c2)
+      { return __c1 < __c2; }
+
+      static int
+      compare(const char_type* __s1, const char_type* __s2, size_t __n)
+      { return __builtin_memcmp(__s1, __s2, __n); }
+
+      static size_t
+      length(const char_type* __s)
+      { return __builtin_strlen(__s); }
+
+      static const char_type*
+      find(const char_type* __s, size_t __n, const char_type& __a)
+      { return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); }
+
+      static char_type*
+      move(char_type* __s1, const char_type* __s2, size_t __n)
+      { return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); }
+
+      static char_type*
+      copy(char_type* __s1, const char_type* __s2, size_t __n)
+      { return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); }
+
+      static char_type*
+      assign(char_type* __s, size_t __n, char_type __a)
+      { return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); }
+
+      static char_type
+      to_char_type(const int_type& __c)
+      { return static_cast<char_type>(__c); }
+
+      // To keep both the byte 0xff and the eof symbol 0xffffffff
+      // from ending up as 0xffffffff.
+      static int_type
+      to_int_type(const char_type& __c)
+      { return static_cast<int_type>(static_cast<unsigned char>(__c)); }
+
+      static bool
+      eq_int_type(const int_type& __c1, const int_type& __c2)
+      { return __c1 == __c2; }
+
+      static int_type
+      eof()
+      { return static_cast<int_type>(_CHAR_TRAITS_EOF); }
+
+      static int_type
+      not_eof(const int_type& __c)
+      { return (__c == eof()) ? 0 : __c; }
+  };
+
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  /// 21.1.3.2  char_traits specializations
+  template<>
+    struct char_traits<wchar_t>
+    {
+      typedef wchar_t           char_type;
+      typedef wint_t            int_type;
+      typedef streamoff         off_type;
+      typedef wstreampos        pos_type;
+      typedef mbstate_t         state_type;
+
+      static void
+      assign(char_type& __c1, const char_type& __c2)
+      { __c1 = __c2; }
+
+      static bool
+      eq(const char_type& __c1, const char_type& __c2)
+      { return __c1 == __c2; }
+
+      static bool
+      lt(const char_type& __c1, const char_type& __c2)
+      { return __c1 < __c2; }
+
+      static int
+      compare(const char_type* __s1, const char_type* __s2, size_t __n)
+      { return wmemcmp(__s1, __s2, __n); }
+
+      static size_t
+      length(const char_type* __s)
+      { return wcslen(__s); }
+
+      static const char_type*
+      find(const char_type* __s, size_t __n, const char_type& __a)
+      { return wmemchr(__s, __a, __n); }
+
+      static char_type*
+      move(char_type* __s1, const char_type* __s2, size_t __n)
+      { return wmemmove(__s1, __s2, __n); }
+
+      static char_type*
+      copy(char_type* __s1, const char_type* __s2, size_t __n)
+      { return wmemcpy(__s1, __s2, __n); }
+
+      static char_type*
+      assign(char_type* __s, size_t __n, char_type __a)
+      { return wmemset(__s, __a, __n); }
+
+      static char_type
+      to_char_type(const int_type& __c)
+      { return char_type(__c); }
+
+      static int_type
+      to_int_type(const char_type& __c)
+      { return int_type(__c); }
+
+      static bool
+      eq_int_type(const int_type& __c1, const int_type& __c2)
+      { return __c1 == __c2; }
+
+      static int_type
+      eof()
+      { return static_cast<int_type>(WEOF); }
+
+      static int_type
+      not_eof(const int_type& __c)
+      { return eq_int_type(__c, eof()) ? 0 : __c; }
+  };
+#endif //_GLIBCXX_USE_WCHAR_T
+
+_GLIBCXX_END_NAMESPACE
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
+     && defined(_GLIBCXX_USE_C99_STDINT_TR1))
+
+#include <cstdint>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<>
+    struct char_traits<char16_t>
+    {
+      typedef char16_t          char_type;
+      typedef uint_least16_t    int_type;
+      typedef streamoff         off_type;
+      typedef u16streampos      pos_type;
+      typedef mbstate_t         state_type;
+
+      static void
+      assign(char_type& __c1, const char_type& __c2)
+      { __c1 = __c2; }
+
+      static bool
+      eq(const char_type& __c1, const char_type& __c2)
+      { return __c1 == __c2; }
+
+      static bool
+      lt(const char_type& __c1, const char_type& __c2)
+      { return __c1 < __c2; }
+
+      static int
+      compare(const char_type* __s1, const char_type* __s2, size_t __n)
+      {
+	for (size_t __i = 0; __i < __n; ++__i)
+	  if (lt(__s1[__i], __s2[__i]))
+	    return -1;
+	  else if (lt(__s2[__i], __s1[__i]))
+	    return 1;
+	return 0;
+      }
+
+      static size_t
+      length(const char_type* __s)
+      {
+	size_t __i = 0;
+	while (!eq(__s[__i], char_type()))
+	  ++__i;
+	return __i;
+      }
+
+      static const char_type*
+      find(const char_type* __s, size_t __n, const char_type& __a)
+      {
+	for (size_t __i = 0; __i < __n; ++__i)
+	  if (eq(__s[__i], __a))
+	    return __s + __i;
+	return 0;
+      }
+
+      static char_type*
+      move(char_type* __s1, const char_type* __s2, size_t __n)
+      {
+	return (static_cast<char_type*>
+		(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))));
+      }
+
+      static char_type*
+      copy(char_type* __s1, const char_type* __s2, size_t __n)
+      {
+	return (static_cast<char_type*>
+		(__builtin_memcpy(__s1, __s2, __n * sizeof(char_type))));
+      }
+
+      static char_type*
+      assign(char_type* __s, size_t __n, char_type __a)
+      {
+	for (size_t __i = 0; __i < __n; ++__i)
+	  assign(__s[__i], __a);
+	return __s;
+      }
+
+      static char_type
+      to_char_type(const int_type& __c)
+      { return char_type(__c); }
+
+      static int_type
+      to_int_type(const char_type& __c)
+      { return int_type(__c); }
+
+      static bool
+      eq_int_type(const int_type& __c1, const int_type& __c2)
+      { return __c1 == __c2; }
+
+      static int_type
+      eof()
+      { return static_cast<int_type>(-1); }
+
+      static int_type
+      not_eof(const int_type& __c)
+      { return eq_int_type(__c, eof()) ? 0 : __c; }
+    };
+
+  template<>
+    struct char_traits<char32_t>
+    {
+      typedef char32_t          char_type;
+      typedef uint_least32_t    int_type;
+      typedef streamoff         off_type;
+      typedef u32streampos      pos_type;
+      typedef mbstate_t         state_type;
+
+      static void
+      assign(char_type& __c1, const char_type& __c2)
+      { __c1 = __c2; }
+
+      static bool
+      eq(const char_type& __c1, const char_type& __c2)
+      { return __c1 == __c2; }
+
+      static bool
+      lt(const char_type& __c1, const char_type& __c2)
+      { return __c1 < __c2; }
+
+      static int
+      compare(const char_type* __s1, const char_type* __s2, size_t __n)
+      {
+	for (size_t __i = 0; __i < __n; ++__i)
+	  if (lt(__s1[__i], __s2[__i]))
+	    return -1;
+	  else if (lt(__s2[__i], __s1[__i]))
+	    return 1;
+	return 0;
+      }
+
+      static size_t
+      length(const char_type* __s)
+      {
+	size_t __i = 0;
+	while (!eq(__s[__i], char_type()))
+	  ++__i;
+	return __i;
+      }
+
+      static const char_type*
+      find(const char_type* __s, size_t __n, const char_type& __a)
+      {
+	for (size_t __i = 0; __i < __n; ++__i)
+	  if (eq(__s[__i], __a))
+	    return __s + __i;
+	return 0;
+      }
+
+      static char_type*
+      move(char_type* __s1, const char_type* __s2, size_t __n)
+      {
+	return (static_cast<char_type*>
+		(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))));
+      }
+
+      static char_type*
+      copy(char_type* __s1, const char_type* __s2, size_t __n)
+      { 
+	return (static_cast<char_type*>
+		(__builtin_memcpy(__s1, __s2, __n * sizeof(char_type))));
+      }
+
+      static char_type*
+      assign(char_type* __s, size_t __n, char_type __a)
+      {
+	for (size_t __i = 0; __i < __n; ++__i)
+	  assign(__s[__i], __a);
+	return __s;
+      }
+
+      static char_type
+      to_char_type(const int_type& __c)
+      { return char_type(__c); }
+
+      static int_type
+      to_int_type(const char_type& __c)
+      { return int_type(__c); }
+
+      static bool
+      eq_int_type(const int_type& __c1, const int_type& __c2)
+      { return __c1 == __c2; }
+
+      static int_type
+      eof()
+      { return static_cast<int_type>(-1); }
+
+      static int_type
+      not_eof(const int_type& __c)
+      { return eq_int_type(__c, eof()) ? 0 : __c; }
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif 
+
+#undef _CHAR_TRAITS_EOF
+
+#endif // _CHAR_TRAITS_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/cmath.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/cmath.tcc
new file mode 100644
index 0000000..9f4c853
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/cmath.tcc
@@ -0,0 +1,55 @@
+// -*- C++ -*- C math library.
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+// This file was written by Gabriel Dos Reis <gdr@codesourcery.com>
+
+/** @file cmath.tcc
+ *  This is a Standard C++ Library file.
+ */
+
+#ifndef _GLIBCXX_CMATH_TCC
+#define _GLIBCXX_CMATH_TCC 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _Tp>
+    inline _Tp
+    __cmath_power(_Tp __x, unsigned int __n)
+    {
+      _Tp __y = __n % 2 ? __x : _Tp(1);
+
+      while (__n >>= 1)
+        {
+          __x = __x * __x;
+          if (__n % 2)
+            __y = __y * __x;
+        }
+
+      return __y;
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/codecvt.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/codecvt.h
new file mode 100644
index 0000000..98ca3ae
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/codecvt.h
@@ -0,0 +1,504 @@
+// Locale support (codecvt) -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+// 2009, 2010  Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/codecvt.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.1.5 Template class codecvt
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _CODECVT_H
+#define _CODECVT_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /// Empty base class for codecvt facet [22.2.1.5].
+  class codecvt_base
+  {
+  public:
+    enum result
+    {
+      ok,
+      partial,
+      error,
+      noconv
+    };
+  };
+
+  /**
+   *  @brief  Common base for codecvt functions.
+   *
+   *  This template class provides implementations of the public functions
+   *  that forward to the protected virtual functions.
+   *
+   *  This template also provides abstract stubs for the protected virtual
+   *  functions.
+  */
+  template<typename _InternT, typename _ExternT, typename _StateT>
+    class __codecvt_abstract_base
+    : public locale::facet, public codecvt_base
+    {
+    public:
+      // Types:
+      typedef codecvt_base::result	result;
+      typedef _InternT			intern_type;
+      typedef _ExternT			extern_type;
+      typedef _StateT			state_type;
+
+      // 22.2.1.5.1 codecvt members
+      /**
+       *  @brief  Convert from internal to external character set.
+       *
+       *  Converts input string of intern_type to output string of
+       *  extern_type.  This is analogous to wcsrtombs.  It does this by
+       *  calling codecvt::do_out.
+       *
+       *  The source and destination character sets are determined by the
+       *  facet's locale, internal and external types.
+       *
+       *  The characters in [from,from_end) are converted and written to
+       *  [to,to_end).  from_next and to_next are set to point to the
+       *  character following the last successfully converted character,
+       *  respectively.  If the result needed no conversion, from_next and
+       *  to_next are not affected.
+       *
+       *  The @a state argument should be initialized if the input is at the
+       *  beginning and carried from a previous call if continuing
+       *  conversion.  There are no guarantees about how @a state is used.
+       *
+       *  The result returned is a member of codecvt_base::result.  If
+       *  all the input is converted, returns codecvt_base::ok.  If no
+       *  conversion is necessary, returns codecvt_base::noconv.  If
+       *  the input ends early or there is insufficient space in the
+       *  output, returns codecvt_base::partial.  Otherwise the
+       *  conversion failed and codecvt_base::error is returned.
+       *
+       *  @param  state  Persistent conversion state data.
+       *  @param  from  Start of input.
+       *  @param  from_end  End of input.
+       *  @param  from_next  Returns start of unconverted data.
+       *  @param  to  Start of output buffer.
+       *  @param  to_end  End of output buffer.
+       *  @param  to_next  Returns start of unused output area.
+       *  @return  codecvt_base::result.
+      */
+      result
+      out(state_type& __state, const intern_type* __from,
+	  const intern_type* __from_end, const intern_type*& __from_next,
+	  extern_type* __to, extern_type* __to_end,
+	  extern_type*& __to_next) const
+      {
+	return this->do_out(__state, __from, __from_end, __from_next,
+			    __to, __to_end, __to_next);
+      }
+
+      /**
+       *  @brief  Reset conversion state.
+       *
+       *  Writes characters to output that would restore @a state to initial
+       *  conditions.  The idea is that if a partial conversion occurs, then
+       *  the converting the characters written by this function would leave
+       *  the state in initial conditions, rather than partial conversion
+       *  state.  It does this by calling codecvt::do_unshift().
+       *
+       *  For example, if 4 external characters always converted to 1 internal
+       *  character, and input to in() had 6 external characters with state
+       *  saved, this function would write two characters to the output and
+       *  set the state to initialized conditions.
+       *
+       *  The source and destination character sets are determined by the
+       *  facet's locale, internal and external types.
+       *
+       *  The result returned is a member of codecvt_base::result.  If the
+       *  state could be reset and data written, returns codecvt_base::ok.  If
+       *  no conversion is necessary, returns codecvt_base::noconv.  If the
+       *  output has insufficient space, returns codecvt_base::partial.
+       *  Otherwise the reset failed and codecvt_base::error is returned.
+       *
+       *  @param  state  Persistent conversion state data.
+       *  @param  to  Start of output buffer.
+       *  @param  to_end  End of output buffer.
+       *  @param  to_next  Returns start of unused output area.
+       *  @return  codecvt_base::result.
+      */
+      result
+      unshift(state_type& __state, extern_type* __to, extern_type* __to_end,
+	      extern_type*& __to_next) const
+      { return this->do_unshift(__state, __to,__to_end,__to_next); }
+
+      /**
+       *  @brief  Convert from external to internal character set.
+       *
+       *  Converts input string of extern_type to output string of
+       *  intern_type.  This is analogous to mbsrtowcs.  It does this by
+       *  calling codecvt::do_in.
+       *
+       *  The source and destination character sets are determined by the
+       *  facet's locale, internal and external types.
+       *
+       *  The characters in [from,from_end) are converted and written to
+       *  [to,to_end).  from_next and to_next are set to point to the
+       *  character following the last successfully converted character,
+       *  respectively.  If the result needed no conversion, from_next and
+       *  to_next are not affected.
+       *
+       *  The @a state argument should be initialized if the input is at the
+       *  beginning and carried from a previous call if continuing
+       *  conversion.  There are no guarantees about how @a state is used.
+       *
+       *  The result returned is a member of codecvt_base::result.  If
+       *  all the input is converted, returns codecvt_base::ok.  If no
+       *  conversion is necessary, returns codecvt_base::noconv.  If
+       *  the input ends early or there is insufficient space in the
+       *  output, returns codecvt_base::partial.  Otherwise the
+       *  conversion failed and codecvt_base::error is returned.
+       *
+       *  @param  state  Persistent conversion state data.
+       *  @param  from  Start of input.
+       *  @param  from_end  End of input.
+       *  @param  from_next  Returns start of unconverted data.
+       *  @param  to  Start of output buffer.
+       *  @param  to_end  End of output buffer.
+       *  @param  to_next  Returns start of unused output area.
+       *  @return  codecvt_base::result.
+      */
+      result
+      in(state_type& __state, const extern_type* __from,
+	 const extern_type* __from_end, const extern_type*& __from_next,
+	 intern_type* __to, intern_type* __to_end,
+	 intern_type*& __to_next) const
+      {
+	return this->do_in(__state, __from, __from_end, __from_next,
+			   __to, __to_end, __to_next);
+      }
+
+      int
+      encoding() const throw()
+      { return this->do_encoding(); }
+
+      bool
+      always_noconv() const throw()
+      { return this->do_always_noconv(); }
+
+      int
+      length(state_type& __state, const extern_type* __from,
+	     const extern_type* __end, size_t __max) const
+      { return this->do_length(__state, __from, __end, __max); }
+
+      int
+      max_length() const throw()
+      { return this->do_max_length(); }
+
+    protected:
+      explicit
+      __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { }
+
+      virtual
+      ~__codecvt_abstract_base() { }
+
+      /**
+       *  @brief  Convert from internal to external character set.
+       *
+       *  Converts input string of intern_type to output string of
+       *  extern_type.  This function is a hook for derived classes to change
+       *  the value returned.  @see out for more information.
+      */
+      virtual result
+      do_out(state_type& __state, const intern_type* __from,
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const = 0;
+
+      virtual result
+      do_unshift(state_type& __state, extern_type* __to,
+		 extern_type* __to_end, extern_type*& __to_next) const = 0;
+
+      virtual result
+      do_in(state_type& __state, const extern_type* __from,
+	    const extern_type* __from_end, const extern_type*& __from_next,
+	    intern_type* __to, intern_type* __to_end,
+	    intern_type*& __to_next) const = 0;
+
+      virtual int
+      do_encoding() const throw() = 0;
+
+      virtual bool
+      do_always_noconv() const throw() = 0;
+
+      virtual int
+      do_length(state_type&, const extern_type* __from,
+		const extern_type* __end, size_t __max) const = 0;
+
+      virtual int
+      do_max_length() const throw() = 0;
+    };
+
+
+
+  /**
+   *  @brief  Primary class template codecvt.
+   *  @ingroup locales
+   *
+   *  NB: Generic, mostly useless implementation.
+   *
+  */
+   template<typename _InternT, typename _ExternT, typename _StateT>
+    class codecvt
+    : public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
+    {
+    public:
+      // Types:
+      typedef codecvt_base::result	result;
+      typedef _InternT			intern_type;
+      typedef _ExternT			extern_type;
+      typedef _StateT			state_type;
+
+    protected:
+      __c_locale			_M_c_locale_codecvt;
+
+    public:
+      static locale::id			id;
+
+      explicit
+      codecvt(size_t __refs = 0)
+      : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { }
+
+      explicit
+      codecvt(__c_locale __cloc, size_t __refs = 0);
+
+    protected:
+      virtual
+      ~codecvt() { }
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from,
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const;
+
+      virtual result
+      do_unshift(state_type& __state, extern_type* __to,
+		 extern_type* __to_end, extern_type*& __to_next) const;
+
+      virtual result
+      do_in(state_type& __state, const extern_type* __from,
+	    const extern_type* __from_end, const extern_type*& __from_next,
+	    intern_type* __to, intern_type* __to_end,
+	    intern_type*& __to_next) const;
+
+      virtual int
+      do_encoding() const throw();
+
+      virtual bool
+      do_always_noconv() const throw();
+
+      virtual int
+      do_length(state_type&, const extern_type* __from,
+		const extern_type* __end, size_t __max) const;
+
+      virtual int
+      do_max_length() const throw();
+    };
+
+  template<typename _InternT, typename _ExternT, typename _StateT>
+    locale::id codecvt<_InternT, _ExternT, _StateT>::id;
+
+  /// class codecvt<char, char, mbstate_t> specialization.
+  template<>
+    class codecvt<char, char, mbstate_t>
+    : public __codecvt_abstract_base<char, char, mbstate_t>
+    {
+    public:
+      // Types:
+      typedef char			intern_type;
+      typedef char			extern_type;
+      typedef mbstate_t			state_type;
+
+    protected:
+      __c_locale			_M_c_locale_codecvt;
+
+    public:
+      static locale::id id;
+
+      explicit
+      codecvt(size_t __refs = 0);
+
+      explicit
+      codecvt(__c_locale __cloc, size_t __refs = 0);
+
+    protected:
+      virtual
+      ~codecvt();
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from,
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const;
+
+      virtual result
+      do_unshift(state_type& __state, extern_type* __to,
+		 extern_type* __to_end, extern_type*& __to_next) const;
+
+      virtual result
+      do_in(state_type& __state, const extern_type* __from,
+	    const extern_type* __from_end, const extern_type*& __from_next,
+	    intern_type* __to, intern_type* __to_end,
+	    intern_type*& __to_next) const;
+
+      virtual int
+      do_encoding() const throw();
+
+      virtual bool
+      do_always_noconv() const throw();
+
+      virtual int
+      do_length(state_type&, const extern_type* __from,
+		const extern_type* __end, size_t __max) const;
+
+      virtual int
+      do_max_length() const throw();
+  };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  /// class codecvt<wchar_t, char, mbstate_t> specialization.
+  template<>
+    class codecvt<wchar_t, char, mbstate_t>
+    : public __codecvt_abstract_base<wchar_t, char, mbstate_t>
+    {
+    public:
+      // Types:
+      typedef wchar_t			intern_type;
+      typedef char			extern_type;
+      typedef mbstate_t			state_type;
+
+    protected:
+      __c_locale			_M_c_locale_codecvt;
+
+    public:
+      static locale::id			id;
+
+      explicit
+      codecvt(size_t __refs = 0);
+
+      explicit
+      codecvt(__c_locale __cloc, size_t __refs = 0);
+
+    protected:
+      virtual
+      ~codecvt();
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from,
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const;
+
+      virtual result
+      do_unshift(state_type& __state,
+		 extern_type* __to, extern_type* __to_end,
+		 extern_type*& __to_next) const;
+
+      virtual result
+      do_in(state_type& __state,
+	     const extern_type* __from, const extern_type* __from_end,
+	     const extern_type*& __from_next,
+	     intern_type* __to, intern_type* __to_end,
+	     intern_type*& __to_next) const;
+
+      virtual
+      int do_encoding() const throw();
+
+      virtual
+      bool do_always_noconv() const throw();
+
+      virtual
+      int do_length(state_type&, const extern_type* __from,
+		    const extern_type* __end, size_t __max) const;
+
+      virtual int
+      do_max_length() const throw();
+    };
+#endif //_GLIBCXX_USE_WCHAR_T
+
+  /// class codecvt_byname [22.2.1.6].
+  template<typename _InternT, typename _ExternT, typename _StateT>
+    class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT>
+    {
+    public:
+      explicit
+      codecvt_byname(const char* __s, size_t __refs = 0)
+      : codecvt<_InternT, _ExternT, _StateT>(__refs)
+      {
+	if (__builtin_strcmp(__s, "C") != 0
+	    && __builtin_strcmp(__s, "POSIX") != 0)
+	  {
+	    this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
+	    this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
+	  }
+      }
+
+    protected:
+      virtual
+      ~codecvt_byname() { }
+    };
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class codecvt_byname<char, char, mbstate_t>;
+
+  extern template
+    const codecvt<char, char, mbstate_t>&
+    use_facet<codecvt<char, char, mbstate_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<codecvt<char, char, mbstate_t> >(const locale&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class codecvt_byname<wchar_t, char, mbstate_t>;
+
+  extern template
+    const codecvt<wchar_t, char, mbstate_t>&
+    use_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _CODECVT_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/concept_check.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/concept_check.h
new file mode 100644
index 0000000..6d45e26
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/concept_check.h
@@ -0,0 +1,80 @@
+// Concept-checking control -*- C++ -*-
+
+// Copyright (C) 2001, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file concept_check.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CONCEPT_CHECK_H
+#define _CONCEPT_CHECK_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+// All places in libstdc++-v3 where these are used, or /might/ be used, or
+// don't need to be used, or perhaps /should/ be used, are commented with
+// "concept requirements" (and maybe some more text).  So grep like crazy
+// if you're looking for additional places to use these.
+
+// Concept-checking code is off by default unless users turn it on via
+// configure options or editing c++config.h.
+
+#ifndef _GLIBCXX_CONCEPT_CHECKS
+
+#define __glibcxx_function_requires(...)
+#define __glibcxx_class_requires(_a,_b)
+#define __glibcxx_class_requires2(_a,_b,_c)
+#define __glibcxx_class_requires3(_a,_b,_c,_d)
+#define __glibcxx_class_requires4(_a,_b,_c,_d,_e)
+
+#else // the checks are on
+
+#include <bits/boost_concept_check.h>
+
+// Note that the obvious and elegant approach of
+//
+//#define glibcxx_function_requires(C) boost::function_requires< boost::C >()
+//
+// won't work due to concept templates with more than one parameter, e.g.,
+// BinaryPredicateConcept.  The preprocessor tries to split things up on
+// the commas in the template argument list.  We can't use an inner pair of
+// parenthesis to hide the commas, because "boost::(Temp<Foo,Bar>)" isn't
+// a valid instantiation pattern.  Thus, we steal a feature from C99.
+
+#define __glibcxx_function_requires(...)                                 \
+            __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >();
+#define __glibcxx_class_requires(_a,_C)                                  \
+            _GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C);
+#define __glibcxx_class_requires2(_a,_b,_C)                              \
+            _GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C);
+#define __glibcxx_class_requires3(_a,_b,_c,_C)                           \
+            _GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C);
+#define __glibcxx_class_requires4(_a,_b,_c,_d,_C)                        \
+            _GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C);
+
+#endif // enable/disable
+
+#endif // _GLIBCXX_CONCEPT_CHECK
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/cpp_type_traits.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/cpp_type_traits.h
new file mode 100644
index 0000000..8c5d8e9
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/cpp_type_traits.h
@@ -0,0 +1,447 @@
+// The  -*- C++ -*- type traits classes for internal use in libstdc++
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cpp_type_traits.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
+
+#ifndef _CPP_TYPE_TRAITS_H
+#define _CPP_TYPE_TRAITS_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+//
+// This file provides some compile-time information about various types.
+// These representations were designed, on purpose, to be constant-expressions
+// and not types as found in <bits/type_traits.h>.  In particular, they
+// can be used in control structures and the optimizer hopefully will do
+// the obvious thing.
+//
+// Why integral expressions, and not functions nor types?
+// Firstly, these compile-time entities are used as template-arguments
+// so function return values won't work:  We need compile-time entities.
+// We're left with types and constant  integral expressions.
+// Secondly, from the point of view of ease of use, type-based compile-time
+// information is -not- *that* convenient.  On has to write lots of
+// overloaded functions and to hope that the compiler will select the right
+// one. As a net effect, the overall structure isn't very clear at first
+// glance.
+// Thirdly, partial ordering and overload resolution (of function templates)
+// is highly costly in terms of compiler-resource.  It is a Good Thing to
+// keep these resource consumption as least as possible.
+//
+// See valarray_array.h for a case use.
+//
+// -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06.
+//
+// Update 2005: types are also provided and <bits/type_traits.h> has been
+// removed.
+//
+
+// Forward declaration hack, should really include this from somewhere.
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  template<typename _Iterator, typename _Container>
+    class __normal_iterator;
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  struct __true_type { };
+  struct __false_type { };
+
+  template<bool>
+    struct __truth_type
+    { typedef __false_type __type; };
+
+  template<>
+    struct __truth_type<true>
+    { typedef __true_type __type; };
+
+  // N.B. The conversions to bool are needed due to the issue
+  // explained in c++/19404.
+  template<class _Sp, class _Tp>
+    struct __traitor
+    {
+      enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
+      typedef typename __truth_type<__value>::__type __type;
+    };
+
+  // Compare for equality of types.
+  template<typename, typename>
+    struct __are_same
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+  template<typename _Tp>
+    struct __are_same<_Tp, _Tp>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  // Holds if the template-argument is a void type.
+  template<typename _Tp>
+    struct __is_void
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+  template<>
+    struct __is_void<void>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  //
+  // Integer types
+  //
+  template<typename _Tp>
+    struct __is_integer
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+  // Thirteen specializations (yes there are eleven standard integer
+  // types; <em>long long</em> and <em>unsigned long long</em> are
+  // supported as extensions)
+  template<>
+    struct __is_integer<bool>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<char>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<signed char>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<unsigned char>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+# ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    struct __is_integer<wchar_t>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+# endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<>
+    struct __is_integer<char16_t>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<char32_t>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+#endif
+
+  template<>
+    struct __is_integer<short>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<unsigned short>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<int>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<unsigned int>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<long>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<unsigned long>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<long long>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_integer<unsigned long long>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  //
+  // Floating point types
+  //
+  template<typename _Tp>
+    struct __is_floating
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+  // three specializations (float, double and 'long double')
+  template<>
+    struct __is_floating<float>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_floating<double>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_floating<long double>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  //
+  // Pointer types
+  //
+  template<typename _Tp>
+    struct __is_pointer
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+  template<typename _Tp>
+    struct __is_pointer<_Tp*>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  //
+  // Normal iterator type
+  //
+  template<typename _Tp>
+    struct __is_normal_iterator
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+  template<typename _Iterator, typename _Container>
+    struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
+							      _Container> >
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  //
+  // An arithmetic type is an integer type or a floating point type
+  //
+  template<typename _Tp>
+    struct __is_arithmetic
+    : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
+    { };
+
+  //
+  // A fundamental type is `void' or and arithmetic type
+  //
+  template<typename _Tp>
+    struct __is_fundamental
+    : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
+    { };
+
+  //
+  // A scalar type is an arithmetic type or a pointer type
+  // 
+  template<typename _Tp>
+    struct __is_scalar
+    : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
+    { };
+
+  //
+  // For use in std::copy and std::find overloads for streambuf iterators.
+  //
+  template<typename _Tp>
+    struct __is_char
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+  template<>
+    struct __is_char<char>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    struct __is_char<wchar_t>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+#endif
+
+  template<typename _Tp>
+    struct __is_byte
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+  template<>
+    struct __is_byte<char>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_byte<signed char>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  template<>
+    struct __is_byte<unsigned char>
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+
+  //
+  // Move iterator type
+  //
+  template<typename _Tp>
+    struct __is_move_iterator
+    {
+      enum { __value = 0 };
+      typedef __false_type __type;
+    };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Iterator>
+    class move_iterator;
+
+  template<typename _Iterator>
+    struct __is_move_iterator< move_iterator<_Iterator> >
+    {
+      enum { __value = 1 };
+      typedef __true_type __type;
+    };
+#endif
+
+  template<typename _Tp>
+    class __is_iterator_helper
+    {
+      typedef char __one;
+      typedef struct { char __arr[2]; } __two;
+
+      template<typename _Up>
+        struct _Wrap_type
+	{ };
+
+      template<typename _Up>
+        static __one __test(_Wrap_type<typename _Up::iterator_category>*);
+
+      template<typename _Up>
+        static __two __test(...);
+
+    public:
+      static const bool __value = (sizeof(__test<_Tp>(0)) == 1
+				   || __is_pointer<_Tp>::__value);
+    };
+
+  template<typename _Tp>
+    struct __is_iterator
+    {
+      enum { __value = __is_iterator_helper<_Tp>::__value };
+      typedef typename __truth_type<__value>::__type __type;
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif //_CPP_TYPE_TRAITS_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/deque.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/deque.tcc
new file mode 100644
index 0000000..cde067c
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/deque.tcc
@@ -0,0 +1,989 @@
+// Deque implementation (out of line) -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file deque.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _DEQUE_TCC
+#define _DEQUE_TCC 1
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  template <typename _Tp, typename _Alloc>
+    deque<_Tp, _Alloc>&
+    deque<_Tp, _Alloc>::
+    operator=(const deque& __x)
+    {
+      const size_type __len = size();
+      if (&__x != this)
+	{
+	  if (__len >= __x.size())
+	    _M_erase_at_end(std::copy(__x.begin(), __x.end(),
+				      this->_M_impl._M_start));
+	  else
+	    {
+	      const_iterator __mid = __x.begin() + difference_type(__len);
+	      std::copy(__x.begin(), __mid, this->_M_impl._M_start);
+	      insert(this->_M_impl._M_finish, __mid, __x.end());
+	    }
+	}
+      return *this;
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp, typename _Alloc>
+    template<typename... _Args>
+      void
+      deque<_Tp, _Alloc>::
+      emplace_front(_Args&&... __args)
+      {
+	if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
+	  {
+	    this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1,
+				    std::forward<_Args>(__args)...);
+	    --this->_M_impl._M_start._M_cur;
+	  }
+	else
+	  _M_push_front_aux(std::forward<_Args>(__args)...);
+      }
+
+  template<typename _Tp, typename _Alloc>
+    template<typename... _Args>
+      void
+      deque<_Tp, _Alloc>::
+      emplace_back(_Args&&... __args)
+      {
+	if (this->_M_impl._M_finish._M_cur
+	    != this->_M_impl._M_finish._M_last - 1)
+	  {
+	    this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
+				    std::forward<_Args>(__args)...);
+	    ++this->_M_impl._M_finish._M_cur;
+	  }
+	else
+	  _M_push_back_aux(std::forward<_Args>(__args)...);
+      }
+#endif
+
+  template <typename _Tp, typename _Alloc>
+    typename deque<_Tp, _Alloc>::iterator
+    deque<_Tp, _Alloc>::
+    insert(iterator __position, const value_type& __x)
+    {
+      if (__position._M_cur == this->_M_impl._M_start._M_cur)
+	{
+	  push_front(__x);
+	  return this->_M_impl._M_start;
+	}
+      else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
+	{
+	  push_back(__x);
+	  iterator __tmp = this->_M_impl._M_finish;
+	  --__tmp;
+	  return __tmp;
+	}
+      else
+        return _M_insert_aux(__position, __x);
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp, typename _Alloc>
+    template<typename... _Args>
+      typename deque<_Tp, _Alloc>::iterator
+      deque<_Tp, _Alloc>::
+      emplace(iterator __position, _Args&&... __args)
+      {
+	if (__position._M_cur == this->_M_impl._M_start._M_cur)
+	  {
+	    push_front(std::forward<_Args>(__args)...);
+	    return this->_M_impl._M_start;
+	  }
+	else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
+	  {
+	    push_back(std::forward<_Args>(__args)...);
+	    iterator __tmp = this->_M_impl._M_finish;
+	    --__tmp;
+	    return __tmp;
+	  }
+	else
+	  return _M_insert_aux(__position, std::forward<_Args>(__args)...);
+      }
+#endif
+
+  template <typename _Tp, typename _Alloc>
+    typename deque<_Tp, _Alloc>::iterator
+    deque<_Tp, _Alloc>::
+    erase(iterator __position)
+    {
+      iterator __next = __position;
+      ++__next;
+      const difference_type __index = __position - begin();
+      if (static_cast<size_type>(__index) < (size() >> 1))
+	{
+	  if (__position != begin())
+	    _GLIBCXX_MOVE_BACKWARD3(begin(), __position, __next);
+	  pop_front();
+	}
+      else
+	{
+	  if (__next != end())
+	    _GLIBCXX_MOVE3(__next, end(), __position);
+	  pop_back();
+	}
+      return begin() + __index;
+    }
+
+  template <typename _Tp, typename _Alloc>
+    typename deque<_Tp, _Alloc>::iterator
+    deque<_Tp, _Alloc>::
+    erase(iterator __first, iterator __last)
+    {
+      if (__first == begin() && __last == end())
+	{
+	  clear();
+	  return end();
+	}
+      else
+	{
+	  const difference_type __n = __last - __first;
+	  const difference_type __elems_before = __first - begin();
+	  if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
+	    {
+	      if (__first != begin())
+		_GLIBCXX_MOVE_BACKWARD3(begin(), __first, __last);
+	      _M_erase_at_begin(begin() + __n);
+	    }
+	  else
+	    {
+	      if (__last != end())
+		_GLIBCXX_MOVE3(__last, end(), __first);
+	      _M_erase_at_end(end() - __n);
+	    }
+	  return begin() + __elems_before;
+	}
+    }
+
+  template <typename _Tp, class _Alloc>
+    template <typename _InputIterator>
+      void
+      deque<_Tp, _Alloc>::
+      _M_assign_aux(_InputIterator __first, _InputIterator __last,
+		    std::input_iterator_tag)
+      {
+        iterator __cur = begin();
+        for (; __first != __last && __cur != end(); ++__cur, ++__first)
+          *__cur = *__first;
+        if (__first == __last)
+          _M_erase_at_end(__cur);
+        else
+          insert(end(), __first, __last);
+      }
+
+  template <typename _Tp, typename _Alloc>
+    void
+    deque<_Tp, _Alloc>::
+    _M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
+    {
+      if (__pos._M_cur == this->_M_impl._M_start._M_cur)
+	{
+	  iterator __new_start = _M_reserve_elements_at_front(__n);
+	  __try
+	    {
+	      std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start,
+					  __x, _M_get_Tp_allocator());
+	      this->_M_impl._M_start = __new_start;
+	    }
+	  __catch(...)
+	    {
+	      _M_destroy_nodes(__new_start._M_node,
+			       this->_M_impl._M_start._M_node);
+	      __throw_exception_again;
+	    }
+	}
+      else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
+	{
+	  iterator __new_finish = _M_reserve_elements_at_back(__n);
+	  __try
+	    {
+	      std::__uninitialized_fill_a(this->_M_impl._M_finish,
+					  __new_finish, __x,
+					  _M_get_Tp_allocator());
+	      this->_M_impl._M_finish = __new_finish;
+	    }
+	  __catch(...)
+	    {
+	      _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+			       __new_finish._M_node + 1);
+	      __throw_exception_again;
+	    }
+	}
+      else
+        _M_insert_aux(__pos, __n, __x);
+    }
+
+  template <typename _Tp, typename _Alloc>
+    void
+    deque<_Tp, _Alloc>::
+    _M_fill_initialize(const value_type& __value)
+    {
+      _Map_pointer __cur;
+      __try
+        {
+          for (__cur = this->_M_impl._M_start._M_node;
+	       __cur < this->_M_impl._M_finish._M_node;
+	       ++__cur)
+            std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(),
+					__value, _M_get_Tp_allocator());
+          std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first,
+				      this->_M_impl._M_finish._M_cur,
+				      __value, _M_get_Tp_allocator());
+        }
+      __catch(...)
+        {
+          std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
+			_M_get_Tp_allocator());
+          __throw_exception_again;
+        }
+    }
+
+  template <typename _Tp, typename _Alloc>
+    template <typename _InputIterator>
+      void
+      deque<_Tp, _Alloc>::
+      _M_range_initialize(_InputIterator __first, _InputIterator __last,
+                          std::input_iterator_tag)
+      {
+        this->_M_initialize_map(0);
+        __try
+          {
+            for (; __first != __last; ++__first)
+              push_back(*__first);
+          }
+        __catch(...)
+          {
+            clear();
+            __throw_exception_again;
+          }
+      }
+
+  template <typename _Tp, typename _Alloc>
+    template <typename _ForwardIterator>
+      void
+      deque<_Tp, _Alloc>::
+      _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+                          std::forward_iterator_tag)
+      {
+        const size_type __n = std::distance(__first, __last);
+        this->_M_initialize_map(__n);
+
+        _Map_pointer __cur_node;
+        __try
+          {
+            for (__cur_node = this->_M_impl._M_start._M_node;
+                 __cur_node < this->_M_impl._M_finish._M_node;
+                 ++__cur_node)
+	      {
+		_ForwardIterator __mid = __first;
+		std::advance(__mid, _S_buffer_size());
+		std::__uninitialized_copy_a(__first, __mid, *__cur_node,
+					    _M_get_Tp_allocator());
+		__first = __mid;
+	      }
+            std::__uninitialized_copy_a(__first, __last,
+					this->_M_impl._M_finish._M_first,
+					_M_get_Tp_allocator());
+          }
+        __catch(...)
+          {
+            std::_Destroy(this->_M_impl._M_start,
+			  iterator(*__cur_node, __cur_node),
+			  _M_get_Tp_allocator());
+            __throw_exception_again;
+          }
+      }
+
+  // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1.
+  template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    template<typename... _Args>
+      void
+      deque<_Tp, _Alloc>::
+      _M_push_back_aux(_Args&&... __args)
+#else
+      void
+      deque<_Tp, _Alloc>::
+      _M_push_back_aux(const value_type& __t)
+#endif
+      {
+	_M_reserve_map_at_back();
+	*(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
+	__try
+	  {
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+	    this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
+				    std::forward<_Args>(__args)...);
+#else
+	    this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t);
+#endif
+	    this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node
+						+ 1);
+	    this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
+	  }
+	__catch(...)
+	  {
+	    _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
+	    __throw_exception_again;
+	  }
+      }
+
+  // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first.
+  template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    template<typename... _Args>
+      void
+      deque<_Tp, _Alloc>::
+      _M_push_front_aux(_Args&&... __args)
+#else
+      void
+      deque<_Tp, _Alloc>::
+      _M_push_front_aux(const value_type& __t)
+#endif
+      {
+	_M_reserve_map_at_front();
+	*(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
+	__try
+	  {
+	    this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
+					       - 1);
+	    this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+	    this->_M_impl.construct(this->_M_impl._M_start._M_cur,
+				    std::forward<_Args>(__args)...);
+#else
+	    this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t);
+#endif
+	  }
+	__catch(...)
+	  {
+	    ++this->_M_impl._M_start;
+	    _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
+	    __throw_exception_again;
+	  }
+      }
+
+  // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_first.
+  template <typename _Tp, typename _Alloc>
+    void deque<_Tp, _Alloc>::
+    _M_pop_back_aux()
+    {
+      _M_deallocate_node(this->_M_impl._M_finish._M_first);
+      this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1);
+      this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1;
+      this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
+    }
+
+  // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_last - 1.
+  // Note that if the deque has at least one element (a precondition for this
+  // member function), and if
+  //   _M_impl._M_start._M_cur == _M_impl._M_start._M_last,
+  // then the deque must have at least two nodes.
+  template <typename _Tp, typename _Alloc>
+    void deque<_Tp, _Alloc>::
+    _M_pop_front_aux()
+    {
+      this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
+      _M_deallocate_node(this->_M_impl._M_start._M_first);
+      this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1);
+      this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first;
+    }
+
+  template <typename _Tp, typename _Alloc>
+    template <typename _InputIterator>
+      void
+      deque<_Tp, _Alloc>::
+      _M_range_insert_aux(iterator __pos,
+                          _InputIterator __first, _InputIterator __last,
+                          std::input_iterator_tag)
+      { std::copy(__first, __last, std::inserter(*this, __pos)); }
+
+  template <typename _Tp, typename _Alloc>
+    template <typename _ForwardIterator>
+      void
+      deque<_Tp, _Alloc>::
+      _M_range_insert_aux(iterator __pos,
+                          _ForwardIterator __first, _ForwardIterator __last,
+                          std::forward_iterator_tag)
+      {
+        const size_type __n = std::distance(__first, __last);
+        if (__pos._M_cur == this->_M_impl._M_start._M_cur)
+	  {
+	    iterator __new_start = _M_reserve_elements_at_front(__n);
+	    __try
+	      {
+		std::__uninitialized_copy_a(__first, __last, __new_start,
+					    _M_get_Tp_allocator());
+		this->_M_impl._M_start = __new_start;
+	      }
+	    __catch(...)
+	      {
+		_M_destroy_nodes(__new_start._M_node,
+				 this->_M_impl._M_start._M_node);
+		__throw_exception_again;
+	      }
+	  }
+        else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
+	  {
+	    iterator __new_finish = _M_reserve_elements_at_back(__n);
+	    __try
+	      {
+		std::__uninitialized_copy_a(__first, __last,
+					    this->_M_impl._M_finish,
+					    _M_get_Tp_allocator());
+		this->_M_impl._M_finish = __new_finish;
+	      }
+	    __catch(...)
+	      {
+		_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+				 __new_finish._M_node + 1);
+		__throw_exception_again;
+	      }
+	  }
+        else
+          _M_insert_aux(__pos, __first, __last, __n);
+      }
+
+  template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    template<typename... _Args>
+      typename deque<_Tp, _Alloc>::iterator
+      deque<_Tp, _Alloc>::
+      _M_insert_aux(iterator __pos, _Args&&... __args)
+      {
+	value_type __x_copy(std::forward<_Args>(__args)...); // XXX copy
+#else
+    typename deque<_Tp, _Alloc>::iterator
+      deque<_Tp, _Alloc>::
+      _M_insert_aux(iterator __pos, const value_type& __x)
+      {
+	value_type __x_copy = __x; // XXX copy
+#endif
+	difference_type __index = __pos - this->_M_impl._M_start;
+	if (static_cast<size_type>(__index) < size() / 2)
+	  {
+	    push_front(_GLIBCXX_MOVE(front()));
+	    iterator __front1 = this->_M_impl._M_start;
+	    ++__front1;
+	    iterator __front2 = __front1;
+	    ++__front2;
+	    __pos = this->_M_impl._M_start + __index;
+	    iterator __pos1 = __pos;
+	    ++__pos1;
+	    _GLIBCXX_MOVE3(__front2, __pos1, __front1);
+	  }
+	else
+	  {
+	    push_back(_GLIBCXX_MOVE(back()));
+	    iterator __back1 = this->_M_impl._M_finish;
+	    --__back1;
+	    iterator __back2 = __back1;
+	    --__back2;
+	    __pos = this->_M_impl._M_start + __index;
+	    _GLIBCXX_MOVE_BACKWARD3(__pos, __back2, __back1);
+	  }
+	*__pos = _GLIBCXX_MOVE(__x_copy);
+	return __pos;
+      }
+
+  template <typename _Tp, typename _Alloc>
+    void
+    deque<_Tp, _Alloc>::
+    _M_insert_aux(iterator __pos, size_type __n, const value_type& __x)
+    {
+      const difference_type __elems_before = __pos - this->_M_impl._M_start;
+      const size_type __length = this->size();
+      value_type __x_copy = __x;
+      if (__elems_before < difference_type(__length / 2))
+	{
+	  iterator __new_start = _M_reserve_elements_at_front(__n);
+	  iterator __old_start = this->_M_impl._M_start;
+	  __pos = this->_M_impl._M_start + __elems_before;
+	  __try
+	    {
+	      if (__elems_before >= difference_type(__n))
+		{
+		  iterator __start_n = (this->_M_impl._M_start
+					+ difference_type(__n));
+		  std::__uninitialized_move_a(this->_M_impl._M_start,
+					      __start_n, __new_start,
+					      _M_get_Tp_allocator());
+		  this->_M_impl._M_start = __new_start;
+		  _GLIBCXX_MOVE3(__start_n, __pos, __old_start);
+		  std::fill(__pos - difference_type(__n), __pos, __x_copy);
+		}
+	      else
+		{
+		  std::__uninitialized_move_fill(this->_M_impl._M_start,
+						 __pos, __new_start,
+						 this->_M_impl._M_start,
+						 __x_copy,
+						 _M_get_Tp_allocator());
+		  this->_M_impl._M_start = __new_start;
+		  std::fill(__old_start, __pos, __x_copy);
+		}
+	    }
+	  __catch(...)
+	    {
+	      _M_destroy_nodes(__new_start._M_node,
+			       this->_M_impl._M_start._M_node);
+	      __throw_exception_again;
+	    }
+	}
+      else
+	{
+	  iterator __new_finish = _M_reserve_elements_at_back(__n);
+	  iterator __old_finish = this->_M_impl._M_finish;
+	  const difference_type __elems_after =
+	    difference_type(__length) - __elems_before;
+	  __pos = this->_M_impl._M_finish - __elems_after;
+	  __try
+	    {
+	      if (__elems_after > difference_type(__n))
+		{
+		  iterator __finish_n = (this->_M_impl._M_finish
+					 - difference_type(__n));
+		  std::__uninitialized_move_a(__finish_n,
+					      this->_M_impl._M_finish,
+					      this->_M_impl._M_finish,
+					      _M_get_Tp_allocator());
+		  this->_M_impl._M_finish = __new_finish;
+		  _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish);
+		  std::fill(__pos, __pos + difference_type(__n), __x_copy);
+		}
+	      else
+		{
+		  std::__uninitialized_fill_move(this->_M_impl._M_finish,
+						 __pos + difference_type(__n),
+						 __x_copy, __pos,
+						 this->_M_impl._M_finish,
+						 _M_get_Tp_allocator());
+		  this->_M_impl._M_finish = __new_finish;
+		  std::fill(__pos, __old_finish, __x_copy);
+		}
+	    }
+	  __catch(...)
+	    {
+	      _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+			       __new_finish._M_node + 1);
+	      __throw_exception_again;
+	    }
+	}
+    }
+
+  template <typename _Tp, typename _Alloc>
+    template <typename _ForwardIterator>
+      void
+      deque<_Tp, _Alloc>::
+      _M_insert_aux(iterator __pos,
+                    _ForwardIterator __first, _ForwardIterator __last,
+                    size_type __n)
+      {
+        const difference_type __elemsbefore = __pos - this->_M_impl._M_start;
+        const size_type __length = size();
+        if (static_cast<size_type>(__elemsbefore) < __length / 2)
+	  {
+	    iterator __new_start = _M_reserve_elements_at_front(__n);
+	    iterator __old_start = this->_M_impl._M_start;
+	    __pos = this->_M_impl._M_start + __elemsbefore;
+	    __try
+	      {
+		if (__elemsbefore >= difference_type(__n))
+		  {
+		    iterator __start_n = (this->_M_impl._M_start
+					  + difference_type(__n));
+		    std::__uninitialized_move_a(this->_M_impl._M_start,
+						__start_n, __new_start,
+						_M_get_Tp_allocator());
+		    this->_M_impl._M_start = __new_start;
+		    _GLIBCXX_MOVE3(__start_n, __pos, __old_start);
+		    std::copy(__first, __last, __pos - difference_type(__n));
+		  }
+		else
+		  {
+		    _ForwardIterator __mid = __first;
+		    std::advance(__mid, difference_type(__n) - __elemsbefore);
+		    std::__uninitialized_move_copy(this->_M_impl._M_start,
+						   __pos, __first, __mid,
+						   __new_start,
+						   _M_get_Tp_allocator());
+		    this->_M_impl._M_start = __new_start;
+		    std::copy(__mid, __last, __old_start);
+		  }
+	      }
+	    __catch(...)
+	      {
+		_M_destroy_nodes(__new_start._M_node,
+				 this->_M_impl._M_start._M_node);
+		__throw_exception_again;
+	      }
+	  }
+        else
+        {
+          iterator __new_finish = _M_reserve_elements_at_back(__n);
+          iterator __old_finish = this->_M_impl._M_finish;
+          const difference_type __elemsafter =
+            difference_type(__length) - __elemsbefore;
+          __pos = this->_M_impl._M_finish - __elemsafter;
+          __try
+            {
+              if (__elemsafter > difference_type(__n))
+		{
+		  iterator __finish_n = (this->_M_impl._M_finish
+					 - difference_type(__n));
+		  std::__uninitialized_move_a(__finish_n,
+					      this->_M_impl._M_finish,
+					      this->_M_impl._M_finish,
+					      _M_get_Tp_allocator());
+		  this->_M_impl._M_finish = __new_finish;
+		  _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish);
+		  std::copy(__first, __last, __pos);
+		}
+              else
+		{
+		  _ForwardIterator __mid = __first;
+		  std::advance(__mid, __elemsafter);
+		  std::__uninitialized_copy_move(__mid, __last, __pos,
+						 this->_M_impl._M_finish,
+						 this->_M_impl._M_finish,
+						 _M_get_Tp_allocator());
+		  this->_M_impl._M_finish = __new_finish;
+		  std::copy(__first, __mid, __pos);
+		}
+            }
+          __catch(...)
+            {
+              _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+			       __new_finish._M_node + 1);
+              __throw_exception_again;
+            }
+        }
+      }
+
+   template<typename _Tp, typename _Alloc>
+     void
+     deque<_Tp, _Alloc>::
+     _M_destroy_data_aux(iterator __first, iterator __last)
+     {
+       for (_Map_pointer __node = __first._M_node + 1;
+	    __node < __last._M_node; ++__node)
+	 std::_Destroy(*__node, *__node + _S_buffer_size(),
+		       _M_get_Tp_allocator());
+
+       if (__first._M_node != __last._M_node)
+	 {
+	   std::_Destroy(__first._M_cur, __first._M_last,
+			 _M_get_Tp_allocator());
+	   std::_Destroy(__last._M_first, __last._M_cur,
+			 _M_get_Tp_allocator());
+	 }
+       else
+	 std::_Destroy(__first._M_cur, __last._M_cur,
+		       _M_get_Tp_allocator());
+     }
+
+  template <typename _Tp, typename _Alloc>
+    void
+    deque<_Tp, _Alloc>::
+    _M_new_elements_at_front(size_type __new_elems)
+    {
+      if (this->max_size() - this->size() < __new_elems)
+	__throw_length_error(__N("deque::_M_new_elements_at_front"));
+
+      const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
+				     / _S_buffer_size());
+      _M_reserve_map_at_front(__new_nodes);
+      size_type __i;
+      __try
+        {
+          for (__i = 1; __i <= __new_nodes; ++__i)
+            *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
+        }
+      __catch(...)
+        {
+          for (size_type __j = 1; __j < __i; ++__j)
+            _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
+          __throw_exception_again;
+        }
+    }
+
+  template <typename _Tp, typename _Alloc>
+    void
+    deque<_Tp, _Alloc>::
+    _M_new_elements_at_back(size_type __new_elems)
+    {
+      if (this->max_size() - this->size() < __new_elems)
+	__throw_length_error(__N("deque::_M_new_elements_at_back"));
+
+      const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
+				     / _S_buffer_size());
+      _M_reserve_map_at_back(__new_nodes);
+      size_type __i;
+      __try
+        {
+          for (__i = 1; __i <= __new_nodes; ++__i)
+            *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
+        }
+      __catch(...)
+        {
+          for (size_type __j = 1; __j < __i; ++__j)
+            _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
+          __throw_exception_again;
+        }
+    }
+
+  template <typename _Tp, typename _Alloc>
+    void
+    deque<_Tp, _Alloc>::
+    _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front)
+    {
+      const size_type __old_num_nodes
+	= this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1;
+      const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
+
+      _Map_pointer __new_nstart;
+      if (this->_M_impl._M_map_size > 2 * __new_num_nodes)
+	{
+	  __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size
+					 - __new_num_nodes) / 2
+	                 + (__add_at_front ? __nodes_to_add : 0);
+	  if (__new_nstart < this->_M_impl._M_start._M_node)
+	    std::copy(this->_M_impl._M_start._M_node,
+		      this->_M_impl._M_finish._M_node + 1,
+		      __new_nstart);
+	  else
+	    std::copy_backward(this->_M_impl._M_start._M_node,
+			       this->_M_impl._M_finish._M_node + 1,
+			       __new_nstart + __old_num_nodes);
+	}
+      else
+	{
+	  size_type __new_map_size = this->_M_impl._M_map_size
+	                             + std::max(this->_M_impl._M_map_size,
+						__nodes_to_add) + 2;
+
+	  _Map_pointer __new_map = this->_M_allocate_map(__new_map_size);
+	  __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
+	                 + (__add_at_front ? __nodes_to_add : 0);
+	  std::copy(this->_M_impl._M_start._M_node,
+		    this->_M_impl._M_finish._M_node + 1,
+		    __new_nstart);
+	  _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
+
+	  this->_M_impl._M_map = __new_map;
+	  this->_M_impl._M_map_size = __new_map_size;
+	}
+
+      this->_M_impl._M_start._M_set_node(__new_nstart);
+      this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
+    }
+
+  // Overload for deque::iterators, exploiting the "segmented-iterator
+  // optimization".
+  template<typename _Tp>
+    void
+    fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first,
+	 const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value)
+    {
+      typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
+
+      for (typename _Self::_Map_pointer __node = __first._M_node + 1;
+           __node < __last._M_node; ++__node)
+	std::fill(*__node, *__node + _Self::_S_buffer_size(), __value);
+
+      if (__first._M_node != __last._M_node)
+	{
+	  std::fill(__first._M_cur, __first._M_last, __value);
+	  std::fill(__last._M_first, __last._M_cur, __value);
+	}
+      else
+	std::fill(__first._M_cur, __last._M_cur, __value);
+    }
+
+  template<typename _Tp>
+    _Deque_iterator<_Tp, _Tp&, _Tp*>
+    copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
+	 _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last,
+	 _Deque_iterator<_Tp, _Tp&, _Tp*> __result)
+    {
+      typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
+      typedef typename _Self::difference_type difference_type;
+
+      difference_type __len = __last - __first;
+      while (__len > 0)
+	{
+	  const difference_type __clen
+	    = std::min(__len, std::min(__first._M_last - __first._M_cur,
+				       __result._M_last - __result._M_cur));
+	  std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur);
+	  __first += __clen;
+	  __result += __clen;
+	  __len -= __clen;
+	}
+      return __result;
+    }
+
+  template<typename _Tp>
+    _Deque_iterator<_Tp, _Tp&, _Tp*>
+    copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
+		  _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last,
+		  _Deque_iterator<_Tp, _Tp&, _Tp*> __result)
+    {
+      typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
+      typedef typename _Self::difference_type difference_type;
+
+      difference_type __len = __last - __first;
+      while (__len > 0)
+	{
+	  difference_type __llen = __last._M_cur - __last._M_first;
+	  _Tp* __lend = __last._M_cur;
+
+	  difference_type __rlen = __result._M_cur - __result._M_first;
+	  _Tp* __rend = __result._M_cur;
+
+	  if (!__llen)
+	    {
+	      __llen = _Self::_S_buffer_size();
+	      __lend = *(__last._M_node - 1) + __llen;
+	    }
+	  if (!__rlen)
+	    {
+	      __rlen = _Self::_S_buffer_size();
+	      __rend = *(__result._M_node - 1) + __rlen;
+	    }
+
+	  const difference_type __clen = std::min(__len,
+						  std::min(__llen, __rlen));
+	  std::copy_backward(__lend - __clen, __lend, __rend);
+	  __last -= __clen;
+	  __result -= __clen;
+	  __len -= __clen;
+	}
+      return __result;
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp>
+    _Deque_iterator<_Tp, _Tp&, _Tp*>
+    move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
+	 _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last,
+	 _Deque_iterator<_Tp, _Tp&, _Tp*> __result)
+    {
+      typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
+      typedef typename _Self::difference_type difference_type;
+
+      difference_type __len = __last - __first;
+      while (__len > 0)
+	{
+	  const difference_type __clen
+	    = std::min(__len, std::min(__first._M_last - __first._M_cur,
+				       __result._M_last - __result._M_cur));
+	  std::move(__first._M_cur, __first._M_cur + __clen, __result._M_cur);
+	  __first += __clen;
+	  __result += __clen;
+	  __len -= __clen;
+	}
+      return __result;
+    }
+
+  template<typename _Tp>
+    _Deque_iterator<_Tp, _Tp&, _Tp*>
+    move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
+		  _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last,
+		  _Deque_iterator<_Tp, _Tp&, _Tp*> __result)
+    {
+      typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
+      typedef typename _Self::difference_type difference_type;
+
+      difference_type __len = __last - __first;
+      while (__len > 0)
+	{
+	  difference_type __llen = __last._M_cur - __last._M_first;
+	  _Tp* __lend = __last._M_cur;
+
+	  difference_type __rlen = __result._M_cur - __result._M_first;
+	  _Tp* __rend = __result._M_cur;
+
+	  if (!__llen)
+	    {
+	      __llen = _Self::_S_buffer_size();
+	      __lend = *(__last._M_node - 1) + __llen;
+	    }
+	  if (!__rlen)
+	    {
+	      __rlen = _Self::_S_buffer_size();
+	      __rend = *(__result._M_node - 1) + __rlen;
+	    }
+
+	  const difference_type __clen = std::min(__len,
+						  std::min(__llen, __rlen));
+	  std::move_backward(__lend - __clen, __lend, __rend);
+	  __last -= __clen;
+	  __result -= __clen;
+	  __len -= __clen;
+	}
+      return __result;
+    }
+#endif
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/forward_list.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/forward_list.h
new file mode 100644
index 0000000..ca882b8
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/forward_list.h
@@ -0,0 +1,1292 @@
+// <forward_list.h> -*- C++ -*-
+
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file forward_list.h
+ *  This is a Standard C++ Library header.
+ */
+
+#ifndef _FORWARD_LIST_H
+#define _FORWARD_LIST_H 1
+
+#pragma GCC system_header
+
+#include <memory>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  @brief  A helper basic node class for %forward_list.
+   *          This is just a linked list with nothing inside it.
+   *          There are purely list shuffling utility methods here.
+   */
+  struct _Fwd_list_node_base
+  {
+    _Fwd_list_node_base() : _M_next(0) { }
+
+    _Fwd_list_node_base* _M_next;
+
+    static void
+    swap(_Fwd_list_node_base& __x, _Fwd_list_node_base& __y)
+    { std::swap(__x._M_next, __y._M_next); }
+
+    _Fwd_list_node_base*
+    _M_transfer_after(_Fwd_list_node_base* __begin)
+    {
+      _Fwd_list_node_base* __end = __begin;
+      while (__end && __end->_M_next)
+	__end = __end->_M_next;
+      return _M_transfer_after(__begin, __end);
+    }
+
+    _Fwd_list_node_base*
+    _M_transfer_after(_Fwd_list_node_base* __begin,
+		      _Fwd_list_node_base* __end)
+    {
+      _Fwd_list_node_base* __keep = __begin->_M_next;
+      if (__end)
+	{
+	  __begin->_M_next = __end->_M_next;
+	  __end->_M_next = _M_next;
+	}
+      else
+	__begin->_M_next = 0;
+      _M_next = __keep;
+      return __end;
+    }
+
+    void
+    _M_reverse_after()
+    {
+      _Fwd_list_node_base* __tail = _M_next;
+      if (!__tail)
+	return;
+      while (_Fwd_list_node_base* __temp = __tail->_M_next)
+	{
+	  _Fwd_list_node_base* __keep = _M_next;
+	  _M_next = __temp;
+	  __tail->_M_next = __temp->_M_next;
+	  _M_next->_M_next = __keep;
+	}
+    }
+  };
+
+  /**
+   *  @brief  A helper node class for %forward_list.
+   *          This is just a linked list with a data value in each node.
+   *          There is a sorting utility method.
+   */
+  template<typename _Tp>
+    struct _Fwd_list_node
+    : public _Fwd_list_node_base
+    {
+      template<typename... _Args>
+        _Fwd_list_node(_Args&&... __args)
+        : _Fwd_list_node_base(), 
+          _M_value(std::forward<_Args>(__args)...) { }
+
+      _Tp _M_value;
+    };
+
+  /**
+   *   @brief A forward_list::iterator.
+   * 
+   *   All the functions are op overloads.
+   */
+  template<typename _Tp>
+    struct _Fwd_list_iterator
+    {
+      typedef _Fwd_list_iterator<_Tp>            _Self;
+      typedef _Fwd_list_node<_Tp>                _Node;
+
+      typedef _Tp                                value_type;
+      typedef _Tp*                               pointer;
+      typedef _Tp&                               reference;
+      typedef ptrdiff_t                          difference_type;
+      typedef std::forward_iterator_tag          iterator_category;
+
+      _Fwd_list_iterator()
+      : _M_node() { }
+
+      explicit
+      _Fwd_list_iterator(_Fwd_list_node_base* __n) 
+      : _M_node(__n) { }
+
+      reference
+      operator*() const
+      { return static_cast<_Node*>(this->_M_node)->_M_value; }
+
+      pointer
+      operator->() const
+      { return &static_cast<_Node*>(this->_M_node)->_M_value; }
+
+      _Self&
+      operator++()
+      {
+        _M_node = _M_node->_M_next;
+        return *this;
+      }
+
+      _Self
+      operator++(int)
+      {
+        _Self __tmp(*this);
+        _M_node = _M_node->_M_next;
+        return __tmp;
+      }
+
+      bool
+      operator==(const _Self& __x) const
+      { return _M_node == __x._M_node; }
+
+      bool
+      operator!=(const _Self& __x) const
+      { return _M_node != __x._M_node; }
+
+      _Self
+      _M_next() const
+      {
+        if (_M_node)
+          return _Fwd_list_iterator(_M_node->_M_next);
+        else
+          return _Fwd_list_iterator(0);
+      }
+
+      _Fwd_list_node_base* _M_node;
+    };
+
+  /**
+   *   @brief A forward_list::const_iterator.
+   * 
+   *   All the functions are op overloads.
+   */
+  template<typename _Tp>
+    struct _Fwd_list_const_iterator
+    {
+      typedef _Fwd_list_const_iterator<_Tp>      _Self;
+      typedef const _Fwd_list_node<_Tp>          _Node;
+      typedef _Fwd_list_iterator<_Tp>            iterator;
+
+      typedef _Tp                                value_type;
+      typedef const _Tp*                         pointer;
+      typedef const _Tp&                         reference;
+      typedef ptrdiff_t                          difference_type;
+      typedef std::forward_iterator_tag          iterator_category;
+
+      _Fwd_list_const_iterator()
+      : _M_node() { }
+
+      explicit
+      _Fwd_list_const_iterator(const _Fwd_list_node_base* __n) 
+      : _M_node(__n) { }
+
+      _Fwd_list_const_iterator(const iterator& __iter)
+      : _M_node(__iter._M_node) { }
+
+      reference
+      operator*() const
+      { return static_cast<_Node*>(this->_M_node)->_M_value; }
+
+      pointer
+      operator->() const
+      { return &static_cast<_Node*>(this->_M_node)->_M_value; }
+
+      _Self&
+      operator++()
+      {
+        _M_node = _M_node->_M_next;
+        return *this;
+      }
+
+      _Self
+      operator++(int)
+      {
+        _Self __tmp(*this);
+        _M_node = _M_node->_M_next;
+        return __tmp;
+      }
+
+      bool
+      operator==(const _Self& __x) const
+      { return _M_node == __x._M_node; }
+
+      bool
+      operator!=(const _Self& __x) const
+      { return _M_node != __x._M_node; }
+
+      _Self
+      _M_next() const
+      {
+        if (this->_M_node)
+          return _Fwd_list_const_iterator(_M_node->_M_next);
+        else
+          return _Fwd_list_const_iterator(0);
+      }
+
+      const _Fwd_list_node_base* _M_node;
+    };
+
+  /**
+   *  @brief  Forward list iterator equality comparison.
+   */
+  template<typename _Tp>
+    inline bool
+    operator==(const _Fwd_list_iterator<_Tp>& __x,
+               const _Fwd_list_const_iterator<_Tp>& __y)
+    { return __x._M_node == __y._M_node; }
+
+  /**
+   *  @brief  Forward list iterator inequality comparison.
+   */
+  template<typename _Tp>
+    inline bool
+    operator!=(const _Fwd_list_iterator<_Tp>& __x,
+               const _Fwd_list_const_iterator<_Tp>& __y)
+    { return __x._M_node != __y._M_node; }
+
+  /**
+   *  @brief  Base class for %forward_list.
+   */
+  template<typename _Tp, typename _Alloc>
+    struct _Fwd_list_base
+    {
+    protected:
+      typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+
+      typedef typename _Alloc::template 
+        rebind<_Fwd_list_node<_Tp>>::other _Node_alloc_type;
+
+      struct _Fwd_list_impl 
+      : public _Node_alloc_type
+      {
+        _Fwd_list_node_base _M_head;
+
+        _Fwd_list_impl()
+        : _Node_alloc_type(), _M_head()
+        { }
+
+        _Fwd_list_impl(const _Node_alloc_type& __a)
+        : _Node_alloc_type(__a), _M_head()
+        { }
+      };
+
+      _Fwd_list_impl _M_impl;
+
+    public:
+      typedef _Fwd_list_iterator<_Tp>                 iterator;
+      typedef _Fwd_list_const_iterator<_Tp>           const_iterator;
+      typedef _Fwd_list_node<_Tp>                     _Node;
+
+      _Node_alloc_type&
+      _M_get_Node_allocator()
+      { return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
+
+      const _Node_alloc_type&
+      _M_get_Node_allocator() const
+      { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
+
+      _Fwd_list_base()
+      : _M_impl()
+      { this->_M_impl._M_head._M_next = 0; }
+
+      _Fwd_list_base(const _Alloc& __a)
+      : _M_impl(__a)
+      { this->_M_impl._M_head._M_next = 0; }
+
+      _Fwd_list_base(const _Fwd_list_base& __lst, const _Alloc& __a);
+
+      _Fwd_list_base(_Fwd_list_base&& __lst, const _Alloc& __a)
+      : _M_impl(__a)
+      { _Fwd_list_node_base::swap(this->_M_impl._M_head,
+				  __lst._M_impl._M_head); }
+
+      _Fwd_list_base(_Fwd_list_base&& __lst)
+      : _M_impl(__lst._M_get_Node_allocator())
+      { _Fwd_list_node_base::swap(this->_M_impl._M_head,
+				  __lst._M_impl._M_head); }
+
+      ~_Fwd_list_base()
+      { _M_erase_after(&_M_impl._M_head, 0); }
+
+    protected:
+
+      _Node*
+      _M_get_node()
+      { return _M_get_Node_allocator().allocate(1); }
+
+      template<typename... _Args>
+        _Node*
+        _M_create_node(_Args&&... __args)
+        {
+          _Node* __node = this->_M_get_node();
+          __try
+            {
+              _M_get_Node_allocator().construct(__node,
+                                              std::forward<_Args>(__args)...);
+              __node->_M_next = 0;
+            }
+          __catch(...)
+            {
+              this->_M_put_node(__node);
+              __throw_exception_again;
+            }
+          return __node;
+        }
+
+      template<typename... _Args>
+        _Fwd_list_node_base*
+        _M_insert_after(const_iterator __pos, _Args&&... __args);
+
+      void
+      _M_put_node(_Node* __p)
+      { _M_get_Node_allocator().deallocate(__p, 1); }
+
+      void
+      _M_erase_after(_Fwd_list_node_base* __pos);
+
+      void
+      _M_erase_after(_Fwd_list_node_base* __pos, 
+                     _Fwd_list_node_base* __last);
+    };
+
+  /**
+   *  @brief A standard container with linear time access to elements,
+   *  and fixed time insertion/deletion at any point in the sequence.
+   *
+   *  @ingroup sequences
+   *
+   *  Meets the requirements of a <a href="tables.html#65">container</a>, a
+   *  <a href="tables.html#67">sequence</a>, including the
+   *  <a href="tables.html#68">optional sequence requirements</a> with the
+   *  %exception of @c at and @c operator[].
+   *
+   *  This is a @e singly @e linked %list.  Traversal up the
+   *  %list requires linear time, but adding and removing elements (or
+   *  @e nodes) is done in constant time, regardless of where the
+   *  change takes place.  Unlike std::vector and std::deque,
+   *  random-access iterators are not provided, so subscripting ( @c
+   *  [] ) access is not allowed.  For algorithms which only need
+   *  sequential access, this lack makes no difference.
+   *
+   *  Also unlike the other standard containers, std::forward_list provides
+   *  specialized algorithms %unique to linked lists, such as
+   *  splicing, sorting, and in-place reversal.
+   *
+   *  A couple points on memory allocation for forward_list<Tp>:
+   *
+   *  First, we never actually allocate a Tp, we allocate
+   *  Fwd_list_node<Tp>'s and trust [20.1.5]/4 to DTRT.  This is to ensure
+   *  that after elements from %forward_list<X,Alloc1> are spliced into
+   *  %forward_list<X,Alloc2>, destroying the memory of the second %list is a
+   *  valid operation, i.e., Alloc1 giveth and Alloc2 taketh away.
+   */
+  template<typename _Tp, typename _Alloc = allocator<_Tp> >
+    class forward_list : private _Fwd_list_base<_Tp, _Alloc>
+    {
+    private:
+      typedef _Fwd_list_base<_Tp, _Alloc>                  _Base;
+      typedef _Fwd_list_node<_Tp>                          _Node;
+      typedef _Fwd_list_node_base                          _Node_base;
+      typedef typename _Base::_Tp_alloc_type               _Tp_alloc_type;
+
+    public:
+      // types:
+      typedef _Tp                                          value_type;
+      typedef typename _Tp_alloc_type::pointer             pointer;
+      typedef typename _Tp_alloc_type::const_pointer       const_pointer;
+      typedef typename _Tp_alloc_type::reference           reference;
+      typedef typename _Tp_alloc_type::const_reference     const_reference;
+ 
+      typedef _Fwd_list_iterator<_Tp>                      iterator;
+      typedef _Fwd_list_const_iterator<_Tp>                const_iterator;
+      typedef std::size_t                                  size_type;
+      typedef std::ptrdiff_t                               difference_type;
+      typedef _Alloc                                       allocator_type;
+
+      // 23.2.3.1 construct/copy/destroy:
+
+      /**
+       *  @brief  Creates a %forward_list with no elements.
+       *  @param  al  An allocator object.
+       */
+      explicit
+      forward_list(const _Alloc& __al = _Alloc())
+      : _Base(__al)
+      { }
+
+      /**
+       *  @brief  Copy constructor with allocator argument.
+       *  @param  list  Input list to copy.
+       *  @param  al    An allocator object.
+       */
+      forward_list(const forward_list& __list, const _Alloc& __al)
+      : _Base(__list, __al)
+      { }
+
+      /**
+       *  @brief  Move constructor with allocator argument.
+       *  @param  list  Input list to move.
+       *  @param  al    An allocator object.
+       */
+      forward_list(forward_list&& __list, const _Alloc& __al)
+      : _Base(std::forward<_Base>(__list), __al)
+      { }
+
+      /**
+       *  @brief  Creates a %forward_list with default constructed elements.
+       *  @param  n  The number of elements to initially create.
+       *
+       *  This constructor creates the %forward_list with @a n default
+       *  constructed elements.
+       */
+      explicit
+      forward_list(size_type __n)
+      : _Base()
+      { _M_default_initialize(__n); }
+
+      /**
+       *  @brief  Creates a %forward_list with copies of an exemplar element.
+       *  @param  n      The number of elements to initially create.
+       *  @param  value  An element to copy.
+       *  @param  al     An allocator object.
+       *
+       *  This constructor fills the %forward_list with @a n copies of @a
+       *  value.
+       */
+      forward_list(size_type __n, const _Tp& __value,
+                   const _Alloc& __al = _Alloc())
+      : _Base(__al)
+      { _M_fill_initialize(__n, __value); }
+
+      /**
+       *  @brief  Builds a %forward_list from a range.
+       *  @param  first  An input iterator.
+       *  @param  last   An input iterator.
+       *  @param  al     An allocator object.
+       *
+       *  Create a %forward_list consisting of copies of the elements from
+       *  [@a first,@a last).  This is linear in N (where N is
+       *  distance(@a first,@a last)).
+       */
+      template<typename _InputIterator>
+        forward_list(_InputIterator __first, _InputIterator __last,
+                     const _Alloc& __al = _Alloc())
+        : _Base(__al)
+        {
+          // Check whether it's an integral type.  If so, it's not an iterator.
+          typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+          _M_initialize_dispatch(__first, __last, _Integral());
+        }
+
+      /**
+       *  @brief  The %forward_list copy constructor.
+       *  @param  list  A %forward_list of identical element and allocator
+       *                types.
+       *
+       *  The newly-created %forward_list uses a copy of the allocation
+       *  object used by @a list.
+       */
+      forward_list(const forward_list& __list)
+      : _Base(__list._M_get_Node_allocator())
+      { _M_initialize_dispatch(__list.begin(), __list.end(), __false_type()); }
+
+      /**
+       *  @brief  The %forward_list move constructor.
+       *  @param  list  A %forward_list of identical element and allocator
+       *                types.
+       *
+       *  The newly-created %forward_list contains the exact contents of @a
+       *  forward_list. The contents of @a list are a valid, but unspecified
+       *  %forward_list.
+       */
+      forward_list(forward_list&& __list)
+      : _Base(std::forward<_Base>(__list)) { }
+
+      /**
+       *  @brief  Builds a %forward_list from an initializer_list
+       *  @param  il  An initializer_list of value_type.
+       *  @param  al  An allocator object.
+       *
+       *  Create a %forward_list consisting of copies of the elements
+       *  in the initializer_list @a il.  This is linear in il.size().
+       */
+      forward_list(std::initializer_list<_Tp> __il,
+                   const _Alloc& __al = _Alloc())
+      : _Base(__al)
+      { _M_initialize_dispatch(__il.begin(), __il.end(), __false_type()); }
+
+      /**
+       *  @brief  The forward_list dtor.
+       */
+      ~forward_list()
+      { }
+
+      /**
+       *  @brief  The %forward_list assignment operator.
+       *  @param  list  A %forward_list of identical element and allocator
+       *                types.
+       *
+       *  All the elements of @a list are copied, but unlike the copy
+       *  constructor, the allocator object is not copied.
+       */
+      forward_list&
+      operator=(const forward_list& __list);
+
+      /**
+       *  @brief  The %forward_list move assignment operator.
+       *  @param  list  A %forward_list of identical element and allocator
+       *                types.
+       *
+       *  The contents of @a list are moved into this %forward_list
+       *  (without copying). @a list is a valid, but unspecified
+       *  %forward_list
+       */
+      forward_list&
+      operator=(forward_list&& __list)
+      {
+	// NB: DR 1204.
+	// NB: DR 675.
+	this->clear();
+	this->swap(__list);
+	return *this;
+      }
+
+      /**
+       *  @brief  The %forward_list initializer list assignment operator.
+       *  @param  il  An initializer_list of value_type.
+       *
+       *  Replace the contents of the %forward_list with copies of the
+       *  elements in the initializer_list @a il.  This is linear in
+       *  il.size().
+       */
+      forward_list&
+      operator=(std::initializer_list<_Tp> __il)
+      {
+        assign(__il);
+        return *this;
+      }
+
+      /**
+       *  @brief  Assigns a range to a %forward_list.
+       *  @param  first  An input iterator.
+       *  @param  last   An input iterator.
+       *
+       *  This function fills a %forward_list with copies of the elements
+       *  in the range [@a first,@a last).
+       *
+       *  Note that the assignment completely changes the %forward_list and
+       *  that the resulting %forward_list's size is the same as the number
+       *  of elements assigned.  Old data may be lost.
+       */
+      template<typename _InputIterator>
+        void
+        assign(_InputIterator __first, _InputIterator __last)
+        {
+          clear();
+          insert_after(cbefore_begin(), __first, __last);
+        }
+
+      /**
+       *  @brief  Assigns a given value to a %forward_list.
+       *  @param  n  Number of elements to be assigned.
+       *  @param  val  Value to be assigned.
+       *
+       *  This function fills a %forward_list with @a n copies of the given
+       *  value.  Note that the assignment completely changes the
+       *  %forward_list and that the resulting %forward_list's size is the
+       *  same as the number of elements assigned.  Old data may be lost.
+       */
+      void
+      assign(size_type __n, const _Tp& __val)
+      {
+        clear();
+        insert_after(cbefore_begin(), __n, __val);
+      }
+
+      /**
+       *  @brief  Assigns an initializer_list to a %forward_list.
+       *  @param  il  An initializer_list of value_type.
+       *
+       *  Replace the contents of the %forward_list with copies of the
+       *  elements in the initializer_list @a il.  This is linear in
+       *  il.size().
+       */
+      void
+      assign(std::initializer_list<_Tp> __il)
+      {
+        clear();
+        insert_after(cbefore_begin(), __il);
+      }
+
+      /// Get a copy of the memory allocation object.
+      allocator_type
+      get_allocator() const
+      { return this->_M_get_Node_allocator(); }
+
+      // 23.2.3.2 iterators:
+
+      /**
+       *  Returns a read/write iterator that points before the first element
+       *  in the %forward_list.  Iteration is done in ordinary element order.
+       */
+      iterator
+      before_begin()
+      { return iterator(&this->_M_impl._M_head); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points before the
+       *  first element in the %forward_list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      before_begin() const
+      { return const_iterator(&this->_M_impl._M_head); }
+
+      /**
+       *  Returns a read/write iterator that points to the first element
+       *  in the %forward_list.  Iteration is done in ordinary element order.
+       */
+      iterator
+      begin()
+      { return iterator(this->_M_impl._M_head._M_next); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %forward_list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      begin() const
+      { return const_iterator(this->_M_impl._M_head._M_next); }
+
+      /**
+       *  Returns a read/write iterator that points one past the last
+       *  element in the %forward_list.  Iteration is done in ordinary
+       *  element order.
+       */
+      iterator
+      end()
+      { return iterator(0); }
+
+      /**
+       *  Returns a read-only iterator that points one past the last
+       *  element in the %forward_list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      end() const
+      { return const_iterator(0); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the
+       *  first element in the %forward_list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      cbegin() const
+      { return const_iterator(this->_M_impl._M_head._M_next); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points before the
+       *  first element in the %forward_list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      cbefore_begin() const
+      { return const_iterator(&this->_M_impl._M_head); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past
+       *  the last element in the %forward_list.  Iteration is done in
+       *  ordinary element order.
+       */
+      const_iterator
+      cend() const
+      { return const_iterator(0); }
+
+      /**
+       *  Returns true if the %forward_list is empty.  (Thus begin() would
+       *  equal end().)
+       */
+      bool
+      empty() const
+      { return this->_M_impl._M_head._M_next == 0; }
+
+      /**
+       *  Returns the largest possible size of %forward_list.
+       */
+      size_type
+      max_size() const
+      { return this->_M_get_Node_allocator().max_size(); }
+
+      // 23.2.3.3 element access:
+
+      /**
+       *  Returns a read/write reference to the data at the first
+       *  element of the %forward_list.
+       */
+      reference
+      front()
+      {
+        _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next);
+        return __front->_M_value;
+      }
+
+      /**
+       *  Returns a read-only (constant) reference to the data at the first
+       *  element of the %forward_list.
+       */
+      const_reference
+      front() const
+      {
+        _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next);
+        return __front->_M_value;
+      }
+
+      // 23.2.3.4 modifiers:
+
+      /**
+       *  @brief  Constructs object in %forward_list at the front of the
+       *          list.
+       *  @param  args  Arguments.
+       *
+       *  This function will insert an object of type Tp constructed
+       *  with Tp(std::forward<Args>(args)...) at the front of the list
+       *  Due to the nature of a %forward_list this operation can
+       *  be done in constant time, and does not invalidate iterators
+       *  and references.
+       */
+      template<typename... _Args>
+        void
+        emplace_front(_Args&&... __args)
+        { this->_M_insert_after(cbefore_begin(),
+                                std::forward<_Args>(__args)...); }
+
+      /**
+       *  @brief  Add data to the front of the %forward_list.
+       *  @param  val  Data to be added.
+       *
+       *  This is a typical stack operation.  The function creates an
+       *  element at the front of the %forward_list and assigns the given
+       *  data to it.  Due to the nature of a %forward_list this operation
+       *  can be done in constant time, and does not invalidate iterators
+       *  and references.
+       */
+      void
+      push_front(const _Tp& __val)
+      { this->_M_insert_after(cbefore_begin(), __val); }
+
+      /**
+       *
+       */
+      void
+      push_front(_Tp&& __val)
+      { this->_M_insert_after(cbefore_begin(), std::move(__val)); }
+
+      /**
+       *  @brief  Removes first element.
+       *
+       *  This is a typical stack operation.  It shrinks the %forward_list
+       *  by one.  Due to the nature of a %forward_list this operation can
+       *  be done in constant time, and only invalidates iterators/references
+       *  to the element being removed.
+       *
+       *  Note that no data is returned, and if the first element's data
+       *  is needed, it should be retrieved before pop_front() is
+       *  called.
+       */
+      void
+      pop_front()
+      { this->_M_erase_after(&this->_M_impl._M_head); }
+
+      /**
+       *  @brief  Constructs object in %forward_list after the specified
+       *          iterator.
+       *  @param  pos  A const_iterator into the %forward_list.
+       *  @param  args  Arguments.
+       *  @return  An iterator that points to the inserted data.
+       *
+       *  This function will insert an object of type T constructed
+       *  with T(std::forward<Args>(args)...) after the specified
+       *  location.  Due to the nature of a %forward_list this operation can
+       *  be done in constant time, and does not invalidate iterators
+       *  and references.
+       */
+      template<typename... _Args>
+        iterator
+        emplace_after(const_iterator __pos, _Args&&... __args)
+        { return iterator(this->_M_insert_after(__pos,
+                                          std::forward<_Args>(__args)...)); }
+
+      /**
+       *  @brief  Inserts given value into %forward_list after specified
+       *          iterator.
+       *  @param  pos  An iterator into the %forward_list.
+       *  @param  val  Data to be inserted.
+       *  @return  An iterator that points to the inserted data.
+       *
+       *  This function will insert a copy of the given value after
+       *  the specified location.  Due to the nature of a %forward_list this
+       *  operation can be done in constant time, and does not
+       *  invalidate iterators and references.
+       */
+      iterator
+      insert_after(const_iterator __pos, const _Tp& __val)
+      { return iterator(this->_M_insert_after(__pos, __val)); }
+
+      /**
+       *
+       */
+      iterator
+      insert_after(const_iterator __pos, _Tp&& __val)
+      { return iterator(this->_M_insert_after(__pos, std::move(__val))); }
+
+      /**
+       *  @brief  Inserts a number of copies of given data into the
+       *          %forward_list.
+       *  @param  pos  An iterator into the %forward_list.
+       *  @param  n  Number of elements to be inserted.
+       *  @param  val  Data to be inserted.
+       *  @return  An iterator pointing to the last inserted copy of
+       *           @a val or @a pos if @a n == 0.
+       *
+       *  This function will insert a specified number of copies of the
+       *  given data after the location specified by @a pos.
+       *
+       *  This operation is linear in the number of elements inserted and
+       *  does not invalidate iterators and references.
+       */
+      iterator
+      insert_after(const_iterator __pos, size_type __n, const _Tp& __val);
+
+      /**
+       *  @brief  Inserts a range into the %forward_list.
+       *  @param  position  An iterator into the %forward_list.
+       *  @param  first  An input iterator.
+       *  @param  last   An input iterator.
+       *  @return  An iterator pointing to the last inserted element or
+       *           @a pos if @a first == @a last.
+       *
+       *  This function will insert copies of the data in the range [@a
+       *  first,@a last) into the %forward_list after the location specified
+       *  by @a pos.
+       *
+       *  This operation is linear in the number of elements inserted and
+       *  does not invalidate iterators and references.
+       */
+      template<typename _InputIterator>
+        iterator
+        insert_after(const_iterator __pos,
+                     _InputIterator __first, _InputIterator __last);
+
+      /**
+       *  @brief  Inserts the contents of an initializer_list into
+       *          %forward_list after the specified iterator.
+       *  @param  pos  An iterator into the %forward_list.
+       *  @param  il  An initializer_list of value_type.
+       *  @return  An iterator pointing to the last inserted element
+       *           or @a pos if @a il is empty.
+       *
+       *  This function will insert copies of the data in the
+       *  initializer_list @a il into the %forward_list before the location
+       *  specified by @a pos.
+       *
+       *  This operation is linear in the number of elements inserted and
+       *  does not invalidate iterators and references.
+       */
+      iterator
+      insert_after(const_iterator __pos, std::initializer_list<_Tp> __il);
+
+      /**
+       *  @brief  Removes the element pointed to by the iterator following
+       *          @c pos.
+       *  @param  pos  Iterator pointing before element to be erased.
+       *
+       *  This function will erase the element at the given position and
+       *  thus shorten the %forward_list by one.
+       *
+       *  Due to the nature of a %forward_list this operation can be done
+       *  in constant time, and only invalidates iterators/references to
+       *  the element being removed.  The user is also cautioned that
+       *  this function only erases the element, and that if the element
+       *  is itself a pointer, the pointed-to memory is not touched in
+       *  any way.  Managing the pointer is the user's responsibility.
+       */
+      void
+      erase_after(const_iterator __pos)
+      { this->_M_erase_after(const_cast<_Node_base*>(__pos._M_node)); }
+
+      /**
+       *  @brief  Remove a range of elements.
+       *  @param  pos  Iterator pointing before the first element to be
+       *               erased.
+       *  @param  last  Iterator pointing to one past the last element to be
+       *                erased.
+       *
+       *  This function will erase the elements in the range @a
+       *  (pos,last) and shorten the %forward_list accordingly.
+       *
+       *  This operation is linear time in the size of the range and only
+       *  invalidates iterators/references to the element being removed.
+       *  The user is also cautioned that this function only erases the
+       *  elements, and that if the elements themselves are pointers, the
+       *  pointed-to memory is not touched in any way.  Managing the pointer
+       *  is the user's responsibility.
+       */
+      void
+      erase_after(const_iterator __pos, const_iterator __last)
+      { this->_M_erase_after(const_cast<_Node_base*>(__pos._M_node),
+			     const_cast<_Node_base*>(__last._M_node)); }
+
+      /**
+       *  @brief  Swaps data with another %forward_list.
+       *  @param  list  A %forward_list of the same element and allocator
+       *                types.
+       *
+       *  This exchanges the elements between two lists in constant
+       *  time.  Note that the global std::swap() function is
+       *  specialized such that std::swap(l1,l2) will feed to this
+       *  function.
+       */
+      void
+      swap(forward_list& __list)
+      { _Node_base::swap(this->_M_impl._M_head, __list._M_impl._M_head); }
+
+      /**
+       *  @brief Resizes the %forward_list to the specified number of
+       *         elements.
+       *  @param sz Number of elements the %forward_list should contain.
+       *
+       *  This function will %resize the %forward_list to the specified
+       *  number of elements.  If the number is smaller than the
+       *  %forward_list's current size the %forward_list is truncated,
+       *  otherwise the %forward_list is extended and the new elements
+       *  are default constructed.
+       */
+      void
+      resize(size_type __sz);
+
+      /**
+       *  @brief Resizes the %forward_list to the specified number of
+       *         elements.
+       *  @param sz Number of elements the %forward_list should contain.
+       *  @param val Data with which new elements should be populated.
+       *
+       *  This function will %resize the %forward_list to the specified
+       *  number of elements.  If the number is smaller than the
+       *  %forward_list's current size the %forward_list is truncated,
+       *  otherwise the %forward_list is extended and new elements are
+       *  populated with given data.
+       */
+      void
+      resize(size_type __sz, value_type __val);
+
+      /**
+       *  @brief  Erases all the elements.
+       *
+       *  Note that this function only erases
+       *  the elements, and that if the elements themselves are
+       *  pointers, the pointed-to memory is not touched in any way.
+       *  Managing the pointer is the user's responsibility.
+       */
+      void
+      clear()
+      { this->_M_erase_after(&this->_M_impl._M_head, 0); }
+
+      // 23.2.3.5 forward_list operations:
+
+      /**
+       *  @brief  Insert contents of another %forward_list.
+       *  @param  pos  Iterator referencing the element to insert after.
+       *  @param  list  Source list.
+       *
+       *  The elements of @a list are inserted in constant time after
+       *  the element referenced by @a pos.  @a list becomes an empty
+       *  list.
+       *
+       *  Requires this != @a x.
+       */
+      void
+      splice_after(const_iterator __pos, forward_list&& __list)
+      {
+	if (!__list.empty())
+	  _M_splice_after(__pos, std::move(__list));
+      }
+
+      /**
+       *  @brief  Insert element from another %forward_list.
+       *  @param  pos  Iterator referencing the element to insert after.
+       *  @param  list  Source list.
+       *  @param  i   Iterator referencing the element before the element
+       *              to move.
+       *
+       *  Removes the element in list @a list referenced by @a i and
+       *  inserts it into the current list after @a pos.
+       */
+      void
+      splice_after(const_iterator __pos, forward_list&& __list,
+                   const_iterator __i)
+      {
+	const_iterator __j = __i;
+	++__j;
+	if (__pos == __i || __pos == __j)
+	  return;
+
+	splice_after(__pos, std::move(__list), __i, __j);
+      }
+
+      /**
+       *  @brief  Insert range from another %forward_list.
+       *  @param  pos  Iterator referencing the element to insert after.
+       *  @param  list  Source list.
+       *  @param  before  Iterator referencing before the start of range
+       *                  in list.
+       *  @param  last  Iterator referencing the end of range in list.
+       *
+       *  Removes elements in the range (before,last) and inserts them
+       *  after @a pos in constant time.
+       *
+       *  Undefined if @a pos is in (before,last).
+       */
+      void
+      splice_after(const_iterator __pos, forward_list&& __list,
+                   const_iterator __before, const_iterator __last);
+
+      /**
+       *  @brief  Remove all elements equal to value.
+       *  @param  val  The value to remove.
+       *
+       *  Removes every element in the list equal to @a value.
+       *  Remaining elements stay in list order.  Note that this
+       *  function only erases the elements, and that if the elements
+       *  themselves are pointers, the pointed-to memory is not
+       *  touched in any way.  Managing the pointer is the user's
+       *  responsibility.
+       */
+      void
+      remove(const _Tp& __val);
+
+      /**
+       *  @brief  Remove all elements satisfying a predicate.
+       *  @param  pred  Unary predicate function or object.
+       *
+       *  Removes every element in the list for which the predicate
+       *  returns true.  Remaining elements stay in list order.  Note
+       *  that this function only erases the elements, and that if the
+       *  elements themselves are pointers, the pointed-to memory is
+       *  not touched in any way.  Managing the pointer is the user's
+       *  responsibility.
+       */
+      template<typename _Pred>
+        void
+        remove_if(_Pred __pred);
+
+      /**
+       *  @brief  Remove consecutive duplicate elements.
+       *
+       *  For each consecutive set of elements with the same value,
+       *  remove all but the first one.  Remaining elements stay in
+       *  list order.  Note that this function only erases the
+       *  elements, and that if the elements themselves are pointers,
+       *  the pointed-to memory is not touched in any way.  Managing
+       *  the pointer is the user's responsibility.
+       */
+      void
+      unique()
+      { this->unique(std::equal_to<_Tp>()); }
+
+      /**
+       *  @brief  Remove consecutive elements satisfying a predicate.
+       *  @param  binary_pred  Binary predicate function or object.
+       *
+       *  For each consecutive set of elements [first,last) that
+       *  satisfy predicate(first,i) where i is an iterator in
+       *  [first,last), remove all but the first one.  Remaining
+       *  elements stay in list order.  Note that this function only
+       *  erases the elements, and that if the elements themselves are
+       *  pointers, the pointed-to memory is not touched in any way.
+       *  Managing the pointer is the user's responsibility.
+       */
+      template<typename _BinPred>
+        void
+        unique(_BinPred __binary_pred);
+
+      /**
+       *  @brief  Merge sorted lists.
+       *  @param  list  Sorted list to merge.
+       *
+       *  Assumes that both @a list and this list are sorted according to
+       *  operator<().  Merges elements of @a list into this list in
+       *  sorted order, leaving @a list empty when complete.  Elements in
+       *  this list precede elements in @a list that are equal.
+       */
+      void
+      merge(forward_list&& __list)
+      { this->merge(std::move(__list), std::less<_Tp>()); }
+
+      /**
+       *  @brief  Merge sorted lists according to comparison function.
+       *  @param  list  Sorted list to merge.
+       *  @param  comp Comparison function defining sort order.
+       *
+       *  Assumes that both @a list and this list are sorted according to
+       *  comp.  Merges elements of @a list into this list
+       *  in sorted order, leaving @a list empty when complete.  Elements
+       *  in this list precede elements in @a list that are equivalent
+       *  according to comp().
+       */
+      template<typename _Comp>
+        void
+        merge(forward_list&& __list, _Comp __comp);
+
+      /**
+       *  @brief  Sort the elements of the list.
+       *
+       *  Sorts the elements of this list in NlogN time.  Equivalent
+       *  elements remain in list order.
+       */
+      void
+      sort()
+      { this->sort(std::less<_Tp>()); }
+
+      /**
+       *  @brief  Sort the forward_list using a comparison function.
+       *
+       *  Sorts the elements of this list in NlogN time.  Equivalent
+       *  elements remain in list order.
+       */
+      template<typename _Comp>
+        void
+        sort(_Comp __comp);
+
+      /**
+       *  @brief  Reverse the elements in list.
+       *
+       *  Reverse the order of elements in the list in linear time.
+       */
+      void
+      reverse()
+      { this->_M_impl._M_head._M_reverse_after(); }
+
+    private:
+      template<typename _Integer>
+        void
+        _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+        { _M_fill_initialize(static_cast<size_type>(__n), __x); }
+
+      // Called by the range constructor to implement [23.1.1]/9
+      template<typename _InputIterator>
+        void
+        _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+                               __false_type);
+
+      // Called by forward_list(n,v,a), and the range constructor when it
+      // turns out to be the same thing.
+      void
+      _M_fill_initialize(size_type __n, const value_type& __value);
+
+      // Called by splice_after and insert_after.
+      iterator
+      _M_splice_after(const_iterator __pos, forward_list&& __list);
+
+      // Called by forward_list(n).
+      void
+      _M_default_initialize(size_type __n);
+
+      // Called by resize(sz).
+      void
+      _M_default_insert_after(const_iterator __pos, size_type __n);
+    };
+
+  /**
+   *  @brief  Forward list equality comparison.
+   *  @param  lx  A %forward_list
+   *  @param  ly  A %forward_list of the same type as @a lx.
+   *  @return  True iff the size and elements of the forward lists are equal.
+   *
+   *  This is an equivalence relation.  It is linear in the size of the
+   *  forward lists.  Deques are considered equivalent if corresponding
+   *  elements compare equal.
+   */
+  template<typename _Tp, typename _Alloc>
+    bool
+    operator==(const forward_list<_Tp, _Alloc>& __lx,
+               const forward_list<_Tp, _Alloc>& __ly);
+
+  /**
+   *  @brief  Forward list ordering relation.
+   *  @param  lx  A %forward_list.
+   *  @param  ly  A %forward_list of the same type as @a lx.
+   *  @return  True iff @a lx is lexicographically less than @a ly.
+   *
+   *  This is a total ordering relation.  It is linear in the size of the
+   *  forward lists.  The elements must be comparable with @c <.
+   *
+   *  See std::lexicographical_compare() for how the determination is made.
+   */
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator<(const forward_list<_Tp, _Alloc>& __lx,
+              const forward_list<_Tp, _Alloc>& __ly)
+    { return std::lexicographical_compare(__lx.cbegin(), __lx.cend(),
+					  __ly.cbegin(), __ly.cend()); }
+
+  /// Based on operator==
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator!=(const forward_list<_Tp, _Alloc>& __lx,
+               const forward_list<_Tp, _Alloc>& __ly)
+    { return !(__lx == __ly); }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator>(const forward_list<_Tp, _Alloc>& __lx,
+              const forward_list<_Tp, _Alloc>& __ly)
+    { return (__ly < __lx); }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator>=(const forward_list<_Tp, _Alloc>& __lx,
+               const forward_list<_Tp, _Alloc>& __ly)
+    { return !(__lx < __ly); }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator<=(const forward_list<_Tp, _Alloc>& __lx,
+               const forward_list<_Tp, _Alloc>& __ly)
+    { return !(__ly < __lx); }
+
+  /// See std::forward_list::swap().
+  template<typename _Tp, typename _Alloc>
+    inline void
+    swap(forward_list<_Tp, _Alloc>& __lx,
+	 forward_list<_Tp, _Alloc>& __ly)
+    { __lx.swap(__ly); }
+
+_GLIBCXX_END_NAMESPACE // namespace std
+
+#endif // _FORWARD_LIST_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/forward_list.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/forward_list.tcc
new file mode 100644
index 0000000..a3719a8
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/forward_list.tcc
@@ -0,0 +1,484 @@
+// <forward_list.tcc> -*- C++ -*-
+
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file forward_list.tcc
+ *  This is a Standard C++ Library header.
+ */
+
+#ifndef _FORWARD_LIST_TCC
+#define _FORWARD_LIST_TCC 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _Tp, typename _Alloc>
+    _Fwd_list_base<_Tp, _Alloc>::
+    _Fwd_list_base(const _Fwd_list_base& __lst, const _Alloc& __a)
+    : _M_impl(__a)
+    {
+      this->_M_impl._M_head._M_next = 0;
+      _Fwd_list_node_base* __to = &this->_M_impl._M_head;
+      _Node* __curr = static_cast<_Node*>(__lst._M_impl._M_head._M_next);
+
+      while (__curr)
+        {
+          __to->_M_next = _M_create_node(__curr->_M_value);
+          __to = __to->_M_next;
+          __curr = static_cast<_Node*>(__curr->_M_next);
+        }
+    }
+
+  template<typename _Tp, typename _Alloc>
+    template<typename... _Args>
+      _Fwd_list_node_base*
+      _Fwd_list_base<_Tp, _Alloc>::
+      _M_insert_after(const_iterator __pos, _Args&&... __args)
+      {
+        _Fwd_list_node_base* __to
+	  = const_cast<_Fwd_list_node_base*>(__pos._M_node);
+	_Node* __thing = _M_create_node(std::forward<_Args>(__args)...);
+        __thing->_M_next = __to->_M_next;
+        __to->_M_next = __thing;
+        return __to->_M_next;
+      }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    _Fwd_list_base<_Tp, _Alloc>::
+    _M_erase_after(_Fwd_list_node_base* __pos)
+    {
+      _Node* __curr = static_cast<_Node*>(__pos->_M_next);
+      __pos->_M_next = __curr->_M_next;
+      _M_get_Node_allocator().destroy(__curr);
+      _M_put_node(__curr);
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    _Fwd_list_base<_Tp, _Alloc>::
+    _M_erase_after(_Fwd_list_node_base* __pos, 
+                   _Fwd_list_node_base* __last)
+    {
+      _Node* __curr = static_cast<_Node*>(__pos->_M_next);
+      while (__curr != __last)
+        {
+          _Node* __temp = __curr;
+          __curr = static_cast<_Node*>(__curr->_M_next);
+          _M_get_Node_allocator().destroy(__temp);
+          _M_put_node(__temp);
+        }
+      __pos->_M_next = __last;
+    }
+  
+  // Called by the range constructor to implement [23.1.1]/9
+  template<typename _Tp, typename _Alloc>
+    template<typename _InputIterator>
+      void
+      forward_list<_Tp, _Alloc>::
+      _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+                             __false_type)
+      {
+        _Node_base* __to = &this->_M_impl._M_head;
+        for (; __first != __last; ++__first)
+          {
+            __to->_M_next = this->_M_create_node(*__first);
+            __to = __to->_M_next;
+          }
+      }
+
+  // Called by forward_list(n,v,a), and the range constructor
+  // when it turns out to be the same thing.
+  template<typename _Tp, typename _Alloc>
+    void
+    forward_list<_Tp, _Alloc>::
+    _M_fill_initialize(size_type __n, const value_type& __value)
+    {
+      _Node_base* __to = &this->_M_impl._M_head;
+      for (; __n; --__n)
+        {
+          __to->_M_next = this->_M_create_node(__value);
+          __to = __to->_M_next;
+        }
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    forward_list<_Tp, _Alloc>::
+    _M_default_initialize(size_type __n)
+    {
+      _Node_base* __to = &this->_M_impl._M_head;
+      for (; __n; --__n)
+        {
+          __to->_M_next = this->_M_create_node();
+          __to = __to->_M_next;
+        }
+    }
+
+  template<typename _Tp, typename _Alloc>
+    forward_list<_Tp, _Alloc>&
+    forward_list<_Tp, _Alloc>::
+    operator=(const forward_list& __list)
+    {
+      if (&__list != this)
+        {
+          iterator __prev1 = before_begin();
+          iterator __curr1 = begin();
+          iterator __last1 = end();
+          const_iterator __first2 = __list.cbegin();
+          const_iterator __last2 = __list.cend();
+          while (__curr1 != __last1 && __first2 != __last2)
+            {
+              *__curr1 = *__first2;
+              ++__prev1;
+              ++__curr1;
+              ++__first2;
+            }
+          if (__first2 == __last2)
+            erase_after(__prev1, __last1);
+          else
+            insert_after(__prev1, __first2, __last2);
+        }
+      return *this;
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    forward_list<_Tp, _Alloc>::
+    _M_default_insert_after(const_iterator __pos, size_type __n)
+    {
+      const_iterator __saved_pos = __pos;
+      __try
+	{
+	  for (; __n; --__n)
+	    __pos = emplace_after(__pos);
+	}
+      __catch(...)
+	{
+	  erase_after(__saved_pos, ++__pos);
+	  __throw_exception_again;
+	}
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    forward_list<_Tp, _Alloc>::
+    resize(size_type __sz)
+    {
+      iterator __k = before_begin();
+
+      size_type __len = 0;
+      while (__k._M_next() != end() && __len < __sz)
+        {
+          ++__k;
+          ++__len;
+        }
+      if (__len == __sz)
+        erase_after(__k, end());
+      else
+	_M_default_insert_after(__k, __sz - __len);
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    forward_list<_Tp, _Alloc>::
+    resize(size_type __sz, value_type __val)
+    {
+      iterator __k = before_begin();
+
+      size_type __len = 0;
+      while (__k._M_next() != end() && __len < __sz)
+        {
+          ++__k;
+          ++__len;
+        }
+      if (__len == __sz)
+        erase_after(__k, end());
+      else
+        insert_after(__k, __sz - __len, __val);
+    }
+
+  template<typename _Tp, typename _Alloc>
+    typename forward_list<_Tp, _Alloc>::iterator
+    forward_list<_Tp, _Alloc>::
+    _M_splice_after(const_iterator __pos, forward_list&& __list)
+    {
+      _Node_base* __tmp = const_cast<_Node_base*>(__pos._M_node);
+      iterator __before = __list.before_begin();
+      return iterator(__tmp->_M_transfer_after(__before._M_node));
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    forward_list<_Tp, _Alloc>::
+    splice_after(const_iterator __pos, forward_list&&,
+                 const_iterator __before, const_iterator __last)
+    {
+      _Node_base* __tmp = const_cast<_Node_base*>(__pos._M_node);
+      __tmp->_M_transfer_after(const_cast<_Node_base*>(__before._M_node),
+                               const_cast<_Node_base*>(__last._M_node));
+    }
+
+  template<typename _Tp, typename _Alloc>
+    typename forward_list<_Tp, _Alloc>::iterator
+    forward_list<_Tp, _Alloc>::
+    insert_after(const_iterator __pos, size_type __n, const _Tp& __val)
+    {
+      if (__n)
+	{
+	  forward_list __tmp(__n, __val, this->_M_get_Node_allocator());
+	  return _M_splice_after(__pos, std::move(__tmp));
+	}
+      else
+	return iterator(const_cast<_Node_base*>(__pos._M_node));
+    }
+
+  template<typename _Tp, typename _Alloc>
+    template<typename _InputIterator>
+      typename forward_list<_Tp, _Alloc>::iterator
+      forward_list<_Tp, _Alloc>::
+      insert_after(const_iterator __pos,
+		   _InputIterator __first, _InputIterator __last)
+      {
+	forward_list __tmp(__first, __last, this->_M_get_Node_allocator());
+	if (!__tmp.empty())
+	  return _M_splice_after(__pos, std::move(__tmp));
+	else
+	  return iterator(const_cast<_Node_base*>(__pos._M_node));
+      }
+
+  template<typename _Tp, typename _Alloc>
+    typename forward_list<_Tp, _Alloc>::iterator
+    forward_list<_Tp, _Alloc>::
+    insert_after(const_iterator __pos, std::initializer_list<_Tp> __il)
+    {
+      if (__il.size())
+	{
+	  forward_list __tmp(__il, this->_M_get_Node_allocator());
+	  return _M_splice_after(__pos, std::move(__tmp));
+	}
+      else
+	return iterator(const_cast<_Node_base*>(__pos._M_node));
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    forward_list<_Tp, _Alloc>::
+    remove(const _Tp& __val)
+    {
+      _Node* __curr = static_cast<_Node*>(&this->_M_impl._M_head);
+      while (_Node* __temp = static_cast<_Node*>(__curr->_M_next))
+        {
+          if (__temp->_M_value == __val)
+            this->_M_erase_after(__curr);
+          else
+            __curr = static_cast<_Node*>(__curr->_M_next);
+        }
+    }
+
+  template<typename _Tp, typename _Alloc>
+    template<typename _Pred>
+      void
+      forward_list<_Tp, _Alloc>::
+      remove_if(_Pred __pred)
+      {
+	_Node* __curr = static_cast<_Node*>(&this->_M_impl._M_head);
+        while (_Node* __temp = static_cast<_Node*>(__curr->_M_next))
+          {
+            if (__pred(__temp->_M_value))
+              this->_M_erase_after(__curr);
+            else
+              __curr = static_cast<_Node*>(__curr->_M_next);
+          }
+      }
+
+  template<typename _Tp, typename _Alloc>
+    template<typename _BinPred>
+      void
+      forward_list<_Tp, _Alloc>::
+      unique(_BinPred __binary_pred)
+      {
+        iterator __first = begin();
+        iterator __last = end();
+        if (__first == __last)
+          return;
+        iterator __next = __first;
+        while (++__next != __last)
+        {
+          if (__binary_pred(*__first, *__next))
+            erase_after(__first);
+          else
+            __first = __next;
+          __next = __first;
+        }
+      }
+
+  template<typename _Tp, typename _Alloc>
+    template<typename _Comp>
+      void
+      forward_list<_Tp, _Alloc>::
+      merge(forward_list&& __list, _Comp __comp)
+      {
+        _Node_base* __node = &this->_M_impl._M_head;
+        while (__node->_M_next && __list._M_impl._M_head._M_next)
+          {
+            if (__comp(static_cast<_Node*>
+                       (__list._M_impl._M_head._M_next)->_M_value,
+                       static_cast<_Node*>
+                       (__node->_M_next)->_M_value))
+              __node->_M_transfer_after(&__list._M_impl._M_head,
+                                        __list._M_impl._M_head._M_next);
+            __node = __node->_M_next;
+          }
+        if (__list._M_impl._M_head._M_next)
+          {
+            __node->_M_next = __list._M_impl._M_head._M_next;
+            __list._M_impl._M_head._M_next = 0;
+          }
+      }
+
+  template<typename _Tp, typename _Alloc>
+    bool
+    operator==(const forward_list<_Tp, _Alloc>& __lx,
+               const forward_list<_Tp, _Alloc>& __ly)
+    {
+      //  We don't have size() so we need to walk through both lists
+      //  making sure both iterators are valid.
+      auto __ix = __lx.cbegin();
+      auto __iy = __ly.cbegin();
+      while (__ix != __lx.cend() && __iy != __ly.cend())
+        {
+          if (*__ix != *__iy)
+            return false;
+          ++__ix;
+          ++__iy;
+        }
+      if (__ix == __lx.cend() && __iy == __ly.cend())
+        return true;
+      else
+        return false;
+    }
+
+  template<typename _Tp, class _Alloc>
+    template<typename _Comp>
+      void
+      forward_list<_Tp, _Alloc>::
+      sort(_Comp __comp)
+      {
+        // If `next' is 0, return immediately.
+        _Node* __list = static_cast<_Node*>(this->_M_impl._M_head._M_next);
+        if (!__list)
+          return;
+
+        unsigned long __insize = 1;
+
+        while (1)
+          {
+            _Node* __p = __list;
+            __list = 0;
+            _Node* __tail = 0;
+
+            // Count number of merges we do in this pass.
+            unsigned long __nmerges = 0;
+
+            while (__p)
+              {
+                ++__nmerges;
+                // There exists a merge to be done.
+                // Step `insize' places along from p.
+                _Node* __q = __p;
+                unsigned long __psize = 0;
+                for (unsigned long __i = 0; __i < __insize; ++__i)
+                  {
+                    ++__psize;
+                    __q = static_cast<_Node*>(__q->_M_next);
+                    if (!__q)
+                      break;
+                  }
+
+                // If q hasn't fallen off end, we have two lists to merge.
+                unsigned long __qsize = __insize;
+
+                // Now we have two lists; merge them.
+                while (__psize > 0 || (__qsize > 0 && __q))
+                  {
+                    // Decide whether next node of merge comes from p or q.
+                    _Node* __e;
+                    if (__psize == 0)
+                      {
+                        // p is empty; e must come from q.
+                        __e = __q;
+                        __q = static_cast<_Node*>(__q->_M_next);
+                        --__qsize;
+                      }
+                    else if (__qsize == 0 || !__q)
+                      {
+                        // q is empty; e must come from p.
+                        __e = __p;
+                        __p = static_cast<_Node*>(__p->_M_next);
+                        --__psize;
+                      }
+                    else if (__comp(__p->_M_value, __q->_M_value))
+                      {
+                        // First node of p is lower; e must come from p.
+                        __e = __p;
+                        __p = static_cast<_Node*>(__p->_M_next);
+                        --__psize;
+                      }
+                    else
+                      {
+                        // First node of q is lower; e must come from q.
+                        __e = __q;
+                        __q = static_cast<_Node*>(__q->_M_next);
+                        --__qsize;
+                      }
+
+                    // Add the next node to the merged list.
+                    if (__tail)
+                      __tail->_M_next = __e;
+                    else
+                      __list = __e;
+                    __tail = __e;
+                  }
+
+                // Now p has stepped `insize' places along, and q has too.
+                __p = __q;
+              }
+            __tail->_M_next = 0;
+
+            // If we have done only one merge, we're finished.
+            // Allow for nmerges == 0, the empty list case.
+            if (__nmerges <= 1)
+              {
+                this->_M_impl._M_head._M_next = __list;
+                return;
+              }
+
+            // Otherwise repeat, merging lists twice the size.
+            __insize *= 2;
+          }
+      }
+ 
+_GLIBCXX_END_NAMESPACE // namespace std
+
+#endif /* _FORWARD_LIST_TCC */
+
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/fstream.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/fstream.tcc
new file mode 100644
index 0000000..c5f7f8c
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/fstream.tcc
@@ -0,0 +1,926 @@
+// File based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+// 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file fstream.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+#ifndef _FSTREAM_TCC
+#define _FSTREAM_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT, typename _Traits>
+    void
+    basic_filebuf<_CharT, _Traits>::
+    _M_allocate_internal_buffer()
+    {
+      // Allocate internal buffer only if one doesn't already exist
+      // (either allocated or provided by the user via setbuf).
+      if (!_M_buf_allocated && !_M_buf)
+	{
+	  _M_buf = new char_type[_M_buf_size];
+	  _M_buf_allocated = true;
+	}
+    }
+
+  template<typename _CharT, typename _Traits>
+    void
+    basic_filebuf<_CharT, _Traits>::
+    _M_destroy_internal_buffer() throw()
+    {
+      if (_M_buf_allocated)
+	{
+	  delete [] _M_buf;
+	  _M_buf = NULL;
+	  _M_buf_allocated = false;
+	}
+      delete [] _M_ext_buf;
+      _M_ext_buf = NULL;
+      _M_ext_buf_size = 0;
+      _M_ext_next = NULL;
+      _M_ext_end = NULL;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_filebuf<_CharT, _Traits>::
+    basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
+    _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(),
+    _M_state_last(), _M_buf(NULL), _M_buf_size(BUFSIZ),
+    _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(), 
+    _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false),
+    _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0),
+    _M_ext_end(0)
+    {
+      if (has_facet<__codecvt_type>(this->_M_buf_locale))
+	_M_codecvt = &use_facet<__codecvt_type>(this->_M_buf_locale);
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
+    basic_filebuf<_CharT, _Traits>::
+    open(const char* __s, ios_base::openmode __mode)
+    {
+      __filebuf_type *__ret = NULL;
+      if (!this->is_open())
+	{
+	  _M_file.open(__s, __mode);
+	  if (this->is_open())
+	    {
+	      _M_allocate_internal_buffer();
+	      _M_mode = __mode;
+
+	      // Setup initial buffer to 'uncommitted' mode.
+	      _M_reading = false;
+	      _M_writing = false;
+	      _M_set_buffer(-1);
+
+	      // Reset to initial state.
+	      _M_state_last = _M_state_cur = _M_state_beg;
+
+	      // 27.8.1.3,4
+	      if ((__mode & ios_base::ate)
+		  && this->seekoff(0, ios_base::end, __mode)
+		  == pos_type(off_type(-1)))
+		this->close();
+	      else
+		__ret = this;
+	    }
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
+    basic_filebuf<_CharT, _Traits>::
+    close()
+    {
+      if (!this->is_open())
+	return NULL;
+
+      bool __testfail = false;
+      {
+	// NB: Do this here so that re-opened filebufs will be cool...
+	struct __close_sentry
+	{
+	  basic_filebuf *__fb;
+	  __close_sentry (basic_filebuf *__fbi): __fb(__fbi) { }
+	  ~__close_sentry ()
+	  {
+	    __fb->_M_mode = ios_base::openmode(0);
+	    __fb->_M_pback_init = false;
+	    __fb->_M_destroy_internal_buffer();
+	    __fb->_M_reading = false;
+	    __fb->_M_writing = false;
+	    __fb->_M_set_buffer(-1);
+	    __fb->_M_state_last = __fb->_M_state_cur = __fb->_M_state_beg;
+	  }
+	} __cs (this);
+
+	__try
+	  {
+	    if (!_M_terminate_output())
+	      __testfail = true;
+	  }
+	__catch(__cxxabiv1::__forced_unwind&)
+	  {
+	    _M_file.close();
+	    __throw_exception_again;
+	  }
+	__catch(...)
+	  { __testfail = true; }
+      }
+
+      if (!_M_file.close())
+	__testfail = true;
+
+      if (__testfail)
+	return NULL;
+      else
+	return this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    streamsize
+    basic_filebuf<_CharT, _Traits>::
+    showmanyc()
+    {
+      streamsize __ret = -1;
+      const bool __testin = _M_mode & ios_base::in;
+      if (__testin && this->is_open())
+	{
+	  // For a stateful encoding (-1) the pending sequence might be just
+	  // shift and unshift prefixes with no actual character.
+	  __ret = this->egptr() - this->gptr();
+
+#if _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM
+	  // About this workaround, see libstdc++/20806.
+	  const bool __testbinary = _M_mode & ios_base::binary;
+	  if (__check_facet(_M_codecvt).encoding() >= 0
+	      && __testbinary)
+#else
+	  if (__check_facet(_M_codecvt).encoding() >= 0)
+#endif
+	    __ret += _M_file.showmanyc() / _M_codecvt->max_length();
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::int_type
+    basic_filebuf<_CharT, _Traits>::
+    underflow()
+    {
+      int_type __ret = traits_type::eof();
+      const bool __testin = _M_mode & ios_base::in;
+      if (__testin && !_M_writing)
+	{
+	  // Check for pback madness, and if so switch back to the
+	  // normal buffers and jet outta here before expensive
+	  // fileops happen...
+	  _M_destroy_pback();
+
+	  if (this->gptr() < this->egptr())
+	    return traits_type::to_int_type(*this->gptr());
+
+	  // Get and convert input sequence.
+	  const size_t __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1;
+
+	  // Will be set to true if ::read() returns 0 indicating EOF.
+	  bool __got_eof = false;
+	  // Number of internal characters produced.
+	  streamsize __ilen = 0;
+	  codecvt_base::result __r = codecvt_base::ok;
+	  if (__check_facet(_M_codecvt).always_noconv())
+	    {
+	      __ilen = _M_file.xsgetn(reinterpret_cast<char*>(this->eback()),
+				      __buflen);
+	      if (__ilen == 0)
+		__got_eof = true;
+	    }
+	  else
+	    {
+              // Worst-case number of external bytes.
+	      // XXX Not done encoding() == -1.
+	      const int __enc = _M_codecvt->encoding();
+	      streamsize __blen; // Minimum buffer size.
+	      streamsize __rlen; // Number of chars to read.
+	      if (__enc > 0)
+		__blen = __rlen = __buflen * __enc;
+	      else
+		{
+		  __blen = __buflen + _M_codecvt->max_length() - 1;
+		  __rlen = __buflen;
+		}
+	      const streamsize __remainder = _M_ext_end - _M_ext_next;
+	      __rlen = __rlen > __remainder ? __rlen - __remainder : 0;
+
+	      // An imbue in 'read' mode implies first converting the external
+	      // chars already present.
+	      if (_M_reading && this->egptr() == this->eback() && __remainder)
+		__rlen = 0;
+
+	      // Allocate buffer if necessary and move unconverted
+	      // bytes to front.
+	      if (_M_ext_buf_size < __blen)
+		{
+		  char* __buf = new char[__blen];
+		  if (__remainder)
+		    __builtin_memcpy(__buf, _M_ext_next, __remainder);
+
+		  delete [] _M_ext_buf;
+		  _M_ext_buf = __buf;
+		  _M_ext_buf_size = __blen;
+		}
+	      else if (__remainder)
+		__builtin_memmove(_M_ext_buf, _M_ext_next, __remainder);
+
+	      _M_ext_next = _M_ext_buf;
+	      _M_ext_end = _M_ext_buf + __remainder;
+	      _M_state_last = _M_state_cur;
+
+	      do
+		{
+		  if (__rlen > 0)
+		    {
+		      // Sanity check!
+		      // This may fail if the return value of
+		      // codecvt::max_length() is bogus.
+		      if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size)
+			{
+			  __throw_ios_failure(__N("basic_filebuf::underflow "
+					      "codecvt::max_length() "
+					      "is not valid"));
+			}
+		      streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen);
+		      if (__elen == 0)
+			__got_eof = true;
+		      else if (__elen == -1)
+			break;
+		      _M_ext_end += __elen;
+		    }
+
+		  char_type* __iend = this->eback();
+		  if (_M_ext_next < _M_ext_end)
+		    __r = _M_codecvt->in(_M_state_cur, _M_ext_next,
+					 _M_ext_end, _M_ext_next,
+					 this->eback(),
+					 this->eback() + __buflen, __iend);
+		  if (__r == codecvt_base::noconv)
+		    {
+		      size_t __avail = _M_ext_end - _M_ext_buf;
+		      __ilen = std::min(__avail, __buflen);
+		      traits_type::copy(this->eback(),
+					reinterpret_cast<char_type*>
+					(_M_ext_buf), __ilen);
+		      _M_ext_next = _M_ext_buf + __ilen;
+		    }
+		  else
+		    __ilen = __iend - this->eback();
+
+		  // _M_codecvt->in may return error while __ilen > 0: this is
+		  // ok, and actually occurs in case of mixed encodings (e.g.,
+		  // XML files).
+		  if (__r == codecvt_base::error)
+		    break;
+
+		  __rlen = 1;
+		}
+	      while (__ilen == 0 && !__got_eof);
+	    }
+
+	  if (__ilen > 0)
+	    {
+	      _M_set_buffer(__ilen);
+	      _M_reading = true;
+	      __ret = traits_type::to_int_type(*this->gptr());
+	    }
+	  else if (__got_eof)
+	    {
+	      // If the actual end of file is reached, set 'uncommitted'
+	      // mode, thus allowing an immediate write without an
+	      // intervening seek.
+	      _M_set_buffer(-1);
+	      _M_reading = false;
+	      // However, reaching it while looping on partial means that
+	      // the file has got an incomplete character.
+	      if (__r == codecvt_base::partial)
+		__throw_ios_failure(__N("basic_filebuf::underflow "
+				    "incomplete character in file"));
+	    }
+	  else if (__r == codecvt_base::error)
+	    __throw_ios_failure(__N("basic_filebuf::underflow "
+				"invalid byte sequence in file"));
+	  else
+	    __throw_ios_failure(__N("basic_filebuf::underflow "
+				"error reading the file"));
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::int_type
+    basic_filebuf<_CharT, _Traits>::
+    pbackfail(int_type __i)
+    {
+      int_type __ret = traits_type::eof();
+      const bool __testin = _M_mode & ios_base::in;
+      if (__testin && !_M_writing)
+	{
+	  // Remember whether the pback buffer is active, otherwise below
+	  // we may try to store in it a second char (libstdc++/9761).
+	  const bool __testpb = _M_pback_init;
+	  const bool __testeof = traits_type::eq_int_type(__i, __ret);
+	  int_type __tmp;
+	  if (this->eback() < this->gptr())
+	    {
+	      this->gbump(-1);
+	      __tmp = traits_type::to_int_type(*this->gptr());
+	    }
+	  else if (this->seekoff(-1, ios_base::cur) != pos_type(off_type(-1)))
+	    {
+	      __tmp = this->underflow();
+	      if (traits_type::eq_int_type(__tmp, __ret))
+		return __ret;
+	    }
+	  else
+	    {
+	      // At the beginning of the buffer, need to make a
+	      // putback position available.  But the seek may fail
+	      // (f.i., at the beginning of a file, see
+	      // libstdc++/9439) and in that case we return
+	      // traits_type::eof().
+	      return __ret;
+	    }
+
+	  // Try to put back __i into input sequence in one of three ways.
+	  // Order these tests done in is unspecified by the standard.
+	  if (!__testeof && traits_type::eq_int_type(__i, __tmp))
+	    __ret = __i;
+	  else if (__testeof)
+	    __ret = traits_type::not_eof(__i);
+	  else if (!__testpb)
+	    {
+	      _M_create_pback();
+	      _M_reading = true;
+	      *this->gptr() = traits_type::to_char_type(__i);
+	      __ret = __i;
+	    }
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::int_type
+    basic_filebuf<_CharT, _Traits>::
+    overflow(int_type __c)
+    {
+      int_type __ret = traits_type::eof();
+      const bool __testeof = traits_type::eq_int_type(__c, __ret);
+      const bool __testout = _M_mode & ios_base::out;
+      if (__testout && !_M_reading)
+	{
+	  if (this->pbase() < this->pptr())
+	    {
+	      // If appropriate, append the overflow char.
+	      if (!__testeof)
+		{
+		  *this->pptr() = traits_type::to_char_type(__c);
+		  this->pbump(1);
+		}
+
+	      // Convert pending sequence to external representation,
+	      // and output.
+	      if (_M_convert_to_external(this->pbase(),
+					 this->pptr() - this->pbase()))
+		{
+		  _M_set_buffer(0);
+		  __ret = traits_type::not_eof(__c);
+		}
+	    }
+	  else if (_M_buf_size > 1)
+	    {
+	      // Overflow in 'uncommitted' mode: set _M_writing, set
+	      // the buffer to the initial 'write' mode, and put __c
+	      // into the buffer.
+	      _M_set_buffer(0);
+	      _M_writing = true;
+	      if (!__testeof)
+		{
+		  *this->pptr() = traits_type::to_char_type(__c);
+		  this->pbump(1);
+		}
+	      __ret = traits_type::not_eof(__c);
+	    }
+	  else
+	    {
+	      // Unbuffered.
+	      char_type __conv = traits_type::to_char_type(__c);
+	      if (__testeof || _M_convert_to_external(&__conv, 1))
+		{
+		  _M_writing = true;
+		  __ret = traits_type::not_eof(__c);
+		}
+	    }
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    bool
+    basic_filebuf<_CharT, _Traits>::
+    _M_convert_to_external(_CharT* __ibuf, streamsize __ilen)
+    {
+      // Sizes of external and pending output.
+      streamsize __elen;
+      streamsize __plen;
+      if (__check_facet(_M_codecvt).always_noconv())
+	{
+	  __elen = _M_file.xsputn(reinterpret_cast<char*>(__ibuf), __ilen);
+	  __plen = __ilen;
+	}
+      else
+	{
+	  // Worst-case number of external bytes needed.
+	  // XXX Not done encoding() == -1.
+	  streamsize __blen = __ilen * _M_codecvt->max_length();
+	  char* __buf = static_cast<char*>(__builtin_alloca(__blen));
+
+	  char* __bend;
+	  const char_type* __iend;
+	  codecvt_base::result __r;
+	  __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen,
+				__iend, __buf, __buf + __blen, __bend);
+
+	  if (__r == codecvt_base::ok || __r == codecvt_base::partial)
+	    __blen = __bend - __buf;
+	  else if (__r == codecvt_base::noconv)
+	    {
+	      // Same as the always_noconv case above.
+	      __buf = reinterpret_cast<char*>(__ibuf);
+	      __blen = __ilen;
+	    }
+	  else
+	    __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
+				    "conversion error"));
+  
+	  __elen = _M_file.xsputn(__buf, __blen);
+	  __plen = __blen;
+
+	  // Try once more for partial conversions.
+	  if (__r == codecvt_base::partial && __elen == __plen)
+	    {
+	      const char_type* __iresume = __iend;
+	      streamsize __rlen = this->pptr() - __iend;
+	      __r = _M_codecvt->out(_M_state_cur, __iresume,
+				    __iresume + __rlen, __iend, __buf,
+				    __buf + __blen, __bend);
+	      if (__r != codecvt_base::error)
+		{
+		  __rlen = __bend - __buf;
+		  __elen = _M_file.xsputn(__buf, __rlen);
+		  __plen = __rlen;
+		}
+	      else
+		__throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
+					"conversion error"));
+	    }
+	}
+      return __elen == __plen;
+    }
+
+   template<typename _CharT, typename _Traits>
+     streamsize
+     basic_filebuf<_CharT, _Traits>::
+     xsgetn(_CharT* __s, streamsize __n)
+     {
+       // Clear out pback buffer before going on to the real deal...
+       streamsize __ret = 0;
+       if (_M_pback_init)
+	 {
+	   if (__n > 0 && this->gptr() == this->eback())
+	     {
+	       *__s++ = *this->gptr();
+	       this->gbump(1);
+	       __ret = 1;
+	       --__n;
+	     }
+	   _M_destroy_pback();
+	 }
+       
+       // Optimization in the always_noconv() case, to be generalized in the
+       // future: when __n > __buflen we read directly instead of using the
+       // buffer repeatedly.
+       const bool __testin = _M_mode & ios_base::in;
+       const streamsize __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1;
+
+       if (__n > __buflen && __check_facet(_M_codecvt).always_noconv()
+	   && __testin && !_M_writing)
+	 {
+	   // First, copy the chars already present in the buffer.
+	   const streamsize __avail = this->egptr() - this->gptr();
+	   if (__avail != 0)
+	     {
+	       if (__avail == 1)
+		 *__s = *this->gptr();
+	       else
+		 traits_type::copy(__s, this->gptr(), __avail);
+	       __s += __avail;
+	       this->gbump(__avail);
+	       __ret += __avail;
+	       __n -= __avail;
+	     }
+
+	   // Need to loop in case of short reads (relatively common
+	   // with pipes).
+	   streamsize __len;
+	   for (;;)
+	     {
+	       __len = _M_file.xsgetn(reinterpret_cast<char*>(__s),
+				      __n);
+	       if (__len == -1)
+		 __throw_ios_failure(__N("basic_filebuf::xsgetn "
+					 "error reading the file"));
+	       if (__len == 0)
+		 break;
+
+	       __n -= __len;
+	       __ret += __len;
+	       if (__n == 0)
+		 break;
+
+	       __s += __len;
+	     }
+
+	   if (__n == 0)
+	     {
+	       _M_set_buffer(0);
+	       _M_reading = true;
+	     }
+	   else if (__len == 0)
+	     {
+	       // If end of file is reached, set 'uncommitted'
+	       // mode, thus allowing an immediate write without
+	       // an intervening seek.
+	       _M_set_buffer(-1);
+	       _M_reading = false;
+	     }
+	 }
+       else
+	 __ret += __streambuf_type::xsgetn(__s, __n);
+
+       return __ret;
+     }
+
+   template<typename _CharT, typename _Traits>
+     streamsize
+     basic_filebuf<_CharT, _Traits>::
+     xsputn(const _CharT* __s, streamsize __n)
+     {
+       // Optimization in the always_noconv() case, to be generalized in the
+       // future: when __n is sufficiently large we write directly instead of
+       // using the buffer.
+       streamsize __ret = 0;
+       const bool __testout = _M_mode & ios_base::out;
+       if (__check_facet(_M_codecvt).always_noconv()
+	   && __testout && !_M_reading)
+	{
+	  // Measurement would reveal the best choice.
+	  const streamsize __chunk = 1ul << 10;
+	  streamsize __bufavail = this->epptr() - this->pptr();
+
+	  // Don't mistake 'uncommitted' mode buffered with unbuffered.
+	  if (!_M_writing && _M_buf_size > 1)
+	    __bufavail = _M_buf_size - 1;
+
+	  const streamsize __limit = std::min(__chunk, __bufavail);
+	  if (__n >= __limit)
+	    {
+	      const streamsize __buffill = this->pptr() - this->pbase();
+	      const char* __buf = reinterpret_cast<const char*>(this->pbase());
+	      __ret = _M_file.xsputn_2(__buf, __buffill,
+				       reinterpret_cast<const char*>(__s),
+				       __n);
+	      if (__ret == __buffill + __n)
+		{
+		  _M_set_buffer(0);
+		  _M_writing = true;
+		}
+	      if (__ret > __buffill)
+		__ret -= __buffill;
+	      else
+		__ret = 0;
+	    }
+	  else
+	    __ret = __streambuf_type::xsputn(__s, __n);
+	}
+       else
+	 __ret = __streambuf_type::xsputn(__s, __n);
+       return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::__streambuf_type*
+    basic_filebuf<_CharT, _Traits>::
+    setbuf(char_type* __s, streamsize __n)
+    {
+      if (!this->is_open())
+	{
+	  if (__s == 0 && __n == 0)
+	    _M_buf_size = 1;
+	  else if (__s && __n > 0)
+	    {
+	      // This is implementation-defined behavior, and assumes that
+	      // an external char_type array of length __n exists and has
+	      // been pre-allocated. If this is not the case, things will
+	      // quickly blow up. When __n > 1, __n - 1 positions will be
+	      // used for the get area, __n - 1 for the put area and 1
+	      // position to host the overflow char of a full put area.
+	      // When __n == 1, 1 position will be used for the get area
+	      // and 0 for the put area, as in the unbuffered case above.
+	      _M_buf = __s;
+	      _M_buf_size = __n;
+	    }
+	}
+      return this;
+    }
+
+
+  // According to 27.8.1.4 p11 - 13, seekoff should ignore the last
+  // argument (of type openmode).
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::pos_type
+    basic_filebuf<_CharT, _Traits>::
+    seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode)
+    {
+      int __width = 0;
+      if (_M_codecvt)
+	__width = _M_codecvt->encoding();
+      if (__width < 0)
+	__width = 0;
+
+      pos_type __ret =  pos_type(off_type(-1));
+      const bool __testfail = __off != 0 && __width <= 0;
+      if (this->is_open() && !__testfail)
+	{
+	  // Ditch any pback buffers to avoid confusion.
+	  _M_destroy_pback();
+
+	  // Correct state at destination. Note that this is the correct
+	  // state for the current position during output, because
+	  // codecvt::unshift() returns the state to the initial state.
+	  // This is also the correct state at the end of the file because
+	  // an unshift sequence should have been written at the end.
+	  __state_type __state = _M_state_beg;
+	  off_type __computed_off = __off * __width;
+	  if (_M_reading && __way == ios_base::cur)
+	    {
+	      if (_M_codecvt->always_noconv())
+		__computed_off += this->gptr() - this->egptr();
+	      else
+		{
+		  // Calculate offset from _M_ext_buf that corresponds
+		  // to gptr(). Note: uses _M_state_last, which
+		  // corresponds to eback().
+		  const int __gptr_off =
+		    _M_codecvt->length(_M_state_last, _M_ext_buf, _M_ext_next,
+				       this->gptr() - this->eback());
+		  __computed_off += _M_ext_buf + __gptr_off - _M_ext_end;
+
+		  // _M_state_last is modified by codecvt::length() so
+		  // it now corresponds to gptr().
+		  __state = _M_state_last;
+		}
+	    }
+	  __ret = _M_seek(__computed_off, __way, __state);
+	}
+      return __ret;
+    }
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 171. Strange seekpos() semantics due to joint position
+  // According to the resolution of DR 171, seekpos should ignore the last
+  // argument (of type openmode).
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::pos_type
+    basic_filebuf<_CharT, _Traits>::
+    seekpos(pos_type __pos, ios_base::openmode)
+    {
+      pos_type __ret =  pos_type(off_type(-1));
+      if (this->is_open())
+	{
+	  // Ditch any pback buffers to avoid confusion.
+	  _M_destroy_pback();
+	  __ret = _M_seek(off_type(__pos), ios_base::beg, __pos.state());
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_filebuf<_CharT, _Traits>::pos_type
+    basic_filebuf<_CharT, _Traits>::
+    _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state)
+    {
+      pos_type __ret = pos_type(off_type(-1));
+      if (_M_terminate_output())
+	{
+	  // Returns pos_type(off_type(-1)) in case of failure.
+	  __ret = pos_type(_M_file.seekoff(__off, __way));
+	  if (__ret != pos_type(off_type(-1)))
+	    {
+	      _M_reading = false;
+	      _M_writing = false;
+	      _M_ext_next = _M_ext_end = _M_ext_buf;
+	      _M_set_buffer(-1);
+	      _M_state_cur = __state;
+	      __ret.state(_M_state_cur);
+	    }
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    bool
+    basic_filebuf<_CharT, _Traits>::
+    _M_terminate_output()
+    {
+      // Part one: update the output sequence.
+      bool __testvalid = true;
+      if (this->pbase() < this->pptr())
+	{
+	  const int_type __tmp = this->overflow();
+	  if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+	    __testvalid = false;
+	}
+
+      // Part two: output unshift sequence.
+      if (_M_writing && !__check_facet(_M_codecvt).always_noconv()
+	  && __testvalid)
+	{
+	  // Note: this value is arbitrary, since there is no way to
+	  // get the length of the unshift sequence from codecvt,
+	  // without calling unshift.
+	  const size_t __blen = 128;
+	  char __buf[__blen];
+	  codecvt_base::result __r;
+	  streamsize __ilen = 0;
+
+	  do
+	    {
+	      char* __next;
+	      __r = _M_codecvt->unshift(_M_state_cur, __buf,
+					__buf + __blen, __next);
+	      if (__r == codecvt_base::error)
+		__testvalid = false;
+	      else if (__r == codecvt_base::ok ||
+		       __r == codecvt_base::partial)
+		{
+		  __ilen = __next - __buf;
+		  if (__ilen > 0)
+		    {
+		      const streamsize __elen = _M_file.xsputn(__buf, __ilen);
+		      if (__elen != __ilen)
+			__testvalid = false;
+		    }
+		}
+	    }
+	  while (__r == codecvt_base::partial && __ilen > 0 && __testvalid);
+
+	  if (__testvalid)
+	    {
+	      // This second call to overflow() is required by the standard,
+	      // but it's not clear why it's needed, since the output buffer
+	      // should be empty by this point (it should have been emptied
+	      // in the first call to overflow()).
+	      const int_type __tmp = this->overflow();
+	      if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+		__testvalid = false;
+	    }
+	}
+      return __testvalid;
+    }
+
+  template<typename _CharT, typename _Traits>
+    int
+    basic_filebuf<_CharT, _Traits>::
+    sync()
+    {
+      // Make sure that the internal buffer resyncs its idea of
+      // the file position with the external file.
+      int __ret = 0;
+      if (this->pbase() < this->pptr())
+	{
+	  const int_type __tmp = this->overflow();
+	  if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+	    __ret = -1;
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    void
+    basic_filebuf<_CharT, _Traits>::
+    imbue(const locale& __loc)
+    {
+      bool __testvalid = true;
+
+      const __codecvt_type* _M_codecvt_tmp = 0;
+      if (__builtin_expect(has_facet<__codecvt_type>(__loc), true))
+	_M_codecvt_tmp = &use_facet<__codecvt_type>(__loc);
+
+      if (this->is_open())
+	{
+	  // encoding() == -1 is ok only at the beginning.
+	  if ((_M_reading || _M_writing)
+	      && __check_facet(_M_codecvt).encoding() == -1)
+	    __testvalid = false;
+	  else
+	    {
+	      if (_M_reading)
+		{
+		  if (__check_facet(_M_codecvt).always_noconv())
+		    {
+		      if (_M_codecvt_tmp
+			  && !__check_facet(_M_codecvt_tmp).always_noconv())
+			__testvalid = this->seekoff(0, ios_base::cur, _M_mode)
+			              != pos_type(off_type(-1));
+		    }
+		  else
+		    {
+		      // External position corresponding to gptr().
+		      _M_ext_next = _M_ext_buf
+			+ _M_codecvt->length(_M_state_last, _M_ext_buf, _M_ext_next,
+					     this->gptr() - this->eback());
+		      const streamsize __remainder = _M_ext_end - _M_ext_next;
+		      if (__remainder)
+			__builtin_memmove(_M_ext_buf, _M_ext_next, __remainder);
+
+		      _M_ext_next = _M_ext_buf;
+		      _M_ext_end = _M_ext_buf + __remainder;
+		      _M_set_buffer(-1);
+		      _M_state_last = _M_state_cur = _M_state_beg;
+		    }
+		}
+	      else if (_M_writing && (__testvalid = _M_terminate_output()))
+		_M_set_buffer(-1);
+	    }
+	}
+
+      if (__testvalid)
+	_M_codecvt = _M_codecvt_tmp;
+      else
+	_M_codecvt = 0;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB:  This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class basic_filebuf<char>;
+  extern template class basic_ifstream<char>;
+  extern template class basic_ofstream<char>;
+  extern template class basic_fstream<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class basic_filebuf<wchar_t>;
+  extern template class basic_ifstream<wchar_t>;
+  extern template class basic_ofstream<wchar_t>;
+  extern template class basic_fstream<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/functexcept.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/functexcept.h
new file mode 100644
index 0000000..5b2e9fc
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/functexcept.h
@@ -0,0 +1,100 @@
+// Function-Based Exception Support -*- C++ -*-
+
+// Copyright (C) 2001, 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file functexcept.h
+ *  This header provides support for -fno-exceptions.
+ */
+
+//
+// ISO C++ 14882: 19.1  Exception classes
+//
+
+#ifndef _FUNCTEXCEPT_H
+#define _FUNCTEXCEPT_H 1
+
+#include <bits/c++config.h>
+#include <exception_defines.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Helper for exception objects in <except>
+  void
+  __throw_bad_exception(void) __attribute__((__noreturn__));
+
+  // Helper for exception objects in <new>
+  void
+  __throw_bad_alloc(void) __attribute__((__noreturn__));
+
+  // Helper for exception objects in <typeinfo>
+  void
+  __throw_bad_cast(void) __attribute__((__noreturn__));
+
+  void
+  __throw_bad_typeid(void) __attribute__((__noreturn__));
+
+  // Helpers for exception objects in <stdexcept>
+  void
+  __throw_logic_error(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_domain_error(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_invalid_argument(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_length_error(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_out_of_range(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_runtime_error(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_range_error(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_overflow_error(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_underflow_error(const char*) __attribute__((__noreturn__));
+
+  // Helpers for exception objects in <ios>
+  void
+  __throw_ios_failure(const char*) __attribute__((__noreturn__));
+
+  void
+  __throw_system_error(int) __attribute__((__noreturn__));
+
+  void
+  __throw_future_error(int) __attribute__((__noreturn__));
+
+  // Helpers for exception objects in <functional>
+  void
+  __throw_bad_function_call() __attribute__((__noreturn__));
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/functional_hash.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/functional_hash.h
new file mode 100644
index 0000000..aaa05aa
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/functional_hash.h
@@ -0,0 +1,214 @@
+// functional_hash.h header -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/functional_hash.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _FUNCTIONAL_HASH_H
+#define _FUNCTIONAL_HASH_H 1
+
+#pragma GCC system_header
+
+#include <cstddef>
+#include <bits/stl_function.h>
+
+namespace std
+{
+  /** @defgroup hashes Hashes
+   *  @ingroup functors
+   *
+   *   Hashing functors taking a variable type and returning a @c std::size_t.
+   *
+   *  @{
+   */
+
+  /// Primary class template hash.
+  template<typename _Tp>
+    struct hash : public std::unary_function<_Tp, size_t>
+    {
+      size_t
+      operator()(_Tp __val) const;
+    };
+
+  /// Partial specializations for pointer types.
+  template<typename _Tp>
+    struct hash<_Tp*> : public std::unary_function<_Tp*, size_t>
+    {
+      size_t
+      operator()(_Tp* __p) const
+      { return reinterpret_cast<size_t>(__p); }
+    };
+
+  // Explicit specializations for integer types.
+#define _Cxx_hashtable_define_trivial_hash(_Tp) 	\
+  template<>						\
+    inline size_t					\
+    hash<_Tp>::operator()(_Tp __val) const		\
+    { return static_cast<size_t>(__val); }
+
+  /// Explicit specialization for bool.
+  _Cxx_hashtable_define_trivial_hash(bool);
+
+  /// Explicit specialization for char.
+  _Cxx_hashtable_define_trivial_hash(char);
+
+  /// Explicit specialization for signed char.
+  _Cxx_hashtable_define_trivial_hash(signed char);
+
+  /// Explicit specialization for unsigned char.
+  _Cxx_hashtable_define_trivial_hash(unsigned char);
+
+  /// Explicit specialization for wchar_t.
+  _Cxx_hashtable_define_trivial_hash(wchar_t);
+
+  /// Explicit specialization for char16_t.
+  _Cxx_hashtable_define_trivial_hash(char16_t);
+
+  /// Explicit specialization for char32_t.
+  _Cxx_hashtable_define_trivial_hash(char32_t);
+
+  /// Explicit specialization for short.
+  _Cxx_hashtable_define_trivial_hash(short);
+
+  /// Explicit specialization for int.
+  _Cxx_hashtable_define_trivial_hash(int);
+
+  /// Explicit specialization for long.
+  _Cxx_hashtable_define_trivial_hash(long);
+
+  /// Explicit specialization for long long.
+  _Cxx_hashtable_define_trivial_hash(long long);
+
+  /// Explicit specialization for unsigned short.
+  _Cxx_hashtable_define_trivial_hash(unsigned short);
+
+  /// Explicit specialization for unsigned int.
+  _Cxx_hashtable_define_trivial_hash(unsigned int);
+
+  /// Explicit specialization for unsigned long.
+  _Cxx_hashtable_define_trivial_hash(unsigned long);
+
+  /// Explicit specialization for unsigned long long.
+  _Cxx_hashtable_define_trivial_hash(unsigned long long);
+
+#undef _Cxx_hashtable_define_trivial_hash
+
+  // Fowler / Noll / Vo (FNV) Hash (type FNV-1a)
+
+  // Dummy generic implementation (for sizeof(size_t) != 4, 8).
+  template<size_t>
+    struct _Fnv_hash_base
+    {
+      template<typename _Tp>
+        static size_t
+        hash(const _Tp* __ptr, size_t __clength, size_t __hash = 0)
+        {
+	  const char* __cptr = reinterpret_cast<const char*>(__ptr);
+	  for (; __clength; --__clength)
+	    __hash = (__hash * 131) + *__cptr++;
+	  return __hash;
+	}
+    };
+
+  template<>
+    struct _Fnv_hash_base<4>
+    {
+      template<typename _Tp>
+        static size_t
+        hash(const _Tp* __ptr, size_t __clength,
+	     size_t __hash = static_cast<size_t>(2166136261UL))
+        {
+	  const char* __cptr = reinterpret_cast<const char*>(__ptr);
+	  for (; __clength; --__clength)
+	    {
+	      __hash ^= static_cast<size_t>(*__cptr++);
+	      __hash *= static_cast<size_t>(16777619UL);
+	    }
+	  return __hash;
+	}
+    };
+  
+  template<>
+    struct _Fnv_hash_base<8>
+    {
+      template<typename _Tp>
+        static size_t
+        hash(const _Tp* __ptr, size_t __clength,
+	     size_t __hash = static_cast<size_t>(14695981039346656037ULL))
+        {
+	  const char* __cptr = reinterpret_cast<const char*>(__ptr);
+	  for (; __clength; --__clength)
+	    {
+	      __hash ^= static_cast<size_t>(*__cptr++);
+	      __hash *= static_cast<size_t>(1099511628211ULL);
+	    }
+	  return __hash;
+	}
+    };
+
+    struct _Fnv_hash
+    : public _Fnv_hash_base<sizeof(size_t)>
+    {
+      using _Fnv_hash_base<sizeof(size_t)>::hash;
+
+      template<typename _Tp>
+        static size_t
+        hash(const _Tp& __val)
+        { return hash(&__val, sizeof(__val)); }
+
+      template<typename _Tp>
+        static size_t
+        __hash_combine(const _Tp& __val, size_t __hash)
+        { return hash(&__val, sizeof(__val), __hash); }
+    };
+
+  /// Specialization for float.
+  template<>
+    inline size_t
+    hash<float>::operator()(float __val) const
+    {
+      // 0 and -0 both hash to zero.
+      return __val != 0.0f ? std::_Fnv_hash::hash(__val) : 0;
+    }
+
+  /// Specialization for double.
+  template<>
+    inline size_t
+    hash<double>::operator()(double __val) const
+    {
+      // 0 and -0 both hash to zero.
+      return __val != 0.0 ? std::_Fnv_hash::hash(__val) : 0;
+    }
+
+  /// Specialization for long double.
+  template<>
+    _GLIBCXX_PURE size_t
+    hash<long double>::operator()(long double __val) const;
+
+  // @} group hashes
+}
+
+#endif // _FUNCTIONAL_HASH_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/gslice.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/gslice.h
new file mode 100644
index 0000000..29ba46a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/gslice.h
@@ -0,0 +1,182 @@
+// The template and inlines for the -*- C++ -*- gslice class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file gslice.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _GSLICE_H
+#define _GSLICE_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup numeric_arrays
+   * @{
+   */
+
+  /**
+   *  @brief  Class defining multi-dimensional subset of an array.
+   *
+   *  The slice class represents a multi-dimensional subset of an array,
+   *  specified by three parameter sets: start offset, size array, and stride
+   *  array.  The start offset is the index of the first element of the array
+   *  that is part of the subset.  The size and stride array describe each
+   *  dimension of the slice.  Size is the number of elements in that
+   *  dimension, and stride is the distance in the array between successive
+   *  elements in that dimension.  Each dimension's size and stride is taken
+   *  to begin at an array element described by the previous dimension.  The
+   *  size array and stride array must be the same size.
+   *
+   *  For example, if you have offset==3, stride[0]==11, size[1]==3,
+   *  stride[1]==3, then slice[0,0]==array[3], slice[0,1]==array[6],
+   *  slice[0,2]==array[9], slice[1,0]==array[14], slice[1,1]==array[17],
+   *  slice[1,2]==array[20].
+   */
+  class gslice
+  {
+  public:
+    ///  Construct an empty slice.
+    gslice();
+
+    /**
+     *  @brief  Construct a slice.
+     *
+     *  Constructs a slice with as many dimensions as the length of the @a l
+     *  and @a s arrays.
+     *
+     *  @param  o  Offset in array of first element.
+     *  @param  l  Array of dimension lengths.
+     *  @param  s  Array of dimension strides between array elements.
+     */
+    gslice(size_t, const valarray<size_t>&, const valarray<size_t>&);
+
+    // XXX: the IS says the copy-ctor and copy-assignment operators are
+    //      synthesized by the compiler but they are just unsuitable
+    //      for a ref-counted semantic
+    ///  Copy constructor.
+    gslice(const gslice&);
+
+    ///  Destructor.
+    ~gslice();
+
+    // XXX: See the note above.
+    ///  Assignment operator.
+    gslice& operator=(const gslice&);
+
+    ///  Return array offset of first slice element.
+    size_t           start() const;
+
+    ///  Return array of sizes of slice dimensions.
+    valarray<size_t> size() const;
+    
+    ///  Return array of array strides for each dimension.
+    valarray<size_t> stride() const;
+
+  private:
+    struct _Indexer
+    {
+      size_t _M_count;
+      size_t _M_start;
+      valarray<size_t> _M_size;
+      valarray<size_t> _M_stride;
+      valarray<size_t> _M_index; // Linear array of referenced indices
+
+      _Indexer()
+      : _M_count(1), _M_start(0), _M_size(), _M_stride(), _M_index() {}
+
+      _Indexer(size_t, const valarray<size_t>&,
+	       const valarray<size_t>&);
+
+      void
+      _M_increment_use()
+      { ++_M_count; }
+      
+      size_t
+      _M_decrement_use()
+      { return --_M_count; }
+    };
+
+    _Indexer* _M_index;
+
+    template<typename _Tp> friend class valarray;
+  };
+
+  inline size_t
+  gslice::start() const
+  { return _M_index ? _M_index->_M_start : 0; }
+
+  inline valarray<size_t>
+  gslice::size() const
+  { return _M_index ? _M_index->_M_size : valarray<size_t>(); }
+
+  inline valarray<size_t>
+  gslice::stride() const
+  { return _M_index ? _M_index->_M_stride : valarray<size_t>(); }
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 543. valarray slice default constructor
+  inline
+  gslice::gslice()
+  : _M_index(new gslice::_Indexer()) {}
+
+  inline
+  gslice::gslice(size_t __o, const valarray<size_t>& __l,
+		 const valarray<size_t>& __s)
+  : _M_index(new gslice::_Indexer(__o, __l, __s)) {}
+
+  inline
+  gslice::gslice(const gslice& __g)
+  : _M_index(__g._M_index)
+  { if (_M_index) _M_index->_M_increment_use(); }
+
+  inline
+  gslice::~gslice()
+  {
+    if (_M_index && _M_index->_M_decrement_use() == 0)
+      delete _M_index;
+  }
+
+  inline gslice&
+  gslice::operator=(const gslice& __g)
+  {
+    if (__g._M_index)
+      __g._M_index->_M_increment_use();
+    if (_M_index && _M_index->_M_decrement_use() == 0)
+      delete _M_index;
+    _M_index = __g._M_index;
+    return *this;
+  }
+
+  // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GSLICE_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/gslice_array.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/gslice_array.h
new file mode 100644
index 0000000..745a5a8
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/gslice_array.h
@@ -0,0 +1,216 @@
+// The template and inlines for the -*- C++ -*- gslice_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004, 2005, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file gslice_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _GSLICE_ARRAY_H
+#define _GSLICE_ARRAY_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup numeric_arrays
+   * @{
+   */
+
+  /**
+   *  @brief  Reference to multi-dimensional subset of an array.
+   *
+   *  A gslice_array is a reference to the actual elements of an array
+   *  specified by a gslice.  The way to get a gslice_array is to call
+   *  operator[](gslice) on a valarray.  The returned gslice_array then
+   *  permits carrying operations out on the referenced subset of elements in
+   *  the original valarray.  For example, operator+=(valarray) will add
+   *  values to the subset of elements in the underlying valarray this
+   *  gslice_array refers to.
+   *
+   *  @param  Tp  Element type.
+   */
+  template<typename _Tp>
+    class gslice_array
+    {
+    public:
+      typedef _Tp value_type;
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 253. valarray helper functions are almost entirely useless
+
+      ///  Copy constructor.  Both slices refer to the same underlying array.
+      gslice_array(const gslice_array&);
+
+      ///  Assignment operator.  Assigns slice elements to corresponding
+      ///  elements of @a a.
+      gslice_array& operator=(const gslice_array&);
+
+      ///  Assign slice elements to corresponding elements of @a v.
+      void operator=(const valarray<_Tp>&) const;
+      ///  Multiply slice elements by corresponding elements of @a v.
+      void operator*=(const valarray<_Tp>&) const;
+      ///  Divide slice elements by corresponding elements of @a v.
+      void operator/=(const valarray<_Tp>&) const;
+      ///  Modulo slice elements by corresponding elements of @a v.
+      void operator%=(const valarray<_Tp>&) const;
+      ///  Add corresponding elements of @a v to slice elements.
+      void operator+=(const valarray<_Tp>&) const;
+      ///  Subtract corresponding elements of @a v from slice elements.
+      void operator-=(const valarray<_Tp>&) const;
+      ///  Logical xor slice elements with corresponding elements of @a v.
+      void operator^=(const valarray<_Tp>&) const;
+      ///  Logical and slice elements with corresponding elements of @a v.
+      void operator&=(const valarray<_Tp>&) const;
+      ///  Logical or slice elements with corresponding elements of @a v.
+      void operator|=(const valarray<_Tp>&) const;
+      ///  Left shift slice elements by corresponding elements of @a v.
+      void operator<<=(const valarray<_Tp>&) const;
+      ///  Right shift slice elements by corresponding elements of @a v.
+      void operator>>=(const valarray<_Tp>&) const;
+      ///  Assign all slice elements to @a t.
+      void operator=(const _Tp&) const;
+
+      template<class _Dom>
+        void operator=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator*=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator/=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator%=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator+=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator-=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator^=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator&=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator|=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator<<=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+        void operator>>=(const _Expr<_Dom, _Tp>&) const;
+
+    private:
+      _Array<_Tp>    _M_array;
+      const valarray<size_t>& _M_index;
+
+      friend class valarray<_Tp>;
+
+      gslice_array(_Array<_Tp>, const valarray<size_t>&);
+
+      // not implemented
+      gslice_array();
+    };
+
+  template<typename _Tp>
+    inline
+    gslice_array<_Tp>::gslice_array(_Array<_Tp> __a,
+				    const valarray<size_t>& __i)
+    : _M_array(__a), _M_index(__i) {}
+
+  template<typename _Tp>
+    inline
+    gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a)
+    : _M_array(__a._M_array), _M_index(__a._M_index) {}
+
+  template<typename _Tp>
+    inline gslice_array<_Tp>&
+    gslice_array<_Tp>::operator=(const gslice_array<_Tp>& __a)
+    {
+      std::__valarray_copy(_Array<_Tp>(__a._M_array),
+			   _Array<size_t>(__a._M_index), _M_index.size(),
+			   _M_array, _Array<size_t>(_M_index));
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline void
+    gslice_array<_Tp>::operator=(const _Tp& __t) const
+    {
+      std::__valarray_fill(_M_array, _Array<size_t>(_M_index),
+			   _M_index.size(), __t);
+    }
+
+  template<typename _Tp>
+    inline void
+    gslice_array<_Tp>::operator=(const valarray<_Tp>& __v) const
+    {
+      std::__valarray_copy(_Array<_Tp>(__v), __v.size(),
+			   _M_array, _Array<size_t>(_M_index));
+    }
+
+  template<typename _Tp>
+    template<class _Dom>
+      inline void
+      gslice_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const
+      {
+	std::__valarray_copy (__e, _M_index.size(), _M_array,
+			      _Array<size_t>(_M_index));
+      }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name)				\
+  template<typename _Tp>						\
+    inline void								\
+    gslice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const	\
+    {									\
+      _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index),	\
+			       _Array<_Tp>(__v), __v.size());		\
+    }									\
+									\
+  template<typename _Tp>                                                \
+    template<class _Dom>				                \
+      inline void							\
+      gslice_array<_Tp>::operator _Op##= (const _Expr<_Dom, _Tp>& __e) const\
+      {									\
+	_Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), __e,\
+				 _M_index.size());			\
+      }
+
+_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(%, __modulus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(-, __minus)
+_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
+_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
+_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
+_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+  // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GSLICE_ARRAY_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/hashtable.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/hashtable.h
new file mode 100644
index 0000000..c7aceb1
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/hashtable.h
@@ -0,0 +1,1194 @@
+// hashtable.h header -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/hashtable.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _HASHTABLE_H
+#define _HASHTABLE_H 1
+
+#pragma GCC system_header
+
+#include <bits/hashtable_policy.h>
+
+namespace std
+{
+  // Class template _Hashtable, class definition.
+  
+  // Meaning of class template _Hashtable's template parameters
+  
+  // _Key and _Value: arbitrary CopyConstructible types.
+  
+  // _Allocator: an allocator type ([lib.allocator.requirements]) whose
+  // value type is Value.  As a conforming extension, we allow for
+  // value type != Value.
+
+  // _ExtractKey: function object that takes a object of type Value
+  // and returns a value of type _Key.
+  
+  // _Equal: function object that takes two objects of type k and returns
+  // a bool-like value that is true if the two objects are considered equal.
+  
+  // _H1: the hash function.  A unary function object with argument type
+  // Key and result type size_t.  Return values should be distributed
+  // over the entire range [0, numeric_limits<size_t>:::max()].
+  
+  // _H2: the range-hashing function (in the terminology of Tavori and
+  // Dreizin).  A binary function object whose argument types and result
+  // type are all size_t.  Given arguments r and N, the return value is
+  // in the range [0, N).
+  
+  // _Hash: the ranged hash function (Tavori and Dreizin). A binary function
+  // whose argument types are _Key and size_t and whose result type is
+  // size_t.  Given arguments k and N, the return value is in the range
+  // [0, N).  Default: hash(k, N) = h2(h1(k), N).  If _Hash is anything other
+  // than the default, _H1 and _H2 are ignored.
+  
+  // _RehashPolicy: Policy class with three members, all of which govern
+  // the bucket count. _M_next_bkt(n) returns a bucket count no smaller
+  // than n.  _M_bkt_for_elements(n) returns a bucket count appropriate
+  // for an element count of n.  _M_need_rehash(n_bkt, n_elt, n_ins)
+  // determines whether, if the current bucket count is n_bkt and the
+  // current element count is n_elt, we need to increase the bucket
+  // count.  If so, returns make_pair(true, n), where n is the new
+  // bucket count.  If not, returns make_pair(false, <anything>).
+  
+  // ??? Right now it is hard-wired that the number of buckets never
+  // shrinks.  Should we allow _RehashPolicy to change that?
+  
+  // __cache_hash_code: bool.  true if we store the value of the hash
+  // function along with the value.  This is a time-space tradeoff.
+  // Storing it may improve lookup speed by reducing the number of times
+  // we need to call the Equal function.
+  
+  // __constant_iterators: bool.  true if iterator and const_iterator are
+  // both constant iterator types.  This is true for unordered_set and
+  // unordered_multiset, false for unordered_map and unordered_multimap.
+  
+  // __unique_keys: bool.  true if the return value of _Hashtable::count(k)
+  // is always at most one, false if it may be an arbitrary number.  This
+  // true for unordered_set and unordered_map, false for unordered_multiset
+  // and unordered_multimap.
+  
+  template<typename _Key, typename _Value, typename _Allocator,
+	   typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, 
+	   typename _RehashPolicy,
+	   bool __cache_hash_code,
+	   bool __constant_iterators,
+	   bool __unique_keys>
+    class _Hashtable
+    : public __detail::_Rehash_base<_RehashPolicy,
+				    _Hashtable<_Key, _Value, _Allocator,
+					       _ExtractKey,
+					       _Equal, _H1, _H2, _Hash,
+					       _RehashPolicy,
+					       __cache_hash_code,
+					       __constant_iterators,
+					       __unique_keys> >,
+      public __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+				       _H1, _H2, _Hash, __cache_hash_code>,
+      public __detail::_Map_base<_Key, _Value, _ExtractKey, __unique_keys,
+				 _Hashtable<_Key, _Value, _Allocator,
+					    _ExtractKey,
+					    _Equal, _H1, _H2, _Hash,
+					    _RehashPolicy,
+					    __cache_hash_code,
+					    __constant_iterators,
+					    __unique_keys> >,
+      public __detail::_Equality_base<_ExtractKey, __unique_keys,
+				      _Hashtable<_Key, _Value, _Allocator,
+						 _ExtractKey,
+						 _Equal, _H1, _H2, _Hash,
+						 _RehashPolicy,
+						 __cache_hash_code,
+						 __constant_iterators,
+						 __unique_keys> >
+    {
+    public:
+      typedef _Allocator                                  allocator_type;
+      typedef _Value                                      value_type;
+      typedef _Key                                        key_type;
+      typedef _Equal                                      key_equal;
+      // mapped_type, if present, comes from _Map_base.
+      // hasher, if present, comes from _Hash_code_base.
+      typedef typename _Allocator::pointer                pointer;
+      typedef typename _Allocator::const_pointer          const_pointer;
+      typedef typename _Allocator::reference              reference;
+      typedef typename _Allocator::const_reference        const_reference;
+
+      typedef std::size_t                                 size_type;
+      typedef std::ptrdiff_t                              difference_type;
+      typedef __detail::_Node_iterator<value_type, __constant_iterators,
+				       __cache_hash_code>
+                                                          local_iterator;
+      typedef __detail::_Node_const_iterator<value_type,
+					     __constant_iterators,
+					     __cache_hash_code>
+                                                          const_local_iterator;
+
+      typedef __detail::_Hashtable_iterator<value_type, __constant_iterators,
+					    __cache_hash_code>
+                                                          iterator;
+      typedef __detail::_Hashtable_const_iterator<value_type,
+						  __constant_iterators,
+						  __cache_hash_code>
+                                                          const_iterator;
+
+      template<typename _Key2, typename _Value2, typename _Ex2, bool __unique2,
+	       typename _Hashtable2>
+        friend struct __detail::_Map_base;
+
+    private:
+      typedef __detail::_Hash_node<_Value, __cache_hash_code> _Node;
+      typedef typename _Allocator::template rebind<_Node>::other
+                                                        _Node_allocator_type;
+      typedef typename _Allocator::template rebind<_Node*>::other
+                                                        _Bucket_allocator_type;
+
+      typedef typename _Allocator::template rebind<_Value>::other
+                                                        _Value_allocator_type;
+
+      _Node_allocator_type   _M_node_allocator;
+      _Node**                _M_buckets;
+      size_type              _M_bucket_count;
+      size_type              _M_element_count;
+      _RehashPolicy          _M_rehash_policy;
+      
+      _Node*
+      _M_allocate_node(const value_type& __v);
+  
+      void
+      _M_deallocate_node(_Node* __n);
+  
+      void
+      _M_deallocate_nodes(_Node**, size_type);
+
+      _Node**
+      _M_allocate_buckets(size_type __n);
+  
+      void
+      _M_deallocate_buckets(_Node**, size_type __n);
+
+    public:			    
+      // Constructor, destructor, assignment, swap
+      _Hashtable(size_type __bucket_hint,
+		 const _H1&, const _H2&, const _Hash&,
+		 const _Equal&, const _ExtractKey&,
+		 const allocator_type&);
+  
+      template<typename _InputIterator>
+        _Hashtable(_InputIterator __first, _InputIterator __last,
+		   size_type __bucket_hint,
+		   const _H1&, const _H2&, const _Hash&, 
+		   const _Equal&, const _ExtractKey&,
+		   const allocator_type&);
+  
+      _Hashtable(const _Hashtable&);
+
+      _Hashtable(_Hashtable&&);
+      
+      _Hashtable&
+      operator=(const _Hashtable&);
+
+      ~_Hashtable();
+
+      void swap(_Hashtable&);
+
+      // Basic container operations
+      iterator
+      begin()
+      {
+	iterator __i(_M_buckets);
+	if (!__i._M_cur_node)
+	  __i._M_incr_bucket();
+	return __i;
+      }
+
+      const_iterator
+      begin() const
+      {
+	const_iterator __i(_M_buckets);
+	if (!__i._M_cur_node)
+	  __i._M_incr_bucket();
+	return __i;
+      }
+
+      iterator
+      end()
+      { return iterator(_M_buckets + _M_bucket_count); }
+
+      const_iterator
+      end() const
+      { return const_iterator(_M_buckets + _M_bucket_count); }
+
+      const_iterator
+      cbegin() const
+      {
+	const_iterator __i(_M_buckets);
+	if (!__i._M_cur_node)
+	  __i._M_incr_bucket();
+	return __i;
+      }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_M_buckets + _M_bucket_count); }
+
+      size_type
+      size() const
+      { return _M_element_count; }
+  
+      bool
+      empty() const
+      { return size() == 0; }
+
+      allocator_type
+      get_allocator() const
+      { return allocator_type(_M_node_allocator); }
+
+      _Value_allocator_type
+      _M_get_Value_allocator() const
+      { return _Value_allocator_type(_M_node_allocator); }
+
+      size_type
+      max_size() const
+      { return _M_node_allocator.max_size(); }
+
+      // Observers
+      key_equal
+      key_eq() const
+      { return this->_M_eq; }
+
+      // hash_function, if present, comes from _Hash_code_base.
+
+      // Bucket operations
+      size_type
+      bucket_count() const
+      { return _M_bucket_count; }
+  
+      size_type
+      max_bucket_count() const
+      { return max_size(); }
+  
+      size_type
+      bucket_size(size_type __n) const
+      { return std::distance(begin(__n), end(__n)); }
+  
+      size_type
+      bucket(const key_type& __k) const
+      { 
+	return this->_M_bucket_index(__k, this->_M_hash_code(__k),
+				     bucket_count());
+      }
+
+      local_iterator
+      begin(size_type __n)
+      { return local_iterator(_M_buckets[__n]); }
+
+      local_iterator
+      end(size_type)
+      { return local_iterator(0); }
+
+      const_local_iterator
+      begin(size_type __n) const
+      { return const_local_iterator(_M_buckets[__n]); }
+
+      const_local_iterator
+      end(size_type) const
+      { return const_local_iterator(0); }
+
+      // DR 691.
+      const_local_iterator
+      cbegin(size_type __n) const
+      { return const_local_iterator(_M_buckets[__n]); }
+
+      const_local_iterator
+      cend(size_type) const
+      { return const_local_iterator(0); }
+
+      float
+      load_factor() const
+      { 
+	return static_cast<float>(size()) / static_cast<float>(bucket_count());
+      }
+
+      // max_load_factor, if present, comes from _Rehash_base.
+
+      // Generalization of max_load_factor.  Extension, not found in TR1.  Only
+      // useful if _RehashPolicy is something other than the default.
+      const _RehashPolicy&
+      __rehash_policy() const
+      { return _M_rehash_policy; }
+      
+      void 
+      __rehash_policy(const _RehashPolicy&);
+
+      // Lookup.
+      iterator
+      find(const key_type& __k);
+
+      const_iterator
+      find(const key_type& __k) const;
+
+      size_type
+      count(const key_type& __k) const;
+
+      std::pair<iterator, iterator>
+      equal_range(const key_type& __k);
+
+      std::pair<const_iterator, const_iterator>
+      equal_range(const key_type& __k) const;
+
+    private:			// Find, insert and erase helper functions
+      // ??? This dispatching is a workaround for the fact that we don't
+      // have partial specialization of member templates; it would be
+      // better to just specialize insert on __unique_keys.  There may be a
+      // cleaner workaround.
+      typedef typename std::conditional<__unique_keys,
+					std::pair<iterator, bool>,
+					iterator>::type
+        _Insert_Return_Type;
+
+      typedef typename std::conditional<__unique_keys,
+					std::_Select1st<_Insert_Return_Type>,
+					std::_Identity<_Insert_Return_Type>
+                                   >::type
+        _Insert_Conv_Type;
+
+      _Node*
+      _M_find_node(_Node*, const key_type&,
+		   typename _Hashtable::_Hash_code_type) const;
+
+      iterator
+      _M_insert_bucket(const value_type&, size_type,
+		       typename _Hashtable::_Hash_code_type);
+
+      std::pair<iterator, bool>
+      _M_insert(const value_type&, std::true_type);
+
+      iterator
+      _M_insert(const value_type&, std::false_type);
+
+      void
+      _M_erase_node(_Node*, _Node**);
+
+    public:				
+      // Insert and erase
+      _Insert_Return_Type
+      insert(const value_type& __v) 
+      { return _M_insert(__v, std::integral_constant<bool,
+			 __unique_keys>()); }
+
+      iterator
+      insert(const_iterator, const value_type& __v)
+      { return iterator(_Insert_Conv_Type()(this->insert(__v))); }
+
+      template<typename _InputIterator>
+        void
+        insert(_InputIterator __first, _InputIterator __last);
+
+      void
+      insert(initializer_list<value_type> __l)
+      { this->insert(__l.begin(), __l.end()); }
+
+      iterator
+      erase(const_iterator);
+
+      size_type
+      erase(const key_type&);
+
+      iterator
+      erase(const_iterator, const_iterator);
+
+      void
+      clear();
+
+      // Set number of buckets to be appropriate for container of n element.
+      void rehash(size_type __n);
+
+      // DR 1189.
+      // reserve, if present, comes from _Rehash_base.
+
+    private:
+      // Unconditionally change size of bucket array to n.
+      void _M_rehash(size_type __n);
+    };
+
+
+  // Definitions of class template _Hashtable's out-of-line member functions.
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::_Node*
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_allocate_node(const value_type& __v)
+    {
+      _Node* __n = _M_node_allocator.allocate(1);
+      __try
+	{
+	  _M_node_allocator.construct(__n, __v);
+	  __n->_M_next = 0;
+	  return __n;
+	}
+      __catch(...)
+	{
+	  _M_node_allocator.deallocate(__n, 1);
+	  __throw_exception_again;
+	}
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_deallocate_node(_Node* __n)
+    {
+      _M_node_allocator.destroy(__n);
+      _M_node_allocator.deallocate(__n, 1);
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_deallocate_nodes(_Node** __array, size_type __n)
+    {
+      for (size_type __i = 0; __i < __n; ++__i)
+	{
+	  _Node* __p = __array[__i];
+	  while (__p)
+	    {
+	      _Node* __tmp = __p;
+	      __p = __p->_M_next;
+	      _M_deallocate_node(__tmp);
+	    }
+	  __array[__i] = 0;
+	}
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::_Node**
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_allocate_buckets(size_type __n)
+    {
+      _Bucket_allocator_type __alloc(_M_node_allocator);
+
+      // We allocate one extra bucket to hold a sentinel, an arbitrary
+      // non-null pointer.  Iterator increment relies on this.
+      _Node** __p = __alloc.allocate(__n + 1);
+      std::fill(__p, __p + __n, (_Node*) 0);
+      __p[__n] = reinterpret_cast<_Node*>(0x1000);
+      return __p;
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_deallocate_buckets(_Node** __p, size_type __n)
+    {
+      _Bucket_allocator_type __alloc(_M_node_allocator);
+      __alloc.deallocate(__p, __n + 1);
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _Hashtable(size_type __bucket_hint,
+	       const _H1& __h1, const _H2& __h2, const _Hash& __h,
+	       const _Equal& __eq, const _ExtractKey& __exk,
+	       const allocator_type& __a)
+    : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(),
+      __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+				_H1, _H2, _Hash, __chc>(__exk, __eq,
+							__h1, __h2, __h),
+      __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(),
+      _M_node_allocator(__a),
+      _M_bucket_count(0),
+      _M_element_count(0),
+      _M_rehash_policy()
+    {
+      _M_bucket_count = _M_rehash_policy._M_next_bkt(__bucket_hint);
+      _M_buckets = _M_allocate_buckets(_M_bucket_count);
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    template<typename _InputIterator>
+      _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+		 _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+      _Hashtable(_InputIterator __f, _InputIterator __l,
+		 size_type __bucket_hint,
+		 const _H1& __h1, const _H2& __h2, const _Hash& __h,
+		 const _Equal& __eq, const _ExtractKey& __exk,
+		 const allocator_type& __a)
+      : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(),
+	__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+				  _H1, _H2, _Hash, __chc>(__exk, __eq,
+							  __h1, __h2, __h),
+	__detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(),
+	_M_node_allocator(__a),
+	_M_bucket_count(0),
+	_M_element_count(0),
+	_M_rehash_policy()
+      {
+	_M_bucket_count = std::max(_M_rehash_policy._M_next_bkt(__bucket_hint),
+				   _M_rehash_policy.
+				   _M_bkt_for_elements(__detail::
+						       __distance_fw(__f,
+								     __l)));
+	_M_buckets = _M_allocate_buckets(_M_bucket_count);
+	__try
+	  {
+	    for (; __f != __l; ++__f)
+	      this->insert(*__f);
+	  }
+	__catch(...)
+	  {
+	    clear();
+	    _M_deallocate_buckets(_M_buckets, _M_bucket_count);
+	    __throw_exception_again;
+	  }
+      }
+  
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _Hashtable(const _Hashtable& __ht)
+    : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht),
+      __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+				_H1, _H2, _Hash, __chc>(__ht),
+      __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(__ht),
+      _M_node_allocator(__ht._M_node_allocator),
+      _M_bucket_count(__ht._M_bucket_count),
+      _M_element_count(__ht._M_element_count),
+      _M_rehash_policy(__ht._M_rehash_policy)
+    {
+      _M_buckets = _M_allocate_buckets(_M_bucket_count);
+      __try
+	{
+	  for (size_type __i = 0; __i < __ht._M_bucket_count; ++__i)
+	    {
+	      _Node* __n = __ht._M_buckets[__i];
+	      _Node** __tail = _M_buckets + __i;
+	      while (__n)
+		{
+		  *__tail = _M_allocate_node(__n->_M_v);
+		  this->_M_copy_code(*__tail, __n);
+		  __tail = &((*__tail)->_M_next);
+		  __n = __n->_M_next;
+		}
+	    }
+	}
+      __catch(...)
+	{
+	  clear();
+	  _M_deallocate_buckets(_M_buckets, _M_bucket_count);
+	  __throw_exception_again;
+	}
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _Hashtable(_Hashtable&& __ht)
+    : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht),
+      __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+				_H1, _H2, _Hash, __chc>(__ht),
+      __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(__ht),
+      _M_node_allocator(__ht._M_node_allocator),
+      _M_bucket_count(__ht._M_bucket_count),
+      _M_element_count(__ht._M_element_count),
+      _M_rehash_policy(__ht._M_rehash_policy),
+      _M_buckets(__ht._M_buckets)
+    {
+      size_type __n_bkt = __ht._M_rehash_policy._M_next_bkt(0);
+      __ht._M_buckets = __ht._M_allocate_buckets(__n_bkt);
+      __ht._M_bucket_count = __n_bkt;
+      __ht._M_element_count = 0;
+      __ht._M_rehash_policy = _RehashPolicy();
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>&
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    operator=(const _Hashtable& __ht)
+    {
+      _Hashtable __tmp(__ht);
+      this->swap(__tmp);
+      return *this;
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    ~_Hashtable()
+    {
+      clear();
+      _M_deallocate_buckets(_M_buckets, _M_bucket_count);
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    swap(_Hashtable& __x)
+    {
+      // The only base class with member variables is hash_code_base.  We
+      // define _Hash_code_base::_M_swap because different specializations
+      // have different members.
+      __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+	_H1, _H2, _Hash, __chc>::_M_swap(__x);
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 431. Swapping containers with unequal allocators.
+      std::__alloc_swap<_Node_allocator_type>::_S_do_it(_M_node_allocator,
+							__x._M_node_allocator);
+
+      std::swap(_M_rehash_policy, __x._M_rehash_policy);
+      std::swap(_M_buckets, __x._M_buckets);
+      std::swap(_M_bucket_count, __x._M_bucket_count);
+      std::swap(_M_element_count, __x._M_element_count);
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    __rehash_policy(const _RehashPolicy& __pol)
+    {
+      _M_rehash_policy = __pol;
+      size_type __n_bkt = __pol._M_bkt_for_elements(_M_element_count);
+      if (__n_bkt > _M_bucket_count)
+	_M_rehash(__n_bkt);
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::iterator
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    find(const key_type& __k)
+    {
+      typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+      std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+      _Node* __p = _M_find_node(_M_buckets[__n], __k, __code);
+      return __p ? iterator(__p, _M_buckets + __n) : this->end();
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::const_iterator
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    find(const key_type& __k) const
+    {
+      typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+      std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+      _Node* __p = _M_find_node(_M_buckets[__n], __k, __code);
+      return __p ? const_iterator(__p, _M_buckets + __n) : this->end();
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::size_type
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    count(const key_type& __k) const
+    {
+      typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+      std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+      std::size_t __result = 0;
+      for (_Node* __p = _M_buckets[__n]; __p; __p = __p->_M_next)
+	if (this->_M_compare(__k, __code, __p))
+	  ++__result;
+      return __result;
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    std::pair<typename _Hashtable<_Key, _Value, _Allocator,
+				  _ExtractKey, _Equal, _H1,
+				  _H2, _Hash, _RehashPolicy,
+				  __chc, __cit, __uk>::iterator,
+	      typename _Hashtable<_Key, _Value, _Allocator,
+				  _ExtractKey, _Equal, _H1,
+				  _H2, _Hash, _RehashPolicy,
+				  __chc, __cit, __uk>::iterator>
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    equal_range(const key_type& __k)
+    {
+      typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+      std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+      _Node** __head = _M_buckets + __n;
+      _Node* __p = _M_find_node(*__head, __k, __code);
+      
+      if (__p)
+	{
+	  _Node* __p1 = __p->_M_next;
+	  for (; __p1; __p1 = __p1->_M_next)
+	    if (!this->_M_compare(__k, __code, __p1))
+	      break;
+
+	  iterator __first(__p, __head);
+	  iterator __last(__p1, __head);
+	  if (!__p1)
+	    __last._M_incr_bucket();
+	  return std::make_pair(__first, __last);
+	}
+      else
+	return std::make_pair(this->end(), this->end());
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    std::pair<typename _Hashtable<_Key, _Value, _Allocator,
+				  _ExtractKey, _Equal, _H1,
+				  _H2, _Hash, _RehashPolicy,
+				  __chc, __cit, __uk>::const_iterator,
+	      typename _Hashtable<_Key, _Value, _Allocator,
+				  _ExtractKey, _Equal, _H1,
+				  _H2, _Hash, _RehashPolicy,
+				  __chc, __cit, __uk>::const_iterator>
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    equal_range(const key_type& __k) const
+    {
+      typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+      std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+      _Node** __head = _M_buckets + __n;
+      _Node* __p = _M_find_node(*__head, __k, __code);
+
+      if (__p)
+	{
+	  _Node* __p1 = __p->_M_next;
+	  for (; __p1; __p1 = __p1->_M_next)
+	    if (!this->_M_compare(__k, __code, __p1))
+	      break;
+
+	  const_iterator __first(__p, __head);
+	  const_iterator __last(__p1, __head);
+	  if (!__p1)
+	    __last._M_incr_bucket();
+	  return std::make_pair(__first, __last);
+	}
+      else
+	return std::make_pair(this->end(), this->end());
+    }
+
+  // Find the node whose key compares equal to k, beginning the search
+  // at p (usually the head of a bucket).  Return nil if no node is found.
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey,
+			_Equal, _H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::_Node* 
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_find_node(_Node* __p, const key_type& __k,
+		typename _Hashtable::_Hash_code_type __code) const
+    {
+      for (; __p; __p = __p->_M_next)
+	if (this->_M_compare(__k, __code, __p))
+	  return __p;
+      return false;
+    }
+
+  // Insert v in bucket n (assumes no element with its key already present).
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::iterator
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_insert_bucket(const value_type& __v, size_type __n,
+		     typename _Hashtable::_Hash_code_type __code)
+    {
+      std::pair<bool, std::size_t> __do_rehash
+	= _M_rehash_policy._M_need_rehash(_M_bucket_count,
+					  _M_element_count, 1);
+
+      // Allocate the new node before doing the rehash so that we don't
+      // do a rehash if the allocation throws.
+      _Node* __new_node = _M_allocate_node(__v);
+
+      __try
+	{
+	  if (__do_rehash.first)
+	    {
+	      const key_type& __k = this->_M_extract(__v);
+	      __n = this->_M_bucket_index(__k, __code, __do_rehash.second);
+	      _M_rehash(__do_rehash.second);
+	    }
+
+	  __new_node->_M_next = _M_buckets[__n];
+	  this->_M_store_code(__new_node, __code);
+	  _M_buckets[__n] = __new_node;
+	  ++_M_element_count;
+	  return iterator(__new_node, _M_buckets + __n);
+	}
+      __catch(...)
+	{
+	  _M_deallocate_node(__new_node);
+	  __throw_exception_again;
+	}
+    }
+
+  // Insert v if no element with its key is already present.
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    std::pair<typename _Hashtable<_Key, _Value, _Allocator,
+				  _ExtractKey, _Equal, _H1,
+				  _H2, _Hash, _RehashPolicy,
+				  __chc, __cit, __uk>::iterator, bool>
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_insert(const value_type& __v, std::true_type)
+    {
+      const key_type& __k = this->_M_extract(__v);
+      typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+      size_type __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+
+      if (_Node* __p = _M_find_node(_M_buckets[__n], __k, __code))
+	return std::make_pair(iterator(__p, _M_buckets + __n), false);
+      return std::make_pair(_M_insert_bucket(__v, __n, __code), true);
+    }
+
+  // Insert v unconditionally.
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::iterator
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_insert(const value_type& __v, std::false_type)
+    {
+      std::pair<bool, std::size_t> __do_rehash
+	= _M_rehash_policy._M_need_rehash(_M_bucket_count,
+					  _M_element_count, 1);
+      if (__do_rehash.first)
+	_M_rehash(__do_rehash.second);
+ 
+      const key_type& __k = this->_M_extract(__v);
+      typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+      size_type __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+
+      // First find the node, avoid leaking new_node if compare throws.
+      _Node* __prev = _M_find_node(_M_buckets[__n], __k, __code);
+      _Node* __new_node = _M_allocate_node(__v);
+
+      if (__prev)
+	{
+	  __new_node->_M_next = __prev->_M_next;
+	  __prev->_M_next = __new_node;
+	}
+      else
+	{
+	  __new_node->_M_next = _M_buckets[__n];
+	  _M_buckets[__n] = __new_node;
+	}
+      this->_M_store_code(__new_node, __code);
+
+      ++_M_element_count;
+      return iterator(__new_node, _M_buckets + __n);
+    }
+
+  // For erase(iterator) and erase(const_iterator).
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_erase_node(_Node* __p, _Node** __b)
+    {
+      _Node* __cur = *__b;
+      if (__cur == __p)
+	*__b = __cur->_M_next;
+      else
+	{
+	  _Node* __next = __cur->_M_next;
+	  while (__next != __p)
+	    {
+	      __cur = __next;
+	      __next = __cur->_M_next;
+	    }
+	  __cur->_M_next = __next->_M_next;
+	}
+
+      _M_deallocate_node(__p);
+      --_M_element_count;
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    template<typename _InputIterator>
+      void 
+      _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+		 _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+      insert(_InputIterator __first, _InputIterator __last)
+      {
+	size_type __n_elt = __detail::__distance_fw(__first, __last);
+	std::pair<bool, std::size_t> __do_rehash
+	  = _M_rehash_policy._M_need_rehash(_M_bucket_count,
+					    _M_element_count, __n_elt);
+	if (__do_rehash.first)
+	  _M_rehash(__do_rehash.second);
+
+	for (; __first != __last; ++__first)
+	  this->insert(*__first);
+      }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::iterator
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    erase(const_iterator __it)
+    {
+      iterator __result(__it._M_cur_node, __it._M_cur_bucket);
+      ++__result;
+      _M_erase_node(__it._M_cur_node, __it._M_cur_bucket);
+      return __result;
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::size_type
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    erase(const key_type& __k)
+    {
+      typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+      std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+      size_type __result = 0;
+      
+      _Node** __slot = _M_buckets + __n;
+      while (*__slot && !this->_M_compare(__k, __code, *__slot))
+	__slot = &((*__slot)->_M_next);
+
+      _Node** __saved_slot = 0;
+      while (*__slot && this->_M_compare(__k, __code, *__slot))
+	{
+	  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	  // 526. Is it undefined if a function in the standard changes
+	  // in parameters?
+	  if (&this->_M_extract((*__slot)->_M_v) != &__k)
+	    {
+              _Node* __p = *__slot;
+              *__slot = __p->_M_next;
+	      _M_deallocate_node(__p);
+	      --_M_element_count;
+	      ++__result;
+	    }
+	  else
+	    {
+	      __saved_slot = __slot;
+	      __slot = &((*__slot)->_M_next);
+	    }
+	}
+
+      if (__saved_slot)
+	{
+	  _Node* __p = *__saved_slot;
+	  *__saved_slot = __p->_M_next;
+	  _M_deallocate_node(__p);
+	  --_M_element_count;
+	  ++__result;
+	}
+
+      return __result;
+    }
+
+  // ??? This could be optimized by taking advantage of the bucket
+  // structure, but it's not clear that it's worth doing.  It probably
+  // wouldn't even be an optimization unless the load factor is large.
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+			_H1, _H2, _Hash, _RehashPolicy,
+			__chc, __cit, __uk>::iterator
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    erase(const_iterator __first, const_iterator __last)
+    {
+      while (__first != __last)
+	__first = this->erase(__first);
+      return iterator(__last._M_cur_node, __last._M_cur_bucket);
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    clear()
+    {
+      _M_deallocate_nodes(_M_buckets, _M_bucket_count);
+      _M_element_count = 0;
+    }
+ 
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    rehash(size_type __n)
+    {
+      _M_rehash(std::max(_M_rehash_policy._M_next_bkt(__n),
+			 _M_rehash_policy._M_bkt_for_elements(_M_element_count
+							      + 1)));
+    }
+
+  template<typename _Key, typename _Value, 
+	   typename _Allocator, typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+	   bool __chc, bool __cit, bool __uk>
+    void
+    _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+	       _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+    _M_rehash(size_type __n)
+    {
+      _Node** __new_array = _M_allocate_buckets(__n);
+      __try
+	{
+	  for (size_type __i = 0; __i < _M_bucket_count; ++__i)
+	    while (_Node* __p = _M_buckets[__i])
+	      {
+		std::size_t __new_index = this->_M_bucket_index(__p, __n);
+		_M_buckets[__i] = __p->_M_next;
+		__p->_M_next = __new_array[__new_index];
+		__new_array[__new_index] = __p;
+	      }
+	  _M_deallocate_buckets(_M_buckets, _M_bucket_count);
+	  _M_bucket_count = __n;
+	  _M_buckets = __new_array;
+	}
+      __catch(...)
+	{
+	  // A failure here means that a hash function threw an exception.
+	  // We can't restore the previous state without calling the hash
+	  // function again, so the only sensible recovery is to delete
+	  // everything.
+	  _M_deallocate_nodes(__new_array, __n);
+	  _M_deallocate_buckets(__new_array, __n);
+	  _M_deallocate_nodes(_M_buckets, _M_bucket_count);
+	  _M_element_count = 0;
+	  __throw_exception_again;
+	}
+    }
+}
+
+#endif // _HASHTABLE_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/hashtable_policy.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/hashtable_policy.h
new file mode 100644
index 0000000..6e6a8fb
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/hashtable_policy.h
@@ -0,0 +1,959 @@
+// Internal policy header for unordered_set and unordered_map -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/hashtable_policy.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _HASHTABLE_POLICY_H
+#define _HASHTABLE_POLICY_H 1
+
+namespace std
+{
+namespace __detail
+{
+  // Helper function: return distance(first, last) for forward
+  // iterators, or 0 for input iterators.
+  template<class _Iterator>
+    inline typename std::iterator_traits<_Iterator>::difference_type
+    __distance_fw(_Iterator __first, _Iterator __last,
+		  std::input_iterator_tag)
+    { return 0; }
+
+  template<class _Iterator>
+    inline typename std::iterator_traits<_Iterator>::difference_type
+    __distance_fw(_Iterator __first, _Iterator __last,
+		  std::forward_iterator_tag)
+    { return std::distance(__first, __last); }
+
+  template<class _Iterator>
+    inline typename std::iterator_traits<_Iterator>::difference_type
+    __distance_fw(_Iterator __first, _Iterator __last)
+    {
+      typedef typename std::iterator_traits<_Iterator>::iterator_category _Tag;
+      return __distance_fw(__first, __last, _Tag());
+    }
+
+  // Auxiliary types used for all instantiations of _Hashtable: nodes
+  // and iterators.
+  
+  // Nodes, used to wrap elements stored in the hash table.  A policy
+  // template parameter of class template _Hashtable controls whether
+  // nodes also store a hash code. In some cases (e.g. strings) this
+  // may be a performance win.
+  template<typename _Value, bool __cache_hash_code>
+    struct _Hash_node;
+
+  template<typename _Value>
+    struct _Hash_node<_Value, true>
+    {
+      _Value       _M_v;
+      std::size_t  _M_hash_code;
+      _Hash_node*  _M_next;
+
+      template<typename... _Args>
+        _Hash_node(_Args&&... __args)
+	: _M_v(std::forward<_Args>(__args)...),
+	  _M_hash_code(), _M_next() { }
+    };
+
+  template<typename _Value>
+    struct _Hash_node<_Value, false>
+    {
+      _Value       _M_v;
+      _Hash_node*  _M_next;
+
+      template<typename... _Args>
+        _Hash_node(_Args&&... __args)
+	: _M_v(std::forward<_Args>(__args)...),
+	  _M_next() { }
+    };
+
+  // Local iterators, used to iterate within a bucket but not between
+  // buckets.
+  template<typename _Value, bool __cache>
+    struct _Node_iterator_base
+    {
+      _Node_iterator_base(_Hash_node<_Value, __cache>* __p)
+      : _M_cur(__p) { }
+      
+      void
+      _M_incr()
+      { _M_cur = _M_cur->_M_next; }
+
+      _Hash_node<_Value, __cache>*  _M_cur;
+    };
+
+  template<typename _Value, bool __cache>
+    inline bool
+    operator==(const _Node_iterator_base<_Value, __cache>& __x,
+	       const _Node_iterator_base<_Value, __cache>& __y)
+    { return __x._M_cur == __y._M_cur; }
+
+  template<typename _Value, bool __cache>
+    inline bool
+    operator!=(const _Node_iterator_base<_Value, __cache>& __x,
+	       const _Node_iterator_base<_Value, __cache>& __y)
+    { return __x._M_cur != __y._M_cur; }
+
+  template<typename _Value, bool __constant_iterators, bool __cache>
+    struct _Node_iterator
+    : public _Node_iterator_base<_Value, __cache>
+    {
+      typedef _Value                                   value_type;
+      typedef typename std::conditional<__constant_iterators,
+					const _Value*, _Value*>::type
+                                                       pointer;
+      typedef typename std::conditional<__constant_iterators,
+					const _Value&, _Value&>::type
+                                                       reference;
+      typedef std::ptrdiff_t                           difference_type;
+      typedef std::forward_iterator_tag                iterator_category;
+
+      _Node_iterator()
+      : _Node_iterator_base<_Value, __cache>(0) { }
+
+      explicit
+      _Node_iterator(_Hash_node<_Value, __cache>* __p)
+      : _Node_iterator_base<_Value, __cache>(__p) { }
+
+      reference
+      operator*() const
+      { return this->_M_cur->_M_v; }
+  
+      pointer
+      operator->() const
+      { return &this->_M_cur->_M_v; }
+
+      _Node_iterator&
+      operator++()
+      { 
+	this->_M_incr();
+	return *this; 
+      }
+  
+      _Node_iterator
+      operator++(int)
+      { 
+	_Node_iterator __tmp(*this);
+	this->_M_incr();
+	return __tmp;
+      }
+    };
+
+  template<typename _Value, bool __constant_iterators, bool __cache>
+    struct _Node_const_iterator
+    : public _Node_iterator_base<_Value, __cache>
+    {
+      typedef _Value                                   value_type;
+      typedef const _Value*                            pointer;
+      typedef const _Value&                            reference;
+      typedef std::ptrdiff_t                           difference_type;
+      typedef std::forward_iterator_tag                iterator_category;
+
+      _Node_const_iterator()
+      : _Node_iterator_base<_Value, __cache>(0) { }
+
+      explicit
+      _Node_const_iterator(_Hash_node<_Value, __cache>* __p)
+      : _Node_iterator_base<_Value, __cache>(__p) { }
+
+      _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators,
+			   __cache>& __x)
+      : _Node_iterator_base<_Value, __cache>(__x._M_cur) { }
+
+      reference
+      operator*() const
+      { return this->_M_cur->_M_v; }
+  
+      pointer
+      operator->() const
+      { return &this->_M_cur->_M_v; }
+
+      _Node_const_iterator&
+      operator++()
+      { 
+	this->_M_incr();
+	return *this; 
+      }
+  
+      _Node_const_iterator
+      operator++(int)
+      { 
+	_Node_const_iterator __tmp(*this);
+	this->_M_incr();
+	return __tmp;
+      }
+    };
+
+  template<typename _Value, bool __cache>
+    struct _Hashtable_iterator_base
+    {
+      _Hashtable_iterator_base(_Hash_node<_Value, __cache>* __node,
+			       _Hash_node<_Value, __cache>** __bucket)
+      : _M_cur_node(__node), _M_cur_bucket(__bucket) { }
+
+      void
+      _M_incr()
+      {
+	_M_cur_node = _M_cur_node->_M_next;
+	if (!_M_cur_node)
+	  _M_incr_bucket();
+      }
+
+      void
+      _M_incr_bucket();
+
+      _Hash_node<_Value, __cache>*   _M_cur_node;
+      _Hash_node<_Value, __cache>**  _M_cur_bucket;
+    };
+
+  // Global iterators, used for arbitrary iteration within a hash
+  // table.  Larger and more expensive than local iterators.
+  template<typename _Value, bool __cache>
+    void
+    _Hashtable_iterator_base<_Value, __cache>::
+    _M_incr_bucket()
+    {
+      ++_M_cur_bucket;
+
+      // This loop requires the bucket array to have a non-null sentinel.
+      while (!*_M_cur_bucket)
+	++_M_cur_bucket;
+      _M_cur_node = *_M_cur_bucket;
+    }
+
+  template<typename _Value, bool __cache>
+    inline bool
+    operator==(const _Hashtable_iterator_base<_Value, __cache>& __x,
+	       const _Hashtable_iterator_base<_Value, __cache>& __y)
+    { return __x._M_cur_node == __y._M_cur_node; }
+
+  template<typename _Value, bool __cache>
+    inline bool
+    operator!=(const _Hashtable_iterator_base<_Value, __cache>& __x,
+	       const _Hashtable_iterator_base<_Value, __cache>& __y)
+    { return __x._M_cur_node != __y._M_cur_node; }
+
+  template<typename _Value, bool __constant_iterators, bool __cache>
+    struct _Hashtable_iterator
+    : public _Hashtable_iterator_base<_Value, __cache>
+    {
+      typedef _Value                                   value_type;
+      typedef typename std::conditional<__constant_iterators,
+					const _Value*, _Value*>::type
+                                                       pointer;
+      typedef typename std::conditional<__constant_iterators,
+					const _Value&, _Value&>::type
+                                                       reference;
+      typedef std::ptrdiff_t                           difference_type;
+      typedef std::forward_iterator_tag                iterator_category;
+
+      _Hashtable_iterator()
+      : _Hashtable_iterator_base<_Value, __cache>(0, 0) { }
+
+      _Hashtable_iterator(_Hash_node<_Value, __cache>* __p,
+			  _Hash_node<_Value, __cache>** __b)
+      : _Hashtable_iterator_base<_Value, __cache>(__p, __b) { }
+
+      explicit
+      _Hashtable_iterator(_Hash_node<_Value, __cache>** __b)
+      : _Hashtable_iterator_base<_Value, __cache>(*__b, __b) { }
+
+      reference
+      operator*() const
+      { return this->_M_cur_node->_M_v; }
+  
+      pointer
+      operator->() const
+      { return &this->_M_cur_node->_M_v; }
+
+      _Hashtable_iterator&
+      operator++()
+      { 
+	this->_M_incr();
+	return *this;
+      }
+  
+      _Hashtable_iterator
+      operator++(int)
+      { 
+	_Hashtable_iterator __tmp(*this);
+	this->_M_incr();
+	return __tmp;
+      }
+    };
+
+  template<typename _Value, bool __constant_iterators, bool __cache>
+    struct _Hashtable_const_iterator
+    : public _Hashtable_iterator_base<_Value, __cache>
+    {
+      typedef _Value                                   value_type;
+      typedef const _Value*                            pointer;
+      typedef const _Value&                            reference;
+      typedef std::ptrdiff_t                           difference_type;
+      typedef std::forward_iterator_tag                iterator_category;
+
+      _Hashtable_const_iterator()
+      : _Hashtable_iterator_base<_Value, __cache>(0, 0) { }
+
+      _Hashtable_const_iterator(_Hash_node<_Value, __cache>* __p,
+				_Hash_node<_Value, __cache>** __b)
+      : _Hashtable_iterator_base<_Value, __cache>(__p, __b) { }
+
+      explicit
+      _Hashtable_const_iterator(_Hash_node<_Value, __cache>** __b)
+      : _Hashtable_iterator_base<_Value, __cache>(*__b, __b) { }
+
+      _Hashtable_const_iterator(const _Hashtable_iterator<_Value,
+				__constant_iterators, __cache>& __x)
+      : _Hashtable_iterator_base<_Value, __cache>(__x._M_cur_node,
+						  __x._M_cur_bucket) { }
+
+      reference
+      operator*() const
+      { return this->_M_cur_node->_M_v; }
+  
+      pointer
+      operator->() const
+      { return &this->_M_cur_node->_M_v; }
+
+      _Hashtable_const_iterator&
+      operator++()
+      { 
+	this->_M_incr();
+	return *this;
+      }
+  
+      _Hashtable_const_iterator
+      operator++(int)
+      { 
+	_Hashtable_const_iterator __tmp(*this);
+	this->_M_incr();
+	return __tmp;
+      }
+    };
+
+
+  // Many of class template _Hashtable's template parameters are policy
+  // classes.  These are defaults for the policies.
+
+  // Default range hashing function: use division to fold a large number
+  // into the range [0, N).
+  struct _Mod_range_hashing
+  {
+    typedef std::size_t first_argument_type;
+    typedef std::size_t second_argument_type;
+    typedef std::size_t result_type;
+
+    result_type
+    operator()(first_argument_type __num, second_argument_type __den) const
+    { return __num % __den; }
+  };
+
+  // Default ranged hash function H.  In principle it should be a
+  // function object composed from objects of type H1 and H2 such that
+  // h(k, N) = h2(h1(k), N), but that would mean making extra copies of
+  // h1 and h2.  So instead we'll just use a tag to tell class template
+  // hashtable to do that composition.
+  struct _Default_ranged_hash { };
+
+  // Default value for rehash policy.  Bucket size is (usually) the
+  // smallest prime that keeps the load factor small enough.
+  struct _Prime_rehash_policy
+  {
+    _Prime_rehash_policy(float __z = 1.0)
+    : _M_max_load_factor(__z), _M_growth_factor(2.f), _M_next_resize(0) { }
+
+    float
+    max_load_factor() const
+    { return _M_max_load_factor; }      
+
+    // Return a bucket size no smaller than n.
+    std::size_t
+    _M_next_bkt(std::size_t __n) const;
+    
+    // Return a bucket count appropriate for n elements
+    std::size_t
+    _M_bkt_for_elements(std::size_t __n) const;
+    
+    // __n_bkt is current bucket count, __n_elt is current element count,
+    // and __n_ins is number of elements to be inserted.  Do we need to
+    // increase bucket count?  If so, return make_pair(true, n), where n
+    // is the new bucket count.  If not, return make_pair(false, 0).
+    std::pair<bool, std::size_t>
+    _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt,
+		   std::size_t __n_ins) const;
+
+    enum { _S_n_primes = sizeof(unsigned long) != 8 ? 256 : 256 + 48 };
+
+    float                _M_max_load_factor;
+    float                _M_growth_factor;
+    mutable std::size_t  _M_next_resize;
+  };
+
+  extern const unsigned long __prime_list[];
+
+  // XXX This is a hack.  There's no good reason for any of
+  // _Prime_rehash_policy's member functions to be inline.  
+
+  // Return a prime no smaller than n.
+  inline std::size_t
+  _Prime_rehash_policy::
+  _M_next_bkt(std::size_t __n) const
+  {
+    const unsigned long* __p = std::lower_bound(__prime_list, __prime_list
+						+ _S_n_primes, __n);
+    _M_next_resize = 
+      static_cast<std::size_t>(__builtin_ceil(*__p * _M_max_load_factor));
+    return *__p;
+  }
+
+  // Return the smallest prime p such that alpha p >= n, where alpha
+  // is the load factor.
+  inline std::size_t
+  _Prime_rehash_policy::
+  _M_bkt_for_elements(std::size_t __n) const
+  {
+    const float __min_bkts = __n / _M_max_load_factor;
+    const unsigned long* __p = std::lower_bound(__prime_list, __prime_list
+						+ _S_n_primes, __min_bkts);
+    _M_next_resize =
+      static_cast<std::size_t>(__builtin_ceil(*__p * _M_max_load_factor));
+    return *__p;
+  }
+
+  // Finds the smallest prime p such that alpha p > __n_elt + __n_ins.
+  // If p > __n_bkt, return make_pair(true, p); otherwise return
+  // make_pair(false, 0).  In principle this isn't very different from 
+  // _M_bkt_for_elements.
+
+  // The only tricky part is that we're caching the element count at
+  // which we need to rehash, so we don't have to do a floating-point
+  // multiply for every insertion.
+
+  inline std::pair<bool, std::size_t>
+  _Prime_rehash_policy::
+  _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt,
+		 std::size_t __n_ins) const
+  {
+    if (__n_elt + __n_ins > _M_next_resize)
+      {
+	float __min_bkts = ((float(__n_ins) + float(__n_elt))
+			    / _M_max_load_factor);
+	if (__min_bkts > __n_bkt)
+	  {
+	    __min_bkts = std::max(__min_bkts, _M_growth_factor * __n_bkt);
+	    const unsigned long* __p =
+	      std::lower_bound(__prime_list, __prime_list + _S_n_primes,
+			       __min_bkts);
+	    _M_next_resize = static_cast<std::size_t>
+	      (__builtin_ceil(*__p * _M_max_load_factor));
+	    return std::make_pair(true, *__p);
+	  }
+	else 
+	  {
+	    _M_next_resize = static_cast<std::size_t>
+	      (__builtin_ceil(__n_bkt * _M_max_load_factor));
+	    return std::make_pair(false, 0);
+	  }
+      }
+    else
+      return std::make_pair(false, 0);
+  }
+
+  // Base classes for std::_Hashtable.  We define these base classes
+  // because in some cases we want to do different things depending
+  // on the value of a policy class.  In some cases the policy class
+  // affects which member functions and nested typedefs are defined;
+  // we handle that by specializing base class templates.  Several of
+  // the base class templates need to access other members of class
+  // template _Hashtable, so we use the "curiously recurring template
+  // pattern" for them.
+
+  // class template _Map_base.  If the hashtable has a value type of
+  // the form pair<T1, T2> and a key extraction policy that returns the
+  // first part of the pair, the hashtable gets a mapped_type typedef.
+  // If it satisfies those criteria and also has unique keys, then it
+  // also gets an operator[].  
+  template<typename _Key, typename _Value, typename _Ex, bool __unique,
+	   typename _Hashtable>
+    struct _Map_base { };
+
+  template<typename _Key, typename _Pair, typename _Hashtable>
+    struct _Map_base<_Key, _Pair, std::_Select1st<_Pair>, false, _Hashtable>
+    {
+      typedef typename _Pair::second_type mapped_type;
+    };
+
+  template<typename _Key, typename _Pair, typename _Hashtable>
+    struct _Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>
+    {
+      typedef typename _Pair::second_type mapped_type;
+
+      mapped_type&
+      operator[](const _Key& __k);
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 761. unordered_map needs an at() member function.
+      mapped_type&
+      at(const _Key& __k);
+
+      const mapped_type&
+      at(const _Key& __k) const;
+    };
+
+  template<typename _Key, typename _Pair, typename _Hashtable>
+    typename _Map_base<_Key, _Pair, std::_Select1st<_Pair>,
+		       true, _Hashtable>::mapped_type&
+    _Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::
+    operator[](const _Key& __k)
+    {
+      _Hashtable* __h = static_cast<_Hashtable*>(this);
+      typename _Hashtable::_Hash_code_type __code = __h->_M_hash_code(__k);
+      std::size_t __n = __h->_M_bucket_index(__k, __code,
+					     __h->_M_bucket_count);
+
+      typename _Hashtable::_Node* __p =
+	__h->_M_find_node(__h->_M_buckets[__n], __k, __code);
+      if (!__p)
+	return __h->_M_insert_bucket(std::make_pair(__k, mapped_type()),
+				     __n, __code)->second;
+      return (__p->_M_v).second;
+    }
+
+  template<typename _Key, typename _Pair, typename _Hashtable>
+    typename _Map_base<_Key, _Pair, std::_Select1st<_Pair>,
+		       true, _Hashtable>::mapped_type&
+    _Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::
+    at(const _Key& __k)
+    {
+      _Hashtable* __h = static_cast<_Hashtable*>(this);
+      typename _Hashtable::_Hash_code_type __code = __h->_M_hash_code(__k);
+      std::size_t __n = __h->_M_bucket_index(__k, __code,
+					     __h->_M_bucket_count);
+
+      typename _Hashtable::_Node* __p =
+	__h->_M_find_node(__h->_M_buckets[__n], __k, __code);
+      if (!__p)
+	__throw_out_of_range(__N("_Map_base::at"));
+      return (__p->_M_v).second;
+    }
+
+  template<typename _Key, typename _Pair, typename _Hashtable>
+    const typename _Map_base<_Key, _Pair, std::_Select1st<_Pair>,
+			     true, _Hashtable>::mapped_type&
+    _Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::
+    at(const _Key& __k) const
+    {
+      const _Hashtable* __h = static_cast<const _Hashtable*>(this);
+      typename _Hashtable::_Hash_code_type __code = __h->_M_hash_code(__k);
+      std::size_t __n = __h->_M_bucket_index(__k, __code,
+					     __h->_M_bucket_count);
+
+      typename _Hashtable::_Node* __p =
+	__h->_M_find_node(__h->_M_buckets[__n], __k, __code);
+      if (!__p)
+	__throw_out_of_range(__N("_Map_base::at"));
+      return (__p->_M_v).second;
+    }
+
+  // class template _Rehash_base.  Give hashtable the max_load_factor
+  // functions and reserve iff the rehash policy is _Prime_rehash_policy.
+  template<typename _RehashPolicy, typename _Hashtable>
+    struct _Rehash_base { };
+
+  template<typename _Hashtable>
+    struct _Rehash_base<_Prime_rehash_policy, _Hashtable>
+    {
+      float
+      max_load_factor() const
+      {
+	const _Hashtable* __this = static_cast<const _Hashtable*>(this);
+	return __this->__rehash_policy().max_load_factor();
+      }
+
+      void
+      max_load_factor(float __z)
+      {
+	_Hashtable* __this = static_cast<_Hashtable*>(this);
+	__this->__rehash_policy(_Prime_rehash_policy(__z));
+      }
+
+      void
+      reserve(std::size_t __n)
+      {
+	_Hashtable* __this = static_cast<_Hashtable*>(this);
+	__this->rehash(__builtin_ceil(__n / max_load_factor()));
+      }
+    };
+
+  // Class template _Hash_code_base.  Encapsulates two policy issues that
+  // aren't quite orthogonal.
+  //   (1) the difference between using a ranged hash function and using
+  //       the combination of a hash function and a range-hashing function.
+  //       In the former case we don't have such things as hash codes, so
+  //       we have a dummy type as placeholder.
+  //   (2) Whether or not we cache hash codes.  Caching hash codes is
+  //       meaningless if we have a ranged hash function.
+  // We also put the key extraction and equality comparison function 
+  // objects here, for convenience.
+  
+  // Primary template: unused except as a hook for specializations.  
+  template<typename _Key, typename _Value,
+	   typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash,
+	   bool __cache_hash_code>
+    struct _Hash_code_base;
+
+  // Specialization: ranged hash function, no caching hash codes.  H1
+  // and H2 are provided but ignored.  We define a dummy hash code type.
+  template<typename _Key, typename _Value,
+	   typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash>
+    struct _Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2,
+			   _Hash, false>
+    {
+    protected:
+      _Hash_code_base(const _ExtractKey& __ex, const _Equal& __eq,
+		      const _H1&, const _H2&, const _Hash& __h)
+      : _M_extract(__ex), _M_eq(__eq), _M_ranged_hash(__h) { }
+
+      typedef void* _Hash_code_type;
+  
+      _Hash_code_type
+      _M_hash_code(const _Key& __key) const
+      { return 0; }
+  
+      std::size_t
+      _M_bucket_index(const _Key& __k, _Hash_code_type,
+		      std::size_t __n) const
+      { return _M_ranged_hash(__k, __n); }
+
+      std::size_t
+      _M_bucket_index(const _Hash_node<_Value, false>* __p,
+		      std::size_t __n) const
+      { return _M_ranged_hash(_M_extract(__p->_M_v), __n); }
+  
+      bool
+      _M_compare(const _Key& __k, _Hash_code_type,
+		 _Hash_node<_Value, false>* __n) const
+      { return _M_eq(__k, _M_extract(__n->_M_v)); }
+
+      void
+      _M_store_code(_Hash_node<_Value, false>*, _Hash_code_type) const
+      { }
+
+      void
+      _M_copy_code(_Hash_node<_Value, false>*,
+		   const _Hash_node<_Value, false>*) const
+      { }
+      
+      void
+      _M_swap(_Hash_code_base& __x)
+      {
+	std::swap(_M_extract, __x._M_extract);
+	std::swap(_M_eq, __x._M_eq);
+	std::swap(_M_ranged_hash, __x._M_ranged_hash);
+      }
+
+    protected:
+      _ExtractKey  _M_extract;
+      _Equal       _M_eq;
+      _Hash        _M_ranged_hash;
+    };
+
+
+  // No specialization for ranged hash function while caching hash codes.
+  // That combination is meaningless, and trying to do it is an error.
+  
+  
+  // Specialization: ranged hash function, cache hash codes.  This
+  // combination is meaningless, so we provide only a declaration
+  // and no definition.  
+  template<typename _Key, typename _Value,
+	   typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2, typename _Hash>
+    struct _Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2,
+			   _Hash, true>;
+
+  // Specialization: hash function and range-hashing function, no
+  // caching of hash codes.  H is provided but ignored.  Provides
+  // typedef and accessor required by TR1.  
+  template<typename _Key, typename _Value,
+	   typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2>
+    struct _Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2,
+			   _Default_ranged_hash, false>
+    {
+      typedef _H1 hasher;
+
+      hasher
+      hash_function() const
+      { return _M_h1; }
+
+    protected:
+      _Hash_code_base(const _ExtractKey& __ex, const _Equal& __eq,
+		      const _H1& __h1, const _H2& __h2,
+		      const _Default_ranged_hash&)
+      : _M_extract(__ex), _M_eq(__eq), _M_h1(__h1), _M_h2(__h2) { }
+
+      typedef std::size_t _Hash_code_type;
+
+      _Hash_code_type
+      _M_hash_code(const _Key& __k) const
+      { return _M_h1(__k); }
+      
+      std::size_t
+      _M_bucket_index(const _Key&, _Hash_code_type __c,
+		      std::size_t __n) const
+      { return _M_h2(__c, __n); }
+
+      std::size_t
+      _M_bucket_index(const _Hash_node<_Value, false>* __p,
+		      std::size_t __n) const
+      { return _M_h2(_M_h1(_M_extract(__p->_M_v)), __n); }
+
+      bool
+      _M_compare(const _Key& __k, _Hash_code_type,
+		 _Hash_node<_Value, false>* __n) const
+      { return _M_eq(__k, _M_extract(__n->_M_v)); }
+
+      void
+      _M_store_code(_Hash_node<_Value, false>*, _Hash_code_type) const
+      { }
+
+      void
+      _M_copy_code(_Hash_node<_Value, false>*,
+		   const _Hash_node<_Value, false>*) const
+      { }
+
+      void
+      _M_swap(_Hash_code_base& __x)
+      {
+	std::swap(_M_extract, __x._M_extract);
+	std::swap(_M_eq, __x._M_eq);
+	std::swap(_M_h1, __x._M_h1);
+	std::swap(_M_h2, __x._M_h2);
+      }
+
+    protected:
+      _ExtractKey  _M_extract;
+      _Equal       _M_eq;
+      _H1          _M_h1;
+      _H2          _M_h2;
+    };
+
+  // Specialization: hash function and range-hashing function, 
+  // caching hash codes.  H is provided but ignored.  Provides
+  // typedef and accessor required by TR1.
+  template<typename _Key, typename _Value,
+	   typename _ExtractKey, typename _Equal,
+	   typename _H1, typename _H2>
+    struct _Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2,
+			   _Default_ranged_hash, true>
+    {
+      typedef _H1 hasher;
+      
+      hasher
+      hash_function() const
+      { return _M_h1; }
+
+    protected:
+      _Hash_code_base(const _ExtractKey& __ex, const _Equal& __eq,
+		      const _H1& __h1, const _H2& __h2,
+		      const _Default_ranged_hash&)
+      : _M_extract(__ex), _M_eq(__eq), _M_h1(__h1), _M_h2(__h2) { }
+
+      typedef std::size_t _Hash_code_type;
+  
+      _Hash_code_type
+      _M_hash_code(const _Key& __k) const
+      { return _M_h1(__k); }
+  
+      std::size_t
+      _M_bucket_index(const _Key&, _Hash_code_type __c,
+		      std::size_t __n) const
+      { return _M_h2(__c, __n); }
+
+      std::size_t
+      _M_bucket_index(const _Hash_node<_Value, true>* __p,
+		      std::size_t __n) const
+      { return _M_h2(__p->_M_hash_code, __n); }
+
+      bool
+      _M_compare(const _Key& __k, _Hash_code_type __c,
+		 _Hash_node<_Value, true>* __n) const
+      { return __c == __n->_M_hash_code && _M_eq(__k, _M_extract(__n->_M_v)); }
+
+      void
+      _M_store_code(_Hash_node<_Value, true>* __n, _Hash_code_type __c) const
+      { __n->_M_hash_code = __c; }
+
+      void
+      _M_copy_code(_Hash_node<_Value, true>* __to,
+		   const _Hash_node<_Value, true>* __from) const
+      { __to->_M_hash_code = __from->_M_hash_code; }
+
+      void
+      _M_swap(_Hash_code_base& __x)
+      {
+	std::swap(_M_extract, __x._M_extract);
+	std::swap(_M_eq, __x._M_eq);
+	std::swap(_M_h1, __x._M_h1);
+	std::swap(_M_h2, __x._M_h2);
+      }
+      
+    protected:
+      _ExtractKey  _M_extract;
+      _Equal       _M_eq;
+      _H1          _M_h1;
+      _H2          _M_h2;
+    };
+
+
+  // Class template _Equality_base.  This is for implementing equality
+  // comparison for unordered containers, per N3068, by John Lakos and
+  // Pablo Halpern.  Algorithmically, we follow closely the reference
+  // implementations therein.
+  template<typename _ExtractKey, bool __unique_keys,
+	   typename _Hashtable>
+    struct _Equality_base;
+
+  template<typename _ExtractKey, typename _Hashtable>
+    struct _Equality_base<_ExtractKey, true, _Hashtable>
+    {
+      bool _M_equal(const _Hashtable&) const;
+    };
+
+  template<typename _ExtractKey, typename _Hashtable>
+    bool
+    _Equality_base<_ExtractKey, true, _Hashtable>::
+    _M_equal(const _Hashtable& __other) const
+    {
+      const _Hashtable* __this = static_cast<const _Hashtable*>(this);
+
+      if (__this->size() != __other.size())
+	return false;
+
+      for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx)
+	{
+	  const auto __ity = __other.find(_ExtractKey()(*__itx));
+	  if (__ity == __other.end() || *__ity != *__itx)
+	    return false;
+	}
+      return true;
+    }
+
+  template<typename _ExtractKey, typename _Hashtable>
+    struct _Equality_base<_ExtractKey, false, _Hashtable>
+    {
+      bool _M_equal(const _Hashtable&) const;
+
+    private:
+      template<typename _Uiterator>
+        static bool
+        _S_is_permutation(_Uiterator, _Uiterator, _Uiterator);
+    };
+
+  // See std::is_permutation in N3068.
+  template<typename _ExtractKey, typename _Hashtable>
+    template<typename _Uiterator>
+      bool
+      _Equality_base<_ExtractKey, false, _Hashtable>::
+      _S_is_permutation(_Uiterator __first1, _Uiterator __last1,
+			_Uiterator __first2)
+      {
+	for (; __first1 != __last1; ++__first1, ++__first2)
+	  if (!(*__first1 == *__first2))
+	    break;
+
+	if (__first1 == __last1)
+	  return true;
+
+	_Uiterator __last2 = __first2;
+	std::advance(__last2, std::distance(__first1, __last1));
+
+	for (_Uiterator __it1 = __first1; __it1 != __last1; ++__it1)
+	  {
+	    _Uiterator __tmp =  __first1;
+	    while (__tmp != __it1 && !(*__tmp == *__it1))
+	      ++__tmp;
+
+	    // We've seen this one before.
+	    if (__tmp != __it1)
+	      continue;
+
+	    std::ptrdiff_t __n2 = 0;
+	    for (__tmp = __first2; __tmp != __last2; ++__tmp)
+	      if (*__tmp == *__it1)
+		++__n2;
+
+	    if (!__n2)
+	      return false;
+
+	    std::ptrdiff_t __n1 = 0;
+	    for (__tmp = __it1; __tmp != __last1; ++__tmp)
+	      if (*__tmp == *__it1)
+		++__n1;
+
+	    if (__n1 != __n2)
+	      return false;
+	  }
+	return true;
+      }
+
+  template<typename _ExtractKey, typename _Hashtable>
+    bool
+    _Equality_base<_ExtractKey, false, _Hashtable>::
+    _M_equal(const _Hashtable& __other) const
+    {
+      const _Hashtable* __this = static_cast<const _Hashtable*>(this);
+
+      if (__this->size() != __other.size())
+	return false;
+
+      for (auto __itx = __this->begin(); __itx != __this->end();)
+	{
+	  const auto __xrange = __this->equal_range(_ExtractKey()(*__itx));
+	  const auto __yrange = __other.equal_range(_ExtractKey()(*__itx));
+
+	  if (std::distance(__xrange.first, __xrange.second)
+	      != std::distance(__yrange.first, __yrange.second))
+	    return false;
+
+	  if (!_S_is_permutation(__xrange.first,
+				 __xrange.second,
+				 __yrange.first))
+	    return false;
+
+	  __itx = __xrange.second;
+	}
+      return true;
+    }
+} // namespace __detail
+}
+
+#endif // _HASHTABLE_POLICY_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/indirect_array.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/indirect_array.h
new file mode 100644
index 0000000..4920394
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/indirect_array.h
@@ -0,0 +1,210 @@
+// The template and inlines for the -*- C++ -*- indirect_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2009
+//  Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file indirect_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _INDIRECT_ARRAY_H
+#define _INDIRECT_ARRAY_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup numeric_arrays
+   * @{
+   */
+
+  /**
+   *  @brief  Reference to arbitrary subset of an array.
+   *
+   *  An indirect_array is a reference to the actual elements of an array
+   *  specified by an ordered array of indices.  The way to get an
+   *  indirect_array is to call operator[](valarray<size_t>) on a valarray.
+   *  The returned indirect_array then permits carrying operations out on the
+   *  referenced subset of elements in the original valarray.
+   *
+   *  For example, if an indirect_array is obtained using the array (4,2,0) as
+   *  an argument, and then assigned to an array containing (1,2,3), then the
+   *  underlying array will have array[0]==3, array[2]==2, and array[4]==1.
+   *
+   *  @param  Tp  Element type.
+   */
+  template <class _Tp>
+    class indirect_array
+    {
+    public:
+      typedef _Tp value_type;
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 253. valarray helper functions are almost entirely useless
+
+      ///  Copy constructor.  Both slices refer to the same underlying array.
+      indirect_array(const indirect_array&);
+
+      ///  Assignment operator.  Assigns elements to corresponding elements
+      ///  of @a a.
+      indirect_array& operator=(const indirect_array&);
+
+      ///  Assign slice elements to corresponding elements of @a v.
+      void operator=(const valarray<_Tp>&) const;
+      ///  Multiply slice elements by corresponding elements of @a v.
+      void operator*=(const valarray<_Tp>&) const;
+      ///  Divide slice elements by corresponding elements of @a v.
+      void operator/=(const valarray<_Tp>&) const;
+      ///  Modulo slice elements by corresponding elements of @a v.
+      void operator%=(const valarray<_Tp>&) const;
+      ///  Add corresponding elements of @a v to slice elements.
+      void operator+=(const valarray<_Tp>&) const;
+      ///  Subtract corresponding elements of @a v from slice elements.
+      void operator-=(const valarray<_Tp>&) const;
+      ///  Logical xor slice elements with corresponding elements of @a v.
+      void operator^=(const valarray<_Tp>&) const;
+      ///  Logical and slice elements with corresponding elements of @a v.
+      void operator&=(const valarray<_Tp>&) const;
+      ///  Logical or slice elements with corresponding elements of @a v.
+      void operator|=(const valarray<_Tp>&) const;
+      ///  Left shift slice elements by corresponding elements of @a v.
+      void operator<<=(const valarray<_Tp>&) const;
+      ///  Right shift slice elements by corresponding elements of @a v.
+      void operator>>=(const valarray<_Tp>&) const;
+      ///  Assign all slice elements to @a t.
+      void operator= (const _Tp&) const;
+      //    ~indirect_array();
+
+      template<class _Dom>
+      void operator=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator*=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator/=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator%=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator+=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator-=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator^=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator&=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator|=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator<<=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+      void operator>>=(const _Expr<_Dom, _Tp>&) const;
+
+    private:
+      ///  Copy constructor.  Both slices refer to the same underlying array.
+      indirect_array(_Array<_Tp>, size_t, _Array<size_t>);
+
+      friend class valarray<_Tp>;
+      friend class gslice_array<_Tp>;
+
+      const size_t	 _M_sz;
+      const _Array<size_t> _M_index;
+      const _Array<_Tp>	 _M_array;
+
+      // not implemented
+      indirect_array();
+    };
+
+  template<typename _Tp>
+    inline
+    indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a)
+    : _M_sz(__a._M_sz), _M_index(__a._M_index), _M_array(__a._M_array) {}
+
+  template<typename _Tp>
+    inline
+    indirect_array<_Tp>::indirect_array(_Array<_Tp> __a, size_t __s,
+					_Array<size_t> __i)
+    : _M_sz(__s), _M_index(__i), _M_array(__a) {}
+
+  template<typename _Tp>
+    inline indirect_array<_Tp>&
+    indirect_array<_Tp>::operator=(const indirect_array<_Tp>& __a)
+    {
+      std::__valarray_copy(__a._M_array, _M_sz, __a._M_index, _M_array,
+			   _M_index);
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline void
+    indirect_array<_Tp>::operator=(const _Tp& __t) const
+    { std::__valarray_fill(_M_array, _M_index, _M_sz, __t); }
+
+  template<typename _Tp>
+    inline void
+    indirect_array<_Tp>::operator=(const valarray<_Tp>& __v) const
+    { std::__valarray_copy(_Array<_Tp>(__v), _M_sz, _M_array, _M_index); }
+
+  template<typename _Tp>
+    template<class _Dom>
+      inline void
+      indirect_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const
+      { std::__valarray_copy(__e, _M_sz, _M_array, _M_index); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name)				\
+  template<typename _Tp>						\
+    inline void								\
+    indirect_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const\
+    {									\
+      _Array_augmented_##_Name(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); \
+    }									\
+									\
+  template<typename _Tp>                                                \
+    template<class _Dom>				                \
+      inline void							\
+      indirect_array<_Tp>::operator _Op##=(const _Expr<_Dom,_Tp>& __e) const\
+      {									\
+	_Array_augmented_##_Name(_M_array, _M_index, __e, _M_sz);	\
+      }
+
+_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(%, __modulus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(-, __minus)
+_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
+_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
+_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
+_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+  // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _INDIRECT_ARRAY_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ios_base.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ios_base.h
new file mode 100644
index 0000000..0ac3d69
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ios_base.h
@@ -0,0 +1,977 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ios_base.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.4  Iostreams base classes
+//
+
+#ifndef _IOS_BASE_H
+#define _IOS_BASE_H 1
+
+#pragma GCC system_header
+
+#include <ext/atomicity.h>
+#include <bits/localefwd.h>
+#include <bits/locale_classes.h>
+
+#ifndef _GLIBCXX_STDIO_MACROS
+# include <cstdio>   // For SEEK_CUR, SEEK_END
+# define _IOS_BASE_SEEK_CUR SEEK_CUR
+# define _IOS_BASE_SEEK_END SEEK_END
+#else
+# define _IOS_BASE_SEEK_CUR 1
+# define _IOS_BASE_SEEK_END 2
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // The following definitions of bitmask types are enums, not ints,
+  // as permitted (but not required) in the standard, in order to provide
+  // better type safety in iostream calls.  A side effect is that
+  // expressions involving them are no longer compile-time constants.
+  enum _Ios_Fmtflags 
+    { 
+      _S_boolalpha 	= 1L << 0,
+      _S_dec 		= 1L << 1,
+      _S_fixed 		= 1L << 2,
+      _S_hex 		= 1L << 3,
+      _S_internal 	= 1L << 4,
+      _S_left 		= 1L << 5,
+      _S_oct 		= 1L << 6,
+      _S_right 		= 1L << 7,
+      _S_scientific 	= 1L << 8,
+      _S_showbase 	= 1L << 9,
+      _S_showpoint 	= 1L << 10,
+      _S_showpos 	= 1L << 11,
+      _S_skipws 	= 1L << 12,
+      _S_unitbuf 	= 1L << 13,
+      _S_uppercase 	= 1L << 14,
+      _S_adjustfield 	= _S_left | _S_right | _S_internal,
+      _S_basefield 	= _S_dec | _S_oct | _S_hex,
+      _S_floatfield 	= _S_scientific | _S_fixed,
+      _S_ios_fmtflags_end = 1L << 16 
+    };
+
+  inline _Ios_Fmtflags
+  operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+  { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); }
+
+  inline _Ios_Fmtflags
+  operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+  { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); }
+
+  inline _Ios_Fmtflags
+  operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+  { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+
+  inline _Ios_Fmtflags&
+  operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+  { return __a = __a | __b; }
+
+  inline _Ios_Fmtflags&
+  operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+  { return __a = __a & __b; }
+
+  inline _Ios_Fmtflags&
+  operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+  { return __a = __a ^ __b; }
+
+  inline _Ios_Fmtflags
+  operator~(_Ios_Fmtflags __a)
+  { return _Ios_Fmtflags(~static_cast<int>(__a)); }
+
+
+  enum _Ios_Openmode 
+    { 
+      _S_app 		= 1L << 0,
+      _S_ate 		= 1L << 1,
+      _S_bin 		= 1L << 2,
+      _S_in 		= 1L << 3,
+      _S_out 		= 1L << 4,
+      _S_trunc 		= 1L << 5,
+      _S_ios_openmode_end = 1L << 16 
+    };
+
+  inline _Ios_Openmode
+  operator&(_Ios_Openmode __a, _Ios_Openmode __b)
+  { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
+
+  inline _Ios_Openmode
+  operator|(_Ios_Openmode __a, _Ios_Openmode __b)
+  { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
+
+  inline _Ios_Openmode
+  operator^(_Ios_Openmode __a, _Ios_Openmode __b)
+  { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+
+  inline _Ios_Openmode&
+  operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
+  { return __a = __a | __b; }
+
+  inline _Ios_Openmode&
+  operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
+  { return __a = __a & __b; }
+
+  inline _Ios_Openmode&
+  operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
+  { return __a = __a ^ __b; }
+
+  inline _Ios_Openmode
+  operator~(_Ios_Openmode __a)
+  { return _Ios_Openmode(~static_cast<int>(__a)); }
+
+
+  enum _Ios_Iostate
+    { 
+      _S_goodbit 		= 0,
+      _S_badbit 		= 1L << 0,
+      _S_eofbit 		= 1L << 1,
+      _S_failbit		= 1L << 2,
+      _S_ios_iostate_end = 1L << 16 
+    };
+
+  inline _Ios_Iostate
+  operator&(_Ios_Iostate __a, _Ios_Iostate __b)
+  { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); }
+
+  inline _Ios_Iostate
+  operator|(_Ios_Iostate __a, _Ios_Iostate __b)
+  { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); }
+
+  inline _Ios_Iostate
+  operator^(_Ios_Iostate __a, _Ios_Iostate __b)
+  { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+
+  inline _Ios_Iostate&
+  operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
+  { return __a = __a | __b; }
+
+  inline _Ios_Iostate&
+  operator&=(_Ios_Iostate& __a, _Ios_Iostate __b)
+  { return __a = __a & __b; }
+
+  inline _Ios_Iostate&
+  operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
+  { return __a = __a ^ __b; }
+
+  inline _Ios_Iostate
+  operator~(_Ios_Iostate __a)
+  { return _Ios_Iostate(~static_cast<int>(__a)); }
+
+  enum _Ios_Seekdir 
+    { 
+      _S_beg = 0,
+      _S_cur = _IOS_BASE_SEEK_CUR,
+      _S_end = _IOS_BASE_SEEK_END,
+      _S_ios_seekdir_end = 1L << 16 
+    };
+
+  // 27.4.2  Class ios_base
+  /**
+   *  @brief  The base of the I/O class hierarchy.
+   *  @ingroup io
+   *
+   *  This class defines everything that can be defined about I/O that does
+   *  not depend on the type of characters being input or output.  Most
+   *  people will only see @c ios_base when they need to specify the full
+   *  name of the various I/O flags (e.g., the openmodes).
+  */
+  class ios_base
+  {
+  public:
+
+    /** 
+     *  @brief These are thrown to indicate problems with io.
+     *  @ingroup exceptions
+     *
+     *  27.4.2.1.1  Class ios_base::failure
+     */
+    class failure : public exception
+    {
+    public:
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 48.  Use of non-existent exception constructor
+      explicit
+      failure(const string& __str) throw();
+
+      // This declaration is not useless:
+      // http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Vague-Linkage.html
+      virtual
+      ~failure() throw();
+
+      virtual const char*
+      what() const throw();
+
+    private:
+      string _M_msg;
+    };
+
+    // 27.4.2.1.2  Type ios_base::fmtflags
+    /**
+     *  @brief This is a bitmask type.
+     *
+     *  @c @a _Ios_Fmtflags is implementation-defined, but it is valid to
+     *  perform bitwise operations on these values and expect the Right
+     *  Thing to happen.  Defined objects of type fmtflags are:
+     *  - boolalpha
+     *  - dec
+     *  - fixed
+     *  - hex
+     *  - internal
+     *  - left
+     *  - oct
+     *  - right
+     *  - scientific
+     *  - showbase
+     *  - showpoint
+     *  - showpos
+     *  - skipws
+     *  - unitbuf
+     *  - uppercase
+     *  - adjustfield
+     *  - basefield
+     *  - floatfield
+    */
+    typedef _Ios_Fmtflags fmtflags;
+
+    /// Insert/extract @c bool in alphabetic rather than numeric format.
+    static const fmtflags boolalpha =   _S_boolalpha;
+
+    /// Converts integer input or generates integer output in decimal base.
+    static const fmtflags dec =         _S_dec;
+
+    /// Generate floating-point output in fixed-point notation.
+    static const fmtflags fixed =       _S_fixed;
+
+    /// Converts integer input or generates integer output in hexadecimal base.
+    static const fmtflags hex =         _S_hex;
+
+    /// Adds fill characters at a designated internal point in certain
+    /// generated output, or identical to @c right if no such point is
+    /// designated.
+    static const fmtflags internal =    _S_internal;
+
+    /// Adds fill characters on the right (final positions) of certain
+    /// generated output.  (I.e., the thing you print is flush left.)
+    static const fmtflags left =        _S_left;
+
+    /// Converts integer input or generates integer output in octal base.
+    static const fmtflags oct =         _S_oct;
+
+    /// Adds fill characters on the left (initial positions) of certain
+    /// generated output.  (I.e., the thing you print is flush right.)
+    static const fmtflags right =       _S_right;
+
+    /// Generates floating-point output in scientific notation.
+    static const fmtflags scientific =  _S_scientific;
+
+    /// Generates a prefix indicating the numeric base of generated integer
+    /// output.
+    static const fmtflags showbase =    _S_showbase;
+
+    /// Generates a decimal-point character unconditionally in generated
+    /// floating-point output.
+    static const fmtflags showpoint =   _S_showpoint;
+
+    /// Generates a + sign in non-negative generated numeric output.
+    static const fmtflags showpos =     _S_showpos;
+
+    /// Skips leading white space before certain input operations.
+    static const fmtflags skipws =      _S_skipws;
+
+    /// Flushes output after each output operation.
+    static const fmtflags unitbuf =     _S_unitbuf;
+
+    /// Replaces certain lowercase letters with their uppercase equivalents
+    /// in generated output.
+    static const fmtflags uppercase =   _S_uppercase;
+
+    /// A mask of left|right|internal.  Useful for the 2-arg form of @c setf.
+    static const fmtflags adjustfield = _S_adjustfield;
+
+    /// A mask of dec|oct|hex.  Useful for the 2-arg form of @c setf.
+    static const fmtflags basefield =   _S_basefield;
+
+    /// A mask of scientific|fixed.  Useful for the 2-arg form of @c setf.
+    static const fmtflags floatfield =  _S_floatfield;
+
+    // 27.4.2.1.3  Type ios_base::iostate
+    /**
+     *  @brief This is a bitmask type.
+     *
+     *  @c @a _Ios_Iostate is implementation-defined, but it is valid to
+     *  perform bitwise operations on these values and expect the Right
+     *  Thing to happen.  Defined objects of type iostate are:
+     *  - badbit
+     *  - eofbit
+     *  - failbit
+     *  - goodbit
+    */
+    typedef _Ios_Iostate iostate;
+
+    /// Indicates a loss of integrity in an input or output sequence (such
+    /// as an irrecoverable read error from a file).
+    static const iostate badbit =	_S_badbit;
+
+    /// Indicates that an input operation reached the end of an input sequence.
+    static const iostate eofbit =	_S_eofbit;
+
+    /// Indicates that an input operation failed to read the expected
+    /// characters, or that an output operation failed to generate the
+    /// desired characters.
+    static const iostate failbit =	_S_failbit;
+
+    /// Indicates all is well.
+    static const iostate goodbit =	_S_goodbit;
+
+    // 27.4.2.1.4  Type ios_base::openmode
+    /**
+     *  @brief This is a bitmask type.
+     *
+     *  @c @a _Ios_Openmode is implementation-defined, but it is valid to
+     *  perform bitwise operations on these values and expect the Right
+     *  Thing to happen.  Defined objects of type openmode are:
+     *  - app
+     *  - ate
+     *  - binary
+     *  - in
+     *  - out
+     *  - trunc
+    */
+    typedef _Ios_Openmode openmode;
+
+    /// Seek to end before each write.
+    static const openmode app =		_S_app;
+
+    /// Open and seek to end immediately after opening.
+    static const openmode ate =		_S_ate;
+
+    /// Perform input and output in binary mode (as opposed to text mode).
+    /// This is probably not what you think it is; see
+    /// http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch27s02.html
+    static const openmode binary =	_S_bin;
+
+    /// Open for input.  Default for @c ifstream and fstream.
+    static const openmode in =		_S_in;
+
+    /// Open for output.  Default for @c ofstream and fstream.
+    static const openmode out =		_S_out;
+
+    /// Open for input.  Default for @c ofstream.
+    static const openmode trunc =	_S_trunc;
+
+    // 27.4.2.1.5  Type ios_base::seekdir
+    /**
+     *  @brief This is an enumerated type.
+     *
+     *  @c @a _Ios_Seekdir is implementation-defined.  Defined values
+     *  of type seekdir are:
+     *  - beg
+     *  - cur, equivalent to @c SEEK_CUR in the C standard library.
+     *  - end, equivalent to @c SEEK_END in the C standard library.
+    */
+    typedef _Ios_Seekdir seekdir;
+
+    /// Request a seek relative to the beginning of the stream.
+    static const seekdir beg =		_S_beg;
+
+    /// Request a seek relative to the current position within the sequence.
+    static const seekdir cur =		_S_cur;
+
+    /// Request a seek relative to the current end of the sequence.
+    static const seekdir end =		_S_end;
+
+    // Annex D.6
+    typedef int io_state;
+    typedef int open_mode;
+    typedef int seek_dir;
+
+    typedef std::streampos streampos;
+    typedef std::streamoff streamoff;
+
+    // Callbacks;
+    /**
+     *  @brief  The set of events that may be passed to an event callback.
+     *
+     *  erase_event is used during ~ios() and copyfmt().  imbue_event is used
+     *  during imbue().  copyfmt_event is used during copyfmt().
+    */
+    enum event
+    {
+      erase_event,
+      imbue_event,
+      copyfmt_event
+    };
+
+    /**
+     *  @brief  The type of an event callback function.
+     *  @param  event  One of the members of the event enum.
+     *  @param  ios_base  Reference to the ios_base object.
+     *  @param  int  The integer provided when the callback was registered.
+     *
+     *  Event callbacks are user defined functions that get called during
+     *  several ios_base and basic_ios functions, specifically imbue(),
+     *  copyfmt(), and ~ios().
+    */
+    typedef void (*event_callback) (event, ios_base&, int);
+
+    /**
+     *  @brief  Add the callback __fn with parameter __index.
+     *  @param  __fn  The function to add.
+     *  @param  __index  The integer to pass to the function when invoked.
+     *
+     *  Registers a function as an event callback with an integer parameter to
+     *  be passed to the function when invoked.  Multiple copies of the
+     *  function are allowed.  If there are multiple callbacks, they are
+     *  invoked in the order they were registered.
+    */
+    void
+    register_callback(event_callback __fn, int __index);
+
+  protected:
+    streamsize		_M_precision;
+    streamsize		_M_width;
+    fmtflags		_M_flags;
+    iostate		_M_exception;
+    iostate		_M_streambuf_state;
+
+    // 27.4.2.6  Members for callbacks
+    // 27.4.2.6  ios_base callbacks
+    struct _Callback_list
+    {
+      // Data Members
+      _Callback_list*		_M_next;
+      ios_base::event_callback	_M_fn;
+      int			_M_index;
+      _Atomic_word		_M_refcount;  // 0 means one reference.
+
+      _Callback_list(ios_base::event_callback __fn, int __index,
+		     _Callback_list* __cb)
+      : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
+
+      void
+      _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
+
+      // 0 => OK to delete.
+      int
+      _M_remove_reference() 
+      { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); }
+    };
+
+     _Callback_list*	_M_callbacks;
+
+    void
+    _M_call_callbacks(event __ev) throw();
+
+    void
+    _M_dispose_callbacks(void) throw();
+
+    // 27.4.2.5  Members for iword/pword storage
+    struct _Words
+    {
+      void*	_M_pword;
+      long	_M_iword;
+      _Words() : _M_pword(0), _M_iword(0) { }
+    };
+
+    // Only for failed iword/pword calls.
+    _Words		_M_word_zero;
+
+    // Guaranteed storage.
+    // The first 5 iword and pword slots are reserved for internal use.
+    enum { _S_local_word_size = 8 };
+    _Words		_M_local_word[_S_local_word_size];
+
+    // Allocated storage.
+    int			_M_word_size;
+    _Words*		_M_word;
+
+    _Words&
+    _M_grow_words(int __index, bool __iword);
+
+    // Members for locale and locale caching.
+    locale		_M_ios_locale;
+
+    void
+    _M_init() throw();
+
+  public:
+
+    // 27.4.2.1.6  Class ios_base::Init
+    // Used to initialize standard streams. In theory, g++ could use
+    // -finit-priority to order this stuff correctly without going
+    // through these machinations.
+    class Init
+    {
+      friend class ios_base;
+    public:
+      Init();
+      ~Init();
+
+    private:
+      static _Atomic_word	_S_refcount;
+      static bool		_S_synced_with_stdio;
+    };
+
+    // [27.4.2.2] fmtflags state functions
+    /**
+     *  @brief  Access to format flags.
+     *  @return  The format control flags for both input and output.
+    */
+    fmtflags
+    flags() const
+    { return _M_flags; }
+
+    /**
+     *  @brief  Setting new format flags all at once.
+     *  @param  fmtfl  The new flags to set.
+     *  @return  The previous format control flags.
+     *
+     *  This function overwrites all the format flags with @a fmtfl.
+    */
+    fmtflags
+    flags(fmtflags __fmtfl)
+    {
+      fmtflags __old = _M_flags;
+      _M_flags = __fmtfl;
+      return __old;
+    }
+
+    /**
+     *  @brief  Setting new format flags.
+     *  @param  fmtfl  Additional flags to set.
+     *  @return  The previous format control flags.
+     *
+     *  This function sets additional flags in format control.  Flags that
+     *  were previously set remain set.
+    */
+    fmtflags
+    setf(fmtflags __fmtfl)
+    {
+      fmtflags __old = _M_flags;
+      _M_flags |= __fmtfl;
+      return __old;
+    }
+
+    /**
+     *  @brief  Setting new format flags.
+     *  @param  fmtfl  Additional flags to set.
+     *  @param  mask  The flags mask for @a fmtfl.
+     *  @return  The previous format control flags.
+     *
+     *  This function clears @a mask in the format flags, then sets
+     *  @a fmtfl @c & @a mask.  An example mask is @c ios_base::adjustfield.
+    */
+    fmtflags
+    setf(fmtflags __fmtfl, fmtflags __mask)
+    {
+      fmtflags __old = _M_flags;
+      _M_flags &= ~__mask;
+      _M_flags |= (__fmtfl & __mask);
+      return __old;
+    }
+
+    /**
+     *  @brief  Clearing format flags.
+     *  @param  mask  The flags to unset.
+     *
+     *  This function clears @a mask in the format flags.
+    */
+    void
+    unsetf(fmtflags __mask)
+    { _M_flags &= ~__mask; }
+
+    /**
+     *  @brief  Flags access.
+     *  @return  The precision to generate on certain output operations.
+     *
+     *  Be careful if you try to give a definition of @a precision here; see
+     *  DR 189.
+    */
+    streamsize
+    precision() const
+    { return _M_precision; }
+
+    /**
+     *  @brief  Changing flags.
+     *  @param  prec  The new precision value.
+     *  @return  The previous value of precision().
+    */
+    streamsize
+    precision(streamsize __prec)
+    {
+      streamsize __old = _M_precision;
+      _M_precision = __prec;
+      return __old;
+    }
+
+    /**
+     *  @brief  Flags access.
+     *  @return  The minimum field width to generate on output operations.
+     *
+     *  <em>Minimum field width</em> refers to the number of characters.
+    */
+    streamsize
+    width() const
+    { return _M_width; }
+
+    /**
+     *  @brief  Changing flags.
+     *  @param  wide  The new width value.
+     *  @return  The previous value of width().
+    */
+    streamsize
+    width(streamsize __wide)
+    {
+      streamsize __old = _M_width;
+      _M_width = __wide;
+      return __old;
+    }
+
+    // [27.4.2.4] ios_base static members
+    /**
+     *  @brief  Interaction with the standard C I/O objects.
+     *  @param  sync  Whether to synchronize or not.
+     *  @return  True if the standard streams were previously synchronized.
+     *
+     *  The synchronization referred to is @e only that between the standard
+     *  C facilities (e.g., stdout) and the standard C++ objects (e.g.,
+     *  cout).  User-declared streams are unaffected.  See
+     *  http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch28s02.html
+    */
+    static bool
+    sync_with_stdio(bool __sync = true);
+
+    // [27.4.2.3] ios_base locale functions
+    /**
+     *  @brief  Setting a new locale.
+     *  @param  loc  The new locale.
+     *  @return  The previous locale.
+     *
+     *  Sets the new locale for this stream, and then invokes each callback
+     *  with imbue_event.
+    */
+    locale
+    imbue(const locale& __loc) throw();
+
+    /**
+     *  @brief  Locale access
+     *  @return  A copy of the current locale.
+     *
+     *  If @c imbue(loc) has previously been called, then this function
+     *  returns @c loc.  Otherwise, it returns a copy of @c std::locale(),
+     *  the global C++ locale.
+    */
+    locale
+    getloc() const
+    { return _M_ios_locale; }
+
+    /**
+     *  @brief  Locale access
+     *  @return  A reference to the current locale.
+     *
+     *  Like getloc above, but returns a reference instead of
+     *  generating a copy.
+    */
+    const locale&
+    _M_getloc() const
+    { return _M_ios_locale; }
+
+    // [27.4.2.5] ios_base storage functions
+    /**
+     *  @brief  Access to unique indices.
+     *  @return  An integer different from all previous calls.
+     *
+     *  This function returns a unique integer every time it is called.  It
+     *  can be used for any purpose, but is primarily intended to be a unique
+     *  index for the iword and pword functions.  The expectation is that an
+     *  application calls xalloc in order to obtain an index in the iword and
+     *  pword arrays that can be used without fear of conflict.
+     *
+     *  The implementation maintains a static variable that is incremented and
+     *  returned on each invocation.  xalloc is guaranteed to return an index
+     *  that is safe to use in the iword and pword arrays.
+    */
+    static int
+    xalloc() throw();
+
+    /**
+     *  @brief  Access to integer array.
+     *  @param  __ix  Index into the array.
+     *  @return  A reference to an integer associated with the index.
+     *
+     *  The iword function provides access to an array of integers that can be
+     *  used for any purpose.  The array grows as required to hold the
+     *  supplied index.  All integers in the array are initialized to 0.
+     *
+     *  The implementation reserves several indices.  You should use xalloc to
+     *  obtain an index that is safe to use.  Also note that since the array
+     *  can grow dynamically, it is not safe to hold onto the reference.
+    */
+    long&
+    iword(int __ix)
+    {
+      _Words& __word = (__ix < _M_word_size)
+			? _M_word[__ix] : _M_grow_words(__ix, true);
+      return __word._M_iword;
+    }
+
+    /**
+     *  @brief  Access to void pointer array.
+     *  @param  __ix  Index into the array.
+     *  @return  A reference to a void* associated with the index.
+     *
+     *  The pword function provides access to an array of pointers that can be
+     *  used for any purpose.  The array grows as required to hold the
+     *  supplied index.  All pointers in the array are initialized to 0.
+     *
+     *  The implementation reserves several indices.  You should use xalloc to
+     *  obtain an index that is safe to use.  Also note that since the array
+     *  can grow dynamically, it is not safe to hold onto the reference.
+    */
+    void*&
+    pword(int __ix)
+    {
+      _Words& __word = (__ix < _M_word_size)
+			? _M_word[__ix] : _M_grow_words(__ix, false);
+      return __word._M_pword;
+    }
+
+    // Destructor
+    /**
+     *  Invokes each callback with erase_event.  Destroys local storage.
+     *
+     *  Note that the ios_base object for the standard streams never gets
+     *  destroyed.  As a result, any callbacks registered with the standard
+     *  streams will not get invoked with erase_event (unless copyfmt is
+     *  used).
+    */
+    virtual ~ios_base();
+
+  protected:
+    ios_base() throw ();
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 50.  Copy constructor and assignment operator of ios_base
+  private:
+    ios_base(const ios_base&);
+
+    ios_base&
+    operator=(const ios_base&);
+  };
+
+  // [27.4.5.1] fmtflags manipulators
+  /// Calls base.setf(ios_base::boolalpha).
+  inline ios_base&
+  boolalpha(ios_base& __base)
+  {
+    __base.setf(ios_base::boolalpha);
+    return __base;
+  }
+
+  /// Calls base.unsetf(ios_base::boolalpha).
+  inline ios_base&
+  noboolalpha(ios_base& __base)
+  {
+    __base.unsetf(ios_base::boolalpha);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::showbase).
+  inline ios_base&
+  showbase(ios_base& __base)
+  {
+    __base.setf(ios_base::showbase);
+    return __base;
+  }
+
+  /// Calls base.unsetf(ios_base::showbase).
+  inline ios_base&
+  noshowbase(ios_base& __base)
+  {
+    __base.unsetf(ios_base::showbase);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::showpoint).
+  inline ios_base&
+  showpoint(ios_base& __base)
+  {
+    __base.setf(ios_base::showpoint);
+    return __base;
+  }
+
+  /// Calls base.unsetf(ios_base::showpoint).
+  inline ios_base&
+  noshowpoint(ios_base& __base)
+  {
+    __base.unsetf(ios_base::showpoint);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::showpos).
+  inline ios_base&
+  showpos(ios_base& __base)
+  {
+    __base.setf(ios_base::showpos);
+    return __base;
+  }
+
+  /// Calls base.unsetf(ios_base::showpos).
+  inline ios_base&
+  noshowpos(ios_base& __base)
+  {
+    __base.unsetf(ios_base::showpos);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::skipws).
+  inline ios_base&
+  skipws(ios_base& __base)
+  {
+    __base.setf(ios_base::skipws);
+    return __base;
+  }
+
+  /// Calls base.unsetf(ios_base::skipws).
+  inline ios_base&
+  noskipws(ios_base& __base)
+  {
+    __base.unsetf(ios_base::skipws);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::uppercase).
+  inline ios_base&
+  uppercase(ios_base& __base)
+  {
+    __base.setf(ios_base::uppercase);
+    return __base;
+  }
+
+  /// Calls base.unsetf(ios_base::uppercase).
+  inline ios_base&
+  nouppercase(ios_base& __base)
+  {
+    __base.unsetf(ios_base::uppercase);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::unitbuf).
+  inline ios_base&
+  unitbuf(ios_base& __base)
+  {
+     __base.setf(ios_base::unitbuf);
+     return __base;
+  }
+
+  /// Calls base.unsetf(ios_base::unitbuf).
+  inline ios_base&
+  nounitbuf(ios_base& __base)
+  {
+     __base.unsetf(ios_base::unitbuf);
+     return __base;
+  }
+
+  // [27.4.5.2] adjustfield manipulators
+  /// Calls base.setf(ios_base::internal, ios_base::adjustfield).
+  inline ios_base&
+  internal(ios_base& __base)
+  {
+     __base.setf(ios_base::internal, ios_base::adjustfield);
+     return __base;
+  }
+
+  /// Calls base.setf(ios_base::left, ios_base::adjustfield).
+  inline ios_base&
+  left(ios_base& __base)
+  {
+    __base.setf(ios_base::left, ios_base::adjustfield);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::right, ios_base::adjustfield).
+  inline ios_base&
+  right(ios_base& __base)
+  {
+    __base.setf(ios_base::right, ios_base::adjustfield);
+    return __base;
+  }
+
+  // [27.4.5.3] basefield manipulators
+  /// Calls base.setf(ios_base::dec, ios_base::basefield).
+  inline ios_base&
+  dec(ios_base& __base)
+  {
+    __base.setf(ios_base::dec, ios_base::basefield);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::hex, ios_base::basefield).
+  inline ios_base&
+  hex(ios_base& __base)
+  {
+    __base.setf(ios_base::hex, ios_base::basefield);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::oct, ios_base::basefield).
+  inline ios_base&
+  oct(ios_base& __base)
+  {
+    __base.setf(ios_base::oct, ios_base::basefield);
+    return __base;
+  }
+
+  // [27.4.5.4] floatfield manipulators
+  /// Calls base.setf(ios_base::fixed, ios_base::floatfield).
+  inline ios_base&
+  fixed(ios_base& __base)
+  {
+    __base.setf(ios_base::fixed, ios_base::floatfield);
+    return __base;
+  }
+
+  /// Calls base.setf(ios_base::scientific, ios_base::floatfield).
+  inline ios_base&
+  scientific(ios_base& __base)
+  {
+    __base.setf(ios_base::scientific, ios_base::floatfield);
+    return __base;
+  }
+
+_GLIBCXX_END_NAMESPACE
+
+#undef _IOS_BASE_SEEK_CUR
+#undef _IOS_BASE_SEEK_END
+
+#endif /* _IOS_BASE_H */
+
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/istream.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/istream.tcc
new file mode 100644
index 0000000..d005f73
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/istream.tcc
@@ -0,0 +1,1072 @@
+// istream classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file istream.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.6.1  Input streams
+//
+
+#ifndef _ISTREAM_TCC
+#define _ISTREAM_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>::sentry::
+    sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false)
+    {
+      ios_base::iostate __err = ios_base::goodbit;
+      if (__in.good())
+	{
+	  if (__in.tie())
+	    __in.tie()->flush();
+	  if (!__noskip && bool(__in.flags() & ios_base::skipws))
+	    {
+	      const __int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = __in.rdbuf();
+	      __int_type __c = __sb->sgetc();
+
+	      const __ctype_type& __ct = __check_facet(__in._M_ctype);
+	      while (!traits_type::eq_int_type(__c, __eof)
+		     && __ct.is(ctype_base::space, 
+				traits_type::to_char_type(__c)))
+		__c = __sb->snextc();
+
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 195. Should basic_istream::sentry's constructor ever
+	      // set eofbit?
+	      if (traits_type::eq_int_type(__c, __eof))
+		__err |= ios_base::eofbit;
+	    }
+	}
+
+      if (__in.good() && __err == ios_base::goodbit)
+	_M_ok = true;
+      else
+	{
+	  __err |= ios_base::failbit;
+	  __in.setstate(__err);
+	}
+    }
+
+  template<typename _CharT, typename _Traits>
+    template<typename _ValueT>
+      basic_istream<_CharT, _Traits>&
+      basic_istream<_CharT, _Traits>::
+      _M_extract(_ValueT& __v)
+      {
+	sentry __cerb(*this, false);
+	if (__cerb)
+	  {
+	    ios_base::iostate __err = ios_base::goodbit;
+	    __try
+	      {
+		const __num_get_type& __ng = __check_facet(this->_M_num_get);
+		__ng.get(*this, 0, *this, __err, __v);
+	      }
+	    __catch(__cxxabiv1::__forced_unwind&)
+	      {
+		this->_M_setstate(ios_base::badbit);
+		__throw_exception_again;
+	      }
+	    __catch(...)
+	      { this->_M_setstate(ios_base::badbit); }
+	    if (__err)
+	      this->setstate(__err);
+	  }
+	return *this;
+      }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    operator>>(short& __n)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 118. basic_istream uses nonexistent num_get member functions.
+      sentry __cerb(*this, false);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      long __l;
+	      const __num_get_type& __ng = __check_facet(this->_M_num_get);
+	      __ng.get(*this, 0, *this, __err, __l);
+
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 696. istream::operator>>(int&) broken.
+	      if (__l < __gnu_cxx::__numeric_traits<short>::__min)
+		{
+		  __err |= ios_base::failbit;
+		  __n = __gnu_cxx::__numeric_traits<short>::__min;
+		}
+	      else if (__l > __gnu_cxx::__numeric_traits<short>::__max)
+		{
+		  __err |= ios_base::failbit;
+		  __n = __gnu_cxx::__numeric_traits<short>::__max;
+		}
+	      else
+		__n = short(__l);
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    operator>>(int& __n)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 118. basic_istream uses nonexistent num_get member functions.
+      sentry __cerb(*this, false);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      long __l;
+	      const __num_get_type& __ng = __check_facet(this->_M_num_get);
+	      __ng.get(*this, 0, *this, __err, __l);
+
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 696. istream::operator>>(int&) broken.
+	      if (__l < __gnu_cxx::__numeric_traits<int>::__min)
+		{
+		  __err |= ios_base::failbit;
+		  __n = __gnu_cxx::__numeric_traits<int>::__min;
+		}
+	      else if (__l > __gnu_cxx::__numeric_traits<int>::__max)
+		{
+		  __err |= ios_base::failbit;	      
+		  __n = __gnu_cxx::__numeric_traits<int>::__max;
+		}
+	      else
+		__n = int(__l);
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    operator>>(__streambuf_type* __sbout)
+    {
+      ios_base::iostate __err = ios_base::goodbit;
+      sentry __cerb(*this, false);
+      if (__cerb && __sbout)
+	{
+	  __try
+	    {
+	      bool __ineof;
+	      if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof))
+		__err |= ios_base::failbit;
+	      if (__ineof)
+		__err |= ios_base::eofbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::failbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::failbit); }
+	}
+      else if (!__sbout)
+	__err |= ios_base::failbit;
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_istream<_CharT, _Traits>::int_type
+    basic_istream<_CharT, _Traits>::
+    get(void)
+    {
+      const int_type __eof = traits_type::eof();
+      int_type __c = __eof;
+      _M_gcount = 0;
+      ios_base::iostate __err = ios_base::goodbit;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  __try
+	    {
+	      __c = this->rdbuf()->sbumpc();
+	      // 27.6.1.1 paragraph 3
+	      if (!traits_type::eq_int_type(__c, __eof))
+		_M_gcount = 1;
+	      else
+		__err |= ios_base::eofbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	}
+      if (!_M_gcount)
+	__err |= ios_base::failbit;
+      if (__err)
+	this->setstate(__err);
+      return __c;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    get(char_type& __c)
+    {
+      _M_gcount = 0;
+      ios_base::iostate __err = ios_base::goodbit;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  __try
+	    {
+	      const int_type __cb = this->rdbuf()->sbumpc();
+	      // 27.6.1.1 paragraph 3
+	      if (!traits_type::eq_int_type(__cb, traits_type::eof()))
+		{
+		  _M_gcount = 1;
+		  __c = traits_type::to_char_type(__cb);
+		}
+	      else
+		__err |= ios_base::eofbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	}
+      if (!_M_gcount)
+	__err |= ios_base::failbit;
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    get(char_type* __s, streamsize __n, char_type __delim)
+    {
+      _M_gcount = 0;
+      ios_base::iostate __err = ios_base::goodbit;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  __try
+	    {
+	      const int_type __idelim = traits_type::to_int_type(__delim);
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+	      int_type __c = __sb->sgetc();
+
+	      while (_M_gcount + 1 < __n
+		     && !traits_type::eq_int_type(__c, __eof)
+		     && !traits_type::eq_int_type(__c, __idelim))
+		{
+		  *__s++ = traits_type::to_char_type(__c);
+		  ++_M_gcount;
+		  __c = __sb->snextc();
+		}
+	      if (traits_type::eq_int_type(__c, __eof))
+		__err |= ios_base::eofbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	}
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 243. get and getline when sentry reports failure.
+      if (__n > 0)
+	*__s = char_type();
+      if (!_M_gcount)
+	__err |= ios_base::failbit;
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    get(__streambuf_type& __sb, char_type __delim)
+    {
+      _M_gcount = 0;
+      ios_base::iostate __err = ios_base::goodbit;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  __try
+	    {
+	      const int_type __idelim = traits_type::to_int_type(__delim);
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __this_sb = this->rdbuf();
+	      int_type __c = __this_sb->sgetc();
+	      char_type __c2 = traits_type::to_char_type(__c);
+
+	      while (!traits_type::eq_int_type(__c, __eof)
+		     && !traits_type::eq_int_type(__c, __idelim)
+		     && !traits_type::eq_int_type(__sb.sputc(__c2), __eof))
+		{
+		  ++_M_gcount;
+		  __c = __this_sb->snextc();
+		  __c2 = traits_type::to_char_type(__c);
+		}
+	      if (traits_type::eq_int_type(__c, __eof))
+		__err |= ios_base::eofbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	}
+      if (!_M_gcount)
+	__err |= ios_base::failbit;
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    getline(char_type* __s, streamsize __n, char_type __delim)
+    {
+      _M_gcount = 0;
+      ios_base::iostate __err = ios_base::goodbit;
+      sentry __cerb(*this, true);
+      if (__cerb)
+        {
+          __try
+            {
+              const int_type __idelim = traits_type::to_int_type(__delim);
+              const int_type __eof = traits_type::eof();
+              __streambuf_type* __sb = this->rdbuf();
+              int_type __c = __sb->sgetc();
+
+              while (_M_gcount + 1 < __n
+                     && !traits_type::eq_int_type(__c, __eof)
+                     && !traits_type::eq_int_type(__c, __idelim))
+                {
+                  *__s++ = traits_type::to_char_type(__c);
+                  __c = __sb->snextc();
+                  ++_M_gcount;
+                }
+              if (traits_type::eq_int_type(__c, __eof))
+                __err |= ios_base::eofbit;
+              else
+                {
+                  if (traits_type::eq_int_type(__c, __idelim))
+                    {
+                      __sb->sbumpc();
+                      ++_M_gcount;
+                    }
+                  else
+                    __err |= ios_base::failbit;
+                }
+            }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+          __catch(...)
+            { this->_M_setstate(ios_base::badbit); }
+        }
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 243. get and getline when sentry reports failure.
+      if (__n > 0)
+	*__s = char_type();
+      if (!_M_gcount)
+        __err |= ios_base::failbit;
+      if (__err)
+        this->setstate(__err);
+      return *this;
+    }
+
+  // We provide three overloads, since the first two are much simpler
+  // than the general case. Also, the latter two can thus adopt the
+  // same "batchy" strategy used by getline above.
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    ignore(void)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+
+	      if (traits_type::eq_int_type(__sb->sbumpc(), __eof))
+		__err |= ios_base::eofbit;
+	      else
+		_M_gcount = 1;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    ignore(streamsize __n)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb && __n > 0)
+        {
+          ios_base::iostate __err = ios_base::goodbit;
+          __try
+            {
+              const int_type __eof = traits_type::eof();
+              __streambuf_type* __sb = this->rdbuf();
+              int_type __c = __sb->sgetc();
+
+	      // N.B. On LFS-enabled platforms streamsize is still 32 bits
+	      // wide: if we want to implement the standard mandated behavior
+	      // for n == max() (see 27.6.1.3/24) we are at risk of signed
+	      // integer overflow: thus these contortions. Also note that,
+	      // by definition, when more than 2G chars are actually ignored,
+	      // _M_gcount (the return value of gcount, that is) cannot be
+	      // really correct, being unavoidably too small.
+	      bool __large_ignore = false;
+	      while (true)
+		{
+		  while (_M_gcount < __n
+			 && !traits_type::eq_int_type(__c, __eof))
+		    {
+		      ++_M_gcount;
+		      __c = __sb->snextc();
+		    }
+		  if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
+		      && !traits_type::eq_int_type(__c, __eof))
+		    {
+		      _M_gcount =
+			__gnu_cxx::__numeric_traits<streamsize>::__min;
+		      __large_ignore = true;
+		    }
+		  else
+		    break;
+		}
+
+	      if (__large_ignore)
+		_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
+
+	      if (traits_type::eq_int_type(__c, __eof))
+                __err |= ios_base::eofbit;
+            }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+          __catch(...)
+            { this->_M_setstate(ios_base::badbit); }
+          if (__err)
+            this->setstate(__err);
+        }
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    ignore(streamsize __n, int_type __delim)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb && __n > 0)
+        {
+          ios_base::iostate __err = ios_base::goodbit;
+          __try
+            {
+              const int_type __eof = traits_type::eof();
+              __streambuf_type* __sb = this->rdbuf();
+              int_type __c = __sb->sgetc();
+
+	      // See comment above.
+	      bool __large_ignore = false;
+	      while (true)
+		{
+		  while (_M_gcount < __n
+			 && !traits_type::eq_int_type(__c, __eof)
+			 && !traits_type::eq_int_type(__c, __delim))
+		    {
+		      ++_M_gcount;
+		      __c = __sb->snextc();
+		    }
+		  if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
+		      && !traits_type::eq_int_type(__c, __eof)
+		      && !traits_type::eq_int_type(__c, __delim))
+		    {
+		      _M_gcount =
+			__gnu_cxx::__numeric_traits<streamsize>::__min;
+		      __large_ignore = true;
+		    }
+		  else
+		    break;
+		}
+
+	      if (__large_ignore)
+		_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
+
+              if (traits_type::eq_int_type(__c, __eof))
+                __err |= ios_base::eofbit;
+	      else if (traits_type::eq_int_type(__c, __delim))
+		{
+		  if (_M_gcount
+		      < __gnu_cxx::__numeric_traits<streamsize>::__max)
+		    ++_M_gcount;
+		  __sb->sbumpc();
+		}
+            }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+          __catch(...)
+            { this->_M_setstate(ios_base::badbit); }
+          if (__err)
+            this->setstate(__err);
+        }
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_istream<_CharT, _Traits>::int_type
+    basic_istream<_CharT, _Traits>::
+    peek(void)
+    {
+      int_type __c = traits_type::eof();
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      __c = this->rdbuf()->sgetc();
+	      if (traits_type::eq_int_type(__c, traits_type::eof()))
+		__err |= ios_base::eofbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return __c;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    read(char_type* __s, streamsize __n)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      _M_gcount = this->rdbuf()->sgetn(__s, __n);
+	      if (_M_gcount != __n)
+		__err |= (ios_base::eofbit | ios_base::failbit);
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    streamsize
+    basic_istream<_CharT, _Traits>::
+    readsome(char_type* __s, streamsize __n)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      // Cannot compare int_type with streamsize generically.
+	      const streamsize __num = this->rdbuf()->in_avail();
+	      if (__num > 0)
+		_M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n));
+	      else if (__num == -1)
+		__err |= ios_base::eofbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return _M_gcount;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    putback(char_type __c)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 60. What is a formatted input function?
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+	      if (!__sb
+		  || traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
+		__err |= ios_base::badbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    unget(void)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 60. What is a formatted input function?
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+	      if (!__sb
+		  || traits_type::eq_int_type(__sb->sungetc(), __eof))
+		__err |= ios_base::badbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    int
+    basic_istream<_CharT, _Traits>::
+    sync(void)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR60.  Do not change _M_gcount.
+      int __ret = -1;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      __streambuf_type* __sb = this->rdbuf();
+	      if (__sb)
+		{
+		  if (__sb->pubsync() == -1)
+		    __err |= ios_base::badbit;
+		  else
+		    __ret = 0;
+		}
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_istream<_CharT, _Traits>::pos_type
+    basic_istream<_CharT, _Traits>::
+    tellg(void)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR60.  Do not change _M_gcount.
+      pos_type __ret = pos_type(-1);
+      __try
+	{
+	  if (!this->fail())
+	    __ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
+					      ios_base::in);
+	}
+      __catch(__cxxabiv1::__forced_unwind&)
+	{
+	  this->_M_setstate(ios_base::badbit);
+	  __throw_exception_again;
+	}
+      __catch(...)
+	{ this->_M_setstate(ios_base::badbit); }
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    seekg(pos_type __pos)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR60.  Do not change _M_gcount.
+      ios_base::iostate __err = ios_base::goodbit;
+      __try
+	{
+	  if (!this->fail())
+	    {
+	      // 136.  seekp, seekg setting wrong streams?
+	      const pos_type __p = this->rdbuf()->pubseekpos(__pos,
+							     ios_base::in);
+	      
+	      // 129.  Need error indication from seekp() and seekg()
+	      if (__p == pos_type(off_type(-1)))
+		__err |= ios_base::failbit;
+	    }
+	}
+      __catch(__cxxabiv1::__forced_unwind&)
+	{
+	  this->_M_setstate(ios_base::badbit);
+	  __throw_exception_again;
+	}
+      __catch(...)
+	{ this->_M_setstate(ios_base::badbit); }
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    seekg(off_type __off, ios_base::seekdir __dir)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR60.  Do not change _M_gcount.
+      ios_base::iostate __err = ios_base::goodbit;
+      __try
+	{
+	  if (!this->fail())
+	    {
+	      // 136.  seekp, seekg setting wrong streams?
+	      const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
+							     ios_base::in);
+	      
+	      // 129.  Need error indication from seekp() and seekg()
+	      if (__p == pos_type(off_type(-1)))
+		__err |= ios_base::failbit;
+	    }
+	}
+      __catch(__cxxabiv1::__forced_unwind&)
+	{
+	  this->_M_setstate(ios_base::badbit);
+	  __throw_exception_again;
+	}
+      __catch(...)
+	{ this->_M_setstate(ios_base::badbit); }
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  // 27.6.1.2.3 Character extraction templates
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
+    {
+      typedef basic_istream<_CharT, _Traits>		__istream_type;
+      typedef typename __istream_type::int_type         __int_type;
+
+      typename __istream_type::sentry __cerb(__in, false);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      const __int_type __cb = __in.rdbuf()->sbumpc();
+	      if (!_Traits::eq_int_type(__cb, _Traits::eof()))
+		__c = _Traits::to_char_type(__cb);
+	      else
+		__err |= (ios_base::eofbit | ios_base::failbit);
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      __in._M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { __in._M_setstate(ios_base::badbit); }
+	  if (__err)
+	    __in.setstate(__err);
+	}
+      return __in;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
+    {
+      typedef basic_istream<_CharT, _Traits>		__istream_type;
+      typedef basic_streambuf<_CharT, _Traits>          __streambuf_type;
+      typedef typename _Traits::int_type		int_type;
+      typedef _CharT					char_type;
+      typedef ctype<_CharT>				__ctype_type;
+
+      streamsize __extracted = 0;
+      ios_base::iostate __err = ios_base::goodbit;
+      typename __istream_type::sentry __cerb(__in, false);
+      if (__cerb)
+	{
+	  __try
+	    {
+	      // Figure out how many characters to extract.
+	      streamsize __num = __in.width();
+	      if (__num <= 0)
+		__num = __gnu_cxx::__numeric_traits<streamsize>::__max;
+
+	      const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+
+	      const int_type __eof = _Traits::eof();
+	      __streambuf_type* __sb = __in.rdbuf();
+	      int_type __c = __sb->sgetc();
+
+	      while (__extracted < __num - 1
+		     && !_Traits::eq_int_type(__c, __eof)
+		     && !__ct.is(ctype_base::space,
+				 _Traits::to_char_type(__c)))
+		{
+		  *__s++ = _Traits::to_char_type(__c);
+		  ++__extracted;
+		  __c = __sb->snextc();
+		}
+	      if (_Traits::eq_int_type(__c, __eof))
+		__err |= ios_base::eofbit;
+
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 68.  Extractors for char* should store null at end
+	      *__s = char_type();
+	      __in.width(0);
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      __in._M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { __in._M_setstate(ios_base::badbit); }
+	}
+      if (!__extracted)
+	__err |= ios_base::failbit;
+      if (__err)
+	__in.setstate(__err);
+      return __in;
+    }
+
+  // 27.6.1.4 Standard basic_istream manipulators
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    ws(basic_istream<_CharT, _Traits>& __in)
+    {
+      typedef basic_istream<_CharT, _Traits>		__istream_type;
+      typedef basic_streambuf<_CharT, _Traits>          __streambuf_type;
+      typedef typename __istream_type::int_type		__int_type;
+      typedef ctype<_CharT>				__ctype_type;
+
+      const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+      const __int_type __eof = _Traits::eof();
+      __streambuf_type* __sb = __in.rdbuf();
+      __int_type __c = __sb->sgetc();
+
+      while (!_Traits::eq_int_type(__c, __eof)
+	     && __ct.is(ctype_base::space, _Traits::to_char_type(__c)))
+	__c = __sb->snextc();
+
+       if (_Traits::eq_int_type(__c, __eof))
+	 __in.setstate(ios_base::eofbit);
+      return __in;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB:  This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class basic_istream<char>;
+  extern template istream& ws(istream&);
+  extern template istream& operator>>(istream&, char&);
+  extern template istream& operator>>(istream&, char*);
+  extern template istream& operator>>(istream&, unsigned char&);
+  extern template istream& operator>>(istream&, signed char&);
+  extern template istream& operator>>(istream&, unsigned char*);
+  extern template istream& operator>>(istream&, signed char*);
+
+  extern template istream& istream::_M_extract(unsigned short&);
+  extern template istream& istream::_M_extract(unsigned int&);  
+  extern template istream& istream::_M_extract(long&);
+  extern template istream& istream::_M_extract(unsigned long&);
+  extern template istream& istream::_M_extract(bool&);
+#ifdef _GLIBCXX_USE_LONG_LONG
+  extern template istream& istream::_M_extract(long long&);
+  extern template istream& istream::_M_extract(unsigned long long&);
+#endif
+  extern template istream& istream::_M_extract(float&);
+  extern template istream& istream::_M_extract(double&);
+  extern template istream& istream::_M_extract(long double&);
+  extern template istream& istream::_M_extract(void*&);
+
+  extern template class basic_iostream<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class basic_istream<wchar_t>;
+  extern template wistream& ws(wistream&);
+  extern template wistream& operator>>(wistream&, wchar_t&);
+  extern template wistream& operator>>(wistream&, wchar_t*);
+
+  extern template wistream& wistream::_M_extract(unsigned short&);
+  extern template wistream& wistream::_M_extract(unsigned int&);  
+  extern template wistream& wistream::_M_extract(long&);
+  extern template wistream& wistream::_M_extract(unsigned long&);
+  extern template wistream& wistream::_M_extract(bool&);
+#ifdef _GLIBCXX_USE_LONG_LONG
+  extern template wistream& wistream::_M_extract(long long&);
+  extern template wistream& wistream::_M_extract(unsigned long long&);
+#endif
+  extern template wistream& wistream::_M_extract(float&);
+  extern template wistream& wistream::_M_extract(double&);
+  extern template wistream& wistream::_M_extract(long double&);
+  extern template wistream& wistream::_M_extract(void*&);
+
+  extern template class basic_iostream<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/list.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/list.tcc
new file mode 100644
index 0000000..5359239
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/list.tcc
@@ -0,0 +1,416 @@
+// List implementation (out of line) -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file list.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _LIST_TCC
+#define _LIST_TCC 1
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  template<typename _Tp, typename _Alloc>
+    void
+    _List_base<_Tp, _Alloc>::
+    _M_clear()
+    {
+      typedef _List_node<_Tp>  _Node;
+      _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next);
+      while (__cur != &this->_M_impl._M_node)
+	{
+	  _Node* __tmp = __cur;
+	  __cur = static_cast<_Node*>(__cur->_M_next);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+	  _M_get_Node_allocator().destroy(__tmp);
+#else
+	  _M_get_Tp_allocator().destroy(&__tmp->_M_data);
+#endif
+	  _M_put_node(__tmp);
+	}
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp, typename _Alloc>
+    template<typename... _Args>
+      typename list<_Tp, _Alloc>::iterator
+      list<_Tp, _Alloc>::
+      emplace(iterator __position, _Args&&... __args)
+      {
+	_Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
+	__tmp->_M_hook(__position._M_node);
+	return iterator(__tmp);
+      }
+#endif
+
+  template<typename _Tp, typename _Alloc>
+    typename list<_Tp, _Alloc>::iterator
+    list<_Tp, _Alloc>::
+    insert(iterator __position, const value_type& __x)
+    {
+      _Node* __tmp = _M_create_node(__x);
+      __tmp->_M_hook(__position._M_node);
+      return iterator(__tmp);
+    }
+
+  template<typename _Tp, typename _Alloc>
+    typename list<_Tp, _Alloc>::iterator
+    list<_Tp, _Alloc>::
+    erase(iterator __position)
+    {
+      iterator __ret = iterator(__position._M_node->_M_next);
+      _M_erase(__position);
+      return __ret;
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    list<_Tp, _Alloc>::
+    resize(size_type __new_size, value_type __x)
+    {
+      iterator __i = begin();
+      size_type __len = 0;
+      for (; __i != end() && __len < __new_size; ++__i, ++__len)
+        ;
+      if (__len == __new_size)
+        erase(__i, end());
+      else                          // __i == end()
+        insert(end(), __new_size - __len, __x);
+    }
+
+  template<typename _Tp, typename _Alloc>
+    list<_Tp, _Alloc>&
+    list<_Tp, _Alloc>::
+    operator=(const list& __x)
+    {
+      if (this != &__x)
+	{
+	  iterator __first1 = begin();
+	  iterator __last1 = end();
+	  const_iterator __first2 = __x.begin();
+	  const_iterator __last2 = __x.end();
+	  for (; __first1 != __last1 && __first2 != __last2;
+	       ++__first1, ++__first2)
+	    *__first1 = *__first2;
+	  if (__first2 == __last2)
+	    erase(__first1, __last1);
+	  else
+	    insert(__last1, __first2, __last2);
+	}
+      return *this;
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    list<_Tp, _Alloc>::
+    _M_fill_assign(size_type __n, const value_type& __val)
+    {
+      iterator __i = begin();
+      for (; __i != end() && __n > 0; ++__i, --__n)
+        *__i = __val;
+      if (__n > 0)
+        insert(end(), __n, __val);
+      else
+        erase(__i, end());
+    }
+
+  template<typename _Tp, typename _Alloc>
+    template <typename _InputIterator>
+      void
+      list<_Tp, _Alloc>::
+      _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
+			 __false_type)
+      {
+        iterator __first1 = begin();
+        iterator __last1 = end();
+        for (; __first1 != __last1 && __first2 != __last2;
+	     ++__first1, ++__first2)
+          *__first1 = *__first2;
+        if (__first2 == __last2)
+          erase(__first1, __last1);
+        else
+          insert(__last1, __first2, __last2);
+      }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    list<_Tp, _Alloc>::
+    remove(const value_type& __value)
+    {
+      iterator __first = begin();
+      iterator __last = end();
+      iterator __extra = __last;
+      while (__first != __last)
+	{
+	  iterator __next = __first;
+	  ++__next;
+	  if (*__first == __value)
+	    {
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 526. Is it undefined if a function in the standard changes
+	      // in parameters?
+	      if (&*__first != &__value)
+		_M_erase(__first);
+	      else
+		__extra = __first;
+	    }
+	  __first = __next;
+	}
+      if (__extra != __last)
+	_M_erase(__extra);
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    list<_Tp, _Alloc>::
+    unique()
+    {
+      iterator __first = begin();
+      iterator __last = end();
+      if (__first == __last)
+	return;
+      iterator __next = __first;
+      while (++__next != __last)
+	{
+	  if (*__first == *__next)
+	    _M_erase(__next);
+	  else
+	    __first = __next;
+	  __next = __first;
+	}
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    list<_Tp, _Alloc>::
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    merge(list&& __x)
+#else
+    merge(list& __x)
+#endif
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 300. list::merge() specification incomplete
+      if (this != &__x)
+	{
+	  _M_check_equal_allocators(__x); 
+
+	  iterator __first1 = begin();
+	  iterator __last1 = end();
+	  iterator __first2 = __x.begin();
+	  iterator __last2 = __x.end();
+	  while (__first1 != __last1 && __first2 != __last2)
+	    if (*__first2 < *__first1)
+	      {
+		iterator __next = __first2;
+		_M_transfer(__first1, __first2, ++__next);
+		__first2 = __next;
+	      }
+	    else
+	      ++__first1;
+	  if (__first2 != __last2)
+	    _M_transfer(__last1, __first2, __last2);
+	}
+    }
+
+  template<typename _Tp, typename _Alloc>
+    template <typename _StrictWeakOrdering>
+      void
+      list<_Tp, _Alloc>::
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      merge(list&& __x, _StrictWeakOrdering __comp)
+#else
+      merge(list& __x, _StrictWeakOrdering __comp)
+#endif
+      {
+	// _GLIBCXX_RESOLVE_LIB_DEFECTS
+	// 300. list::merge() specification incomplete
+	if (this != &__x)
+	  {
+	    _M_check_equal_allocators(__x);
+
+	    iterator __first1 = begin();
+	    iterator __last1 = end();
+	    iterator __first2 = __x.begin();
+	    iterator __last2 = __x.end();
+	    while (__first1 != __last1 && __first2 != __last2)
+	      if (__comp(*__first2, *__first1))
+		{
+		  iterator __next = __first2;
+		  _M_transfer(__first1, __first2, ++__next);
+		  __first2 = __next;
+		}
+	      else
+		++__first1;
+	    if (__first2 != __last2)
+	      _M_transfer(__last1, __first2, __last2);
+	  }
+      }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    list<_Tp, _Alloc>::
+    sort()
+    {
+      // Do nothing if the list has length 0 or 1.
+      if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
+	  && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
+      {
+        list __carry;
+        list __tmp[64];
+        list * __fill = &__tmp[0];
+        list * __counter;
+
+        do
+	  {
+	    __carry.splice(__carry.begin(), *this, begin());
+
+	    for(__counter = &__tmp[0];
+		__counter != __fill && !__counter->empty();
+		++__counter)
+	      {
+		__counter->merge(__carry);
+		__carry.swap(*__counter);
+	      }
+	    __carry.swap(*__counter);
+	    if (__counter == __fill)
+	      ++__fill;
+	  }
+	while ( !empty() );
+
+        for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
+          __counter->merge(*(__counter - 1));
+        swap( *(__fill - 1) );
+      }
+    }
+
+  template<typename _Tp, typename _Alloc>
+    template <typename _Predicate>
+      void
+      list<_Tp, _Alloc>::
+      remove_if(_Predicate __pred)
+      {
+        iterator __first = begin();
+        iterator __last = end();
+        while (__first != __last)
+	  {
+	    iterator __next = __first;
+	    ++__next;
+	    if (__pred(*__first))
+	      _M_erase(__first);
+	    __first = __next;
+	  }
+      }
+
+  template<typename _Tp, typename _Alloc>
+    template <typename _BinaryPredicate>
+      void
+      list<_Tp, _Alloc>::
+      unique(_BinaryPredicate __binary_pred)
+      {
+        iterator __first = begin();
+        iterator __last = end();
+        if (__first == __last)
+	  return;
+        iterator __next = __first;
+        while (++__next != __last)
+	  {
+	    if (__binary_pred(*__first, *__next))
+	      _M_erase(__next);
+	    else
+	      __first = __next;
+	    __next = __first;
+	  }
+      }
+
+  template<typename _Tp, typename _Alloc>
+    template <typename _StrictWeakOrdering>
+      void
+      list<_Tp, _Alloc>::
+      sort(_StrictWeakOrdering __comp)
+      {
+	// Do nothing if the list has length 0 or 1.
+	if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
+	    && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
+	  {
+	    list __carry;
+	    list __tmp[64];
+	    list * __fill = &__tmp[0];
+	    list * __counter;
+
+	    do
+	      {
+		__carry.splice(__carry.begin(), *this, begin());
+
+		for(__counter = &__tmp[0];
+		    __counter != __fill && !__counter->empty();
+		    ++__counter)
+		  {
+		    __counter->merge(__carry, __comp);
+		    __carry.swap(*__counter);
+		  }
+		__carry.swap(*__counter);
+		if (__counter == __fill)
+		  ++__fill;
+	      }
+	    while ( !empty() );
+
+	    for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
+	      __counter->merge(*(__counter - 1), __comp);
+	    swap(*(__fill - 1));
+	  }
+      }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _LIST_TCC */
+
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_classes.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_classes.h
new file mode 100644
index 0000000..347e761
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_classes.h
@@ -0,0 +1,818 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_classes.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+#ifndef _LOCALE_CLASSES_H
+#define _LOCALE_CLASSES_H 1
+
+#pragma GCC system_header
+
+#include <bits/localefwd.h>
+#include <string>
+#include <ext/atomicity.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // 22.1.1 Class locale
+  /**
+   *  @brief  Container class for localization functionality.
+   *  @ingroup locales
+   *
+   *  The locale class is first a class wrapper for C library locales.  It is
+   *  also an extensible container for user-defined localization.  A locale is
+   *  a collection of facets that implement various localization features such
+   *  as money, time, and number printing.
+   *
+   *  Constructing C++ locales does not change the C library locale.
+   *
+   *  This library supports efficient construction and copying of locales
+   *  through a reference counting implementation of the locale class.
+  */
+  class locale
+  {
+  public:
+    // Types:
+    /// Definition of locale::category.
+    typedef int	category;
+
+    // Forward decls and friends:
+    class facet;
+    class id;
+    class _Impl;
+
+    friend class facet;
+    friend class _Impl;
+
+    template<typename _Facet>
+      friend bool
+      has_facet(const locale&) throw();
+
+    template<typename _Facet>
+      friend const _Facet&
+      use_facet(const locale&);
+
+    template<typename _Cache>
+      friend struct __use_cache;
+
+    //@{
+    /**
+     *  @brief  Category values.
+     *
+     *  The standard category values are none, ctype, numeric, collate, time,
+     *  monetary, and messages.  They form a bitmask that supports union and
+     *  intersection.  The category all is the union of these values.
+     *
+     *  NB: Order must match _S_facet_categories definition in locale.cc
+    */
+    static const category none		= 0;
+    static const category ctype		= 1L << 0;
+    static const category numeric	= 1L << 1;
+    static const category collate	= 1L << 2;
+    static const category time		= 1L << 3;
+    static const category monetary	= 1L << 4;
+    static const category messages	= 1L << 5;
+    static const category all		= (ctype | numeric | collate |
+					   time  | monetary | messages);
+    //@}
+
+    // Construct/copy/destroy:
+
+    /**
+     *  @brief  Default constructor.
+     *
+     *  Constructs a copy of the global locale.  If no locale has been
+     *  explicitly set, this is the C locale.
+    */
+    locale() throw();
+
+    /**
+     *  @brief  Copy constructor.
+     *
+     *  Constructs a copy of @a other.
+     *
+     *  @param  other  The locale to copy.
+    */
+    locale(const locale& __other) throw();
+
+    /**
+     *  @brief  Named locale constructor.
+     *
+     *  Constructs a copy of the named C library locale.
+     *
+     *  @param  s  Name of the locale to construct.
+     *  @throw  std::runtime_error if s is null or an undefined locale.
+    */
+    explicit
+    locale(const char* __s);
+
+    /**
+     *  @brief  Construct locale with facets from another locale.
+     *
+     *  Constructs a copy of the locale @a base.  The facets specified by @a
+     *  cat are replaced with those from the locale named by @a s.  If base is
+     *  named, this locale instance will also be named.
+     *
+     *  @param  base  The locale to copy.
+     *  @param  s  Name of the locale to use facets from.
+     *  @param  cat  Set of categories defining the facets to use from s.
+     *  @throw  std::runtime_error if s is null or an undefined locale.
+    */
+    locale(const locale& __base, const char* __s, category __cat);
+
+    /**
+     *  @brief  Construct locale with facets from another locale.
+     *
+     *  Constructs a copy of the locale @a base.  The facets specified by @a
+     *  cat are replaced with those from the locale @a add.  If @a base and @a
+     *  add are named, this locale instance will also be named.
+     *
+     *  @param  base  The locale to copy.
+     *  @param  add  The locale to use facets from.
+     *  @param  cat  Set of categories defining the facets to use from add.
+    */
+    locale(const locale& __base, const locale& __add, category __cat);
+
+    /**
+     *  @brief  Construct locale with another facet.
+     *
+     *  Constructs a copy of the locale @a other.  The facet @f is added to
+     *  @other, replacing an existing facet of type Facet if there is one.  If
+     *  @f is null, this locale is a copy of @a other.
+     *
+     *  @param  other  The locale to copy.
+     *  @param  f  The facet to add in.
+    */
+    template<typename _Facet>
+      locale(const locale& __other, _Facet* __f);
+
+    /// Locale destructor.
+    ~locale() throw();
+
+    /**
+     *  @brief  Assignment operator.
+     *
+     *  Set this locale to be a copy of @a other.
+     *
+     *  @param  other  The locale to copy.
+     *  @return  A reference to this locale.
+    */
+    const locale&
+    operator=(const locale& __other) throw();
+
+    /**
+     *  @brief  Construct locale with another facet.
+     *
+     *  Constructs and returns a new copy of this locale.  Adds or replaces an
+     *  existing facet of type Facet from the locale @a other into the new
+     *  locale.
+     *
+     *  @param  Facet  The facet type to copy from other
+     *  @param  other  The locale to copy from.
+     *  @return  Newly constructed locale.
+     *  @throw  std::runtime_error if other has no facet of type Facet.
+    */
+    template<typename _Facet>
+      locale
+      combine(const locale& __other) const;
+
+    // Locale operations:
+    /**
+     *  @brief  Return locale name.
+     *  @return  Locale name or "*" if unnamed.
+    */
+    string
+    name() const;
+
+    /**
+     *  @brief  Locale equality.
+     *
+     *  @param  other  The locale to compare against.
+     *  @return  True if other and this refer to the same locale instance, are
+     *		 copies, or have the same name.  False otherwise.
+    */
+    bool
+    operator==(const locale& __other) const throw();
+
+    /**
+     *  @brief  Locale inequality.
+     *
+     *  @param  other  The locale to compare against.
+     *  @return  ! (*this == other)
+    */
+    bool
+    operator!=(const locale& __other) const throw()
+    { return !(this->operator==(__other)); }
+
+    /**
+     *  @brief  Compare two strings according to collate.
+     *
+     *  Template operator to compare two strings using the compare function of
+     *  the collate facet in this locale.  One use is to provide the locale to
+     *  the sort function.  For example, a vector v of strings could be sorted
+     *  according to locale loc by doing:
+     *  @code
+     *  std::sort(v.begin(), v.end(), loc);
+     *  @endcode
+     *
+     *  @param  s1  First string to compare.
+     *  @param  s2  Second string to compare.
+     *  @return  True if collate<Char> facet compares s1 < s2, else false.
+    */
+    template<typename _Char, typename _Traits, typename _Alloc>
+      bool
+      operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
+		 const basic_string<_Char, _Traits, _Alloc>& __s2) const;
+
+    // Global locale objects:
+    /**
+     *  @brief  Set global locale
+     *
+     *  This function sets the global locale to the argument and returns a
+     *  copy of the previous global locale.  If the argument has a name, it
+     *  will also call std::setlocale(LC_ALL, loc.name()).
+     *
+     *  @param  locale  The new locale to make global.
+     *  @return  Copy of the old global locale.
+    */
+    static locale
+    global(const locale&);
+
+    /**
+     *  @brief  Return reference to the C locale.
+    */
+    static const locale&
+    classic();
+
+  private:
+    // The (shared) implementation
+    _Impl*		_M_impl;
+
+    // The "C" reference locale
+    static _Impl*       _S_classic;
+
+    // Current global locale
+    static _Impl*	_S_global;
+
+    // Names of underlying locale categories.
+    // NB: locale::global() has to know how to modify all the
+    // underlying categories, not just the ones required by the C++
+    // standard.
+    static const char* const* const _S_categories;
+
+    // Number of standard categories. For C++, these categories are
+    // collate, ctype, monetary, numeric, time, and messages. These
+    // directly correspond to ISO C99 macros LC_COLLATE, LC_CTYPE,
+    // LC_MONETARY, LC_NUMERIC, and LC_TIME. In addition, POSIX (IEEE
+    // 1003.1-2001) specifies LC_MESSAGES.
+    // In addition to the standard categories, the underlying
+    // operating system is allowed to define extra LC_*
+    // macros. For GNU systems, the following are also valid:
+    // LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT,
+    // and LC_IDENTIFICATION.
+    enum { _S_categories_size = 6 + _GLIBCXX_NUM_CATEGORIES };
+
+#ifdef __GTHREADS
+    static __gthread_once_t _S_once;
+#endif
+
+    explicit
+    locale(_Impl*) throw();
+
+    static void
+    _S_initialize();
+
+    static void
+    _S_initialize_once() throw();
+
+    static category
+    _S_normalize_category(category);
+
+    void
+    _M_coalesce(const locale& __base, const locale& __add, category __cat);
+  };
+
+
+  // 22.1.1.1.2  Class locale::facet
+  /**
+   *  @brief  Localization functionality base class.
+   *  @ingroup locales
+   *
+   *  The facet class is the base class for a localization feature, such as
+   *  money, time, and number printing.  It provides common support for facets
+   *  and reference management.
+   *
+   *  Facets may not be copied or assigned.
+  */
+  class locale::facet
+  {
+  private:
+    friend class locale;
+    friend class locale::_Impl;
+
+    mutable _Atomic_word		_M_refcount;
+
+    // Contains data from the underlying "C" library for the classic locale.
+    static __c_locale                   _S_c_locale;
+
+    // String literal for the name of the classic locale.
+    static const char			_S_c_name[2];
+
+#ifdef __GTHREADS
+    static __gthread_once_t		_S_once;
+#endif
+
+    static void
+    _S_initialize_once();
+
+  protected:
+    /**
+     *  @brief  Facet constructor.
+     *
+     *  This is the constructor provided by the standard.  If refs is 0, the
+     *  facet is destroyed when the last referencing locale is destroyed.
+     *  Otherwise the facet will never be destroyed.
+     *
+     *  @param refs  The initial value for reference count.
+    */
+    explicit
+    facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0)
+    { }
+
+    /// Facet destructor.
+    virtual
+    ~facet();
+
+    static void
+    _S_create_c_locale(__c_locale& __cloc, const char* __s,
+		       __c_locale __old = 0);
+
+    static __c_locale
+    _S_clone_c_locale(__c_locale& __cloc) throw();
+
+    static void
+    _S_destroy_c_locale(__c_locale& __cloc);
+
+    static __c_locale
+    _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s);
+
+    // Returns data from the underlying "C" library data for the
+    // classic locale.
+    static __c_locale
+    _S_get_c_locale();
+
+    _GLIBCXX_CONST static const char*
+    _S_get_c_name() throw();
+
+  private:
+    void
+    _M_add_reference() const throw()
+    { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
+
+    void
+    _M_remove_reference() const throw()
+    {
+      if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
+	{
+	  __try
+	    { delete this; }
+	  __catch(...)
+	    { }
+	}
+    }
+
+    facet(const facet&);  // Not defined.
+
+    facet&
+    operator=(const facet&);  // Not defined.
+  };
+
+
+  // 22.1.1.1.3 Class locale::id
+  /**
+   *  @brief  Facet ID class.
+   *  @ingroup locales
+   *
+   *  The ID class provides facets with an index used to identify them.
+   *  Every facet class must define a public static member locale::id, or be
+   *  derived from a facet that provides this member, otherwise the facet
+   *  cannot be used in a locale.  The locale::id ensures that each class
+   *  type gets a unique identifier.
+  */
+  class locale::id
+  {
+  private:
+    friend class locale;
+    friend class locale::_Impl;
+
+    template<typename _Facet>
+      friend const _Facet&
+      use_facet(const locale&);
+
+    template<typename _Facet>
+      friend bool
+      has_facet(const locale&) throw();
+
+    // NB: There is no accessor for _M_index because it may be used
+    // before the constructor is run; the effect of calling a member
+    // function (even an inline) would be undefined.
+    mutable size_t		_M_index;
+
+    // Last id number assigned.
+    static _Atomic_word		_S_refcount;
+
+    void
+    operator=(const id&);  // Not defined.
+
+    id(const id&);  // Not defined.
+
+  public:
+    // NB: This class is always a static data member, and thus can be
+    // counted on to be zero-initialized.
+    /// Constructor.
+    id() { }
+
+    size_t
+    _M_id() const throw();
+  };
+
+
+  // Implementation object for locale.
+  class locale::_Impl
+  {
+  public:
+    // Friends.
+    friend class locale;
+    friend class locale::facet;
+
+    template<typename _Facet>
+      friend bool
+      has_facet(const locale&) throw();
+
+    template<typename _Facet>
+      friend const _Facet&
+      use_facet(const locale&);
+
+    template<typename _Cache>
+      friend struct __use_cache;
+
+  private:
+    // Data Members.
+    _Atomic_word			_M_refcount;
+    const facet**			_M_facets;
+    size_t				_M_facets_size;
+    const facet**			_M_caches;
+    char**				_M_names;
+    static const locale::id* const	_S_id_ctype[];
+    static const locale::id* const	_S_id_numeric[];
+    static const locale::id* const	_S_id_collate[];
+    static const locale::id* const	_S_id_time[];
+    static const locale::id* const	_S_id_monetary[];
+    static const locale::id* const	_S_id_messages[];
+    static const locale::id* const* const _S_facet_categories[];
+
+    void
+    _M_add_reference() throw()
+    { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
+
+    void
+    _M_remove_reference() throw()
+    {
+      if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
+	{
+	  __try
+	    { delete this; }
+	  __catch(...)
+	    { }
+	}
+    }
+
+    _Impl(const _Impl&, size_t);
+    _Impl(const char*, size_t);
+    _Impl(size_t) throw();
+
+   ~_Impl() throw();
+
+    _Impl(const _Impl&);  // Not defined.
+
+    void
+    operator=(const _Impl&);  // Not defined.
+
+    bool
+    _M_check_same_name()
+    {
+      bool __ret = true;
+      if (_M_names[1])
+	// We must actually compare all the _M_names: can be all equal!
+	for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i)
+	  __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0;
+      return __ret;
+    }
+
+    void
+    _M_replace_categories(const _Impl*, category);
+
+    void
+    _M_replace_category(const _Impl*, const locale::id* const*);
+
+    void
+    _M_replace_facet(const _Impl*, const locale::id*);
+
+    void
+    _M_install_facet(const locale::id*, const facet*);
+
+    template<typename _Facet>
+      void
+      _M_init_facet(_Facet* __facet)
+      { _M_install_facet(&_Facet::id, __facet); }
+
+    void
+    _M_install_cache(const facet*, size_t);
+  };
+
+
+  /**
+   *  @brief  Test for the presence of a facet.
+   *
+   *  has_facet tests the locale argument for the presence of the facet type
+   *  provided as the template parameter.  Facets derived from the facet
+   *  parameter will also return true.
+   *
+   *  @param  Facet  The facet type to test the presence of.
+   *  @param  locale  The locale to test.
+   *  @return  true if locale contains a facet of type Facet, else false.
+  */
+  template<typename _Facet>
+    bool
+    has_facet(const locale& __loc) throw();
+
+  /**
+   *  @brief  Return a facet.
+   *
+   *  use_facet looks for and returns a reference to a facet of type Facet
+   *  where Facet is the template parameter.  If has_facet(locale) is true,
+   *  there is a suitable facet to return.  It throws std::bad_cast if the
+   *  locale doesn't contain a facet of type Facet.
+   *
+   *  @param  Facet  The facet type to access.
+   *  @param  locale  The locale to use.
+   *  @return  Reference to facet of type Facet.
+   *  @throw  std::bad_cast if locale doesn't contain a facet of type Facet.
+  */
+  template<typename _Facet>
+    const _Facet&
+    use_facet(const locale& __loc);
+
+
+  /**
+   *  @brief  Facet for localized string comparison.
+   *
+   *  This facet encapsulates the code to compare strings in a localized
+   *  manner.
+   *
+   *  The collate template uses protected virtual functions to provide
+   *  the actual results.  The public accessors forward the call to
+   *  the virtual functions.  These virtual functions are hooks for
+   *  developers to implement the behavior they require from the
+   *  collate facet.
+  */
+  template<typename _CharT>
+    class collate : public locale::facet
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef basic_string<_CharT>	string_type;
+      //@}
+
+    protected:
+      // Underlying "C" library locale information saved from
+      // initialization, needed by collate_byname as well.
+      __c_locale			_M_c_locale_collate;
+
+    public:
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      collate(size_t __refs = 0)
+      : facet(__refs), _M_c_locale_collate(_S_get_c_locale())
+      { }
+
+      /**
+       *  @brief  Internal constructor. Not for general use.
+       *
+       *  This is a constructor for use by the library itself to set up new
+       *  locales.
+       *
+       *  @param cloc  The C locale.
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      collate(__c_locale __cloc, size_t __refs = 0)
+      : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
+      { }
+
+      /**
+       *  @brief  Compare two strings.
+       *
+       *  This function compares two strings and returns the result by calling
+       *  collate::do_compare().
+       *
+       *  @param lo1  Start of string 1.
+       *  @param hi1  End of string 1.
+       *  @param lo2  Start of string 2.
+       *  @param hi2  End of string 2.
+       *  @return  1 if string1 > string2, -1 if string1 < string2, else 0.
+      */
+      int
+      compare(const _CharT* __lo1, const _CharT* __hi1,
+	      const _CharT* __lo2, const _CharT* __hi2) const
+      { return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
+
+      /**
+       *  @brief  Transform string to comparable form.
+       *
+       *  This function is a wrapper for strxfrm functionality.  It takes the
+       *  input string and returns a modified string that can be directly
+       *  compared to other transformed strings.  In the C locale, this
+       *  function just returns a copy of the input string.  In some other
+       *  locales, it may replace two chars with one, change a char for
+       *  another, etc.  It does so by returning collate::do_transform().
+       *
+       *  @param lo  Start of string.
+       *  @param hi  End of string.
+       *  @return  Transformed string_type.
+      */
+      string_type
+      transform(const _CharT* __lo, const _CharT* __hi) const
+      { return this->do_transform(__lo, __hi); }
+
+      /**
+       *  @brief  Return hash of a string.
+       *
+       *  This function computes and returns a hash on the input string.  It
+       *  does so by returning collate::do_hash().
+       *
+       *  @param lo  Start of string.
+       *  @param hi  End of string.
+       *  @return  Hash value.
+      */
+      long
+      hash(const _CharT* __lo, const _CharT* __hi) const
+      { return this->do_hash(__lo, __hi); }
+
+      // Used to abstract out _CharT bits in virtual member functions, below.
+      int
+      _M_compare(const _CharT*, const _CharT*) const throw();
+
+      size_t
+      _M_transform(_CharT*, const _CharT*, size_t) const throw();
+
+  protected:
+      /// Destructor.
+      virtual
+      ~collate()
+      { _S_destroy_c_locale(_M_c_locale_collate); }
+
+      /**
+       *  @brief  Compare two strings.
+       *
+       *  This function is a hook for derived classes to change the value
+       *  returned.  @see compare().
+       *
+       *  @param lo1  Start of string 1.
+       *  @param hi1  End of string 1.
+       *  @param lo2  Start of string 2.
+       *  @param hi2  End of string 2.
+       *  @return  1 if string1 > string2, -1 if string1 < string2, else 0.
+      */
+      virtual int
+      do_compare(const _CharT* __lo1, const _CharT* __hi1,
+		 const _CharT* __lo2, const _CharT* __hi2) const;
+
+      /**
+       *  @brief  Transform string to comparable form.
+       *
+       *  This function is a hook for derived classes to change the value
+       *  returned.
+       *
+       *  @param lo1  Start of string 1.
+       *  @param hi1  End of string 1.
+       *  @param lo2  Start of string 2.
+       *  @param hi2  End of string 2.
+       *  @return  1 if string1 > string2, -1 if string1 < string2, else 0.
+      */
+      virtual string_type
+      do_transform(const _CharT* __lo, const _CharT* __hi) const;
+
+      /**
+       *  @brief  Return hash of a string.
+       *
+       *  This function computes and returns a hash on the input string.  This
+       *  function is a hook for derived classes to change the value returned.
+       *
+       *  @param lo  Start of string.
+       *  @param hi  End of string.
+       *  @return  Hash value.
+      */
+      virtual long
+      do_hash(const _CharT* __lo, const _CharT* __hi) const;
+    };
+
+  template<typename _CharT>
+    locale::id collate<_CharT>::id;
+
+  // Specializations.
+  template<>
+    int
+    collate<char>::_M_compare(const char*, const char*) const throw();
+
+  template<>
+    size_t
+    collate<char>::_M_transform(char*, const char*, size_t) const throw();
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    int
+    collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const throw();
+
+  template<>
+    size_t
+    collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const throw();
+#endif
+
+  /// class collate_byname [22.2.4.2].
+  template<typename _CharT>
+    class collate_byname : public collate<_CharT>
+    {
+    public:
+      //@{
+      /// Public typedefs
+      typedef _CharT               char_type;
+      typedef basic_string<_CharT> string_type;
+      //@}
+
+      explicit
+      collate_byname(const char* __s, size_t __refs = 0)
+      : collate<_CharT>(__refs)
+      {
+	if (__builtin_strcmp(__s, "C") != 0
+	    && __builtin_strcmp(__s, "POSIX") != 0)
+	  {
+	    this->_S_destroy_c_locale(this->_M_c_locale_collate);
+	    this->_S_create_c_locale(this->_M_c_locale_collate, __s);
+	  }
+      }
+
+    protected:
+      virtual
+      ~collate_byname() { }
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/locale_classes.tcc>
+#endif
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_classes.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_classes.tcc
new file mode 100644
index 0000000..5dcf205
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_classes.tcc
@@ -0,0 +1,271 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_classes.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+#ifndef _LOCALE_CLASSES_TCC
+#define _LOCALE_CLASSES_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _Facet>
+    locale::
+    locale(const locale& __other, _Facet* __f)
+    {
+      _M_impl = new _Impl(*__other._M_impl, 1);
+
+      __try
+	{ _M_impl->_M_install_facet(&_Facet::id, __f); }
+      __catch(...)
+	{
+	  _M_impl->_M_remove_reference();
+	  __throw_exception_again;
+	}
+      delete [] _M_impl->_M_names[0];
+      _M_impl->_M_names[0] = 0;   // Unnamed.
+    }
+
+  template<typename _Facet>
+    locale
+    locale::
+    combine(const locale& __other) const
+    {
+      _Impl* __tmp = new _Impl(*_M_impl, 1);
+      __try
+	{
+	  __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
+	}
+      __catch(...)
+	{
+	  __tmp->_M_remove_reference();
+	  __throw_exception_again;
+	}
+      return locale(__tmp);
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    bool
+    locale::
+    operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
+	       const basic_string<_CharT, _Traits, _Alloc>& __s2) const
+    {
+      typedef std::collate<_CharT> __collate_type;
+      const __collate_type& __collate = use_facet<__collate_type>(*this);
+      return (__collate.compare(__s1.data(), __s1.data() + __s1.length(),
+				__s2.data(), __s2.data() + __s2.length()) < 0);
+    }
+
+
+  template<typename _Facet>
+    bool
+    has_facet(const locale& __loc) throw()
+    {
+      const size_t __i = _Facet::id._M_id();
+      const locale::facet** __facets = __loc._M_impl->_M_facets;
+      return (__i < __loc._M_impl->_M_facets_size
+#ifdef __GXX_RTTI
+	      && dynamic_cast<const _Facet*>(__facets[__i]));
+#else
+              && static_cast<const _Facet*>(__facets[__i]));
+#endif
+    }
+
+  template<typename _Facet>
+    const _Facet&
+    use_facet(const locale& __loc)
+    {
+      const size_t __i = _Facet::id._M_id();
+      const locale::facet** __facets = __loc._M_impl->_M_facets;
+      if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i])
+        __throw_bad_cast();
+#ifdef __GXX_RTTI
+      return dynamic_cast<const _Facet&>(*__facets[__i]);
+#else
+      return static_cast<const _Facet&>(*__facets[__i]);
+#endif
+    }
+
+
+  // Generic version does nothing.
+  template<typename _CharT>
+    int
+    collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw ()
+    { return 0; }
+
+  // Generic version does nothing.
+  template<typename _CharT>
+    size_t
+    collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw ()
+    { return 0; }
+
+  template<typename _CharT>
+    int
+    collate<_CharT>::
+    do_compare(const _CharT* __lo1, const _CharT* __hi1,
+	       const _CharT* __lo2, const _CharT* __hi2) const
+    {
+      // strcoll assumes zero-terminated strings so we make a copy
+      // and then put a zero at the end.
+      const string_type __one(__lo1, __hi1);
+      const string_type __two(__lo2, __hi2);
+
+      const _CharT* __p = __one.c_str();
+      const _CharT* __pend = __one.data() + __one.length();
+      const _CharT* __q = __two.c_str();
+      const _CharT* __qend = __two.data() + __two.length();
+
+      // strcoll stops when it sees a nul character so we break
+      // the strings into zero-terminated substrings and pass those
+      // to strcoll.
+      for (;;)
+	{
+	  const int __res = _M_compare(__p, __q);
+	  if (__res)
+	    return __res;
+
+	  __p += char_traits<_CharT>::length(__p);
+	  __q += char_traits<_CharT>::length(__q);
+	  if (__p == __pend && __q == __qend)
+	    return 0;
+	  else if (__p == __pend)
+	    return -1;
+	  else if (__q == __qend)
+	    return 1;
+
+	  __p++;
+	  __q++;
+	}
+    }
+
+  template<typename _CharT>
+    typename collate<_CharT>::string_type
+    collate<_CharT>::
+    do_transform(const _CharT* __lo, const _CharT* __hi) const
+    {
+      string_type __ret;
+
+      // strxfrm assumes zero-terminated strings so we make a copy
+      const string_type __str(__lo, __hi);
+
+      const _CharT* __p = __str.c_str();
+      const _CharT* __pend = __str.data() + __str.length();
+
+      size_t __len = (__hi - __lo) * 2;
+
+      _CharT* __c = new _CharT[__len];
+
+      __try
+	{
+	  // strxfrm stops when it sees a nul character so we break
+	  // the string into zero-terminated substrings and pass those
+	  // to strxfrm.
+	  for (;;)
+	    {
+	      // First try a buffer perhaps big enough.
+	      size_t __res = _M_transform(__c, __p, __len);
+	      // If the buffer was not large enough, try again with the
+	      // correct size.
+	      if (__res >= __len)
+		{
+		  __len = __res + 1;
+		  delete [] __c, __c = 0;
+		  __c = new _CharT[__len];
+		  __res = _M_transform(__c, __p, __len);
+		}
+
+	      __ret.append(__c, __res);
+	      __p += char_traits<_CharT>::length(__p);
+	      if (__p == __pend)
+		break;
+
+	      __p++;
+	      __ret.push_back(_CharT());
+	    }
+	}
+      __catch(...)
+	{
+	  delete [] __c;
+	  __throw_exception_again;
+	}
+
+      delete [] __c;
+
+      return __ret;
+    }
+
+  template<typename _CharT>
+    long
+    collate<_CharT>::
+    do_hash(const _CharT* __lo, const _CharT* __hi) const
+    {
+      unsigned long __val = 0;
+      for (; __lo < __hi; ++__lo)
+	__val =
+	  *__lo + ((__val << 7)
+		   | (__val >> (__gnu_cxx::__numeric_traits<unsigned long>::
+				__digits - 7)));
+      return static_cast<long>(__val);
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class collate<char>;
+  extern template class collate_byname<char>;
+
+  extern template
+    const collate<char>&
+    use_facet<collate<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<collate<char> >(const locale&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class collate<wchar_t>;
+  extern template class collate_byname<wchar_t>;
+
+  extern template
+    const collate<wchar_t>&
+    use_facet<collate<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<collate<wchar_t> >(const locale&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets.h
new file mode 100644
index 0000000..2e18f7d
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets.h
@@ -0,0 +1,2604 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_facets.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+#ifndef _LOCALE_FACETS_H
+#define _LOCALE_FACETS_H 1
+
+#pragma GCC system_header
+
+#include <cwctype>	// For wctype_t
+#include <cctype>
+#include <bits/ctype_base.h>	
+#include <iosfwd>
+#include <bits/ios_base.h>  // For ios_base, ios_base::iostate
+#include <streambuf>
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include <ext/numeric_traits.h>
+#include <bits/streambuf_iterator.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // NB: Don't instantiate required wchar_t facets if no wchar_t support.
+#ifdef _GLIBCXX_USE_WCHAR_T
+# define  _GLIBCXX_NUM_FACETS 28
+#else
+# define  _GLIBCXX_NUM_FACETS 14
+#endif
+
+  // Convert string to numeric value of type _Tp and store results.
+  // NB: This is specialized for all required types, there is no
+  // generic definition.
+  template<typename _Tp>
+    void
+    __convert_to_v(const char*, _Tp&, ios_base::iostate&,
+		   const __c_locale&) throw();
+
+  // Explicit specializations for required types.
+  template<>
+    void
+    __convert_to_v(const char*, float&, ios_base::iostate&,
+		   const __c_locale&) throw();
+
+  template<>
+    void
+    __convert_to_v(const char*, double&, ios_base::iostate&,
+		   const __c_locale&) throw();
+
+  template<>
+    void
+    __convert_to_v(const char*, long double&, ios_base::iostate&,
+		   const __c_locale&) throw();
+
+  // NB: __pad is a struct, rather than a function, so it can be
+  // partially-specialized.
+  template<typename _CharT, typename _Traits>
+    struct __pad
+    {
+      static void
+      _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
+	     const _CharT* __olds, streamsize __newlen, streamsize __oldlen);
+    };
+
+  // Used by both numeric and monetary facets.
+  // Inserts "group separator" characters into an array of characters.
+  // It's recursive, one iteration per group.  It moves the characters
+  // in the buffer this way: "xxxx12345" -> "12,345xxx".  Call this
+  // only with __gsize != 0.
+  template<typename _CharT>
+    _CharT*
+    __add_grouping(_CharT* __s, _CharT __sep,
+		   const char* __gbeg, size_t __gsize,
+		   const _CharT* __first, const _CharT* __last);
+
+  // This template permits specializing facet output code for
+  // ostreambuf_iterator.  For ostreambuf_iterator, sputn is
+  // significantly more efficient than incrementing iterators.
+  template<typename _CharT>
+    inline
+    ostreambuf_iterator<_CharT>
+    __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len)
+    {
+      __s._M_put(__ws, __len);
+      return __s;
+    }
+
+  // This is the unspecialized form of the template.
+  template<typename _CharT, typename _OutIter>
+    inline
+    _OutIter
+    __write(_OutIter __s, const _CharT* __ws, int __len)
+    {
+      for (int __j = 0; __j < __len; __j++, ++__s)
+	*__s = __ws[__j];
+      return __s;
+    }
+
+
+  // 22.2.1.1  Template class ctype
+  // Include host and configuration specific ctype enums for ctype_base.
+
+  /**
+   *  @brief  Common base for ctype facet
+   *
+   *  This template class provides implementations of the public functions
+   *  that forward to the protected virtual functions.
+   *
+   *  This template also provides abstract stubs for the protected virtual
+   *  functions.
+  */
+  template<typename _CharT>
+    class __ctype_abstract_base : public locale::facet, public ctype_base
+    {
+    public:
+      // Types:
+      /// Typedef for the template parameter
+      typedef _CharT char_type;
+
+      /**
+       *  @brief  Test char_type classification.
+       *
+       *  This function finds a mask M for @a c and compares it to mask @a m.
+       *  It does so by returning the value of ctype<char_type>::do_is().
+       *
+       *  @param c  The char_type to compare the mask of.
+       *  @param m  The mask to compare against.
+       *  @return  (M & m) != 0.
+      */
+      bool
+      is(mask __m, char_type __c) const
+      { return this->do_is(__m, __c); }
+
+      /**
+       *  @brief  Return a mask array.
+       *
+       *  This function finds the mask for each char_type in the range [lo,hi)
+       *  and successively writes it to vec.  vec must have as many elements
+       *  as the char array.  It does so by returning the value of
+       *  ctype<char_type>::do_is().
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param vec  Pointer to an array of mask storage.
+       *  @return  @a hi.
+      */
+      const char_type*
+      is(const char_type *__lo, const char_type *__hi, mask *__vec) const
+      { return this->do_is(__lo, __hi, __vec); }
+
+      /**
+       *  @brief  Find char_type matching a mask
+       *
+       *  This function searches for and returns the first char_type c in
+       *  [lo,hi) for which is(m,c) is true.  It does so by returning
+       *  ctype<char_type>::do_scan_is().
+       *
+       *  @param m  The mask to compare against.
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  Pointer to matching char_type if found, else @a hi.
+      */
+      const char_type*
+      scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
+      { return this->do_scan_is(__m, __lo, __hi); }
+
+      /**
+       *  @brief  Find char_type not matching a mask
+       *
+       *  This function searches for and returns the first char_type c in
+       *  [lo,hi) for which is(m,c) is false.  It does so by returning
+       *  ctype<char_type>::do_scan_not().
+       *
+       *  @param m  The mask to compare against.
+       *  @param lo  Pointer to first char in range.
+       *  @param hi  Pointer to end of range.
+       *  @return  Pointer to non-matching char if found, else @a hi.
+      */
+      const char_type*
+      scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+      { return this->do_scan_not(__m, __lo, __hi); }
+
+      /**
+       *  @brief  Convert to uppercase.
+       *
+       *  This function converts the argument to uppercase if possible.
+       *  If not possible (for example, '2'), returns the argument.  It does
+       *  so by returning ctype<char_type>::do_toupper().
+       *
+       *  @param c  The char_type to convert.
+       *  @return  The uppercase char_type if convertible, else @a c.
+      */
+      char_type
+      toupper(char_type __c) const
+      { return this->do_toupper(__c); }
+
+      /**
+       *  @brief  Convert array to uppercase.
+       *
+       *  This function converts each char_type in the range [lo,hi) to
+       *  uppercase if possible.  Other elements remain untouched.  It does so
+       *  by returning ctype<char_type>:: do_toupper(lo, hi).
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      const char_type*
+      toupper(char_type *__lo, const char_type* __hi) const
+      { return this->do_toupper(__lo, __hi); }
+
+      /**
+       *  @brief  Convert to lowercase.
+       *
+       *  This function converts the argument to lowercase if possible.  If
+       *  not possible (for example, '2'), returns the argument.  It does so
+       *  by returning ctype<char_type>::do_tolower(c).
+       *
+       *  @param c  The char_type to convert.
+       *  @return  The lowercase char_type if convertible, else @a c.
+      */
+      char_type
+      tolower(char_type __c) const
+      { return this->do_tolower(__c); }
+
+      /**
+       *  @brief  Convert array to lowercase.
+       *
+       *  This function converts each char_type in the range [lo,hi) to
+       *  lowercase if possible.  Other elements remain untouched.  It does so
+       *  by returning ctype<char_type>:: do_tolower(lo, hi).
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      const char_type*
+      tolower(char_type* __lo, const char_type* __hi) const
+      { return this->do_tolower(__lo, __hi); }
+
+      /**
+       *  @brief  Widen char to char_type
+       *
+       *  This function converts the char argument to char_type using the
+       *  simplest reasonable transformation.  It does so by returning
+       *  ctype<char_type>::do_widen(c).
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char to convert.
+       *  @return  The converted char_type.
+      */
+      char_type
+      widen(char __c) const
+      { return this->do_widen(__c); }
+
+      /**
+       *  @brief  Widen array to char_type
+       *
+       *  This function converts each char in the input to char_type using the
+       *  simplest reasonable transformation.  It does so by returning
+       *  ctype<char_type>::do_widen(c).
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      const char*
+      widen(const char* __lo, const char* __hi, char_type* __to) const
+      { return this->do_widen(__lo, __hi, __to); }
+
+      /**
+       *  @brief  Narrow char_type to char
+       *
+       *  This function converts the char_type to char using the simplest
+       *  reasonable transformation.  If the conversion fails, dfault is
+       *  returned instead.  It does so by returning
+       *  ctype<char_type>::do_narrow(c).
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char_type to convert.
+       *  @param dfault  Char to return if conversion fails.
+       *  @return  The converted char.
+      */
+      char
+      narrow(char_type __c, char __dfault) const
+      { return this->do_narrow(__c, __dfault); }
+
+      /**
+       *  @brief  Narrow array to char array
+       *
+       *  This function converts each char_type in the input to char using the
+       *  simplest reasonable transformation and writes the results to the
+       *  destination array.  For any char_type in the input that cannot be
+       *  converted, @a dfault is used instead.  It does so by returning
+       *  ctype<char_type>::do_narrow(lo, hi, dfault, to).
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param dfault  Char to use if conversion fails.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      const char_type*
+      narrow(const char_type* __lo, const char_type* __hi,
+	      char __dfault, char *__to) const
+      { return this->do_narrow(__lo, __hi, __dfault, __to); }
+
+    protected:
+      explicit
+      __ctype_abstract_base(size_t __refs = 0): facet(__refs) { }
+
+      virtual
+      ~__ctype_abstract_base() { }
+
+      /**
+       *  @brief  Test char_type classification.
+       *
+       *  This function finds a mask M for @a c and compares it to mask @a m.
+       *
+       *  do_is() is a hook for a derived facet to change the behavior of
+       *  classifying.  do_is() must always return the same result for the
+       *  same input.
+       *
+       *  @param c  The char_type to find the mask of.
+       *  @param m  The mask to compare against.
+       *  @return  (M & m) != 0.
+      */
+      virtual bool
+      do_is(mask __m, char_type __c) const = 0;
+
+      /**
+       *  @brief  Return a mask array.
+       *
+       *  This function finds the mask for each char_type in the range [lo,hi)
+       *  and successively writes it to vec.  vec must have as many elements
+       *  as the input.
+       *
+       *  do_is() is a hook for a derived facet to change the behavior of
+       *  classifying.  do_is() must always return the same result for the
+       *  same input.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param vec  Pointer to an array of mask storage.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_is(const char_type* __lo, const char_type* __hi,
+	    mask* __vec) const = 0;
+
+      /**
+       *  @brief  Find char_type matching mask
+       *
+       *  This function searches for and returns the first char_type c in
+       *  [lo,hi) for which is(m,c) is true.
+       *
+       *  do_scan_is() is a hook for a derived facet to change the behavior of
+       *  match searching.  do_is() must always return the same result for the
+       *  same input.
+       *
+       *  @param m  The mask to compare against.
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  Pointer to a matching char_type if found, else @a hi.
+      */
+      virtual const char_type*
+      do_scan_is(mask __m, const char_type* __lo,
+		 const char_type* __hi) const = 0;
+
+      /**
+       *  @brief  Find char_type not matching mask
+       *
+       *  This function searches for and returns a pointer to the first
+       *  char_type c of [lo,hi) for which is(m,c) is false.
+       *
+       *  do_scan_is() is a hook for a derived facet to change the behavior of
+       *  match searching.  do_is() must always return the same result for the
+       *  same input.
+       *
+       *  @param m  The mask to compare against.
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  Pointer to a non-matching char_type if found, else @a hi.
+      */
+      virtual const char_type*
+      do_scan_not(mask __m, const char_type* __lo,
+		  const char_type* __hi) const = 0;
+
+      /**
+       *  @brief  Convert to uppercase.
+       *
+       *  This virtual function converts the char_type argument to uppercase
+       *  if possible.  If not possible (for example, '2'), returns the
+       *  argument.
+       *
+       *  do_toupper() is a hook for a derived facet to change the behavior of
+       *  uppercasing.  do_toupper() must always return the same result for
+       *  the same input.
+       *
+       *  @param c  The char_type to convert.
+       *  @return  The uppercase char_type if convertible, else @a c.
+      */
+      virtual char_type
+      do_toupper(char_type) const = 0;
+
+      /**
+       *  @brief  Convert array to uppercase.
+       *
+       *  This virtual function converts each char_type in the range [lo,hi)
+       *  to uppercase if possible.  Other elements remain untouched.
+       *
+       *  do_toupper() is a hook for a derived facet to change the behavior of
+       *  uppercasing.  do_toupper() must always return the same result for
+       *  the same input.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_toupper(char_type* __lo, const char_type* __hi) const = 0;
+
+      /**
+       *  @brief  Convert to lowercase.
+       *
+       *  This virtual function converts the argument to lowercase if
+       *  possible.  If not possible (for example, '2'), returns the argument.
+       *
+       *  do_tolower() is a hook for a derived facet to change the behavior of
+       *  lowercasing.  do_tolower() must always return the same result for
+       *  the same input.
+       *
+       *  @param c  The char_type to convert.
+       *  @return  The lowercase char_type if convertible, else @a c.
+      */
+      virtual char_type
+      do_tolower(char_type) const = 0;
+
+      /**
+       *  @brief  Convert array to lowercase.
+       *
+       *  This virtual function converts each char_type in the range [lo,hi)
+       *  to lowercase if possible.  Other elements remain untouched.
+       *
+       *  do_tolower() is a hook for a derived facet to change the behavior of
+       *  lowercasing.  do_tolower() must always return the same result for
+       *  the same input.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_tolower(char_type* __lo, const char_type* __hi) const = 0;
+
+      /**
+       *  @brief  Widen char
+       *
+       *  This virtual function converts the char to char_type using the
+       *  simplest reasonable transformation.
+       *
+       *  do_widen() is a hook for a derived facet to change the behavior of
+       *  widening.  do_widen() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char to convert.
+       *  @return  The converted char_type
+      */
+      virtual char_type
+      do_widen(char) const = 0;
+
+      /**
+       *  @brief  Widen char array
+       *
+       *  This function converts each char in the input to char_type using the
+       *  simplest reasonable transformation.
+       *
+       *  do_widen() is a hook for a derived facet to change the behavior of
+       *  widening.  do_widen() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start range.
+       *  @param hi  Pointer to end of range.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      virtual const char*
+      do_widen(const char* __lo, const char* __hi,
+	       char_type* __dest) const = 0;
+
+      /**
+       *  @brief  Narrow char_type to char
+       *
+       *  This virtual function converts the argument to char using the
+       *  simplest reasonable transformation.  If the conversion fails, dfault
+       *  is returned instead.
+       *
+       *  do_narrow() is a hook for a derived facet to change the behavior of
+       *  narrowing.  do_narrow() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char_type to convert.
+       *  @param dfault  Char to return if conversion fails.
+       *  @return  The converted char.
+      */
+      virtual char
+      do_narrow(char_type, char __dfault) const = 0;
+
+      /**
+       *  @brief  Narrow char_type array to char
+       *
+       *  This virtual function converts each char_type in the range [lo,hi) to
+       *  char using the simplest reasonable transformation and writes the
+       *  results to the destination array.  For any element in the input that
+       *  cannot be converted, @a dfault is used instead.
+       *
+       *  do_narrow() is a hook for a derived facet to change the behavior of
+       *  narrowing.  do_narrow() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param dfault  Char to use if conversion fails.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_narrow(const char_type* __lo, const char_type* __hi,
+		char __dfault, char* __dest) const = 0;
+    };
+
+  /**
+   *  @brief  Primary class template ctype facet.
+   *  @ingroup locales
+   *
+   *  This template class defines classification and conversion functions for
+   *  character sets.  It wraps cctype functionality.  Ctype gets used by
+   *  streams for many I/O operations.
+   *
+   *  This template provides the protected virtual functions the developer
+   *  will have to replace in a derived class or specialization to make a
+   *  working facet.  The public functions that access them are defined in
+   *  __ctype_abstract_base, to allow for implementation flexibility.  See
+   *  ctype<wchar_t> for an example.  The functions are documented in
+   *  __ctype_abstract_base.
+   *
+   *  Note: implementations are provided for all the protected virtual
+   *  functions, but will likely not be useful.
+  */
+  template<typename _CharT>
+    class ctype : public __ctype_abstract_base<_CharT>
+    {
+    public:
+      // Types:
+      typedef _CharT			char_type;
+      typedef typename __ctype_abstract_base<_CharT>::mask mask;
+
+      /// The facet id for ctype<char_type>
+      static locale::id			id;
+
+      explicit
+      ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { }
+
+   protected:
+      virtual
+      ~ctype();
+
+      virtual bool
+      do_is(mask __m, char_type __c) const;
+
+      virtual const char_type*
+      do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+
+      virtual const char_type*
+      do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+
+      virtual const char_type*
+      do_scan_not(mask __m, const char_type* __lo,
+		  const char_type* __hi) const;
+
+      virtual char_type
+      do_toupper(char_type __c) const;
+
+      virtual const char_type*
+      do_toupper(char_type* __lo, const char_type* __hi) const;
+
+      virtual char_type
+      do_tolower(char_type __c) const;
+
+      virtual const char_type*
+      do_tolower(char_type* __lo, const char_type* __hi) const;
+
+      virtual char_type
+      do_widen(char __c) const;
+
+      virtual const char*
+      do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
+
+      virtual char
+      do_narrow(char_type, char __dfault) const;
+
+      virtual const char_type*
+      do_narrow(const char_type* __lo, const char_type* __hi,
+		char __dfault, char* __dest) const;
+    };
+
+  template<typename _CharT>
+    locale::id ctype<_CharT>::id;
+
+  /**
+   *  @brief  The ctype<char> specialization.
+   *  @ingroup locales
+   *
+   *  This class defines classification and conversion functions for
+   *  the char type.  It gets used by char streams for many I/O
+   *  operations.  The char specialization provides a number of
+   *  optimizations as well.
+  */
+  template<>
+    class ctype<char> : public locale::facet, public ctype_base
+    {
+    public:
+      // Types:
+      /// Typedef for the template parameter char.
+      typedef char		char_type;
+
+    protected:
+      // Data Members:
+      __c_locale		_M_c_locale_ctype;
+      bool			_M_del;
+      __to_type			_M_toupper;
+      __to_type			_M_tolower;
+      const mask*		_M_table;
+      mutable char		_M_widen_ok;
+      mutable char		_M_widen[1 + static_cast<unsigned char>(-1)];
+      mutable char		_M_narrow[1 + static_cast<unsigned char>(-1)];
+      mutable char		_M_narrow_ok;	// 0 uninitialized, 1 init,
+						// 2 memcpy can't be used
+
+    public:
+      /// The facet id for ctype<char>
+      static locale::id        id;
+      /// The size of the mask table.  It is SCHAR_MAX + 1.
+      static const size_t      table_size = 1 + static_cast<unsigned char>(-1);
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param table If non-zero, table is used as the per-char mask.
+       *               Else classic_table() is used.
+       *  @param del   If true, passes ownership of table to this facet.
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
+
+      /**
+       *  @brief  Constructor performs static initialization.
+       *
+       *  This constructor is used to construct the initial C locale facet.
+       *
+       *  @param cloc  Handle to C locale data.
+       *  @param table If non-zero, table is used as the per-char mask.
+       *  @param del   If true, passes ownership of table to this facet.
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
+	    size_t __refs = 0);
+
+      /**
+       *  @brief  Test char classification.
+       *
+       *  This function compares the mask table[c] to @a m.
+       *
+       *  @param c  The char to compare the mask of.
+       *  @param m  The mask to compare against.
+       *  @return  True if m & table[c] is true, false otherwise.
+      */
+      inline bool
+      is(mask __m, char __c) const;
+
+      /**
+       *  @brief  Return a mask array.
+       *
+       *  This function finds the mask for each char in the range [lo, hi) and
+       *  successively writes it to vec.  vec must have as many elements as
+       *  the char array.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param vec  Pointer to an array of mask storage.
+       *  @return  @a hi.
+      */
+      inline const char*
+      is(const char* __lo, const char* __hi, mask* __vec) const;
+
+      /**
+       *  @brief  Find char matching a mask
+       *
+       *  This function searches for and returns the first char in [lo,hi) for
+       *  which is(m,char) is true.
+       *
+       *  @param m  The mask to compare against.
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  Pointer to a matching char if found, else @a hi.
+      */
+      inline const char*
+      scan_is(mask __m, const char* __lo, const char* __hi) const;
+
+      /**
+       *  @brief  Find char not matching a mask
+       *
+       *  This function searches for and returns a pointer to the first char
+       *  in [lo,hi) for which is(m,char) is false.
+       *
+       *  @param m  The mask to compare against.
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  Pointer to a non-matching char if found, else @a hi.
+      */
+      inline const char*
+      scan_not(mask __m, const char* __lo, const char* __hi) const;
+
+      /**
+       *  @brief  Convert to uppercase.
+       *
+       *  This function converts the char argument to uppercase if possible.
+       *  If not possible (for example, '2'), returns the argument.
+       *
+       *  toupper() acts as if it returns ctype<char>::do_toupper(c).
+       *  do_toupper() must always return the same result for the same input.
+       *
+       *  @param c  The char to convert.
+       *  @return  The uppercase char if convertible, else @a c.
+      */
+      char_type
+      toupper(char_type __c) const
+      { return this->do_toupper(__c); }
+
+      /**
+       *  @brief  Convert array to uppercase.
+       *
+       *  This function converts each char in the range [lo,hi) to uppercase
+       *  if possible.  Other chars remain untouched.
+       *
+       *  toupper() acts as if it returns ctype<char>:: do_toupper(lo, hi).
+       *  do_toupper() must always return the same result for the same input.
+       *
+       *  @param lo  Pointer to first char in range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      const char_type*
+      toupper(char_type *__lo, const char_type* __hi) const
+      { return this->do_toupper(__lo, __hi); }
+
+      /**
+       *  @brief  Convert to lowercase.
+       *
+       *  This function converts the char argument to lowercase if possible.
+       *  If not possible (for example, '2'), returns the argument.
+       *
+       *  tolower() acts as if it returns ctype<char>::do_tolower(c).
+       *  do_tolower() must always return the same result for the same input.
+       *
+       *  @param c  The char to convert.
+       *  @return  The lowercase char if convertible, else @a c.
+      */
+      char_type
+      tolower(char_type __c) const
+      { return this->do_tolower(__c); }
+
+      /**
+       *  @brief  Convert array to lowercase.
+       *
+       *  This function converts each char in the range [lo,hi) to lowercase
+       *  if possible.  Other chars remain untouched.
+       *
+       *  tolower() acts as if it returns ctype<char>:: do_tolower(lo, hi).
+       *  do_tolower() must always return the same result for the same input.
+       *
+       *  @param lo  Pointer to first char in range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      const char_type*
+      tolower(char_type* __lo, const char_type* __hi) const
+      { return this->do_tolower(__lo, __hi); }
+
+      /**
+       *  @brief  Widen char
+       *
+       *  This function converts the char to char_type using the simplest
+       *  reasonable transformation.  For an underived ctype<char> facet, the
+       *  argument will be returned unchanged.
+       *
+       *  This function works as if it returns ctype<char>::do_widen(c).
+       *  do_widen() must always return the same result for the same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char to convert.
+       *  @return  The converted character.
+      */
+      char_type
+      widen(char __c) const
+      {
+	if (_M_widen_ok)
+	  return _M_widen[static_cast<unsigned char>(__c)];
+	this->_M_widen_init();
+	return this->do_widen(__c);
+      }
+
+      /**
+       *  @brief  Widen char array
+       *
+       *  This function converts each char in the input to char using the
+       *  simplest reasonable transformation.  For an underived ctype<char>
+       *  facet, the argument will be copied unchanged.
+       *
+       *  This function works as if it returns ctype<char>::do_widen(c).
+       *  do_widen() must always return the same result for the same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to first char in range.
+       *  @param hi  Pointer to end of range.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      const char*
+      widen(const char* __lo, const char* __hi, char_type* __to) const
+      {
+	if (_M_widen_ok == 1)
+	  {
+	    __builtin_memcpy(__to, __lo, __hi - __lo);
+	    return __hi;
+	  }
+	if (!_M_widen_ok)
+	  _M_widen_init();
+	return this->do_widen(__lo, __hi, __to);
+      }
+
+      /**
+       *  @brief  Narrow char
+       *
+       *  This function converts the char to char using the simplest
+       *  reasonable transformation.  If the conversion fails, dfault is
+       *  returned instead.  For an underived ctype<char> facet, @a c
+       *  will be returned unchanged.
+       *
+       *  This function works as if it returns ctype<char>::do_narrow(c).
+       *  do_narrow() must always return the same result for the same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char to convert.
+       *  @param dfault  Char to return if conversion fails.
+       *  @return  The converted character.
+      */
+      char
+      narrow(char_type __c, char __dfault) const
+      {
+	if (_M_narrow[static_cast<unsigned char>(__c)])
+	  return _M_narrow[static_cast<unsigned char>(__c)];
+	const char __t = do_narrow(__c, __dfault);
+	if (__t != __dfault)
+	  _M_narrow[static_cast<unsigned char>(__c)] = __t;
+	return __t;
+      }
+
+      /**
+       *  @brief  Narrow char array
+       *
+       *  This function converts each char in the input to char using the
+       *  simplest reasonable transformation and writes the results to the
+       *  destination array.  For any char in the input that cannot be
+       *  converted, @a dfault is used instead.  For an underived ctype<char>
+       *  facet, the argument will be copied unchanged.
+       *
+       *  This function works as if it returns ctype<char>::do_narrow(lo, hi,
+       *  dfault, to).  do_narrow() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param dfault  Char to use if conversion fails.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      const char_type*
+      narrow(const char_type* __lo, const char_type* __hi,
+	     char __dfault, char *__to) const
+      {
+	if (__builtin_expect(_M_narrow_ok == 1, true))
+	  {
+	    __builtin_memcpy(__to, __lo, __hi - __lo);
+	    return __hi;
+	  }
+	if (!_M_narrow_ok)
+	  _M_narrow_init();
+	return this->do_narrow(__lo, __hi, __dfault, __to);
+      }
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 695. ctype<char>::classic_table() not accessible.
+      /// Returns a pointer to the mask table provided to the constructor, or
+      /// the default from classic_table() if none was provided.
+      const mask*
+      table() const throw()
+      { return _M_table; }
+
+      /// Returns a pointer to the C locale mask table.
+      static const mask*
+      classic_table() throw();
+    protected:
+
+      /**
+       *  @brief  Destructor.
+       *
+       *  This function deletes table() if @a del was true in the
+       *  constructor.
+      */
+      virtual
+      ~ctype();
+
+      /**
+       *  @brief  Convert to uppercase.
+       *
+       *  This virtual function converts the char argument to uppercase if
+       *  possible.  If not possible (for example, '2'), returns the argument.
+       *
+       *  do_toupper() is a hook for a derived facet to change the behavior of
+       *  uppercasing.  do_toupper() must always return the same result for
+       *  the same input.
+       *
+       *  @param c  The char to convert.
+       *  @return  The uppercase char if convertible, else @a c.
+      */
+      virtual char_type
+      do_toupper(char_type) const;
+
+      /**
+       *  @brief  Convert array to uppercase.
+       *
+       *  This virtual function converts each char in the range [lo,hi) to
+       *  uppercase if possible.  Other chars remain untouched.
+       *
+       *  do_toupper() is a hook for a derived facet to change the behavior of
+       *  uppercasing.  do_toupper() must always return the same result for
+       *  the same input.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_toupper(char_type* __lo, const char_type* __hi) const;
+
+      /**
+       *  @brief  Convert to lowercase.
+       *
+       *  This virtual function converts the char argument to lowercase if
+       *  possible.  If not possible (for example, '2'), returns the argument.
+       *
+       *  do_tolower() is a hook for a derived facet to change the behavior of
+       *  lowercasing.  do_tolower() must always return the same result for
+       *  the same input.
+       *
+       *  @param c  The char to convert.
+       *  @return  The lowercase char if convertible, else @a c.
+      */
+      virtual char_type
+      do_tolower(char_type) const;
+
+      /**
+       *  @brief  Convert array to lowercase.
+       *
+       *  This virtual function converts each char in the range [lo,hi) to
+       *  lowercase if possible.  Other chars remain untouched.
+       *
+       *  do_tolower() is a hook for a derived facet to change the behavior of
+       *  lowercasing.  do_tolower() must always return the same result for
+       *  the same input.
+       *
+       *  @param lo  Pointer to first char in range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_tolower(char_type* __lo, const char_type* __hi) const;
+
+      /**
+       *  @brief  Widen char
+       *
+       *  This virtual function converts the char to char using the simplest
+       *  reasonable transformation.  For an underived ctype<char> facet, the
+       *  argument will be returned unchanged.
+       *
+       *  do_widen() is a hook for a derived facet to change the behavior of
+       *  widening.  do_widen() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char to convert.
+       *  @return  The converted character.
+      */
+      virtual char_type
+      do_widen(char __c) const
+      { return __c; }
+
+      /**
+       *  @brief  Widen char array
+       *
+       *  This function converts each char in the range [lo,hi) to char using
+       *  the simplest reasonable transformation.  For an underived
+       *  ctype<char> facet, the argument will be copied unchanged.
+       *
+       *  do_widen() is a hook for a derived facet to change the behavior of
+       *  widening.  do_widen() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      virtual const char*
+      do_widen(const char* __lo, const char* __hi, char_type* __dest) const
+      {
+	__builtin_memcpy(__dest, __lo, __hi - __lo);
+	return __hi;
+      }
+
+      /**
+       *  @brief  Narrow char
+       *
+       *  This virtual function converts the char to char using the simplest
+       *  reasonable transformation.  If the conversion fails, dfault is
+       *  returned instead.  For an underived ctype<char> facet, @a c will be
+       *  returned unchanged.
+       *
+       *  do_narrow() is a hook for a derived facet to change the behavior of
+       *  narrowing.  do_narrow() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char to convert.
+       *  @param dfault  Char to return if conversion fails.
+       *  @return  The converted char.
+      */
+      virtual char
+      do_narrow(char_type __c, char) const
+      { return __c; }
+
+      /**
+       *  @brief  Narrow char array to char array
+       *
+       *  This virtual function converts each char in the range [lo,hi) to
+       *  char using the simplest reasonable transformation and writes the
+       *  results to the destination array.  For any char in the input that
+       *  cannot be converted, @a dfault is used instead.  For an underived
+       *  ctype<char> facet, the argument will be copied unchanged.
+       *
+       *  do_narrow() is a hook for a derived facet to change the behavior of
+       *  narrowing.  do_narrow() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param dfault  Char to use if conversion fails.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_narrow(const char_type* __lo, const char_type* __hi,
+		char, char* __dest) const
+      {
+	__builtin_memcpy(__dest, __lo, __hi - __lo);
+	return __hi;
+      }
+
+    private:
+      void _M_narrow_init() const;
+      void _M_widen_init() const;
+    };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  /**
+   *  @brief  The ctype<wchar_t> specialization.
+   *  @ingroup locales
+   *
+   *  This class defines classification and conversion functions for the
+   *  wchar_t type.  It gets used by wchar_t streams for many I/O operations.
+   *  The wchar_t specialization provides a number of optimizations as well.
+   *
+   *  ctype<wchar_t> inherits its public methods from
+   *  __ctype_abstract_base<wchar_t>.
+  */
+  template<>
+    class ctype<wchar_t> : public __ctype_abstract_base<wchar_t>
+    {
+    public:
+      // Types:
+      /// Typedef for the template parameter wchar_t.
+      typedef wchar_t		char_type;
+      typedef wctype_t		__wmask_type;
+
+    protected:
+      __c_locale		_M_c_locale_ctype;
+
+      // Pre-computed narrowed and widened chars.
+      bool                      _M_narrow_ok;
+      char                      _M_narrow[128];
+      wint_t                    _M_widen[1 + static_cast<unsigned char>(-1)];
+
+      // Pre-computed elements for do_is.
+      mask                      _M_bit[16];
+      __wmask_type              _M_wmask[16];
+
+    public:
+      // Data Members:
+      /// The facet id for ctype<wchar_t>
+      static locale::id		id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      ctype(size_t __refs = 0);
+
+      /**
+       *  @brief  Constructor performs static initialization.
+       *
+       *  This constructor is used to construct the initial C locale facet.
+       *
+       *  @param cloc  Handle to C locale data.
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      ctype(__c_locale __cloc, size_t __refs = 0);
+
+    protected:
+      __wmask_type
+      _M_convert_to_wmask(const mask __m) const throw();
+
+      /// Destructor
+      virtual
+      ~ctype();
+
+      /**
+       *  @brief  Test wchar_t classification.
+       *
+       *  This function finds a mask M for @a c and compares it to mask @a m.
+       *
+       *  do_is() is a hook for a derived facet to change the behavior of
+       *  classifying.  do_is() must always return the same result for the
+       *  same input.
+       *
+       *  @param c  The wchar_t to find the mask of.
+       *  @param m  The mask to compare against.
+       *  @return  (M & m) != 0.
+      */
+      virtual bool
+      do_is(mask __m, char_type __c) const;
+
+      /**
+       *  @brief  Return a mask array.
+       *
+       *  This function finds the mask for each wchar_t in the range [lo,hi)
+       *  and successively writes it to vec.  vec must have as many elements
+       *  as the input.
+       *
+       *  do_is() is a hook for a derived facet to change the behavior of
+       *  classifying.  do_is() must always return the same result for the
+       *  same input.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param vec  Pointer to an array of mask storage.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+
+      /**
+       *  @brief  Find wchar_t matching mask
+       *
+       *  This function searches for and returns the first wchar_t c in
+       *  [lo,hi) for which is(m,c) is true.
+       *
+       *  do_scan_is() is a hook for a derived facet to change the behavior of
+       *  match searching.  do_is() must always return the same result for the
+       *  same input.
+       *
+       *  @param m  The mask to compare against.
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  Pointer to a matching wchar_t if found, else @a hi.
+      */
+      virtual const char_type*
+      do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+
+      /**
+       *  @brief  Find wchar_t not matching mask
+       *
+       *  This function searches for and returns a pointer to the first
+       *  wchar_t c of [lo,hi) for which is(m,c) is false.
+       *
+       *  do_scan_is() is a hook for a derived facet to change the behavior of
+       *  match searching.  do_is() must always return the same result for the
+       *  same input.
+       *
+       *  @param m  The mask to compare against.
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  Pointer to a non-matching wchar_t if found, else @a hi.
+      */
+      virtual const char_type*
+      do_scan_not(mask __m, const char_type* __lo,
+		  const char_type* __hi) const;
+
+      /**
+       *  @brief  Convert to uppercase.
+       *
+       *  This virtual function converts the wchar_t argument to uppercase if
+       *  possible.  If not possible (for example, '2'), returns the argument.
+       *
+       *  do_toupper() is a hook for a derived facet to change the behavior of
+       *  uppercasing.  do_toupper() must always return the same result for
+       *  the same input.
+       *
+       *  @param c  The wchar_t to convert.
+       *  @return  The uppercase wchar_t if convertible, else @a c.
+      */
+      virtual char_type
+      do_toupper(char_type) const;
+
+      /**
+       *  @brief  Convert array to uppercase.
+       *
+       *  This virtual function converts each wchar_t in the range [lo,hi) to
+       *  uppercase if possible.  Other elements remain untouched.
+       *
+       *  do_toupper() is a hook for a derived facet to change the behavior of
+       *  uppercasing.  do_toupper() must always return the same result for
+       *  the same input.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_toupper(char_type* __lo, const char_type* __hi) const;
+
+      /**
+       *  @brief  Convert to lowercase.
+       *
+       *  This virtual function converts the argument to lowercase if
+       *  possible.  If not possible (for example, '2'), returns the argument.
+       *
+       *  do_tolower() is a hook for a derived facet to change the behavior of
+       *  lowercasing.  do_tolower() must always return the same result for
+       *  the same input.
+       *
+       *  @param c  The wchar_t to convert.
+       *  @return  The lowercase wchar_t if convertible, else @a c.
+      */
+      virtual char_type
+      do_tolower(char_type) const;
+
+      /**
+       *  @brief  Convert array to lowercase.
+       *
+       *  This virtual function converts each wchar_t in the range [lo,hi) to
+       *  lowercase if possible.  Other elements remain untouched.
+       *
+       *  do_tolower() is a hook for a derived facet to change the behavior of
+       *  lowercasing.  do_tolower() must always return the same result for
+       *  the same input.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_tolower(char_type* __lo, const char_type* __hi) const;
+
+      /**
+       *  @brief  Widen char to wchar_t
+       *
+       *  This virtual function converts the char to wchar_t using the
+       *  simplest reasonable transformation.  For an underived ctype<wchar_t>
+       *  facet, the argument will be cast to wchar_t.
+       *
+       *  do_widen() is a hook for a derived facet to change the behavior of
+       *  widening.  do_widen() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The char to convert.
+       *  @return  The converted wchar_t.
+      */
+      virtual char_type
+      do_widen(char) const;
+
+      /**
+       *  @brief  Widen char array to wchar_t array
+       *
+       *  This function converts each char in the input to wchar_t using the
+       *  simplest reasonable transformation.  For an underived ctype<wchar_t>
+       *  facet, the argument will be copied, casting each element to wchar_t.
+       *
+       *  do_widen() is a hook for a derived facet to change the behavior of
+       *  widening.  do_widen() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start range.
+       *  @param hi  Pointer to end of range.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      virtual const char*
+      do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
+
+      /**
+       *  @brief  Narrow wchar_t to char
+       *
+       *  This virtual function converts the argument to char using
+       *  the simplest reasonable transformation.  If the conversion
+       *  fails, dfault is returned instead.  For an underived
+       *  ctype<wchar_t> facet, @a c will be cast to char and
+       *  returned.
+       *
+       *  do_narrow() is a hook for a derived facet to change the
+       *  behavior of narrowing.  do_narrow() must always return the
+       *  same result for the same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param c  The wchar_t to convert.
+       *  @param dfault  Char to return if conversion fails.
+       *  @return  The converted char.
+      */
+      virtual char
+      do_narrow(char_type, char __dfault) const;
+
+      /**
+       *  @brief  Narrow wchar_t array to char array
+       *
+       *  This virtual function converts each wchar_t in the range [lo,hi) to
+       *  char using the simplest reasonable transformation and writes the
+       *  results to the destination array.  For any wchar_t in the input that
+       *  cannot be converted, @a dfault is used instead.  For an underived
+       *  ctype<wchar_t> facet, the argument will be copied, casting each
+       *  element to char.
+       *
+       *  do_narrow() is a hook for a derived facet to change the behavior of
+       *  narrowing.  do_narrow() must always return the same result for the
+       *  same input.
+       *
+       *  Note: this is not what you want for codepage conversions.  See
+       *  codecvt for that.
+       *
+       *  @param lo  Pointer to start of range.
+       *  @param hi  Pointer to end of range.
+       *  @param dfault  Char to use if conversion fails.
+       *  @param to  Pointer to the destination array.
+       *  @return  @a hi.
+      */
+      virtual const char_type*
+      do_narrow(const char_type* __lo, const char_type* __hi,
+		char __dfault, char* __dest) const;
+
+      // For use at construction time only.
+      void
+      _M_initialize_ctype() throw();
+    };
+#endif //_GLIBCXX_USE_WCHAR_T
+
+  /// class ctype_byname [22.2.1.2].
+  template<typename _CharT>
+    class ctype_byname : public ctype<_CharT>
+    {
+    public:
+      typedef typename ctype<_CharT>::mask  mask;
+
+      explicit
+      ctype_byname(const char* __s, size_t __refs = 0);
+
+    protected:
+      virtual
+      ~ctype_byname() { };
+    };
+
+  /// 22.2.1.4  Class ctype_byname specializations.
+  template<>
+    class ctype_byname<char> : public ctype<char>
+    {
+    public:
+      explicit
+      ctype_byname(const char* __s, size_t __refs = 0);
+
+    protected:
+      virtual
+      ~ctype_byname();
+    };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    class ctype_byname<wchar_t> : public ctype<wchar_t>
+    {
+    public:
+      explicit
+      ctype_byname(const char* __s, size_t __refs = 0);
+
+    protected:
+      virtual
+      ~ctype_byname();
+    };
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+// Include host and configuration specific ctype inlines.
+#include <bits/ctype_inline.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // 22.2.2  The numeric category.
+  class __num_base
+  {
+  public:
+    // NB: Code depends on the order of _S_atoms_out elements.
+    // Below are the indices into _S_atoms_out.
+    enum
+      {
+        _S_ominus,
+        _S_oplus,
+        _S_ox,
+        _S_oX,
+        _S_odigits,
+        _S_odigits_end = _S_odigits + 16,
+        _S_oudigits = _S_odigits_end,
+        _S_oudigits_end = _S_oudigits + 16,
+        _S_oe = _S_odigits + 14,  // For scientific notation, 'e'
+        _S_oE = _S_oudigits + 14, // For scientific notation, 'E'
+	_S_oend = _S_oudigits_end
+      };
+
+    // A list of valid numeric literals for output.  This array
+    // contains chars that will be passed through the current locale's
+    // ctype<_CharT>.widen() and then used to render numbers.
+    // For the standard "C" locale, this is
+    // "-+xX0123456789abcdef0123456789ABCDEF".
+    static const char* _S_atoms_out;
+
+    // String literal of acceptable (narrow) input, for num_get.
+    // "-+xX0123456789abcdefABCDEF"
+    static const char* _S_atoms_in;
+
+    enum
+    {
+      _S_iminus,
+      _S_iplus,
+      _S_ix,
+      _S_iX,
+      _S_izero,
+      _S_ie = _S_izero + 14,
+      _S_iE = _S_izero + 20,
+      _S_iend = 26
+    };
+
+    // num_put
+    // Construct and return valid scanf format for floating point types.
+    static void
+    _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw();
+  };
+
+  template<typename _CharT>
+    struct __numpunct_cache : public locale::facet
+    {
+      const char*			_M_grouping;
+      size_t                            _M_grouping_size;
+      bool				_M_use_grouping;
+      const _CharT*			_M_truename;
+      size_t                            _M_truename_size;
+      const _CharT*			_M_falsename;
+      size_t                            _M_falsename_size;
+      _CharT				_M_decimal_point;
+      _CharT				_M_thousands_sep;
+
+      // A list of valid numeric literals for output: in the standard
+      // "C" locale, this is "-+xX0123456789abcdef0123456789ABCDEF".
+      // This array contains the chars after having been passed
+      // through the current locale's ctype<_CharT>.widen().
+      _CharT				_M_atoms_out[__num_base::_S_oend];
+
+      // A list of valid numeric literals for input: in the standard
+      // "C" locale, this is "-+xX0123456789abcdefABCDEF"
+      // This array contains the chars after having been passed
+      // through the current locale's ctype<_CharT>.widen().
+      _CharT				_M_atoms_in[__num_base::_S_iend];
+
+      bool				_M_allocated;
+
+      __numpunct_cache(size_t __refs = 0) : facet(__refs),
+      _M_grouping(NULL), _M_grouping_size(0), _M_use_grouping(false),
+      _M_truename(NULL), _M_truename_size(0), _M_falsename(NULL),
+      _M_falsename_size(0), _M_decimal_point(_CharT()),
+      _M_thousands_sep(_CharT()), _M_allocated(false)
+      { }
+
+      ~__numpunct_cache();
+
+      void
+      _M_cache(const locale& __loc);
+
+    private:
+      __numpunct_cache&
+      operator=(const __numpunct_cache&);
+      
+      explicit
+      __numpunct_cache(const __numpunct_cache&);
+    };
+
+  template<typename _CharT>
+    __numpunct_cache<_CharT>::~__numpunct_cache()
+    {
+      if (_M_allocated)
+	{
+	  delete [] _M_grouping;
+	  delete [] _M_truename;
+	  delete [] _M_falsename;
+	}
+    }
+
+  /**
+   *  @brief  Primary class template numpunct.
+   *  @ingroup locales
+   *
+   *  This facet stores several pieces of information related to printing and
+   *  scanning numbers, such as the decimal point character.  It takes a
+   *  template parameter specifying the char type.  The numpunct facet is
+   *  used by streams for many I/O operations involving numbers.
+   *
+   *  The numpunct template uses protected virtual functions to provide the
+   *  actual results.  The public accessors forward the call to the virtual
+   *  functions.  These virtual functions are hooks for developers to
+   *  implement the behavior they require from a numpunct facet.
+  */
+  template<typename _CharT>
+    class numpunct : public locale::facet
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef basic_string<_CharT>	string_type;
+      //@}
+      typedef __numpunct_cache<_CharT>  __cache_type;
+
+    protected:
+      __cache_type*			_M_data;
+
+    public:
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Numpunct constructor.
+       *
+       *  @param  refs  Refcount to pass to the base class.
+       */
+      explicit
+      numpunct(size_t __refs = 0) : facet(__refs), _M_data(NULL)
+      { _M_initialize_numpunct(); }
+
+      /**
+       *  @brief  Internal constructor.  Not for general use.
+       *
+       *  This is a constructor for use by the library itself to set up the
+       *  predefined locale facets.
+       *
+       *  @param  cache  __numpunct_cache object.
+       *  @param  refs  Refcount to pass to the base class.
+       */
+      explicit
+      numpunct(__cache_type* __cache, size_t __refs = 0)
+      : facet(__refs), _M_data(__cache)
+      { _M_initialize_numpunct(); }
+
+      /**
+       *  @brief  Internal constructor.  Not for general use.
+       *
+       *  This is a constructor for use by the library itself to set up new
+       *  locales.
+       *
+       *  @param  cloc  The C locale.
+       *  @param  refs  Refcount to pass to the base class.
+       */
+      explicit
+      numpunct(__c_locale __cloc, size_t __refs = 0)
+      : facet(__refs), _M_data(NULL)
+      { _M_initialize_numpunct(__cloc); }
+
+      /**
+       *  @brief  Return decimal point character.
+       *
+       *  This function returns a char_type to use as a decimal point.  It
+       *  does so by returning returning
+       *  numpunct<char_type>::do_decimal_point().
+       *
+       *  @return  @a char_type representing a decimal point.
+      */
+      char_type
+      decimal_point() const
+      { return this->do_decimal_point(); }
+
+      /**
+       *  @brief  Return thousands separator character.
+       *
+       *  This function returns a char_type to use as a thousands
+       *  separator.  It does so by returning returning
+       *  numpunct<char_type>::do_thousands_sep().
+       *
+       *  @return  char_type representing a thousands separator.
+      */
+      char_type
+      thousands_sep() const
+      { return this->do_thousands_sep(); }
+
+      /**
+       *  @brief  Return grouping specification.
+       *
+       *  This function returns a string representing groupings for the
+       *  integer part of a number.  Groupings indicate where thousands
+       *  separators should be inserted in the integer part of a number.
+       *
+       *  Each char in the return string is interpret as an integer
+       *  rather than a character.  These numbers represent the number
+       *  of digits in a group.  The first char in the string
+       *  represents the number of digits in the least significant
+       *  group.  If a char is negative, it indicates an unlimited
+       *  number of digits for the group.  If more chars from the
+       *  string are required to group a number, the last char is used
+       *  repeatedly.
+       *
+       *  For example, if the grouping() returns "\003\002" and is
+       *  applied to the number 123456789, this corresponds to
+       *  12,34,56,789.  Note that if the string was "32", this would
+       *  put more than 50 digits into the least significant group if
+       *  the character set is ASCII.
+       *
+       *  The string is returned by calling
+       *  numpunct<char_type>::do_grouping().
+       *
+       *  @return  string representing grouping specification.
+      */
+      string
+      grouping() const
+      { return this->do_grouping(); }
+
+      /**
+       *  @brief  Return string representation of bool true.
+       *
+       *  This function returns a string_type containing the text
+       *  representation for true bool variables.  It does so by calling
+       *  numpunct<char_type>::do_truename().
+       *
+       *  @return  string_type representing printed form of true.
+      */
+      string_type
+      truename() const
+      { return this->do_truename(); }
+
+      /**
+       *  @brief  Return string representation of bool false.
+       *
+       *  This function returns a string_type containing the text
+       *  representation for false bool variables.  It does so by calling
+       *  numpunct<char_type>::do_falsename().
+       *
+       *  @return  string_type representing printed form of false.
+      */
+      string_type
+      falsename() const
+      { return this->do_falsename(); }
+
+    protected:
+      /// Destructor.
+      virtual
+      ~numpunct();
+
+      /**
+       *  @brief  Return decimal point character.
+       *
+       *  Returns a char_type to use as a decimal point.  This function is a
+       *  hook for derived classes to change the value returned.
+       *
+       *  @return  @a char_type representing a decimal point.
+      */
+      virtual char_type
+      do_decimal_point() const
+      { return _M_data->_M_decimal_point; }
+
+      /**
+       *  @brief  Return thousands separator character.
+       *
+       *  Returns a char_type to use as a thousands separator.  This function
+       *  is a hook for derived classes to change the value returned.
+       *
+       *  @return  @a char_type representing a thousands separator.
+      */
+      virtual char_type
+      do_thousands_sep() const
+      { return _M_data->_M_thousands_sep; }
+
+      /**
+       *  @brief  Return grouping specification.
+       *
+       *  Returns a string representing groupings for the integer part of a
+       *  number.  This function is a hook for derived classes to change the
+       *  value returned.  @see grouping() for details.
+       *
+       *  @return  String representing grouping specification.
+      */
+      virtual string
+      do_grouping() const
+      { return _M_data->_M_grouping; }
+
+      /**
+       *  @brief  Return string representation of bool true.
+       *
+       *  Returns a string_type containing the text representation for true
+       *  bool variables.  This function is a hook for derived classes to
+       *  change the value returned.
+       *
+       *  @return  string_type representing printed form of true.
+      */
+      virtual string_type
+      do_truename() const
+      { return _M_data->_M_truename; }
+
+      /**
+       *  @brief  Return string representation of bool false.
+       *
+       *  Returns a string_type containing the text representation for false
+       *  bool variables.  This function is a hook for derived classes to
+       *  change the value returned.
+       *
+       *  @return  string_type representing printed form of false.
+      */
+      virtual string_type
+      do_falsename() const
+      { return _M_data->_M_falsename; }
+
+      // For use at construction time only.
+      void
+      _M_initialize_numpunct(__c_locale __cloc = NULL);
+    };
+
+  template<typename _CharT>
+    locale::id numpunct<_CharT>::id;
+
+  template<>
+    numpunct<char>::~numpunct();
+
+  template<>
+    void
+    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    numpunct<wchar_t>::~numpunct();
+
+  template<>
+    void
+    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
+#endif
+
+  /// class numpunct_byname [22.2.3.2].
+  template<typename _CharT>
+    class numpunct_byname : public numpunct<_CharT>
+    {
+    public:
+      typedef _CharT			char_type;
+      typedef basic_string<_CharT>	string_type;
+
+      explicit
+      numpunct_byname(const char* __s, size_t __refs = 0)
+      : numpunct<_CharT>(__refs)
+      {
+	if (__builtin_strcmp(__s, "C") != 0
+	    && __builtin_strcmp(__s, "POSIX") != 0)
+	  {
+	    __c_locale __tmp;
+	    this->_S_create_c_locale(__tmp, __s);
+	    this->_M_initialize_numpunct(__tmp);
+	    this->_S_destroy_c_locale(__tmp);
+	  }
+      }
+
+    protected:
+      virtual
+      ~numpunct_byname() { }
+    };
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+  /**
+   *  @brief  Primary class template num_get.
+   *  @ingroup locales
+   *
+   *  This facet encapsulates the code to parse and return a number
+   *  from a string.  It is used by the istream numeric extraction
+   *  operators.
+   *
+   *  The num_get template uses protected virtual functions to provide the
+   *  actual results.  The public accessors forward the call to the virtual
+   *  functions.  These virtual functions are hooks for developers to
+   *  implement the behavior they require from the num_get facet.
+  */
+  template<typename _CharT, typename _InIter>
+    class num_get : public locale::facet
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef _InIter			iter_type;
+      //@}
+
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      num_get(size_t __refs = 0) : facet(__refs) { }
+
+      /**
+       *  @brief  Numeric parsing.
+       *
+       *  Parses the input stream into the bool @a v.  It does so by calling
+       *  num_get::do_get().
+       *
+       *  If ios_base::boolalpha is set, attempts to read
+       *  ctype<CharT>::truename() or ctype<CharT>::falsename().  Sets
+       *  @a v to true or false if successful.  Sets err to
+       *  ios_base::failbit if reading the string fails.  Sets err to
+       *  ios_base::eofbit if the stream is emptied.
+       *
+       *  If ios_base::boolalpha is not set, proceeds as with reading a long,
+       *  except if the value is 1, sets @a v to true, if the value is 0, sets
+       *  @a v to false, and otherwise set err to ios_base::failbit.
+       *
+       *  @param  in  Start of input stream.
+       *  @param  end  End of input stream.
+       *  @param  io  Source of locale and flags.
+       *  @param  err  Error flags to set.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after reading.
+      */
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, bool& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      //@{
+      /**
+       *  @brief  Numeric parsing.
+       *
+       *  Parses the input stream into the integral variable @a v.  It does so
+       *  by calling num_get::do_get().
+       *
+       *  Parsing is affected by the flag settings in @a io.
+       *
+       *  The basic parse is affected by the value of io.flags() &
+       *  ios_base::basefield.  If equal to ios_base::oct, parses like the
+       *  scanf %o specifier.  Else if equal to ios_base::hex, parses like %X
+       *  specifier.  Else if basefield equal to 0, parses like the %i
+       *  specifier.  Otherwise, parses like %d for signed and %u for unsigned
+       *  types.  The matching type length modifier is also used.
+       *
+       *  Digit grouping is interpreted according to numpunct::grouping() and
+       *  numpunct::thousands_sep().  If the pattern of digit groups isn't
+       *  consistent, sets err to ios_base::failbit.
+       *
+       *  If parsing the string yields a valid value for @a v, @a v is set.
+       *  Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+       *  Sets err to ios_base::eofbit if the stream is emptied.
+       *
+       *  @param  in  Start of input stream.
+       *  @param  end  End of input stream.
+       *  @param  io  Source of locale and flags.
+       *  @param  err  Error flags to set.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after reading.
+      */
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, long& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, unsigned short& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, unsigned int& __v)   const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, unsigned long& __v)  const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, long long& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, unsigned long long& __v)  const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+#endif
+      //@}
+
+      //@{
+      /**
+       *  @brief  Numeric parsing.
+       *
+       *  Parses the input stream into the integral variable @a v.  It does so
+       *  by calling num_get::do_get().
+       *
+       *  The input characters are parsed like the scanf %g specifier.  The
+       *  matching type length modifier is also used.
+       *
+       *  The decimal point character used is numpunct::decimal_point().
+       *  Digit grouping is interpreted according to numpunct::grouping() and
+       *  numpunct::thousands_sep().  If the pattern of digit groups isn't
+       *  consistent, sets err to ios_base::failbit.
+       *
+       *  If parsing the string yields a valid value for @a v, @a v is set.
+       *  Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+       *  Sets err to ios_base::eofbit if the stream is emptied.
+       *
+       *  @param  in  Start of input stream.
+       *  @param  end  End of input stream.
+       *  @param  io  Source of locale and flags.
+       *  @param  err  Error flags to set.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after reading.
+      */
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, float& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, double& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, long double& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+      //@}
+
+      /**
+       *  @brief  Numeric parsing.
+       *
+       *  Parses the input stream into the pointer variable @a v.  It does so
+       *  by calling num_get::do_get().
+       *
+       *  The input characters are parsed like the scanf %p specifier.
+       *
+       *  Digit grouping is interpreted according to numpunct::grouping() and
+       *  numpunct::thousands_sep().  If the pattern of digit groups isn't
+       *  consistent, sets err to ios_base::failbit.
+       *
+       *  Note that the digit grouping effect for pointers is a bit ambiguous
+       *  in the standard and shouldn't be relied on.  See DR 344.
+       *
+       *  If parsing the string yields a valid value for @a v, @a v is set.
+       *  Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+       *  Sets err to ios_base::eofbit if the stream is emptied.
+       *
+       *  @param  in  Start of input stream.
+       *  @param  end  End of input stream.
+       *  @param  io  Source of locale and flags.
+       *  @param  err  Error flags to set.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after reading.
+      */
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, void*& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+    protected:
+      /// Destructor.
+      virtual ~num_get() { }
+
+      iter_type
+      _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
+		       string&) const;
+
+      template<typename _ValueT>
+        iter_type
+        _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
+		       _ValueT&) const;
+
+      template<typename _CharT2>
+      typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type
+        _M_find(const _CharT2*, size_t __len, _CharT2 __c) const
+        {
+	  int __ret = -1;
+	  if (__len <= 10)
+	    {
+	      if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len))
+		__ret = __c - _CharT2('0');
+	    }
+	  else
+	    {
+	      if (__c >= _CharT2('0') && __c <= _CharT2('9'))
+		__ret = __c - _CharT2('0');
+	      else if (__c >= _CharT2('a') && __c <= _CharT2('f'))
+		__ret = 10 + (__c - _CharT2('a'));
+	      else if (__c >= _CharT2('A') && __c <= _CharT2('F'))
+		__ret = 10 + (__c - _CharT2('A'));
+	    }
+	  return __ret;
+	}
+
+      template<typename _CharT2>
+      typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value, 
+				      int>::__type
+        _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const
+        {
+	  int __ret = -1;
+	  const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c);
+	  if (__q)
+	    {
+	      __ret = __q - __zero;
+	      if (__ret > 15)
+		__ret -= 6;
+	    }
+	  return __ret;
+	}
+
+      //@{
+      /**
+       *  @brief  Numeric parsing.
+       *
+       *  Parses the input stream into the variable @a v.  This function is a
+       *  hook for derived classes to change the value returned.  @see get()
+       *  for more details.
+       *
+       *  @param  in  Start of input stream.
+       *  @param  end  End of input stream.
+       *  @param  io  Source of locale and flags.
+       *  @param  err  Error flags to set.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after reading.
+      */
+      virtual iter_type
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
+
+      virtual iter_type
+      do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	     ios_base::iostate& __err, long& __v) const
+      { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+      virtual iter_type
+      do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	     ios_base::iostate& __err, unsigned short& __v) const
+      { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+      virtual iter_type
+      do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	     ios_base::iostate& __err, unsigned int& __v) const
+      { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+      virtual iter_type
+      do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	     ios_base::iostate& __err, unsigned long& __v) const
+      { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+      virtual iter_type
+      do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	     ios_base::iostate& __err, long long& __v) const
+      { return _M_extract_int(__beg, __end, __io, __err, __v); }	
+
+      virtual iter_type
+      do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	     ios_base::iostate& __err, unsigned long long& __v) const
+      { return _M_extract_int(__beg, __end, __io, __err, __v); }
+#endif
+
+      virtual iter_type
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+	     float&) const;
+
+      virtual iter_type
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+	     double&) const;
+
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+	       double&) const;
+#else
+      virtual iter_type
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+	     long double&) const;
+#endif
+
+      virtual iter_type
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+	     void*&) const;
+
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+	     long double&) const;
+#endif
+      //@}
+    };
+
+  template<typename _CharT, typename _InIter>
+    locale::id num_get<_CharT, _InIter>::id;
+
+
+  /**
+   *  @brief  Primary class template num_put.
+   *  @ingroup locales
+   *
+   *  This facet encapsulates the code to convert a number to a string.  It is
+   *  used by the ostream numeric insertion operators.
+   *
+   *  The num_put template uses protected virtual functions to provide the
+   *  actual results.  The public accessors forward the call to the virtual
+   *  functions.  These virtual functions are hooks for developers to
+   *  implement the behavior they require from the num_put facet.
+  */
+  template<typename _CharT, typename _OutIter>
+    class num_put : public locale::facet
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT		char_type;
+      typedef _OutIter		iter_type;
+      //@}
+
+      /// Numpunct facet id.
+      static locale::id		id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      num_put(size_t __refs = 0) : facet(__refs) { }
+
+      /**
+       *  @brief  Numeric formatting.
+       *
+       *  Formats the boolean @a v and inserts it into a stream.  It does so
+       *  by calling num_put::do_put().
+       *
+       *  If ios_base::boolalpha is set, writes ctype<CharT>::truename() or
+       *  ctype<CharT>::falsename().  Otherwise formats @a v as an int.
+       *
+       *  @param  s  Stream to write to.
+       *  @param  io  Source of locale and flags.
+       *  @param  fill  Char_type to use for filling.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after writing.
+      */
+      iter_type
+      put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      //@{
+      /**
+       *  @brief  Numeric formatting.
+       *
+       *  Formats the integral value @a v and inserts it into a
+       *  stream.  It does so by calling num_put::do_put().
+       *
+       *  Formatting is affected by the flag settings in @a io.
+       *
+       *  The basic format is affected by the value of io.flags() &
+       *  ios_base::basefield.  If equal to ios_base::oct, formats like the
+       *  printf %o specifier.  Else if equal to ios_base::hex, formats like
+       *  %x or %X with ios_base::uppercase unset or set respectively.
+       *  Otherwise, formats like %d, %ld, %lld for signed and %u, %lu, %llu
+       *  for unsigned values.  Note that if both oct and hex are set, neither
+       *  will take effect.
+       *
+       *  If ios_base::showpos is set, '+' is output before positive values.
+       *  If ios_base::showbase is set, '0' precedes octal values (except 0)
+       *  and '0[xX]' precedes hex values.
+       *
+       *  Thousands separators are inserted according to numpunct::grouping()
+       *  and numpunct::thousands_sep().  The decimal point character used is
+       *  numpunct::decimal_point().
+       *
+       *  If io.width() is non-zero, enough @a fill characters are inserted to
+       *  make the result at least that wide.  If
+       *  (io.flags() & ios_base::adjustfield) == ios_base::left, result is
+       *  padded at the end.  If ios_base::internal, then padding occurs
+       *  immediately after either a '+' or '-' or after '0x' or '0X'.
+       *  Otherwise, padding occurs at the beginning.
+       *
+       *  @param  s  Stream to write to.
+       *  @param  io  Source of locale and flags.
+       *  @param  fill  Char_type to use for filling.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after writing.
+      */
+      iter_type
+      put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      iter_type
+      put(iter_type __s, ios_base& __f, char_type __fill,
+	  unsigned long __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+      iter_type
+      put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      iter_type
+      put(iter_type __s, ios_base& __f, char_type __fill,
+	  unsigned long long __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+#endif
+      //@}
+
+      //@{
+      /**
+       *  @brief  Numeric formatting.
+       *
+       *  Formats the floating point value @a v and inserts it into a stream.
+       *  It does so by calling num_put::do_put().
+       *
+       *  Formatting is affected by the flag settings in @a io.
+       *
+       *  The basic format is affected by the value of io.flags() &
+       *  ios_base::floatfield.  If equal to ios_base::fixed, formats like the
+       *  printf %f specifier.  Else if equal to ios_base::scientific, formats
+       *  like %e or %E with ios_base::uppercase unset or set respectively.
+       *  Otherwise, formats like %g or %G depending on uppercase.  Note that
+       *  if both fixed and scientific are set, the effect will also be like
+       *  %g or %G.
+       *
+       *  The output precision is given by io.precision().  This precision is
+       *  capped at numeric_limits::digits10 + 2 (different for double and
+       *  long double).  The default precision is 6.
+       *
+       *  If ios_base::showpos is set, '+' is output before positive values.
+       *  If ios_base::showpoint is set, a decimal point will always be
+       *  output.
+       *
+       *  Thousands separators are inserted according to numpunct::grouping()
+       *  and numpunct::thousands_sep().  The decimal point character used is
+       *  numpunct::decimal_point().
+       *
+       *  If io.width() is non-zero, enough @a fill characters are inserted to
+       *  make the result at least that wide.  If
+       *  (io.flags() & ios_base::adjustfield) == ios_base::left, result is
+       *  padded at the end.  If ios_base::internal, then padding occurs
+       *  immediately after either a '+' or '-' or after '0x' or '0X'.
+       *  Otherwise, padding occurs at the beginning.
+       *
+       *  @param  s  Stream to write to.
+       *  @param  io  Source of locale and flags.
+       *  @param  fill  Char_type to use for filling.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after writing.
+      */
+      iter_type
+      put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      iter_type
+      put(iter_type __s, ios_base& __f, char_type __fill,
+	  long double __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+      //@}
+
+      /**
+       *  @brief  Numeric formatting.
+       *
+       *  Formats the pointer value @a v and inserts it into a stream.  It
+       *  does so by calling num_put::do_put().
+       *
+       *  This function formats @a v as an unsigned long with ios_base::hex
+       *  and ios_base::showbase set.
+       *
+       *  @param  s  Stream to write to.
+       *  @param  io  Source of locale and flags.
+       *  @param  fill  Char_type to use for filling.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after writing.
+      */
+      iter_type
+      put(iter_type __s, ios_base& __f, char_type __fill,
+	  const void* __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+    protected:
+      template<typename _ValueT>
+        iter_type
+        _M_insert_float(iter_type, ios_base& __io, char_type __fill,
+			char __mod, _ValueT __v) const;
+
+      void
+      _M_group_float(const char* __grouping, size_t __grouping_size,
+		     char_type __sep, const char_type* __p, char_type* __new,
+		     char_type* __cs, int& __len) const;
+
+      template<typename _ValueT>
+        iter_type
+        _M_insert_int(iter_type, ios_base& __io, char_type __fill,
+		      _ValueT __v) const;
+
+      void
+      _M_group_int(const char* __grouping, size_t __grouping_size,
+		   char_type __sep, ios_base& __io, char_type* __new,
+		   char_type* __cs, int& __len) const;
+
+      void
+      _M_pad(char_type __fill, streamsize __w, ios_base& __io,
+	     char_type* __new, const char_type* __cs, int& __len) const;
+
+      /// Destructor.
+      virtual
+      ~num_put() { };
+
+      //@{
+      /**
+       *  @brief  Numeric formatting.
+       *
+       *  These functions do the work of formatting numeric values and
+       *  inserting them into a stream. This function is a hook for derived
+       *  classes to change the value returned.
+       *
+       *  @param  s  Stream to write to.
+       *  @param  io  Source of locale and flags.
+       *  @param  fill  Char_type to use for filling.
+       *  @param  v  Value to format and insert.
+       *  @return  Iterator after writing.
+      */
+      virtual iter_type
+      do_put(iter_type, ios_base&, char_type __fill, bool __v) const;
+
+      virtual iter_type
+      do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
+      { return _M_insert_int(__s, __io, __fill, __v); }	
+
+      virtual iter_type
+      do_put(iter_type __s, ios_base& __io, char_type __fill,
+	     unsigned long __v) const
+      { return _M_insert_int(__s, __io, __fill, __v); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+      virtual iter_type
+      do_put(iter_type __s, ios_base& __io, char_type __fill,
+	     long long __v) const
+      { return _M_insert_int(__s, __io, __fill, __v); }
+
+      virtual iter_type
+      do_put(iter_type __s, ios_base& __io, char_type __fill,
+	     unsigned long long __v) const
+      { return _M_insert_int(__s, __io, __fill, __v); }
+#endif
+
+      virtual iter_type
+      do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      __do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+#else
+      virtual iter_type
+      do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+#endif
+
+      virtual iter_type
+      do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
+
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+#endif
+      //@}
+    };
+
+  template <typename _CharT, typename _OutIter>
+    locale::id num_put<_CharT, _OutIter>::id;
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+  // Subclause convenience interfaces, inlines.
+  // NB: These are inline because, when used in a loop, some compilers
+  // can hoist the body out of the loop; then it's just as fast as the
+  // C is*() function.
+
+  /// Convenience interface to ctype.is(ctype_base::space, __c).
+  template<typename _CharT>
+    inline bool
+    isspace(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::print, __c).
+  template<typename _CharT>
+    inline bool
+    isprint(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::cntrl, __c).
+  template<typename _CharT>
+    inline bool
+    iscntrl(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::upper, __c).
+  template<typename _CharT>
+    inline bool
+    isupper(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::lower, __c).
+  template<typename _CharT>
+    inline bool 
+    islower(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::alpha, __c).
+  template<typename _CharT>
+    inline bool
+    isalpha(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::digit, __c).
+  template<typename _CharT>
+    inline bool
+    isdigit(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::punct, __c).
+  template<typename _CharT>
+    inline bool
+    ispunct(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::xdigit, __c).
+  template<typename _CharT>
+    inline bool
+    isxdigit(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::alnum, __c).
+  template<typename _CharT>
+    inline bool
+    isalnum(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
+
+  /// Convenience interface to ctype.is(ctype_base::graph, __c).
+  template<typename _CharT>
+    inline bool
+    isgraph(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
+
+  /// Convenience interface to ctype.toupper(__c).
+  template<typename _CharT>
+    inline _CharT
+    toupper(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).toupper(__c); }
+
+  /// Convenience interface to ctype.tolower(__c).
+  template<typename _CharT>
+    inline _CharT
+    tolower(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).tolower(__c); }
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/locale_facets.tcc>
+#endif
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets.tcc
new file mode 100644
index 0000000..1608e2c
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets.tcc
@@ -0,0 +1,1360 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_facets.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _LOCALE_FACETS_TCC
+#define _LOCALE_FACETS_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Routine to access a cache for the facet.  If the cache didn't
+  // exist before, it gets constructed on the fly.
+  template<typename _Facet>
+    struct __use_cache
+    {
+      const _Facet*
+      operator() (const locale& __loc) const;
+    };
+
+  // Specializations.
+  template<typename _CharT>
+    struct __use_cache<__numpunct_cache<_CharT> >
+    {
+      const __numpunct_cache<_CharT>*
+      operator() (const locale& __loc) const
+      {
+	const size_t __i = numpunct<_CharT>::id._M_id();
+	const locale::facet** __caches = __loc._M_impl->_M_caches;
+	if (!__caches[__i])
+	  {
+	    __numpunct_cache<_CharT>* __tmp = NULL;
+	    __try
+	      {
+		__tmp = new __numpunct_cache<_CharT>;
+		__tmp->_M_cache(__loc);
+	      }
+	    __catch(...)
+	      {
+		delete __tmp;
+		__throw_exception_again;
+	      }
+	    __loc._M_impl->_M_install_cache(__tmp, __i);
+	  }
+	return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]);
+      }
+    };
+
+  template<typename _CharT>
+    void
+    __numpunct_cache<_CharT>::_M_cache(const locale& __loc)
+    {
+      _M_allocated = true;
+
+      const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
+
+      char* __grouping = 0;
+      _CharT* __truename = 0;
+      _CharT* __falsename = 0;
+      __try
+	{
+	  _M_grouping_size = __np.grouping().size();
+	  __grouping = new char[_M_grouping_size];
+	  __np.grouping().copy(__grouping, _M_grouping_size);
+	  _M_grouping = __grouping;
+	  _M_use_grouping = (_M_grouping_size
+			     && static_cast<signed char>(_M_grouping[0]) > 0
+			     && (_M_grouping[0]
+				 != __gnu_cxx::__numeric_traits<char>::__max));
+
+	  _M_truename_size = __np.truename().size();
+	  __truename = new _CharT[_M_truename_size];
+	  __np.truename().copy(__truename, _M_truename_size);
+	  _M_truename = __truename;
+
+	  _M_falsename_size = __np.falsename().size();
+	  __falsename = new _CharT[_M_falsename_size];
+	  __np.falsename().copy(__falsename, _M_falsename_size);
+	  _M_falsename = __falsename;
+
+	  _M_decimal_point = __np.decimal_point();
+	  _M_thousands_sep = __np.thousands_sep();
+
+	  const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
+	  __ct.widen(__num_base::_S_atoms_out,
+		     __num_base::_S_atoms_out
+		     + __num_base::_S_oend, _M_atoms_out);
+	  __ct.widen(__num_base::_S_atoms_in,
+		     __num_base::_S_atoms_in
+		     + __num_base::_S_iend, _M_atoms_in);
+	}
+      __catch(...)
+	{
+	  delete [] __grouping;
+	  delete [] __truename;
+	  delete [] __falsename;
+	  __throw_exception_again;
+	}
+    }
+
+  // Used by both numeric and monetary facets.
+  // Check to make sure that the __grouping_tmp string constructed in
+  // money_get or num_get matches the canonical grouping for a given
+  // locale.
+  // __grouping_tmp is parsed L to R
+  // 1,222,444 == __grouping_tmp of "\1\3\3"
+  // __grouping is parsed R to L
+  // 1,222,444 == __grouping of "\3" == "\3\3\3"
+  _GLIBCXX_PURE bool
+  __verify_grouping(const char* __grouping, size_t __grouping_size,
+		    const string& __grouping_tmp) throw ();
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    num_get<_CharT, _InIter>::
+    _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io,
+		     ios_base::iostate& __err, string& __xtrc) const
+    {
+      typedef char_traits<_CharT>			__traits_type;
+      typedef __numpunct_cache<_CharT>                  __cache_type;
+      __use_cache<__cache_type> __uc;
+      const locale& __loc = __io._M_getloc();
+      const __cache_type* __lc = __uc(__loc);
+      const _CharT* __lit = __lc->_M_atoms_in;
+      char_type __c = char_type();
+
+      // True if __beg becomes equal to __end.
+      bool __testeof = __beg == __end;
+
+      // First check for sign.
+      if (!__testeof)
+	{
+	  __c = *__beg;
+	  const bool __plus = __c == __lit[__num_base::_S_iplus];
+	  if ((__plus || __c == __lit[__num_base::_S_iminus])
+	      && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+	      && !(__c == __lc->_M_decimal_point))
+	    {
+	      __xtrc += __plus ? '+' : '-';
+	      if (++__beg != __end)
+		__c = *__beg;
+	      else
+		__testeof = true;
+	    }
+	}
+
+      // Next, look for leading zeros.
+      bool __found_mantissa = false;
+      int __sep_pos = 0;
+      while (!__testeof)
+	{
+	  if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+	      || __c == __lc->_M_decimal_point)
+	    break;
+	  else if (__c == __lit[__num_base::_S_izero])
+	    {
+	      if (!__found_mantissa)
+		{
+		  __xtrc += '0';
+		  __found_mantissa = true;
+		}
+	      ++__sep_pos;
+
+	      if (++__beg != __end)
+		__c = *__beg;
+	      else
+		__testeof = true;
+	    }
+	  else
+	    break;
+	}
+
+      // Only need acceptable digits for floating point numbers.
+      bool __found_dec = false;
+      bool __found_sci = false;
+      string __found_grouping;
+      if (__lc->_M_use_grouping)
+	__found_grouping.reserve(32);
+      const char_type* __lit_zero = __lit + __num_base::_S_izero;
+
+      if (!__lc->_M_allocated)
+	// "C" locale
+	while (!__testeof)
+	  {
+	    const int __digit = _M_find(__lit_zero, 10, __c);
+	    if (__digit != -1)
+	      {
+		__xtrc += '0' + __digit;
+		__found_mantissa = true;
+	      }
+	    else if (__c == __lc->_M_decimal_point
+		     && !__found_dec && !__found_sci)
+	      {
+		__xtrc += '.';
+		__found_dec = true;
+	      }
+	    else if ((__c == __lit[__num_base::_S_ie] 
+		      || __c == __lit[__num_base::_S_iE])
+		     && !__found_sci && __found_mantissa)
+	      {
+		// Scientific notation.
+		__xtrc += 'e';
+		__found_sci = true;
+		
+		// Remove optional plus or minus sign, if they exist.
+		if (++__beg != __end)
+		  {
+		    __c = *__beg;
+		    const bool __plus = __c == __lit[__num_base::_S_iplus];
+		    if (__plus || __c == __lit[__num_base::_S_iminus])
+		      __xtrc += __plus ? '+' : '-';
+		    else
+		      continue;
+		  }
+		else
+		  {
+		    __testeof = true;
+		    break;
+		  }
+	      }
+	    else
+	      break;
+
+	    if (++__beg != __end)
+	      __c = *__beg;
+	    else
+	      __testeof = true;
+	  }
+      else
+	while (!__testeof)
+	  {
+	    // According to 22.2.2.1.2, p8-9, first look for thousands_sep
+	    // and decimal_point.
+	    if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+	      {
+		if (!__found_dec && !__found_sci)
+		  {
+		    // NB: Thousands separator at the beginning of a string
+		    // is a no-no, as is two consecutive thousands separators.
+		    if (__sep_pos)
+		      {
+			__found_grouping += static_cast<char>(__sep_pos);
+			__sep_pos = 0;
+		      }
+		    else
+		      {
+			// NB: __convert_to_v will not assign __v and will
+			// set the failbit.
+			__xtrc.clear();
+			break;
+		      }
+		  }
+		else
+		  break;
+	      }
+	    else if (__c == __lc->_M_decimal_point)
+	      {
+		if (!__found_dec && !__found_sci)
+		  {
+		    // If no grouping chars are seen, no grouping check
+		    // is applied. Therefore __found_grouping is adjusted
+		    // only if decimal_point comes after some thousands_sep.
+		    if (__found_grouping.size())
+		      __found_grouping += static_cast<char>(__sep_pos);
+		    __xtrc += '.';
+		    __found_dec = true;
+		  }
+		else
+		  break;
+	      }
+	    else
+	      {
+		const char_type* __q =
+		  __traits_type::find(__lit_zero, 10, __c);
+		if (__q)
+		  {
+		    __xtrc += '0' + (__q - __lit_zero);
+		    __found_mantissa = true;
+		    ++__sep_pos;
+		  }
+		else if ((__c == __lit[__num_base::_S_ie] 
+			  || __c == __lit[__num_base::_S_iE])
+			 && !__found_sci && __found_mantissa)
+		  {
+		    // Scientific notation.
+		    if (__found_grouping.size() && !__found_dec)
+		      __found_grouping += static_cast<char>(__sep_pos);
+		    __xtrc += 'e';
+		    __found_sci = true;
+		    
+		    // Remove optional plus or minus sign, if they exist.
+		    if (++__beg != __end)
+		      {
+			__c = *__beg;
+			const bool __plus = __c == __lit[__num_base::_S_iplus];
+			if ((__plus || __c == __lit[__num_base::_S_iminus])
+			    && !(__lc->_M_use_grouping
+				 && __c == __lc->_M_thousands_sep)
+			    && !(__c == __lc->_M_decimal_point))
+		      __xtrc += __plus ? '+' : '-';
+			else
+			  continue;
+		      }
+		    else
+		      {
+			__testeof = true;
+			break;
+		      }
+		  }
+		else
+		  break;
+	      }
+	    
+	    if (++__beg != __end)
+	      __c = *__beg;
+	    else
+	      __testeof = true;
+	  }
+
+      // Digit grouping is checked. If grouping and found_grouping don't
+      // match, then get very very upset, and set failbit.
+      if (__found_grouping.size())
+        {
+          // Add the ending grouping if a decimal or 'e'/'E' wasn't found.
+	  if (!__found_dec && !__found_sci)
+	    __found_grouping += static_cast<char>(__sep_pos);
+
+          if (!std::__verify_grouping(__lc->_M_grouping, 
+				      __lc->_M_grouping_size,
+				      __found_grouping))
+	    __err = ios_base::failbit;
+        }
+
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    template<typename _ValueT>
+      _InIter
+      num_get<_CharT, _InIter>::
+      _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io,
+		     ios_base::iostate& __err, _ValueT& __v) const
+      {
+        typedef char_traits<_CharT>			     __traits_type;
+	using __gnu_cxx::__add_unsigned;
+	typedef typename __add_unsigned<_ValueT>::__type __unsigned_type;
+	typedef __numpunct_cache<_CharT>                     __cache_type;
+	__use_cache<__cache_type> __uc;
+	const locale& __loc = __io._M_getloc();
+	const __cache_type* __lc = __uc(__loc);
+	const _CharT* __lit = __lc->_M_atoms_in;
+	char_type __c = char_type();
+
+	// NB: Iff __basefield == 0, __base can change based on contents.
+	const ios_base::fmtflags __basefield = __io.flags()
+	                                       & ios_base::basefield;
+	const bool __oct = __basefield == ios_base::oct;
+	int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10);
+
+	// True if __beg becomes equal to __end.
+	bool __testeof = __beg == __end;
+
+	// First check for sign.
+	bool __negative = false;
+	if (!__testeof)
+	  {
+	    __c = *__beg;
+	    __negative = __c == __lit[__num_base::_S_iminus];
+	    if ((__negative || __c == __lit[__num_base::_S_iplus])
+		&& !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+		&& !(__c == __lc->_M_decimal_point))
+	      {
+		if (++__beg != __end)
+		  __c = *__beg;
+		else
+		  __testeof = true;
+	      }
+	  }
+
+	// Next, look for leading zeros and check required digits
+	// for base formats.
+	bool __found_zero = false;
+	int __sep_pos = 0;
+	while (!__testeof)
+	  {
+	    if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+		|| __c == __lc->_M_decimal_point)
+	      break;
+	    else if (__c == __lit[__num_base::_S_izero] 
+		     && (!__found_zero || __base == 10))
+	      {
+		__found_zero = true;
+		++__sep_pos;
+		if (__basefield == 0)
+		  __base = 8;
+		if (__base == 8)
+		  __sep_pos = 0;
+	      }
+	    else if (__found_zero
+		     && (__c == __lit[__num_base::_S_ix]
+			 || __c == __lit[__num_base::_S_iX]))
+	      {
+		if (__basefield == 0)
+		  __base = 16;
+		if (__base == 16)
+		  {
+		    __found_zero = false;
+		    __sep_pos = 0;
+		  }
+		else
+		  break;
+	      }
+	    else
+	      break;
+
+	    if (++__beg != __end)
+	      {
+		__c = *__beg;
+		if (!__found_zero)
+		  break;
+	      }
+	    else
+	      __testeof = true;
+	  }
+	
+	// At this point, base is determined. If not hex, only allow
+	// base digits as valid input.
+	const size_t __len = (__base == 16 ? __num_base::_S_iend
+			      - __num_base::_S_izero : __base);
+
+	// Extract.
+	string __found_grouping;
+	if (__lc->_M_use_grouping)
+	  __found_grouping.reserve(32);
+	bool __testfail = false;
+	bool __testoverflow = false;
+	const __unsigned_type __max =
+	  (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
+	  ? -__gnu_cxx::__numeric_traits<_ValueT>::__min
+	  : __gnu_cxx::__numeric_traits<_ValueT>::__max;
+	const __unsigned_type __smax = __max / __base;
+	__unsigned_type __result = 0;
+	int __digit = 0;
+	const char_type* __lit_zero = __lit + __num_base::_S_izero;
+
+	if (!__lc->_M_allocated)
+	  // "C" locale
+	  while (!__testeof)
+	    {
+	      __digit = _M_find(__lit_zero, __len, __c);
+	      if (__digit == -1)
+		break;
+	      
+	      if (__result > __smax)
+		__testoverflow = true;
+	      else
+		{
+		  __result *= __base;
+		  __testoverflow |= __result > __max - __digit;
+		  __result += __digit;
+		  ++__sep_pos;
+		}
+	      
+	      if (++__beg != __end)
+		__c = *__beg;
+	      else
+		__testeof = true;
+	    }
+	else
+	  while (!__testeof)
+	    {
+	      // According to 22.2.2.1.2, p8-9, first look for thousands_sep
+	      // and decimal_point.
+	      if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+		{
+		  // NB: Thousands separator at the beginning of a string
+		  // is a no-no, as is two consecutive thousands separators.
+		  if (__sep_pos)
+		    {
+		      __found_grouping += static_cast<char>(__sep_pos);
+		      __sep_pos = 0;
+		    }
+		  else
+		    {
+		      __testfail = true;
+		      break;
+		    }
+		}
+	      else if (__c == __lc->_M_decimal_point)
+		break;
+	      else
+		{
+		  const char_type* __q =
+		    __traits_type::find(__lit_zero, __len, __c);
+		  if (!__q)
+		    break;
+		  
+		  __digit = __q - __lit_zero;
+		  if (__digit > 15)
+		    __digit -= 6;
+		  if (__result > __smax)
+		    __testoverflow = true;
+		  else
+		    {
+		      __result *= __base;
+		      __testoverflow |= __result > __max - __digit;
+		      __result += __digit;
+		      ++__sep_pos;
+		    }
+		}
+	      
+	      if (++__beg != __end)
+		__c = *__beg;
+	      else
+		__testeof = true;
+	    }
+	
+	// Digit grouping is checked. If grouping and found_grouping don't
+	// match, then get very very upset, and set failbit.
+	if (__found_grouping.size())
+	  {
+	    // Add the ending grouping.
+	    __found_grouping += static_cast<char>(__sep_pos);
+
+	    if (!std::__verify_grouping(__lc->_M_grouping,
+					__lc->_M_grouping_size,
+					__found_grouping))
+	      __err = ios_base::failbit;
+	  }
+
+	// _GLIBCXX_RESOLVE_LIB_DEFECTS
+	// 23. Num_get overflow result.
+	if ((!__sep_pos && !__found_zero && !__found_grouping.size())
+	    || __testfail)
+	  {
+	    __v = 0;
+	    __err = ios_base::failbit;
+	  }
+	else if (__testoverflow)
+	  {
+	    if (__negative
+		&& __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
+	      __v = __gnu_cxx::__numeric_traits<_ValueT>::__min;
+	    else
+	      __v = __gnu_cxx::__numeric_traits<_ValueT>::__max;
+	    __err = ios_base::failbit;
+	  }
+	else
+	  __v = __negative ? -__result : __result;
+
+	if (__testeof)
+	  __err |= ios_base::eofbit;
+	return __beg;
+      }
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 17.  Bad bool parsing
+  template<typename _CharT, typename _InIter>
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, bool& __v) const
+    {
+      if (!(__io.flags() & ios_base::boolalpha))
+        {
+	  // Parse bool values as long.
+          // NB: We can't just call do_get(long) here, as it might
+          // refer to a derived class.
+	  long __l = -1;
+          __beg = _M_extract_int(__beg, __end, __io, __err, __l);
+	  if (__l == 0 || __l == 1)
+	    __v = bool(__l);
+	  else
+	    {
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 23. Num_get overflow result.
+	      __v = true;
+	      __err = ios_base::failbit;
+	      if (__beg == __end)
+		__err |= ios_base::eofbit;
+	    }
+        }
+      else
+        {
+	  // Parse bool values as alphanumeric.
+	  typedef __numpunct_cache<_CharT>  __cache_type;
+	  __use_cache<__cache_type> __uc;
+	  const locale& __loc = __io._M_getloc();
+	  const __cache_type* __lc = __uc(__loc);
+
+	  bool __testf = true;
+	  bool __testt = true;
+	  bool __donef = __lc->_M_falsename_size == 0;
+	  bool __donet = __lc->_M_truename_size == 0;
+	  bool __testeof = false;
+	  size_t __n = 0;
+	  while (!__donef || !__donet)
+	    {
+	      if (__beg == __end)
+		{
+		  __testeof = true;
+		  break;
+		}
+
+	      const char_type __c = *__beg;
+
+	      if (!__donef)
+		__testf = __c == __lc->_M_falsename[__n];
+
+	      if (!__testf && __donet)
+		break;
+
+	      if (!__donet)
+		__testt = __c == __lc->_M_truename[__n];
+
+	      if (!__testt && __donef)
+		break;
+
+	      if (!__testt && !__testf)
+		break;
+
+	      ++__n;
+	      ++__beg;
+
+	      __donef = !__testf || __n >= __lc->_M_falsename_size;
+	      __donet = !__testt || __n >= __lc->_M_truename_size;
+	    }
+	  if (__testf && __n == __lc->_M_falsename_size && __n)
+	    {
+	      __v = false;
+	      if (__testt && __n == __lc->_M_truename_size)
+		__err = ios_base::failbit;
+	      else
+		__err = __testeof ? ios_base::eofbit : ios_base::goodbit;
+	    }
+	  else if (__testt && __n == __lc->_M_truename_size && __n)
+	    {
+	      __v = true;
+	      __err = __testeof ? ios_base::eofbit : ios_base::goodbit;
+	    }
+	  else
+	    {
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 23. Num_get overflow result.
+	      __v = false;
+	      __err = ios_base::failbit;
+	      if (__testeof)
+		__err |= ios_base::eofbit;
+	    }
+	}
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	   ios_base::iostate& __err, float& __v) const
+    {
+      string __xtrc;
+      __xtrc.reserve(32);
+      __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+      std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, double& __v) const
+    {
+      string __xtrc;
+      __xtrc.reserve(32);
+      __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+      std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+  template<typename _CharT, typename _InIter>
+    _InIter
+    num_get<_CharT, _InIter>::
+    __do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	     ios_base::iostate& __err, double& __v) const
+    {
+      string __xtrc;
+      __xtrc.reserve(32);
+      __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+      std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+#endif
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, long double& __v) const
+    {
+      string __xtrc;
+      __xtrc.reserve(32);
+      __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+      std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, void*& __v) const
+    {
+      // Prepare for hex formatted input.
+      typedef ios_base::fmtflags        fmtflags;
+      const fmtflags __fmt = __io.flags();
+      __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex);
+
+      typedef __gnu_cxx::__conditional_type<(sizeof(void*)
+					     <= sizeof(unsigned long)),
+	unsigned long, unsigned long long>::__type _UIntPtrType;       
+
+      _UIntPtrType __ul;
+      __beg = _M_extract_int(__beg, __end, __io, __err, __ul);
+
+      // Reset from hex formatted input.
+      __io.flags(__fmt);
+
+      __v = reinterpret_cast<void*>(__ul);
+      return __beg;
+    }
+
+  // For use by integer and floating-point types after they have been
+  // converted into a char_type string.
+  template<typename _CharT, typename _OutIter>
+    void
+    num_put<_CharT, _OutIter>::
+    _M_pad(_CharT __fill, streamsize __w, ios_base& __io,
+	   _CharT* __new, const _CharT* __cs, int& __len) const
+    {
+      // [22.2.2.2.2] Stage 3.
+      // If necessary, pad.
+      __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new,
+						  __cs, __w, __len);
+      __len = static_cast<int>(__w);
+    }
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+  template<typename _CharT, typename _ValueT>
+    int
+    __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit,
+		  ios_base::fmtflags __flags, bool __dec)
+    {
+      _CharT* __buf = __bufend;
+      if (__builtin_expect(__dec, true))
+	{
+	  // Decimal.
+	  do
+	    {
+	      *--__buf = __lit[(__v % 10) + __num_base::_S_odigits];
+	      __v /= 10;
+	    }
+	  while (__v != 0);
+	}
+      else if ((__flags & ios_base::basefield) == ios_base::oct)
+	{
+	  // Octal.
+	  do
+	    {
+	      *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits];
+	      __v >>= 3;
+	    }
+	  while (__v != 0);
+	}
+      else
+	{
+	  // Hex.
+	  const bool __uppercase = __flags & ios_base::uppercase;
+	  const int __case_offset = __uppercase ? __num_base::_S_oudigits
+	                                        : __num_base::_S_odigits;
+	  do
+	    {
+	      *--__buf = __lit[(__v & 0xf) + __case_offset];
+	      __v >>= 4;
+	    }
+	  while (__v != 0);
+	}
+      return __bufend - __buf;
+    }
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+  template<typename _CharT, typename _OutIter>
+    void
+    num_put<_CharT, _OutIter>::
+    _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep,
+		 ios_base&, _CharT* __new, _CharT* __cs, int& __len) const
+    {
+      _CharT* __p = std::__add_grouping(__new, __sep, __grouping,
+					__grouping_size, __cs, __cs + __len);
+      __len = __p - __new;
+    }
+  
+  template<typename _CharT, typename _OutIter>
+    template<typename _ValueT>
+      _OutIter
+      num_put<_CharT, _OutIter>::
+      _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill,
+		    _ValueT __v) const
+      {
+	using __gnu_cxx::__add_unsigned;
+	typedef typename __add_unsigned<_ValueT>::__type __unsigned_type;
+	typedef __numpunct_cache<_CharT>	             __cache_type;
+	__use_cache<__cache_type> __uc;
+	const locale& __loc = __io._M_getloc();
+	const __cache_type* __lc = __uc(__loc);
+	const _CharT* __lit = __lc->_M_atoms_out;
+	const ios_base::fmtflags __flags = __io.flags();
+
+	// Long enough to hold hex, dec, and octal representations.
+	const int __ilen = 5 * sizeof(_ValueT);
+	_CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+							     * __ilen));
+
+	// [22.2.2.2.2] Stage 1, numeric conversion to character.
+	// Result is returned right-justified in the buffer.
+	const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
+	const bool __dec = (__basefield != ios_base::oct
+			    && __basefield != ios_base::hex);
+	const __unsigned_type __u = ((__v > 0 || !__dec)
+				     ? __unsigned_type(__v)
+				     : -__unsigned_type(__v));
+ 	int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec);
+	__cs += __ilen - __len;
+
+	// Add grouping, if necessary.
+	if (__lc->_M_use_grouping)
+	  {
+	    // Grouping can add (almost) as many separators as the number
+	    // of digits + space is reserved for numeric base or sign.
+	    _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+								  * (__len + 1)
+								  * 2));
+	    _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size,
+			 __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len);
+	    __cs = __cs2 + 2;
+	  }
+
+	// Complete Stage 1, prepend numeric base or sign.
+	if (__builtin_expect(__dec, true))
+	  {
+	    // Decimal.
+	    if (__v >= 0)
+	      {
+		if (bool(__flags & ios_base::showpos)
+		    && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
+		  *--__cs = __lit[__num_base::_S_oplus], ++__len;
+	      }
+	    else
+	      *--__cs = __lit[__num_base::_S_ominus], ++__len;
+	  }
+	else if (bool(__flags & ios_base::showbase) && __v)
+	  {
+	    if (__basefield == ios_base::oct)
+	      *--__cs = __lit[__num_base::_S_odigits], ++__len;
+	    else
+	      {
+		// 'x' or 'X'
+		const bool __uppercase = __flags & ios_base::uppercase;
+		*--__cs = __lit[__num_base::_S_ox + __uppercase];
+		// '0'
+		*--__cs = __lit[__num_base::_S_odigits];
+		__len += 2;
+	      }
+	  }
+
+	// Pad.
+	const streamsize __w = __io.width();
+	if (__w > static_cast<streamsize>(__len))
+	  {
+	    _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+								  * __w));
+	    _M_pad(__fill, __w, __io, __cs3, __cs, __len);
+	    __cs = __cs3;
+	  }
+	__io.width(0);
+
+	// [22.2.2.2.2] Stage 4.
+	// Write resulting, fully-formatted string to output iterator.
+	return std::__write(__s, __cs, __len);
+      }
+
+  template<typename _CharT, typename _OutIter>
+    void
+    num_put<_CharT, _OutIter>::
+    _M_group_float(const char* __grouping, size_t __grouping_size,
+		   _CharT __sep, const _CharT* __p, _CharT* __new,
+		   _CharT* __cs, int& __len) const
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 282. What types does numpunct grouping refer to?
+      // Add grouping, if necessary.
+      const int __declen = __p ? __p - __cs : __len;
+      _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping,
+					 __grouping_size,
+					 __cs, __cs + __declen);
+
+      // Tack on decimal part.
+      int __newlen = __p2 - __new;
+      if (__p)
+	{
+	  char_traits<_CharT>::copy(__p2, __p, __len - __declen);
+	  __newlen += __len - __declen;
+	}
+      __len = __newlen;
+    }
+
+  // The following code uses vsnprintf (or vsprintf(), when
+  // _GLIBCXX_USE_C99 is not defined) to convert floating point values
+  // for insertion into a stream.  An optimization would be to replace
+  // them with code that works directly on a wide buffer and then use
+  // __pad to do the padding.  It would be good to replace them anyway
+  // to gain back the efficiency that C++ provides by knowing up front
+  // the type of the values to insert.  Also, sprintf is dangerous
+  // since may lead to accidental buffer overruns.  This
+  // implementation follows the C++ standard fairly directly as
+  // outlined in 22.2.2.2 [lib.locale.num.put]
+  template<typename _CharT, typename _OutIter>
+    template<typename _ValueT>
+      _OutIter
+      num_put<_CharT, _OutIter>::
+      _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
+		       _ValueT __v) const
+      {
+	typedef __numpunct_cache<_CharT>                __cache_type;
+	__use_cache<__cache_type> __uc;
+	const locale& __loc = __io._M_getloc();
+	const __cache_type* __lc = __uc(__loc);
+
+	// Use default precision if out of range.
+	const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision();
+
+	const int __max_digits =
+	  __gnu_cxx::__numeric_traits<_ValueT>::__digits10;
+
+	// [22.2.2.2.2] Stage 1, numeric conversion to character.
+	int __len;
+	// Long enough for the max format spec.
+	char __fbuf[16];
+	__num_base::_S_format_float(__io, __fbuf, __mod);
+
+#ifdef _GLIBCXX_USE_C99
+	// First try a buffer perhaps big enough (most probably sufficient
+	// for non-ios_base::fixed outputs)
+	int __cs_size = __max_digits * 3;
+	char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+	__len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+				      __fbuf, __prec, __v);
+
+	// If the buffer was not large enough, try again with the correct size.
+	if (__len >= __cs_size)
+	  {
+	    __cs_size = __len + 1;
+	    __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+	    __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+					  __fbuf, __prec, __v);
+	  }
+#else
+	// Consider the possibility of long ios_base::fixed outputs
+	const bool __fixed = __io.flags() & ios_base::fixed;
+	const int __max_exp =
+	  __gnu_cxx::__numeric_traits<_ValueT>::__max_exponent10;
+
+	// The size of the output string is computed as follows.
+	// ios_base::fixed outputs may need up to __max_exp + 1 chars
+	// for the integer part + __prec chars for the fractional part
+	// + 3 chars for sign, decimal point, '\0'. On the other hand,
+	// for non-fixed outputs __max_digits * 2 + __prec chars are
+	// largely sufficient.
+	const int __cs_size = __fixed ? __max_exp + __prec + 4
+	                              : __max_digits * 2 + __prec;
+	char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+	__len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf, 
+				      __prec, __v);
+#endif
+
+	// [22.2.2.2.2] Stage 2, convert to char_type, using correct
+	// numpunct.decimal_point() values for '.' and adding grouping.
+	const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+	
+	_CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+							     * __len));
+	__ctype.widen(__cs, __cs + __len, __ws);
+	
+	// Replace decimal point.
+	_CharT* __wp = 0;
+	const char* __p = char_traits<char>::find(__cs, __len, '.');
+	if (__p)
+	  {
+	    __wp = __ws + (__p - __cs);
+	    *__wp = __lc->_M_decimal_point;
+	  }
+	
+	// Add grouping, if necessary.
+	// N.B. Make sure to not group things like 2e20, i.e., no decimal
+	// point, scientific notation.
+	if (__lc->_M_use_grouping
+	    && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9'
+				      && __cs[1] >= '0' && __cs[2] >= '0')))
+	  {
+	    // Grouping can add (almost) as many separators as the
+	    // number of digits, but no more.
+	    _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+								  * __len * 2));
+	    
+	    streamsize __off = 0;
+	    if (__cs[0] == '-' || __cs[0] == '+')
+	      {
+		__off = 1;
+		__ws2[0] = __ws[0];
+		__len -= 1;
+	      }
+	    
+	    _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size,
+			   __lc->_M_thousands_sep, __wp, __ws2 + __off,
+			   __ws + __off, __len);
+	    __len += __off;
+	    
+	    __ws = __ws2;
+	  }
+
+	// Pad.
+	const streamsize __w = __io.width();
+	if (__w > static_cast<streamsize>(__len))
+	  {
+	    _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+								  * __w));
+	    _M_pad(__fill, __w, __io, __ws3, __ws, __len);
+	    __ws = __ws3;
+	  }
+	__io.width(0);
+	
+	// [22.2.2.2.2] Stage 4.
+	// Write resulting, fully-formatted string to output iterator.
+	return std::__write(__s, __ws, __len);
+      }
+  
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const
+    {
+      const ios_base::fmtflags __flags = __io.flags();
+      if ((__flags & ios_base::boolalpha) == 0)
+        {
+          const long __l = __v;
+          __s = _M_insert_int(__s, __io, __fill, __l);
+        }
+      else
+        {
+	  typedef __numpunct_cache<_CharT>              __cache_type;
+	  __use_cache<__cache_type> __uc;
+	  const locale& __loc = __io._M_getloc();
+	  const __cache_type* __lc = __uc(__loc);
+
+	  const _CharT* __name = __v ? __lc->_M_truename
+	                             : __lc->_M_falsename;
+	  int __len = __v ? __lc->_M_truename_size
+	                  : __lc->_M_falsename_size;
+
+	  const streamsize __w = __io.width();
+	  if (__w > static_cast<streamsize>(__len))
+	    {
+	      const streamsize __plen = __w - __len;
+	      _CharT* __ps
+		= static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+							* __plen));
+
+	      char_traits<_CharT>::assign(__ps, __plen, __fill);
+	      __io.width(0);
+
+	      if ((__flags & ios_base::adjustfield) == ios_base::left)
+		{
+		  __s = std::__write(__s, __name, __len);
+		  __s = std::__write(__s, __ps, __plen);
+		}
+	      else
+		{
+		  __s = std::__write(__s, __ps, __plen);
+		  __s = std::__write(__s, __name, __len);
+		}
+	      return __s;
+	    }
+	  __io.width(0);
+	  __s = std::__write(__s, __name, __len);
+	}
+      return __s;
+    }
+
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+    { return _M_insert_float(__s, __io, __fill, char(), __v); }
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    __do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+    { return _M_insert_float(__s, __io, __fill, char(), __v); }
+#endif
+
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill,
+	   long double __v) const
+    { return _M_insert_float(__s, __io, __fill, 'L', __v); }
+
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill,
+           const void* __v) const
+    {
+      const ios_base::fmtflags __flags = __io.flags();
+      const ios_base::fmtflags __fmt = ~(ios_base::basefield
+					 | ios_base::uppercase);
+      __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase));
+
+      typedef __gnu_cxx::__conditional_type<(sizeof(const void*)
+					     <= sizeof(unsigned long)),
+	unsigned long, unsigned long long>::__type _UIntPtrType;       
+
+      __s = _M_insert_int(__s, __io, __fill,
+			  reinterpret_cast<_UIntPtrType>(__v));
+      __io.flags(__flags);
+      return __s;
+    }
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+  // Construct correctly padded string, as per 22.2.2.2.2
+  // Assumes
+  // __newlen > __oldlen
+  // __news is allocated for __newlen size
+
+  // NB: Of the two parameters, _CharT can be deduced from the
+  // function arguments. The other (_Traits) has to be explicitly specified.
+  template<typename _CharT, typename _Traits>
+    void
+    __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill,
+				   _CharT* __news, const _CharT* __olds,
+				   streamsize __newlen, streamsize __oldlen)
+    {
+      const size_t __plen = static_cast<size_t>(__newlen - __oldlen);
+      const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield;
+
+      // Padding last.
+      if (__adjust == ios_base::left)
+	{
+	  _Traits::copy(__news, __olds, __oldlen);
+	  _Traits::assign(__news + __oldlen, __plen, __fill);
+	  return;
+	}
+
+      size_t __mod = 0;
+      if (__adjust == ios_base::internal)
+	{
+	  // Pad after the sign, if there is one.
+	  // Pad after 0[xX], if there is one.
+	  // Who came up with these rules, anyway? Jeeze.
+          const locale& __loc = __io._M_getloc();
+	  const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+	  if (__ctype.widen('-') == __olds[0]
+	      || __ctype.widen('+') == __olds[0])
+	    {
+	      __news[0] = __olds[0];
+	      __mod = 1;
+	      ++__news;
+	    }
+	  else if (__ctype.widen('0') == __olds[0]
+		   && __oldlen > 1
+		   && (__ctype.widen('x') == __olds[1]
+		       || __ctype.widen('X') == __olds[1]))
+	    {
+	      __news[0] = __olds[0];
+	      __news[1] = __olds[1];
+	      __mod = 2;
+	      __news += 2;
+	    }
+	  // else Padding first.
+	}
+      _Traits::assign(__news, __plen, __fill);
+      _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod);
+    }
+
+  template<typename _CharT>
+    _CharT*
+    __add_grouping(_CharT* __s, _CharT __sep,
+		   const char* __gbeg, size_t __gsize,
+		   const _CharT* __first, const _CharT* __last)
+    {
+      size_t __idx = 0;
+      size_t __ctr = 0;
+
+      while (__last - __first > __gbeg[__idx]
+	     && static_cast<signed char>(__gbeg[__idx]) > 0
+	     && __gbeg[__idx] != __gnu_cxx::__numeric_traits<char>::__max)
+	{
+	  __last -= __gbeg[__idx];
+	  __idx < __gsize - 1 ? ++__idx : ++__ctr;
+	}
+
+      while (__first != __last)
+	*__s++ = *__first++;
+
+      while (__ctr--)
+	{
+	  *__s++ = __sep;	  
+	  for (char __i = __gbeg[__idx]; __i > 0; --__i)
+	    *__s++ = *__first++;
+	}
+
+      while (__idx--)
+	{
+	  *__s++ = __sep;	  
+	  for (char __i = __gbeg[__idx]; __i > 0; --__i)
+	    *__s++ = *__first++;
+	}
+
+      return __s;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class numpunct<char>;
+  extern template class numpunct_byname<char>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE num_get<char>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE num_put<char>;
+  extern template class ctype_byname<char>;
+
+  extern template
+    const ctype<char>&
+    use_facet<ctype<char> >(const locale&);
+
+  extern template
+    const numpunct<char>&
+    use_facet<numpunct<char> >(const locale&);
+
+  extern template
+    const num_put<char>&
+    use_facet<num_put<char> >(const locale&);
+
+  extern template
+    const num_get<char>&
+    use_facet<num_get<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<ctype<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<numpunct<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<num_put<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<num_get<char> >(const locale&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class numpunct<wchar_t>;
+  extern template class numpunct_byname<wchar_t>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE num_get<wchar_t>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE num_put<wchar_t>;
+  extern template class ctype_byname<wchar_t>;
+
+  extern template
+    const ctype<wchar_t>&
+    use_facet<ctype<wchar_t> >(const locale&);
+
+  extern template
+    const numpunct<wchar_t>&
+    use_facet<numpunct<wchar_t> >(const locale&);
+
+  extern template
+    const num_put<wchar_t>&
+    use_facet<num_put<wchar_t> >(const locale&);
+
+  extern template
+    const num_get<wchar_t>&
+    use_facet<num_get<wchar_t> >(const locale&);
+
+ extern template
+    bool
+    has_facet<ctype<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<numpunct<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<num_put<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<num_get<wchar_t> >(const locale&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets_nonio.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets_nonio.h
new file mode 100644
index 0000000..a25e0ac
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets_nonio.h
@@ -0,0 +1,1933 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_facets_nonio.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+#ifndef _LOCALE_FACETS_NONIO_H
+#define _LOCALE_FACETS_NONIO_H 1
+
+#pragma GCC system_header
+
+#include <ctime>	// For struct tm
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  @brief  Time format ordering data.
+   *  @ingroup locales
+   *
+   *  This class provides an enum representing different orderings of
+   *  time: day, month, and year.
+  */
+  class time_base
+  {
+  public:
+    enum dateorder { no_order, dmy, mdy, ymd, ydm };
+  };
+
+  template<typename _CharT>
+    struct __timepunct_cache : public locale::facet
+    {
+      // List of all known timezones, with GMT first.
+      static const _CharT*		_S_timezones[14];
+
+      const _CharT*			_M_date_format;
+      const _CharT*			_M_date_era_format;
+      const _CharT*			_M_time_format;
+      const _CharT*			_M_time_era_format;
+      const _CharT*			_M_date_time_format;
+      const _CharT*			_M_date_time_era_format;
+      const _CharT*			_M_am;
+      const _CharT*			_M_pm;
+      const _CharT*			_M_am_pm_format;
+
+      // Day names, starting with "C"'s Sunday.
+      const _CharT*			_M_day1;
+      const _CharT*			_M_day2;
+      const _CharT*			_M_day3;
+      const _CharT*			_M_day4;
+      const _CharT*			_M_day5;
+      const _CharT*			_M_day6;
+      const _CharT*			_M_day7;
+
+      // Abbreviated day names, starting with "C"'s Sun.
+      const _CharT*			_M_aday1;
+      const _CharT*			_M_aday2;
+      const _CharT*			_M_aday3;
+      const _CharT*			_M_aday4;
+      const _CharT*			_M_aday5;
+      const _CharT*			_M_aday6;
+      const _CharT*			_M_aday7;
+
+      // Month names, starting with "C"'s January.
+      const _CharT*			_M_month01;
+      const _CharT*			_M_month02;
+      const _CharT*			_M_month03;
+      const _CharT*			_M_month04;
+      const _CharT*			_M_month05;
+      const _CharT*			_M_month06;
+      const _CharT*			_M_month07;
+      const _CharT*			_M_month08;
+      const _CharT*			_M_month09;
+      const _CharT*			_M_month10;
+      const _CharT*			_M_month11;
+      const _CharT*			_M_month12;
+
+      // Abbreviated month names, starting with "C"'s Jan.
+      const _CharT*			_M_amonth01;
+      const _CharT*			_M_amonth02;
+      const _CharT*			_M_amonth03;
+      const _CharT*			_M_amonth04;
+      const _CharT*			_M_amonth05;
+      const _CharT*			_M_amonth06;
+      const _CharT*			_M_amonth07;
+      const _CharT*			_M_amonth08;
+      const _CharT*			_M_amonth09;
+      const _CharT*			_M_amonth10;
+      const _CharT*			_M_amonth11;
+      const _CharT*			_M_amonth12;
+
+      bool				_M_allocated;
+
+      __timepunct_cache(size_t __refs = 0) : facet(__refs),
+      _M_date_format(NULL), _M_date_era_format(NULL), _M_time_format(NULL),
+      _M_time_era_format(NULL), _M_date_time_format(NULL),
+      _M_date_time_era_format(NULL), _M_am(NULL), _M_pm(NULL),
+      _M_am_pm_format(NULL), _M_day1(NULL), _M_day2(NULL), _M_day3(NULL),
+      _M_day4(NULL), _M_day5(NULL), _M_day6(NULL), _M_day7(NULL),
+      _M_aday1(NULL), _M_aday2(NULL), _M_aday3(NULL), _M_aday4(NULL),
+      _M_aday5(NULL), _M_aday6(NULL), _M_aday7(NULL), _M_month01(NULL),
+      _M_month02(NULL), _M_month03(NULL), _M_month04(NULL), _M_month05(NULL),
+      _M_month06(NULL), _M_month07(NULL), _M_month08(NULL), _M_month09(NULL),
+      _M_month10(NULL), _M_month11(NULL), _M_month12(NULL), _M_amonth01(NULL),
+      _M_amonth02(NULL), _M_amonth03(NULL), _M_amonth04(NULL),
+      _M_amonth05(NULL), _M_amonth06(NULL), _M_amonth07(NULL),
+      _M_amonth08(NULL), _M_amonth09(NULL), _M_amonth10(NULL),
+      _M_amonth11(NULL), _M_amonth12(NULL), _M_allocated(false)
+      { }
+
+      ~__timepunct_cache();
+
+      void
+      _M_cache(const locale& __loc);
+
+    private:
+      __timepunct_cache&
+      operator=(const __timepunct_cache&);
+      
+      explicit
+      __timepunct_cache(const __timepunct_cache&);
+    };
+
+  template<typename _CharT>
+    __timepunct_cache<_CharT>::~__timepunct_cache()
+    {
+      if (_M_allocated)
+	{
+	  // Unused.
+	}
+    }
+
+  // Specializations.
+  template<>
+    const char*
+    __timepunct_cache<char>::_S_timezones[14];
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    const wchar_t*
+    __timepunct_cache<wchar_t>::_S_timezones[14];
+#endif
+
+  // Generic.
+  template<typename _CharT>
+    const _CharT* __timepunct_cache<_CharT>::_S_timezones[14];
+
+  template<typename _CharT>
+    class __timepunct : public locale::facet
+    {
+    public:
+      // Types:
+      typedef _CharT			__char_type;
+      typedef basic_string<_CharT>	__string_type;
+      typedef __timepunct_cache<_CharT>	__cache_type;
+
+    protected:
+      __cache_type*			_M_data;
+      __c_locale			_M_c_locale_timepunct;
+      const char*			_M_name_timepunct;
+
+    public:
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      explicit
+      __timepunct(size_t __refs = 0);
+
+      explicit
+      __timepunct(__cache_type* __cache, size_t __refs = 0);
+
+      /**
+       *  @brief  Internal constructor. Not for general use.
+       *
+       *  This is a constructor for use by the library itself to set up new
+       *  locales.
+       *
+       *  @param cloc  The C locale.
+       *  @param s  The name of a locale.
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0);
+
+      // FIXME: for error checking purposes _M_put should return the return
+      // value of strftime/wcsftime.
+      void
+      _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format,
+	     const tm* __tm) const throw ();
+
+      void
+      _M_date_formats(const _CharT** __date) const
+      {
+	// Always have default first.
+	__date[0] = _M_data->_M_date_format;
+	__date[1] = _M_data->_M_date_era_format;
+      }
+
+      void
+      _M_time_formats(const _CharT** __time) const
+      {
+	// Always have default first.
+	__time[0] = _M_data->_M_time_format;
+	__time[1] = _M_data->_M_time_era_format;
+      }
+
+      void
+      _M_date_time_formats(const _CharT** __dt) const
+      {
+	// Always have default first.
+	__dt[0] = _M_data->_M_date_time_format;
+	__dt[1] = _M_data->_M_date_time_era_format;
+      }
+
+      void
+      _M_am_pm_format(const _CharT* __ampm) const
+      { __ampm = _M_data->_M_am_pm_format; }
+
+      void
+      _M_am_pm(const _CharT** __ampm) const
+      {
+	__ampm[0] = _M_data->_M_am;
+	__ampm[1] = _M_data->_M_pm;
+      }
+
+      void
+      _M_days(const _CharT** __days) const
+      {
+	__days[0] = _M_data->_M_day1;
+	__days[1] = _M_data->_M_day2;
+	__days[2] = _M_data->_M_day3;
+	__days[3] = _M_data->_M_day4;
+	__days[4] = _M_data->_M_day5;
+	__days[5] = _M_data->_M_day6;
+	__days[6] = _M_data->_M_day7;
+      }
+
+      void
+      _M_days_abbreviated(const _CharT** __days) const
+      {
+	__days[0] = _M_data->_M_aday1;
+	__days[1] = _M_data->_M_aday2;
+	__days[2] = _M_data->_M_aday3;
+	__days[3] = _M_data->_M_aday4;
+	__days[4] = _M_data->_M_aday5;
+	__days[5] = _M_data->_M_aday6;
+	__days[6] = _M_data->_M_aday7;
+      }
+
+      void
+      _M_months(const _CharT** __months) const
+      {
+	__months[0] = _M_data->_M_month01;
+	__months[1] = _M_data->_M_month02;
+	__months[2] = _M_data->_M_month03;
+	__months[3] = _M_data->_M_month04;
+	__months[4] = _M_data->_M_month05;
+	__months[5] = _M_data->_M_month06;
+	__months[6] = _M_data->_M_month07;
+	__months[7] = _M_data->_M_month08;
+	__months[8] = _M_data->_M_month09;
+	__months[9] = _M_data->_M_month10;
+	__months[10] = _M_data->_M_month11;
+	__months[11] = _M_data->_M_month12;
+      }
+
+      void
+      _M_months_abbreviated(const _CharT** __months) const
+      {
+	__months[0] = _M_data->_M_amonth01;
+	__months[1] = _M_data->_M_amonth02;
+	__months[2] = _M_data->_M_amonth03;
+	__months[3] = _M_data->_M_amonth04;
+	__months[4] = _M_data->_M_amonth05;
+	__months[5] = _M_data->_M_amonth06;
+	__months[6] = _M_data->_M_amonth07;
+	__months[7] = _M_data->_M_amonth08;
+	__months[8] = _M_data->_M_amonth09;
+	__months[9] = _M_data->_M_amonth10;
+	__months[10] = _M_data->_M_amonth11;
+	__months[11] = _M_data->_M_amonth12;
+      }
+
+    protected:
+      virtual
+      ~__timepunct();
+
+      // For use at construction time only.
+      void
+      _M_initialize_timepunct(__c_locale __cloc = NULL);
+    };
+
+  template<typename _CharT>
+    locale::id __timepunct<_CharT>::id;
+
+  // Specializations.
+  template<>
+    void
+    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc);
+
+  template<>
+    void
+    __timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const throw ();
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    void
+    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc);
+
+  template<>
+    void
+    __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*,
+				 const tm*) const throw ();
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+  // Include host and configuration specific timepunct functions.
+  #include <bits/time_members.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  @brief  Primary class template time_get.
+   *  @ingroup locales
+   *
+   *  This facet encapsulates the code to parse and return a date or
+   *  time from a string.  It is used by the istream numeric
+   *  extraction operators.
+   *
+   *  The time_get template uses protected virtual functions to provide the
+   *  actual results.  The public accessors forward the call to the virtual
+   *  functions.  These virtual functions are hooks for developers to
+   *  implement the behavior they require from the time_get facet.
+  */
+  template<typename _CharT, typename _InIter>
+    class time_get : public locale::facet, public time_base
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef _InIter			iter_type;
+      //@}
+      typedef basic_string<_CharT>	__string_type;
+
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      time_get(size_t __refs = 0)
+      : facet (__refs) { }
+
+      /**
+       *  @brief  Return preferred order of month, day, and year.
+       *
+       *  This function returns an enum from timebase::dateorder giving the
+       *  preferred ordering if the format @a x given to time_put::put() only
+       *  uses month, day, and year.  If the format @a x for the associated
+       *  locale uses other fields, this function returns
+       *  timebase::dateorder::noorder.
+       *
+       *  NOTE: The library always returns noorder at the moment.
+       *
+       *  @return  A member of timebase::dateorder.
+      */
+      dateorder
+      date_order()  const
+      { return this->do_date_order(); }
+
+      /**
+       *  @brief  Parse input time string.
+       *
+       *  This function parses a time according to the format @a x and puts the
+       *  results into a user-supplied struct tm.  The result is returned by
+       *  calling time_get::do_get_time().
+       *
+       *  If there is a valid time string according to format @a x, @a tm will
+       *  be filled in accordingly and the returned iterator will point to the
+       *  first character beyond the time string.  If an error occurs before
+       *  the end, err |= ios_base::failbit.  If parsing reads all the
+       *  characters, err |= ios_base::eofbit.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond time string.
+      */
+      iter_type
+      get_time(iter_type __beg, iter_type __end, ios_base& __io,
+	       ios_base::iostate& __err, tm* __tm)  const
+      { return this->do_get_time(__beg, __end, __io, __err, __tm); }
+
+      /**
+       *  @brief  Parse input date string.
+       *
+       *  This function parses a date according to the format @a X and puts the
+       *  results into a user-supplied struct tm.  The result is returned by
+       *  calling time_get::do_get_date().
+       *
+       *  If there is a valid date string according to format @a X, @a tm will
+       *  be filled in accordingly and the returned iterator will point to the
+       *  first character beyond the date string.  If an error occurs before
+       *  the end, err |= ios_base::failbit.  If parsing reads all the
+       *  characters, err |= ios_base::eofbit.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond date string.
+      */
+      iter_type
+      get_date(iter_type __beg, iter_type __end, ios_base& __io,
+	       ios_base::iostate& __err, tm* __tm)  const
+      { return this->do_get_date(__beg, __end, __io, __err, __tm); }
+
+      /**
+       *  @brief  Parse input weekday string.
+       *
+       *  This function parses a weekday name and puts the results into a
+       *  user-supplied struct tm.  The result is returned by calling
+       *  time_get::do_get_weekday().
+       *
+       *  Parsing starts by parsing an abbreviated weekday name.  If a valid
+       *  abbreviation is followed by a character that would lead to the full
+       *  weekday name, parsing continues until the full name is found or an
+       *  error occurs.  Otherwise parsing finishes at the end of the
+       *  abbreviated name.
+       *
+       *  If an error occurs before the end, err |= ios_base::failbit.  If
+       *  parsing reads all the characters, err |= ios_base::eofbit.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond weekday name.
+      */
+      iter_type
+      get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
+		  ios_base::iostate& __err, tm* __tm) const
+      { return this->do_get_weekday(__beg, __end, __io, __err, __tm); }
+
+      /**
+       *  @brief  Parse input month string.
+       *
+       *  This function parses a month name and puts the results into a
+       *  user-supplied struct tm.  The result is returned by calling
+       *  time_get::do_get_monthname().
+       *
+       *  Parsing starts by parsing an abbreviated month name.  If a valid
+       *  abbreviation is followed by a character that would lead to the full
+       *  month name, parsing continues until the full name is found or an
+       *  error occurs.  Otherwise parsing finishes at the end of the
+       *  abbreviated name.
+       *
+       *  If an error occurs before the end, err |= ios_base::failbit.  If
+       *  parsing reads all the characters, err |=
+       *  ios_base::eofbit.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond month name.
+      */
+      iter_type
+      get_monthname(iter_type __beg, iter_type __end, ios_base& __io,
+		    ios_base::iostate& __err, tm* __tm) const
+      { return this->do_get_monthname(__beg, __end, __io, __err, __tm); }
+
+      /**
+       *  @brief  Parse input year string.
+       *
+       *  This function reads up to 4 characters to parse a year string and
+       *  puts the results into a user-supplied struct tm.  The result is
+       *  returned by calling time_get::do_get_year().
+       *
+       *  4 consecutive digits are interpreted as a full year.  If there are
+       *  exactly 2 consecutive digits, the library interprets this as the
+       *  number of years since 1900.
+       *
+       *  If an error occurs before the end, err |= ios_base::failbit.  If
+       *  parsing reads all the characters, err |= ios_base::eofbit.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond year.
+      */
+      iter_type
+      get_year(iter_type __beg, iter_type __end, ios_base& __io,
+	       ios_base::iostate& __err, tm* __tm) const
+      { return this->do_get_year(__beg, __end, __io, __err, __tm); }
+
+    protected:
+      /// Destructor.
+      virtual
+      ~time_get() { }
+
+      /**
+       *  @brief  Return preferred order of month, day, and year.
+       *
+       *  This function returns an enum from timebase::dateorder giving the
+       *  preferred ordering if the format @a x given to time_put::put() only
+       *  uses month, day, and year.  This function is a hook for derived
+       *  classes to change the value returned.
+       *
+       *  @return  A member of timebase::dateorder.
+      */
+      virtual dateorder
+      do_date_order() const;
+
+      /**
+       *  @brief  Parse input time string.
+       *
+       *  This function parses a time according to the format @a x and puts the
+       *  results into a user-supplied struct tm.  This function is a hook for
+       *  derived classes to change the value returned.  @see get_time() for
+       *  details.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond time string.
+      */
+      virtual iter_type
+      do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
+		  ios_base::iostate& __err, tm* __tm) const;
+
+      /**
+       *  @brief  Parse input date string.
+       *
+       *  This function parses a date according to the format @a X and puts the
+       *  results into a user-supplied struct tm.  This function is a hook for
+       *  derived classes to change the value returned.  @see get_date() for
+       *  details.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond date string.
+      */
+      virtual iter_type
+      do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
+		  ios_base::iostate& __err, tm* __tm) const;
+
+      /**
+       *  @brief  Parse input weekday string.
+       *
+       *  This function parses a weekday name and puts the results into a
+       *  user-supplied struct tm.  This function is a hook for derived
+       *  classes to change the value returned.  @see get_weekday() for
+       *  details.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond weekday name.
+      */
+      virtual iter_type
+      do_get_weekday(iter_type __beg, iter_type __end, ios_base&,
+		     ios_base::iostate& __err, tm* __tm) const;
+
+      /**
+       *  @brief  Parse input month string.
+       *
+       *  This function parses a month name and puts the results into a
+       *  user-supplied struct tm.  This function is a hook for derived
+       *  classes to change the value returned.  @see get_monthname() for
+       *  details.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond month name.
+      */
+      virtual iter_type
+      do_get_monthname(iter_type __beg, iter_type __end, ios_base&,
+		       ios_base::iostate& __err, tm* __tm) const;
+
+      /**
+       *  @brief  Parse input year string.
+       *
+       *  This function reads up to 4 characters to parse a year string and
+       *  puts the results into a user-supplied struct tm.  This function is a
+       *  hook for derived classes to change the value returned.  @see
+       *  get_year() for details.
+       *
+       *  @param  beg  Start of string to parse.
+       *  @param  end  End of string to parse.
+       *  @param  io  Source of the locale.
+       *  @param  err  Error flags to set.
+       *  @param  tm  Pointer to struct tm to fill in.
+       *  @return  Iterator to first char beyond year.
+      */
+      virtual iter_type
+      do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
+		  ios_base::iostate& __err, tm* __tm) const;
+
+      // Extract numeric component of length __len.
+      iter_type
+      _M_extract_num(iter_type __beg, iter_type __end, int& __member,
+		     int __min, int __max, size_t __len,
+		     ios_base& __io, ios_base::iostate& __err) const;
+
+      // Extract any unique array of string literals in a const _CharT* array.
+      iter_type
+      _M_extract_name(iter_type __beg, iter_type __end, int& __member,
+		      const _CharT** __names, size_t __indexlen,
+		      ios_base& __io, ios_base::iostate& __err) const;
+
+      // Extract day or month name in a const _CharT* array.
+      iter_type
+      _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member,
+			       const _CharT** __names, size_t __indexlen,
+			       ios_base& __io, ios_base::iostate& __err) const;
+
+      // Extract on a component-by-component basis, via __format argument.
+      iter_type
+      _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
+			    ios_base::iostate& __err, tm* __tm,
+			    const _CharT* __format) const;
+    };
+
+  template<typename _CharT, typename _InIter>
+    locale::id time_get<_CharT, _InIter>::id;
+
+  /// class time_get_byname [22.2.5.2].
+  template<typename _CharT, typename _InIter>
+    class time_get_byname : public time_get<_CharT, _InIter>
+    {
+    public:
+      // Types:
+      typedef _CharT			char_type;
+      typedef _InIter			iter_type;
+
+      explicit
+      time_get_byname(const char*, size_t __refs = 0)
+      : time_get<_CharT, _InIter>(__refs) { }
+
+    protected:
+      virtual
+      ~time_get_byname() { }
+    };
+
+  /**
+   *  @brief  Primary class template time_put.
+   *  @ingroup locales
+   *
+   *  This facet encapsulates the code to format and output dates and times
+   *  according to formats used by strftime().
+   *
+   *  The time_put template uses protected virtual functions to provide the
+   *  actual results.  The public accessors forward the call to the virtual
+   *  functions.  These virtual functions are hooks for developers to
+   *  implement the behavior they require from the time_put facet.
+  */
+  template<typename _CharT, typename _OutIter>
+    class time_put : public locale::facet
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef _OutIter			iter_type;
+      //@}
+
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      time_put(size_t __refs = 0)
+      : facet(__refs) { }
+
+      /**
+       *  @brief  Format and output a time or date.
+       *
+       *  This function formats the data in struct tm according to the
+       *  provided format string.  The format string is interpreted as by
+       *  strftime().
+       *
+       *  @param  s  The stream to write to.
+       *  @param  io  Source of locale.
+       *  @param  fill  char_type to use for padding.
+       *  @param  tm  Struct tm with date and time info to format.
+       *  @param  beg  Start of format string.
+       *  @param  end  End of format string.
+       *  @return  Iterator after writing.
+       */
+      iter_type
+      put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+	  const _CharT* __beg, const _CharT* __end) const;
+
+      /**
+       *  @brief  Format and output a time or date.
+       *
+       *  This function formats the data in struct tm according to the
+       *  provided format char and optional modifier.  The format and modifier
+       *  are interpreted as by strftime().  It does so by returning
+       *  time_put::do_put().
+       *
+       *  @param  s  The stream to write to.
+       *  @param  io  Source of locale.
+       *  @param  fill  char_type to use for padding.
+       *  @param  tm  Struct tm with date and time info to format.
+       *  @param  format  Format char.
+       *  @param  mod  Optional modifier char.
+       *  @return  Iterator after writing.
+       */
+      iter_type
+      put(iter_type __s, ios_base& __io, char_type __fill,
+	  const tm* __tm, char __format, char __mod = 0) const
+      { return this->do_put(__s, __io, __fill, __tm, __format, __mod); }
+
+    protected:
+      /// Destructor.
+      virtual
+      ~time_put()
+      { }
+
+      /**
+       *  @brief  Format and output a time or date.
+       *
+       *  This function formats the data in struct tm according to the
+       *  provided format char and optional modifier.  This function is a hook
+       *  for derived classes to change the value returned.  @see put() for
+       *  more details.
+       *
+       *  @param  s  The stream to write to.
+       *  @param  io  Source of locale.
+       *  @param  fill  char_type to use for padding.
+       *  @param  tm  Struct tm with date and time info to format.
+       *  @param  format  Format char.
+       *  @param  mod  Optional modifier char.
+       *  @return  Iterator after writing.
+       */
+      virtual iter_type
+      do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+	     char __format, char __mod) const;
+    };
+
+  template<typename _CharT, typename _OutIter>
+    locale::id time_put<_CharT, _OutIter>::id;
+
+  /// class time_put_byname [22.2.5.4].
+  template<typename _CharT, typename _OutIter>
+    class time_put_byname : public time_put<_CharT, _OutIter>
+    {
+    public:
+      // Types:
+      typedef _CharT			char_type;
+      typedef _OutIter			iter_type;
+
+      explicit
+      time_put_byname(const char*, size_t __refs = 0)
+      : time_put<_CharT, _OutIter>(__refs)
+      { };
+
+    protected:
+      virtual
+      ~time_put_byname() { }
+    };
+
+
+  /**
+   *  @brief  Money format ordering data.
+   *  @ingroup locales
+   *
+   *  This class contains an ordered array of 4 fields to represent the
+   *  pattern for formatting a money amount.  Each field may contain one entry
+   *  from the part enum.  symbol, sign, and value must be present and the
+   *  remaining field must contain either none or space.  @see
+   *  moneypunct::pos_format() and moneypunct::neg_format() for details of how
+   *  these fields are interpreted.
+  */
+  class money_base
+  {
+  public:
+    enum part { none, space, symbol, sign, value };
+    struct pattern { char field[4]; };
+
+    static const pattern _S_default_pattern;
+
+    enum
+    {
+      _S_minus,
+      _S_zero,
+      _S_end = 11
+    };
+
+    // String literal of acceptable (narrow) input/output, for
+    // money_get/money_put. "-0123456789"
+    static const char* _S_atoms;
+
+    // Construct and return valid pattern consisting of some combination of:
+    // space none symbol sign value
+    _GLIBCXX_CONST static pattern
+    _S_construct_pattern(char __precedes, char __space, char __posn) throw ();
+  };
+
+  template<typename _CharT, bool _Intl>
+    struct __moneypunct_cache : public locale::facet
+    {
+      const char*			_M_grouping;
+      size_t                            _M_grouping_size;
+      bool				_M_use_grouping;
+      _CharT				_M_decimal_point;
+      _CharT				_M_thousands_sep;
+      const _CharT*			_M_curr_symbol;
+      size_t                            _M_curr_symbol_size;
+      const _CharT*			_M_positive_sign;
+      size_t                            _M_positive_sign_size;
+      const _CharT*			_M_negative_sign;
+      size_t                            _M_negative_sign_size;
+      int				_M_frac_digits;
+      money_base::pattern		_M_pos_format;
+      money_base::pattern	        _M_neg_format;
+
+      // A list of valid numeric literals for input and output: in the standard
+      // "C" locale, this is "-0123456789". This array contains the chars after
+      // having been passed through the current locale's ctype<_CharT>.widen().
+      _CharT				_M_atoms[money_base::_S_end];
+
+      bool				_M_allocated;
+
+      __moneypunct_cache(size_t __refs = 0) : facet(__refs),
+      _M_grouping(NULL), _M_grouping_size(0), _M_use_grouping(false),
+      _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()),
+      _M_curr_symbol(NULL), _M_curr_symbol_size(0),
+      _M_positive_sign(NULL), _M_positive_sign_size(0),
+      _M_negative_sign(NULL), _M_negative_sign_size(0),
+      _M_frac_digits(0),
+      _M_pos_format(money_base::pattern()),
+      _M_neg_format(money_base::pattern()), _M_allocated(false)
+      { }
+
+      ~__moneypunct_cache();
+
+      void
+      _M_cache(const locale& __loc);
+
+    private:
+      __moneypunct_cache&
+      operator=(const __moneypunct_cache&);
+      
+      explicit
+      __moneypunct_cache(const __moneypunct_cache&);
+    };
+
+  template<typename _CharT, bool _Intl>
+    __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache()
+    {
+      if (_M_allocated)
+	{
+	  delete [] _M_grouping;
+	  delete [] _M_curr_symbol;
+	  delete [] _M_positive_sign;
+	  delete [] _M_negative_sign;
+	}
+    }
+
+  /**
+   *  @brief  Primary class template moneypunct.
+   *  @ingroup locales
+   *
+   *  This facet encapsulates the punctuation, grouping and other formatting
+   *  features of money amount string representations.
+  */
+  template<typename _CharT, bool _Intl>
+    class moneypunct : public locale::facet, public money_base
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef basic_string<_CharT>	string_type;
+      //@}
+      typedef __moneypunct_cache<_CharT, _Intl>     __cache_type;
+
+    private:
+      __cache_type*			_M_data;
+
+    public:
+      /// This value is provided by the standard, but no reason for its
+      /// existence.
+      static const bool			intl = _Intl;
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      moneypunct(size_t __refs = 0) : facet(__refs), _M_data(NULL)
+      { _M_initialize_moneypunct(); }
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is an internal constructor.
+       *
+       *  @param cache  Cache for optimization.
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      moneypunct(__cache_type* __cache, size_t __refs = 0)
+      : facet(__refs), _M_data(__cache)
+      { _M_initialize_moneypunct(); }
+
+      /**
+       *  @brief  Internal constructor. Not for general use.
+       *
+       *  This is a constructor for use by the library itself to set up new
+       *  locales.
+       *
+       *  @param cloc  The C locale.
+       *  @param s  The name of a locale.
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0)
+      : facet(__refs), _M_data(NULL)
+      { _M_initialize_moneypunct(__cloc, __s); }
+
+      /**
+       *  @brief  Return decimal point character.
+       *
+       *  This function returns a char_type to use as a decimal point.  It
+       *  does so by returning returning
+       *  moneypunct<char_type>::do_decimal_point().
+       *
+       *  @return  @a char_type representing a decimal point.
+      */
+      char_type
+      decimal_point() const
+      { return this->do_decimal_point(); }
+
+      /**
+       *  @brief  Return thousands separator character.
+       *
+       *  This function returns a char_type to use as a thousands
+       *  separator.  It does so by returning returning
+       *  moneypunct<char_type>::do_thousands_sep().
+       *
+       *  @return  char_type representing a thousands separator.
+      */
+      char_type
+      thousands_sep() const
+      { return this->do_thousands_sep(); }
+
+      /**
+       *  @brief  Return grouping specification.
+       *
+       *  This function returns a string representing groupings for the
+       *  integer part of an amount.  Groupings indicate where thousands
+       *  separators should be inserted.
+       *
+       *  Each char in the return string is interpret as an integer rather
+       *  than a character.  These numbers represent the number of digits in a
+       *  group.  The first char in the string represents the number of digits
+       *  in the least significant group.  If a char is negative, it indicates
+       *  an unlimited number of digits for the group.  If more chars from the
+       *  string are required to group a number, the last char is used
+       *  repeatedly.
+       *
+       *  For example, if the grouping() returns <code>\003\002</code>
+       *  and is applied to the number 123456789, this corresponds to
+       *  12,34,56,789.  Note that if the string was <code>32</code>, this would
+       *  put more than 50 digits into the least significant group if
+       *  the character set is ASCII.
+       *
+       *  The string is returned by calling
+       *  moneypunct<char_type>::do_grouping().
+       *
+       *  @return  string representing grouping specification.
+      */
+      string
+      grouping() const
+      { return this->do_grouping(); }
+
+      /**
+       *  @brief  Return currency symbol string.
+       *
+       *  This function returns a string_type to use as a currency symbol.  It
+       *  does so by returning returning
+       *  moneypunct<char_type>::do_curr_symbol().
+       *
+       *  @return  @a string_type representing a currency symbol.
+      */
+      string_type
+      curr_symbol() const
+      { return this->do_curr_symbol(); }
+
+      /**
+       *  @brief  Return positive sign string.
+       *
+       *  This function returns a string_type to use as a sign for positive
+       *  amounts.  It does so by returning returning
+       *  moneypunct<char_type>::do_positive_sign().
+       *
+       *  If the return value contains more than one character, the first
+       *  character appears in the position indicated by pos_format() and the
+       *  remainder appear at the end of the formatted string.
+       *
+       *  @return  @a string_type representing a positive sign.
+      */
+      string_type
+      positive_sign() const
+      { return this->do_positive_sign(); }
+
+      /**
+       *  @brief  Return negative sign string.
+       *
+       *  This function returns a string_type to use as a sign for negative
+       *  amounts.  It does so by returning returning
+       *  moneypunct<char_type>::do_negative_sign().
+       *
+       *  If the return value contains more than one character, the first
+       *  character appears in the position indicated by neg_format() and the
+       *  remainder appear at the end of the formatted string.
+       *
+       *  @return  @a string_type representing a negative sign.
+      */
+      string_type
+      negative_sign() const
+      { return this->do_negative_sign(); }
+
+      /**
+       *  @brief  Return number of digits in fraction.
+       *
+       *  This function returns the exact number of digits that make up the
+       *  fractional part of a money amount.  It does so by returning
+       *  returning moneypunct<char_type>::do_frac_digits().
+       *
+       *  The fractional part of a money amount is optional.  But if it is
+       *  present, there must be frac_digits() digits.
+       *
+       *  @return  Number of digits in amount fraction.
+      */
+      int
+      frac_digits() const
+      { return this->do_frac_digits(); }
+
+      //@{
+      /**
+       *  @brief  Return pattern for money values.
+       *
+       *  This function returns a pattern describing the formatting of a
+       *  positive or negative valued money amount.  It does so by returning
+       *  returning moneypunct<char_type>::do_pos_format() or
+       *  moneypunct<char_type>::do_neg_format().
+       *
+       *  The pattern has 4 fields describing the ordering of symbol, sign,
+       *  value, and none or space.  There must be one of each in the pattern.
+       *  The none and space enums may not appear in the first field and space
+       *  may not appear in the final field.
+       *
+       *  The parts of a money string must appear in the order indicated by
+       *  the fields of the pattern.  The symbol field indicates that the
+       *  value of curr_symbol() may be present.  The sign field indicates
+       *  that the value of positive_sign() or negative_sign() must be
+       *  present.  The value field indicates that the absolute value of the
+       *  money amount is present.  none indicates 0 or more whitespace
+       *  characters, except at the end, where it permits no whitespace.
+       *  space indicates that 1 or more whitespace characters must be
+       *  present.
+       *
+       *  For example, for the US locale and pos_format() pattern
+       *  {symbol,sign,value,none}, curr_symbol() == &apos;$&apos;
+       *  positive_sign() == &apos;+&apos;, and value 10.01, and
+       *  options set to force the symbol, the corresponding string is
+       *  <code>$+10.01</code>.
+       *
+       *  @return  Pattern for money values.
+      */
+      pattern
+      pos_format() const
+      { return this->do_pos_format(); }
+
+      pattern
+      neg_format() const
+      { return this->do_neg_format(); }
+      //@}
+
+    protected:
+      /// Destructor.
+      virtual
+      ~moneypunct();
+
+      /**
+       *  @brief  Return decimal point character.
+       *
+       *  Returns a char_type to use as a decimal point.  This function is a
+       *  hook for derived classes to change the value returned.
+       *
+       *  @return  @a char_type representing a decimal point.
+      */
+      virtual char_type
+      do_decimal_point() const
+      { return _M_data->_M_decimal_point; }
+
+      /**
+       *  @brief  Return thousands separator character.
+       *
+       *  Returns a char_type to use as a thousands separator.  This function
+       *  is a hook for derived classes to change the value returned.
+       *
+       *  @return  @a char_type representing a thousands separator.
+      */
+      virtual char_type
+      do_thousands_sep() const
+      { return _M_data->_M_thousands_sep; }
+
+      /**
+       *  @brief  Return grouping specification.
+       *
+       *  Returns a string representing groupings for the integer part of a
+       *  number.  This function is a hook for derived classes to change the
+       *  value returned.  @see grouping() for details.
+       *
+       *  @return  String representing grouping specification.
+      */
+      virtual string
+      do_grouping() const
+      { return _M_data->_M_grouping; }
+
+      /**
+       *  @brief  Return currency symbol string.
+       *
+       *  This function returns a string_type to use as a currency symbol.
+       *  This function is a hook for derived classes to change the value
+       *  returned.  @see curr_symbol() for details.
+       *
+       *  @return  @a string_type representing a currency symbol.
+      */
+      virtual string_type
+      do_curr_symbol()   const
+      { return _M_data->_M_curr_symbol; }
+
+      /**
+       *  @brief  Return positive sign string.
+       *
+       *  This function returns a string_type to use as a sign for positive
+       *  amounts.  This function is a hook for derived classes to change the
+       *  value returned.  @see positive_sign() for details.
+       *
+       *  @return  @a string_type representing a positive sign.
+      */
+      virtual string_type
+      do_positive_sign() const
+      { return _M_data->_M_positive_sign; }
+
+      /**
+       *  @brief  Return negative sign string.
+       *
+       *  This function returns a string_type to use as a sign for negative
+       *  amounts.  This function is a hook for derived classes to change the
+       *  value returned.  @see negative_sign() for details.
+       *
+       *  @return  @a string_type representing a negative sign.
+      */
+      virtual string_type
+      do_negative_sign() const
+      { return _M_data->_M_negative_sign; }
+
+      /**
+       *  @brief  Return number of digits in fraction.
+       *
+       *  This function returns the exact number of digits that make up the
+       *  fractional part of a money amount.  This function is a hook for
+       *  derived classes to change the value returned.  @see frac_digits()
+       *  for details.
+       *
+       *  @return  Number of digits in amount fraction.
+      */
+      virtual int
+      do_frac_digits() const
+      { return _M_data->_M_frac_digits; }
+
+      /**
+       *  @brief  Return pattern for money values.
+       *
+       *  This function returns a pattern describing the formatting of a
+       *  positive valued money amount.  This function is a hook for derived
+       *  classes to change the value returned.  @see pos_format() for
+       *  details.
+       *
+       *  @return  Pattern for money values.
+      */
+      virtual pattern
+      do_pos_format() const
+      { return _M_data->_M_pos_format; }
+
+      /**
+       *  @brief  Return pattern for money values.
+       *
+       *  This function returns a pattern describing the formatting of a
+       *  negative valued money amount.  This function is a hook for derived
+       *  classes to change the value returned.  @see neg_format() for
+       *  details.
+       *
+       *  @return  Pattern for money values.
+      */
+      virtual pattern
+      do_neg_format() const
+      { return _M_data->_M_neg_format; }
+
+      // For use at construction time only.
+       void
+       _M_initialize_moneypunct(__c_locale __cloc = NULL,
+				const char* __name = NULL);
+    };
+
+  template<typename _CharT, bool _Intl>
+    locale::id moneypunct<_CharT, _Intl>::id;
+
+  template<typename _CharT, bool _Intl>
+    const bool moneypunct<_CharT, _Intl>::intl;
+
+  template<>
+    moneypunct<char, true>::~moneypunct();
+
+  template<>
+    moneypunct<char, false>::~moneypunct();
+
+  template<>
+    void
+    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*);
+
+  template<>
+    void
+    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    moneypunct<wchar_t, true>::~moneypunct();
+
+  template<>
+    moneypunct<wchar_t, false>::~moneypunct();
+
+  template<>
+    void
+    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
+							const char*);
+
+  template<>
+    void
+    moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
+							 const char*);
+#endif
+
+  /// class moneypunct_byname [22.2.6.4].
+  template<typename _CharT, bool _Intl>
+    class moneypunct_byname : public moneypunct<_CharT, _Intl>
+    {
+    public:
+      typedef _CharT			char_type;
+      typedef basic_string<_CharT>	string_type;
+
+      static const bool intl = _Intl;
+
+      explicit
+      moneypunct_byname(const char* __s, size_t __refs = 0)
+      : moneypunct<_CharT, _Intl>(__refs)
+      {
+	if (__builtin_strcmp(__s, "C") != 0
+	    && __builtin_strcmp(__s, "POSIX") != 0)
+	  {
+	    __c_locale __tmp;
+	    this->_S_create_c_locale(__tmp, __s);
+	    this->_M_initialize_moneypunct(__tmp);
+	    this->_S_destroy_c_locale(__tmp);
+	  }
+      }
+
+    protected:
+      virtual
+      ~moneypunct_byname() { }
+    };
+
+  template<typename _CharT, bool _Intl>
+    const bool moneypunct_byname<_CharT, _Intl>::intl;
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+  /**
+   *  @brief  Primary class template money_get.
+   *  @ingroup locales
+   *
+   *  This facet encapsulates the code to parse and return a monetary
+   *  amount from a string.
+   *
+   *  The money_get template uses protected virtual functions to
+   *  provide the actual results.  The public accessors forward the
+   *  call to the virtual functions.  These virtual functions are
+   *  hooks for developers to implement the behavior they require from
+   *  the money_get facet.
+  */
+  template<typename _CharT, typename _InIter>
+    class money_get : public locale::facet
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef _InIter			iter_type;
+      typedef basic_string<_CharT>	string_type;
+      //@}
+
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      money_get(size_t __refs = 0) : facet(__refs) { }
+
+      /**
+       *  @brief  Read and parse a monetary value.
+       *
+       *  This function reads characters from @a s, interprets them as a
+       *  monetary value according to moneypunct and ctype facets retrieved
+       *  from io.getloc(), and returns the result in @a units as an integral
+       *  value moneypunct::frac_digits() * the actual amount.  For example,
+       *  the string $10.01 in a US locale would store 1001 in @a units.
+       *
+       *  Any characters not part of a valid money amount are not consumed.
+       *
+       *  If a money value cannot be parsed from the input stream, sets
+       *  err=(err|io.failbit).  If the stream is consumed before finishing
+       *  parsing,  sets err=(err|io.failbit|io.eofbit).  @a units is
+       *  unchanged if parsing fails.
+       *
+       *  This function works by returning the result of do_get().
+       *
+       *  @param  s  Start of characters to parse.
+       *  @param  end  End of characters to parse.
+       *  @param  intl  Parameter to use_facet<moneypunct<CharT,intl> >.
+       *  @param  io  Source of facets and io state.
+       *  @param  err  Error field to set if parsing fails.
+       *  @param  units  Place to store result of parsing.
+       *  @return  Iterator referencing first character beyond valid money
+       *	   amount.
+       */
+      iter_type
+      get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+	  ios_base::iostate& __err, long double& __units) const
+      { return this->do_get(__s, __end, __intl, __io, __err, __units); }
+
+      /**
+       *  @brief  Read and parse a monetary value.
+       *
+       *  This function reads characters from @a s, interprets them as
+       *  a monetary value according to moneypunct and ctype facets
+       *  retrieved from io.getloc(), and returns the result in @a
+       *  digits.  For example, the string $10.01 in a US locale would
+       *  store <code>1001</code> in @a digits.
+       *
+       *  Any characters not part of a valid money amount are not consumed.
+       *
+       *  If a money value cannot be parsed from the input stream, sets
+       *  err=(err|io.failbit).  If the stream is consumed before finishing
+       *  parsing,  sets err=(err|io.failbit|io.eofbit).
+       *
+       *  This function works by returning the result of do_get().
+       *
+       *  @param  s  Start of characters to parse.
+       *  @param  end  End of characters to parse.
+       *  @param  intl  Parameter to use_facet<moneypunct<CharT,intl> >.
+       *  @param  io  Source of facets and io state.
+       *  @param  err  Error field to set if parsing fails.
+       *  @param  digits  Place to store result of parsing.
+       *  @return  Iterator referencing first character beyond valid money
+       *	   amount.
+       */
+      iter_type
+      get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+	  ios_base::iostate& __err, string_type& __digits) const
+      { return this->do_get(__s, __end, __intl, __io, __err, __digits); }
+
+    protected:
+      /// Destructor.
+      virtual
+      ~money_get() { }
+
+      /**
+       *  @brief  Read and parse a monetary value.
+       *
+       *  This function reads and parses characters representing a monetary
+       *  value.  This function is a hook for derived classes to change the
+       *  value returned.  @see get() for details.
+       */
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      __do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+	       ios_base::iostate& __err, double& __units) const;
+#else
+      virtual iter_type
+      do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+	     ios_base::iostate& __err, long double& __units) const;
+#endif
+
+      /**
+       *  @brief  Read and parse a monetary value.
+       *
+       *  This function reads and parses characters representing a monetary
+       *  value.  This function is a hook for derived classes to change the
+       *  value returned.  @see get() for details.
+       */
+      virtual iter_type
+      do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+	     ios_base::iostate& __err, string_type& __digits) const;
+
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+	     ios_base::iostate& __err, long double& __units) const;
+#endif
+
+      template<bool _Intl>
+        iter_type
+        _M_extract(iter_type __s, iter_type __end, ios_base& __io,
+		   ios_base::iostate& __err, string& __digits) const;     
+    };
+
+  template<typename _CharT, typename _InIter>
+    locale::id money_get<_CharT, _InIter>::id;
+
+  /**
+   *  @brief  Primary class template money_put.
+   *  @ingroup locales
+   *
+   *  This facet encapsulates the code to format and output a monetary
+   *  amount.
+   *
+   *  The money_put template uses protected virtual functions to
+   *  provide the actual results.  The public accessors forward the
+   *  call to the virtual functions.  These virtual functions are
+   *  hooks for developers to implement the behavior they require from
+   *  the money_put facet.
+  */
+  template<typename _CharT, typename _OutIter>
+    class money_put : public locale::facet
+    {
+    public:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef _OutIter			iter_type;
+      typedef basic_string<_CharT>	string_type;
+      //@}
+
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      money_put(size_t __refs = 0) : facet(__refs) { }
+
+      /**
+       *  @brief  Format and output a monetary value.
+       *
+       *  This function formats @a units as a monetary value according to
+       *  moneypunct and ctype facets retrieved from io.getloc(), and writes
+       *  the resulting characters to @a s.  For example, the value 1001 in a
+       *  US locale would write <code>$10.01</code> to @a s.
+       *
+       *  This function works by returning the result of do_put().
+       *
+       *  @param  s  The stream to write to.
+       *  @param  intl  Parameter to use_facet<moneypunct<CharT,intl> >.
+       *  @param  io  Source of facets and io state.
+       *  @param  fill  char_type to use for padding.
+       *  @param  units  Place to store result of parsing.
+       *  @return  Iterator after writing.
+       */
+      iter_type
+      put(iter_type __s, bool __intl, ios_base& __io,
+	  char_type __fill, long double __units) const
+      { return this->do_put(__s, __intl, __io, __fill, __units); }
+
+      /**
+       *  @brief  Format and output a monetary value.
+       *
+       *  This function formats @a digits as a monetary value
+       *  according to moneypunct and ctype facets retrieved from
+       *  io.getloc(), and writes the resulting characters to @a s.
+       *  For example, the string <code>1001</code> in a US locale
+       *  would write <code>$10.01</code> to @a s.
+       *
+       *  This function works by returning the result of do_put().
+       *
+       *  @param  s  The stream to write to.
+       *  @param  intl  Parameter to use_facet<moneypunct<CharT,intl> >.
+       *  @param  io  Source of facets and io state.
+       *  @param  fill  char_type to use for padding.
+       *  @param  units  Place to store result of parsing.
+       *  @return  Iterator after writing.
+       */
+      iter_type
+      put(iter_type __s, bool __intl, ios_base& __io,
+	  char_type __fill, const string_type& __digits) const
+      { return this->do_put(__s, __intl, __io, __fill, __digits); }
+
+    protected:
+      /// Destructor.
+      virtual
+      ~money_put() { }
+
+      /**
+       *  @brief  Format and output a monetary value.
+       *
+       *  This function formats @a units as a monetary value according to
+       *  moneypunct and ctype facets retrieved from io.getloc(), and writes
+       *  the resulting characters to @a s.  For example, the value 1001 in a
+       *  US locale would write <code>$10.01</code> to @a s.
+       *
+       *  This function is a hook for derived classes to change the value
+       *  returned.  @see put().
+       *
+       *  @param  s  The stream to write to.
+       *  @param  intl  Parameter to use_facet<moneypunct<CharT,intl> >.
+       *  @param  io  Source of facets and io state.
+       *  @param  fill  char_type to use for padding.
+       *  @param  units  Place to store result of parsing.
+       *  @return  Iterator after writing.
+       */
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	       double __units) const;
+#else
+      virtual iter_type
+      do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	     long double __units) const;
+#endif
+
+      /**
+       *  @brief  Format and output a monetary value.
+       *
+       *  This function formats @a digits as a monetary value
+       *  according to moneypunct and ctype facets retrieved from
+       *  io.getloc(), and writes the resulting characters to @a s.
+       *  For example, the string <code>1001</code> in a US locale
+       *  would write <code>$10.01</code> to @a s.
+       *
+       *  This function is a hook for derived classes to change the value
+       *  returned.  @see put().
+       *
+       *  @param  s  The stream to write to.
+       *  @param  intl  Parameter to use_facet<moneypunct<CharT,intl> >.
+       *  @param  io  Source of facets and io state.
+       *  @param  fill  char_type to use for padding.
+       *  @param  units  Place to store result of parsing.
+       *  @return  Iterator after writing.
+       */
+      virtual iter_type
+      do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	     const string_type& __digits) const;
+
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	     long double __units) const;
+#endif
+
+      template<bool _Intl>
+        iter_type
+        _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+		  const string_type& __digits) const;
+    };
+
+  template<typename _CharT, typename _OutIter>
+    locale::id money_put<_CharT, _OutIter>::id;
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+  /**
+   *  @brief  Messages facet base class providing catalog typedef.
+   *  @ingroup locales
+   */
+  struct messages_base
+  {
+    typedef int catalog;
+  };
+
+  /**
+   *  @brief  Primary class template messages.
+   *  @ingroup locales
+   *
+   *  This facet encapsulates the code to retrieve messages from
+   *  message catalogs.  The only thing defined by the standard for this facet
+   *  is the interface.  All underlying functionality is
+   *  implementation-defined.
+   *
+   *  This library currently implements 3 versions of the message facet.  The
+   *  first version (gnu) is a wrapper around gettext, provided by libintl.
+   *  The second version (ieee) is a wrapper around catgets.  The final
+   *  version (default) does no actual translation.  These implementations are
+   *  only provided for char and wchar_t instantiations.
+   *
+   *  The messages template uses protected virtual functions to
+   *  provide the actual results.  The public accessors forward the
+   *  call to the virtual functions.  These virtual functions are
+   *  hooks for developers to implement the behavior they require from
+   *  the messages facet.
+  */
+  template<typename _CharT>
+    class messages : public locale::facet, public messages_base
+    {
+    public:
+      // Types:
+      //@{
+      /// Public typedefs
+      typedef _CharT			char_type;
+      typedef basic_string<_CharT>	string_type;
+      //@}
+
+    protected:
+      // Underlying "C" library locale information saved from
+      // initialization, needed by messages_byname as well.
+      __c_locale			_M_c_locale_messages;
+      const char*			_M_name_messages;
+
+    public:
+      /// Numpunct facet id.
+      static locale::id			id;
+
+      /**
+       *  @brief  Constructor performs initialization.
+       *
+       *  This is the constructor provided by the standard.
+       *
+       *  @param refs  Passed to the base facet class.
+      */
+      explicit
+      messages(size_t __refs = 0);
+
+      // Non-standard.
+      /**
+       *  @brief  Internal constructor.  Not for general use.
+       *
+       *  This is a constructor for use by the library itself to set up new
+       *  locales.
+       *
+       *  @param  cloc  The C locale.
+       *  @param  s  The name of a locale.
+       *  @param  refs  Refcount to pass to the base class.
+       */
+      explicit
+      messages(__c_locale __cloc, const char* __s, size_t __refs = 0);
+
+      /*
+       *  @brief  Open a message catalog.
+       *
+       *  This function opens and returns a handle to a message catalog by
+       *  returning do_open(s, loc).
+       *
+       *  @param  s  The catalog to open.
+       *  @param  loc  Locale to use for character set conversions.
+       *  @return  Handle to the catalog or value < 0 if open fails.
+      */
+      catalog
+      open(const basic_string<char>& __s, const locale& __loc) const
+      { return this->do_open(__s, __loc); }
+
+      // Non-standard and unorthodox, yet effective.
+      /*
+       *  @brief  Open a message catalog.
+       *
+       *  This non-standard function opens and returns a handle to a message
+       *  catalog by returning do_open(s, loc).  The third argument provides a
+       *  message catalog root directory for gnu gettext and is ignored
+       *  otherwise.
+       *
+       *  @param  s  The catalog to open.
+       *  @param  loc  Locale to use for character set conversions.
+       *  @param  dir  Message catalog root directory.
+       *  @return  Handle to the catalog or value < 0 if open fails.
+      */
+      catalog
+      open(const basic_string<char>&, const locale&, const char*) const;
+
+      /*
+       *  @brief  Look up a string in a message catalog.
+       *
+       *  This function retrieves and returns a message from a catalog by
+       *  returning do_get(c, set, msgid, s).
+       *
+       *  For gnu, @a set and @a msgid are ignored.  Returns gettext(s).
+       *  For default, returns s. For ieee, returns catgets(c,set,msgid,s).
+       *
+       *  @param  c  The catalog to access.
+       *  @param  set  Implementation-defined.
+       *  @param  msgid  Implementation-defined.
+       *  @param  s  Default return value if retrieval fails.
+       *  @return  Retrieved message or @a s if get fails.
+      */
+      string_type
+      get(catalog __c, int __set, int __msgid, const string_type& __s) const
+      { return this->do_get(__c, __set, __msgid, __s); }
+
+      /*
+       *  @brief  Close a message catalog.
+       *
+       *  Closes catalog @a c by calling do_close(c).
+       *
+       *  @param  c  The catalog to close.
+      */
+      void
+      close(catalog __c) const
+      { return this->do_close(__c); }
+
+    protected:
+      /// Destructor.
+      virtual
+      ~messages();
+
+      /*
+       *  @brief  Open a message catalog.
+       *
+       *  This function opens and returns a handle to a message catalog in an
+       *  implementation-defined manner.  This function is a hook for derived
+       *  classes to change the value returned.
+       *
+       *  @param  s  The catalog to open.
+       *  @param  loc  Locale to use for character set conversions.
+       *  @return  Handle to the opened catalog, value < 0 if open failed.
+      */
+      virtual catalog
+      do_open(const basic_string<char>&, const locale&) const;
+
+      /*
+       *  @brief  Look up a string in a message catalog.
+       *
+       *  This function retrieves and returns a message from a catalog in an
+       *  implementation-defined manner.  This function is a hook for derived
+       *  classes to change the value returned.
+       *
+       *  For gnu, @a set and @a msgid are ignored.  Returns gettext(s).
+       *  For default, returns s. For ieee, returns catgets(c,set,msgid,s).
+       *
+       *  @param  c  The catalog to access.
+       *  @param  set  Implementation-defined.
+       *  @param  msgid  Implementation-defined.
+       *  @param  s  Default return value if retrieval fails.
+       *  @return  Retrieved message or @a s if get fails.
+      */
+      virtual string_type
+      do_get(catalog, int, int, const string_type& __dfault) const;
+
+      /*
+       *  @brief  Close a message catalog.
+       *
+       *  @param  c  The catalog to close.
+      */
+      virtual void
+      do_close(catalog) const;
+
+      // Returns a locale and codeset-converted string, given a char* message.
+      char*
+      _M_convert_to_char(const string_type& __msg) const
+      {
+	// XXX
+	return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str()));
+      }
+
+      // Returns a locale and codeset-converted string, given a char* message.
+      string_type
+      _M_convert_from_char(char*) const
+      {
+#if 0
+	// Length of message string without terminating null.
+	size_t __len = char_traits<char>::length(__msg) - 1;
+
+	// "everybody can easily convert the string using
+	// mbsrtowcs/wcsrtombs or with iconv()"
+
+	// Convert char* to _CharT in locale used to open catalog.
+	// XXX need additional template parameter on messages class for this..
+	// typedef typename codecvt<char, _CharT, _StateT> __codecvt_type;
+	typedef typename codecvt<char, _CharT, mbstate_t> __codecvt_type;
+
+	__codecvt_type::state_type __state;
+	// XXX may need to initialize state.
+	//initialize_state(__state._M_init());
+
+	char* __from_next;
+	// XXX what size for this string?
+	_CharT* __to = static_cast<_CharT*>(__builtin_alloca(__len + 1));
+	const __codecvt_type& __cvt = use_facet<__codecvt_type>(_M_locale_conv);
+	__cvt.out(__state, __msg, __msg + __len, __from_next,
+		  __to, __to + __len + 1, __to_next);
+	return string_type(__to);
+#endif
+#if 0
+	typedef ctype<_CharT> __ctype_type;
+	// const __ctype_type& __cvt = use_facet<__ctype_type>(_M_locale_msg);
+	const __ctype_type& __cvt = use_facet<__ctype_type>(locale());
+	// XXX Again, proper length of converted string an issue here.
+	// For now, assume the converted length is not larger.
+	_CharT* __dest = static_cast<_CharT*>(__builtin_alloca(__len + 1));
+	__cvt.widen(__msg, __msg + __len, __dest);
+	return basic_string<_CharT>(__dest);
+#endif
+	return string_type();
+      }
+     };
+
+  template<typename _CharT>
+    locale::id messages<_CharT>::id;
+
+  /// Specializations for required instantiations.
+  template<>
+    string
+    messages<char>::do_get(catalog, int, int, const string&) const;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<>
+    wstring
+    messages<wchar_t>::do_get(catalog, int, int, const wstring&) const;
+#endif
+
+   /// class messages_byname [22.2.7.2].
+   template<typename _CharT>
+    class messages_byname : public messages<_CharT>
+    {
+    public:
+      typedef _CharT			char_type;
+      typedef basic_string<_CharT>	string_type;
+
+      explicit
+      messages_byname(const char* __s, size_t __refs = 0);
+
+    protected:
+      virtual
+      ~messages_byname()
+      { }
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+// Include host and configuration specific messages functions.
+#include <bits/messages_members.h>
+
+// 22.2.1.5  Template class codecvt
+#include <bits/codecvt.h>
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/locale_facets_nonio.tcc>
+#endif
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets_nonio.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets_nonio.tcc
new file mode 100644
index 0000000..48a9139
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/locale_facets_nonio.tcc
@@ -0,0 +1,1370 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_facets_nonio.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _LOCALE_FACETS_NONIO_TCC
+#define _LOCALE_FACETS_NONIO_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT, bool _Intl>
+    struct __use_cache<__moneypunct_cache<_CharT, _Intl> >
+    {
+      const __moneypunct_cache<_CharT, _Intl>*
+      operator() (const locale& __loc) const
+      {
+	const size_t __i = moneypunct<_CharT, _Intl>::id._M_id();
+	const locale::facet** __caches = __loc._M_impl->_M_caches;
+	if (!__caches[__i])
+	  {
+	    __moneypunct_cache<_CharT, _Intl>* __tmp = NULL;
+	    __try
+	      {
+		__tmp = new __moneypunct_cache<_CharT, _Intl>;
+		__tmp->_M_cache(__loc);
+	      }
+	    __catch(...)
+	      {
+		delete __tmp;
+		__throw_exception_again;
+	      }
+	    __loc._M_impl->_M_install_cache(__tmp, __i);
+	  }
+	return static_cast<
+	  const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]);
+      }
+    };
+
+  template<typename _CharT, bool _Intl>
+    void
+    __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc)
+    {
+      _M_allocated = true;
+
+      const moneypunct<_CharT, _Intl>& __mp =
+	use_facet<moneypunct<_CharT, _Intl> >(__loc);
+
+      _M_decimal_point = __mp.decimal_point();
+      _M_thousands_sep = __mp.thousands_sep();
+      _M_frac_digits = __mp.frac_digits();
+
+      char* __grouping = 0;
+      _CharT* __curr_symbol = 0;
+      _CharT* __positive_sign = 0;
+      _CharT* __negative_sign = 0;     
+      __try
+	{
+	  _M_grouping_size = __mp.grouping().size();
+	  __grouping = new char[_M_grouping_size];
+	  __mp.grouping().copy(__grouping, _M_grouping_size);
+	  _M_grouping = __grouping;
+	  _M_use_grouping = (_M_grouping_size
+			     && static_cast<signed char>(_M_grouping[0]) > 0
+			     && (_M_grouping[0]
+				 != __gnu_cxx::__numeric_traits<char>::__max));
+
+	  _M_curr_symbol_size = __mp.curr_symbol().size();
+	  __curr_symbol = new _CharT[_M_curr_symbol_size];
+	  __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size);
+	  _M_curr_symbol = __curr_symbol;
+
+	  _M_positive_sign_size = __mp.positive_sign().size();
+	  __positive_sign = new _CharT[_M_positive_sign_size];
+	  __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size);
+	  _M_positive_sign = __positive_sign;
+
+	  _M_negative_sign_size = __mp.negative_sign().size();
+	  __negative_sign = new _CharT[_M_negative_sign_size];
+	  __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size);
+	  _M_negative_sign = __negative_sign;
+
+	  _M_pos_format = __mp.pos_format();
+	  _M_neg_format = __mp.neg_format();
+
+	  const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
+	  __ct.widen(money_base::_S_atoms,
+		     money_base::_S_atoms + money_base::_S_end, _M_atoms);
+	}
+      __catch(...)
+	{
+	  delete [] __grouping;
+	  delete [] __curr_symbol;
+	  delete [] __positive_sign;
+	  delete [] __negative_sign;
+	  __throw_exception_again;
+	}
+    }
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+  template<typename _CharT, typename _InIter>
+    template<bool _Intl>
+      _InIter
+      money_get<_CharT, _InIter>::
+      _M_extract(iter_type __beg, iter_type __end, ios_base& __io,
+		 ios_base::iostate& __err, string& __units) const
+      {
+	typedef char_traits<_CharT>			  __traits_type;
+	typedef typename string_type::size_type	          size_type;	
+	typedef money_base::part			  part;
+	typedef __moneypunct_cache<_CharT, _Intl>         __cache_type;
+	
+	const locale& __loc = __io._M_getloc();
+	const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+	__use_cache<__cache_type> __uc;
+	const __cache_type* __lc = __uc(__loc);
+	const char_type* __lit = __lc->_M_atoms;
+
+	// Deduced sign.
+	bool __negative = false;
+	// Sign size.
+	size_type __sign_size = 0;
+	// True if sign is mandatory.
+	const bool __mandatory_sign = (__lc->_M_positive_sign_size
+				       && __lc->_M_negative_sign_size);
+	// String of grouping info from thousands_sep plucked from __units.
+	string __grouping_tmp;
+	if (__lc->_M_use_grouping)
+	  __grouping_tmp.reserve(32);
+	// Last position before the decimal point.
+	int __last_pos = 0;
+	// Separator positions, then, possibly, fractional digits.
+	int __n = 0;
+	// If input iterator is in a valid state.
+	bool __testvalid = true;
+	// Flag marking when a decimal point is found.
+	bool __testdecfound = false;
+
+	// The tentative returned string is stored here.
+	string __res;
+	__res.reserve(32);
+
+	const char_type* __lit_zero = __lit + money_base::_S_zero;
+	const money_base::pattern __p = __lc->_M_neg_format;
+	for (int __i = 0; __i < 4 && __testvalid; ++__i)
+	  {
+	    const part __which = static_cast<part>(__p.field[__i]);
+	    switch (__which)
+	      {
+	      case money_base::symbol:
+		// According to 22.2.6.1.2, p2, symbol is required
+		// if (__io.flags() & ios_base::showbase), otherwise
+		// is optional and consumed only if other characters
+		// are needed to complete the format.
+		if (__io.flags() & ios_base::showbase || __sign_size > 1
+		    || __i == 0
+		    || (__i == 1 && (__mandatory_sign
+				     || (static_cast<part>(__p.field[0])
+					 == money_base::sign)
+				     || (static_cast<part>(__p.field[2])
+					 == money_base::space)))
+		    || (__i == 2 && ((static_cast<part>(__p.field[3])
+				      == money_base::value)
+				     || (__mandatory_sign
+					 && (static_cast<part>(__p.field[3])
+					     == money_base::sign)))))
+		  {
+		    const size_type __len = __lc->_M_curr_symbol_size;
+		    size_type __j = 0;
+		    for (; __beg != __end && __j < __len
+			   && *__beg == __lc->_M_curr_symbol[__j];
+			 ++__beg, ++__j);
+		    if (__j != __len
+			&& (__j || __io.flags() & ios_base::showbase))
+		      __testvalid = false;
+		  }
+		break;
+	      case money_base::sign:
+		// Sign might not exist, or be more than one character long.
+		if (__lc->_M_positive_sign_size && __beg != __end
+		    && *__beg == __lc->_M_positive_sign[0])
+		  {
+		    __sign_size = __lc->_M_positive_sign_size;
+		    ++__beg;
+		  }
+		else if (__lc->_M_negative_sign_size && __beg != __end
+			 && *__beg == __lc->_M_negative_sign[0])
+		  {
+		    __negative = true;
+		    __sign_size = __lc->_M_negative_sign_size;
+		    ++__beg;
+		  }
+		else if (__lc->_M_positive_sign_size
+			 && !__lc->_M_negative_sign_size)
+		  // "... if no sign is detected, the result is given the sign
+		  // that corresponds to the source of the empty string"
+		  __negative = true;
+		else if (__mandatory_sign)
+		  __testvalid = false;
+		break;
+	      case money_base::value:
+		// Extract digits, remove and stash away the
+		// grouping of found thousands separators.
+		for (; __beg != __end; ++__beg)
+		  {
+		    const char_type __c = *__beg;
+		    const char_type* __q = __traits_type::find(__lit_zero, 
+							       10, __c);
+		    if (__q != 0)
+		      {
+			__res += money_base::_S_atoms[__q - __lit];
+			++__n;
+		      }
+		    else if (__c == __lc->_M_decimal_point 
+			     && !__testdecfound)
+		      {
+			if (__lc->_M_frac_digits <= 0)
+			  break;
+
+			__last_pos = __n;
+			__n = 0;
+			__testdecfound = true;
+		      }
+		    else if (__lc->_M_use_grouping
+			     && __c == __lc->_M_thousands_sep
+			     && !__testdecfound)
+		      {
+			if (__n)
+			  {
+			    // Mark position for later analysis.
+			    __grouping_tmp += static_cast<char>(__n);
+			    __n = 0;
+			  }
+			else
+			  {
+			    __testvalid = false;
+			    break;
+			  }
+		      }
+		    else
+		      break;
+		  }
+		if (__res.empty())
+		  __testvalid = false;
+		break;
+	      case money_base::space:
+		// At least one space is required.
+		if (__beg != __end && __ctype.is(ctype_base::space, *__beg))
+		  ++__beg;
+		else
+		  __testvalid = false;
+	      case money_base::none:
+		// Only if not at the end of the pattern.
+		if (__i != 3)
+		  for (; __beg != __end
+			 && __ctype.is(ctype_base::space, *__beg); ++__beg);
+		break;
+	      }
+	  }
+
+	// Need to get the rest of the sign characters, if they exist.
+	if (__sign_size > 1 && __testvalid)
+	  {
+	    const char_type* __sign = __negative ? __lc->_M_negative_sign
+	                                         : __lc->_M_positive_sign;
+	    size_type __i = 1;
+	    for (; __beg != __end && __i < __sign_size
+		   && *__beg == __sign[__i]; ++__beg, ++__i);
+	    
+	    if (__i != __sign_size)
+	      __testvalid = false;
+	  }
+
+	if (__testvalid)
+	  {
+	    // Strip leading zeros.
+	    if (__res.size() > 1)
+	      {
+		const size_type __first = __res.find_first_not_of('0');
+		const bool __only_zeros = __first == string::npos;
+		if (__first)
+		  __res.erase(0, __only_zeros ? __res.size() - 1 : __first);
+	      }
+
+	    // 22.2.6.1.2, p4
+	    if (__negative && __res[0] != '0')
+	      __res.insert(__res.begin(), '-');
+	    
+	    // Test for grouping fidelity.
+	    if (__grouping_tmp.size())
+	      {
+		// Add the ending grouping.
+		__grouping_tmp += static_cast<char>(__testdecfound ? __last_pos
+						                   : __n);
+		if (!std::__verify_grouping(__lc->_M_grouping,
+					    __lc->_M_grouping_size,
+					    __grouping_tmp))
+		  __err |= ios_base::failbit;
+	      }
+	    
+	    // Iff not enough digits were supplied after the decimal-point.
+	    if (__testdecfound && __n != __lc->_M_frac_digits)
+	      __testvalid = false;
+	  }
+
+	// Iff valid sequence is not recognized.
+	if (!__testvalid)
+	  __err |= ios_base::failbit;
+	else
+	  __units.swap(__res);
+	
+	// Iff no more characters are available.
+	if (__beg == __end)
+	  __err |= ios_base::eofbit;
+	return __beg;
+      }
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+  template<typename _CharT, typename _InIter>
+    _InIter
+    money_get<_CharT, _InIter>::
+    __do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+	     ios_base::iostate& __err, double& __units) const
+    {
+      string __str;
+      __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+                     : _M_extract<false>(__beg, __end, __io, __err, __str);
+      std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
+      return __beg;
+    }
+#endif
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    money_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+	   ios_base::iostate& __err, long double& __units) const
+    {
+      string __str;
+      __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+	             : _M_extract<false>(__beg, __end, __io, __err, __str);
+      std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    money_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+	   ios_base::iostate& __err, string_type& __digits) const
+    {
+      typedef typename string::size_type                  size_type;
+
+      const locale& __loc = __io._M_getloc();
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+      string __str;
+      __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+	             : _M_extract<false>(__beg, __end, __io, __err, __str);
+      const size_type __len = __str.size();
+      if (__len)
+	{
+	  __digits.resize(__len);
+	  __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]);
+	}
+      return __beg;
+    }
+
+  template<typename _CharT, typename _OutIter>
+    template<bool _Intl>
+      _OutIter
+      money_put<_CharT, _OutIter>::
+      _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+		const string_type& __digits) const
+      {
+	typedef typename string_type::size_type	          size_type;
+	typedef money_base::part                          part;
+	typedef __moneypunct_cache<_CharT, _Intl>         __cache_type;
+      
+	const locale& __loc = __io._M_getloc();
+	const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+	__use_cache<__cache_type> __uc;
+	const __cache_type* __lc = __uc(__loc);
+	const char_type* __lit = __lc->_M_atoms;
+
+	// Determine if negative or positive formats are to be used, and
+	// discard leading negative_sign if it is present.
+	const char_type* __beg = __digits.data();
+
+	money_base::pattern __p;
+	const char_type* __sign;
+	size_type __sign_size;
+	if (!(*__beg == __lit[money_base::_S_minus]))
+	  {
+	    __p = __lc->_M_pos_format;
+	    __sign = __lc->_M_positive_sign;
+	    __sign_size = __lc->_M_positive_sign_size;
+	  }
+	else
+	  {
+	    __p = __lc->_M_neg_format;
+	    __sign = __lc->_M_negative_sign;
+	    __sign_size = __lc->_M_negative_sign_size;
+	    if (__digits.size())
+	      ++__beg;
+	  }
+       
+	// Look for valid numbers in the ctype facet within input digits.
+	size_type __len = __ctype.scan_not(ctype_base::digit, __beg,
+					   __beg + __digits.size()) - __beg;
+	if (__len)
+	  {
+	    // Assume valid input, and attempt to format.
+	    // Break down input numbers into base components, as follows:
+	    //   final_value = grouped units + (decimal point) + (digits)
+	    string_type __value;
+	    __value.reserve(2 * __len);
+
+	    // Add thousands separators to non-decimal digits, per
+	    // grouping rules.
+	    long __paddec = __len - __lc->_M_frac_digits;
+	    if (__paddec > 0)
+  	      {
+		if (__lc->_M_frac_digits < 0)
+		  __paddec = __len;
+  		if (__lc->_M_grouping_size)
+  		  {
+		    __value.assign(2 * __paddec, char_type());
+ 		    _CharT* __vend = 
+		      std::__add_grouping(&__value[0], __lc->_M_thousands_sep,
+					  __lc->_M_grouping,
+					  __lc->_M_grouping_size,
+					  __beg, __beg + __paddec);
+		    __value.erase(__vend - &__value[0]);
+  		  }
+  		else
+		  __value.assign(__beg, __paddec);
+	      }
+
+	    // Deal with decimal point, decimal digits.
+	    if (__lc->_M_frac_digits > 0)
+	      {
+		__value += __lc->_M_decimal_point;
+		if (__paddec >= 0)
+		  __value.append(__beg + __paddec, __lc->_M_frac_digits);
+		else
+		  {
+		    // Have to pad zeros in the decimal position.
+		    __value.append(-__paddec, __lit[money_base::_S_zero]);
+		    __value.append(__beg, __len);
+		  }
+  	      }
+  
+	    // Calculate length of resulting string.
+	    const ios_base::fmtflags __f = __io.flags() 
+	                                   & ios_base::adjustfield;
+	    __len = __value.size() + __sign_size;
+	    __len += ((__io.flags() & ios_base::showbase)
+		      ? __lc->_M_curr_symbol_size : 0);
+
+	    string_type __res;
+	    __res.reserve(2 * __len);
+	    
+	    const size_type __width = static_cast<size_type>(__io.width());  
+	    const bool __testipad = (__f == ios_base::internal
+				     && __len < __width);
+	    // Fit formatted digits into the required pattern.
+	    for (int __i = 0; __i < 4; ++__i)
+	      {
+		const part __which = static_cast<part>(__p.field[__i]);
+		switch (__which)
+		  {
+		  case money_base::symbol:
+		    if (__io.flags() & ios_base::showbase)
+		      __res.append(__lc->_M_curr_symbol,
+				   __lc->_M_curr_symbol_size);
+		    break;
+		  case money_base::sign:
+		    // Sign might not exist, or be more than one
+		    // character long. In that case, add in the rest
+		    // below.
+		    if (__sign_size)
+		      __res += __sign[0];
+		    break;
+		  case money_base::value:
+		    __res += __value;
+		    break;
+		  case money_base::space:
+		    // At least one space is required, but if internal
+		    // formatting is required, an arbitrary number of
+		    // fill spaces will be necessary.
+		    if (__testipad)
+		      __res.append(__width - __len, __fill);
+		    else
+		      __res += __fill;
+		    break;
+		  case money_base::none:
+		    if (__testipad)
+		      __res.append(__width - __len, __fill);
+		    break;
+		  }
+	      }
+	    
+	    // Special case of multi-part sign parts.
+	    if (__sign_size > 1)
+	      __res.append(__sign + 1, __sign_size - 1);
+	    
+	    // Pad, if still necessary.
+	    __len = __res.size();
+	    if (__width > __len)
+	      {
+		if (__f == ios_base::left)
+		  // After.
+		  __res.append(__width - __len, __fill);
+		else
+		  // Before.
+		  __res.insert(0, __width - __len, __fill);
+		__len = __width;
+	      }
+	    
+	    // Write resulting, fully-formatted string to output iterator.
+	    __s = std::__write(__s, __res.data(), __len);
+	  }
+	__io.width(0);
+	return __s;    
+      }
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    money_put<_CharT, _OutIter>::
+    __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	     double __units) const
+    { return this->do_put(__s, __intl, __io, __fill, (long double) __units); }
+#endif
+
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    money_put<_CharT, _OutIter>::
+    do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	   long double __units) const
+    {
+      const locale __loc = __io.getloc();
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+#ifdef _GLIBCXX_USE_C99
+      // First try a buffer perhaps big enough.
+      int __cs_size = 64;
+      char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 328. Bad sprintf format modifier in money_put<>::do_put()
+      int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+					"%.*Lf", 0, __units);
+      // If the buffer was not large enough, try again with the correct size.
+      if (__len >= __cs_size)
+	{
+	  __cs_size = __len + 1;
+	  __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+	  __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+					"%.*Lf", 0, __units);
+	}
+#else
+      // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
+      const int __cs_size =
+	__gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 3;
+      char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+      int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf", 
+					0, __units);
+#endif
+      string_type __digits(__len, char_type());
+      __ctype.widen(__cs, __cs + __len, &__digits[0]);
+      return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+	            : _M_insert<false>(__s, __io, __fill, __digits);
+    }
+
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    money_put<_CharT, _OutIter>::
+    do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	   const string_type& __digits) const
+    { return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+	            : _M_insert<false>(__s, __io, __fill, __digits); }
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+  // NB: Not especially useful. Without an ios_base object or some
+  // kind of locale reference, we are left clawing at the air where
+  // the side of the mountain used to be...
+  template<typename _CharT, typename _InIter>
+    time_base::dateorder
+    time_get<_CharT, _InIter>::do_date_order() const
+    { return time_base::no_order; }
+
+  // Expand a strftime format string and parse it.  E.g., do_get_date() may
+  // pass %m/%d/%Y => extracted characters.
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
+			  ios_base::iostate& __err, tm* __tm,
+			  const _CharT* __format) const
+    {
+      const locale& __loc = __io._M_getloc();
+      const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+      const size_t __len = char_traits<_CharT>::length(__format);
+
+      ios_base::iostate __tmperr = ios_base::goodbit;
+      for (size_t __i = 0; __beg != __end && __i < __len && !__tmperr; ++__i)
+	{
+	  if (__ctype.narrow(__format[__i], 0) == '%')
+	    {
+	      // Verify valid formatting code, attempt to extract.
+	      char __c = __ctype.narrow(__format[++__i], 0);
+	      int __mem = 0;
+	      if (__c == 'E' || __c == 'O')
+		__c = __ctype.narrow(__format[++__i], 0);
+	      switch (__c)
+		{
+		  const char* __cs;
+		  _CharT __wcs[10];
+		case 'a':
+		  // Abbreviated weekday name [tm_wday]
+		  const char_type*  __days1[7];
+		  __tp._M_days_abbreviated(__days1);
+		  __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1,
+					  7, __io, __tmperr);
+		  break;
+		case 'A':
+		  // Weekday name [tm_wday].
+		  const char_type*  __days2[7];
+		  __tp._M_days(__days2);
+		  __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2,
+					  7, __io, __tmperr);
+		  break;
+		case 'h':
+		case 'b':
+		  // Abbreviated month name [tm_mon]
+		  const char_type*  __months1[12];
+		  __tp._M_months_abbreviated(__months1);
+		  __beg = _M_extract_name(__beg, __end, __tm->tm_mon, 
+					  __months1, 12, __io, __tmperr);
+		  break;
+		case 'B':
+		  // Month name [tm_mon].
+		  const char_type*  __months2[12];
+		  __tp._M_months(__months2);
+		  __beg = _M_extract_name(__beg, __end, __tm->tm_mon, 
+					  __months2, 12, __io, __tmperr);
+		  break;
+		case 'c':
+		  // Default time and date representation.
+		  const char_type*  __dt[2];
+		  __tp._M_date_time_formats(__dt);
+		  __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 
+						__tm, __dt[0]);
+		  break;
+		case 'd':
+		  // Day [01, 31]. [tm_mday]
+		  __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2,
+					 __io, __tmperr);
+		  break;
+		case 'e':
+		  // Day [1, 31], with single digits preceded by
+		  // space. [tm_mday]
+		  if (__ctype.is(ctype_base::space, *__beg))
+		    __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9,
+					   1, __io, __tmperr);
+		  else
+		    __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31,
+					   2, __io, __tmperr);
+		  break;
+		case 'D':
+		  // Equivalent to %m/%d/%y.[tm_mon, tm_mday, tm_year]
+		  __cs = "%m/%d/%y";
+		  __ctype.widen(__cs, __cs + 9, __wcs);
+		  __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 
+						__tm, __wcs);
+		  break;
+		case 'H':
+		  // Hour [00, 23]. [tm_hour]
+		  __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2,
+					 __io, __tmperr);
+		  break;
+		case 'I':
+		  // Hour [01, 12]. [tm_hour]
+		  __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2,
+					 __io, __tmperr);
+		  break;
+		case 'm':
+		  // Month [01, 12]. [tm_mon]
+		  __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, 
+					 __io, __tmperr);
+		  if (!__tmperr)
+		    __tm->tm_mon = __mem - 1;
+		  break;
+		case 'M':
+		  // Minute [00, 59]. [tm_min]
+		  __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2,
+					 __io, __tmperr);
+		  break;
+		case 'n':
+		  if (__ctype.narrow(*__beg, 0) == '\n')
+		    ++__beg;
+		  else
+		    __tmperr |= ios_base::failbit;
+		  break;
+		case 'R':
+		  // Equivalent to (%H:%M).
+		  __cs = "%H:%M";
+		  __ctype.widen(__cs, __cs + 6, __wcs);
+		  __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 
+						__tm, __wcs);
+		  break;
+		case 'S':
+		  // Seconds. [tm_sec]
+		  // [00, 60] in C99 (one leap-second), [00, 61] in C89.
+#ifdef _GLIBCXX_USE_C99
+		  __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2,
+#else
+		  __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2,
+#endif
+					 __io, __tmperr);
+		  break;
+		case 't':
+		  if (__ctype.narrow(*__beg, 0) == '\t')
+		    ++__beg;
+		  else
+		    __tmperr |= ios_base::failbit;
+		  break;
+		case 'T':
+		  // Equivalent to (%H:%M:%S).
+		  __cs = "%H:%M:%S";
+		  __ctype.widen(__cs, __cs + 9, __wcs);
+		  __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 
+						__tm, __wcs);
+		  break;
+		case 'x':
+		  // Locale's date.
+		  const char_type*  __dates[2];
+		  __tp._M_date_formats(__dates);
+		  __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 
+						__tm, __dates[0]);
+		  break;
+		case 'X':
+		  // Locale's time.
+		  const char_type*  __times[2];
+		  __tp._M_time_formats(__times);
+		  __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 
+						__tm, __times[0]);
+		  break;
+		case 'y':
+		case 'C': // C99
+		  // Two digit year.
+		case 'Y':
+		  // Year [1900).
+		  // NB: We parse either two digits, implicitly years since
+		  // 1900, or 4 digits, full year.  In both cases we can 
+		  // reconstruct [tm_year].  See also libstdc++/26701.
+		  __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4,
+					 __io, __tmperr);
+		  if (!__tmperr)
+		    __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900;
+		  break;
+		case 'Z':
+		  // Timezone info.
+		  if (__ctype.is(ctype_base::upper, *__beg))
+		    {
+		      int __tmp;
+		      __beg = _M_extract_name(__beg, __end, __tmp,
+				       __timepunct_cache<_CharT>::_S_timezones,
+					      14, __io, __tmperr);
+
+		      // GMT requires special effort.
+		      if (__beg != __end && !__tmperr && __tmp == 0
+			  && (*__beg == __ctype.widen('-')
+			      || *__beg == __ctype.widen('+')))
+			{
+			  __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2,
+						 __io, __tmperr);
+			  __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2,
+						 __io, __tmperr);
+			}
+		    }
+		  else
+		    __tmperr |= ios_base::failbit;
+		  break;
+		default:
+		  // Not recognized.
+		  __tmperr |= ios_base::failbit;
+		}
+	    }
+	  else
+	    {
+	      // Verify format and input match, extract and discard.
+	      if (__format[__i] == *__beg)
+		++__beg;
+	      else
+		__tmperr |= ios_base::failbit;
+	    }
+	}
+
+      if (__tmperr)
+	__err |= ios_base::failbit;
+  
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    _M_extract_num(iter_type __beg, iter_type __end, int& __member,
+		   int __min, int __max, size_t __len,
+		   ios_base& __io, ios_base::iostate& __err) const
+    {
+      const locale& __loc = __io._M_getloc();
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+      // As-is works for __len = 1, 2, 4, the values actually used.
+      int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1);
+
+      ++__min;
+      size_t __i = 0;
+      int __value = 0;
+      for (; __beg != __end && __i < __len; ++__beg, ++__i)
+	{
+	  const char __c = __ctype.narrow(*__beg, '*');
+	  if (__c >= '0' && __c <= '9')
+	    {
+	      __value = __value * 10 + (__c - '0');
+	      const int __valuec = __value * __mult;
+	      if (__valuec > __max || __valuec + __mult < __min)
+		break;
+	      __mult /= 10;
+	    }
+	  else
+	    break;
+	}
+      if (__i == __len)
+	__member = __value;
+      // Special encoding for do_get_year, 'y', and 'Y' above.
+      else if (__len == 4 && __i == 2)
+	__member = __value - 100;
+      else
+	__err |= ios_base::failbit;
+
+      return __beg;
+    }
+
+  // Assumptions:
+  // All elements in __names are unique.
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    _M_extract_name(iter_type __beg, iter_type __end, int& __member,
+		    const _CharT** __names, size_t __indexlen,
+		    ios_base& __io, ios_base::iostate& __err) const
+    {
+      typedef char_traits<_CharT>		__traits_type;
+      const locale& __loc = __io._M_getloc();
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+      int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int)
+							  * __indexlen));
+      size_t __nmatches = 0;
+      size_t __pos = 0;
+      bool __testvalid = true;
+      const char_type* __name;
+
+      // Look for initial matches.
+      // NB: Some of the locale data is in the form of all lowercase
+      // names, and some is in the form of initially-capitalized
+      // names. Look for both.
+      if (__beg != __end)
+	{
+	  const char_type __c = *__beg;
+	  for (size_t __i1 = 0; __i1 < __indexlen; ++__i1)
+	    if (__c == __names[__i1][0]
+		|| __c == __ctype.toupper(__names[__i1][0]))
+	      __matches[__nmatches++] = __i1;
+	}
+
+      while (__nmatches > 1)
+	{
+	  // Find smallest matching string.
+	  size_t __minlen = __traits_type::length(__names[__matches[0]]);
+	  for (size_t __i2 = 1; __i2 < __nmatches; ++__i2)
+	    __minlen = std::min(__minlen,
+			      __traits_type::length(__names[__matches[__i2]]));
+	  ++__beg, ++__pos;
+	  if (__pos < __minlen && __beg != __end)
+	    for (size_t __i3 = 0; __i3 < __nmatches;)
+	      {
+		__name = __names[__matches[__i3]];
+		if (!(__name[__pos] == *__beg))
+		  __matches[__i3] = __matches[--__nmatches];
+		else
+		  ++__i3;
+	      }
+	  else
+	    break;
+	}
+
+      if (__nmatches == 1)
+	{
+	  // Make sure found name is completely extracted.
+	  ++__beg, ++__pos;
+	  __name = __names[__matches[0]];
+	  const size_t __len = __traits_type::length(__name);
+	  while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
+	    ++__beg, ++__pos;
+
+	  if (__len == __pos)
+	    __member = __matches[0];
+	  else
+	    __testvalid = false;
+	}
+      else
+	__testvalid = false;
+      if (!__testvalid)
+	__err |= ios_base::failbit;
+
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member,
+			     const _CharT** __names, size_t __indexlen,
+			     ios_base& __io, ios_base::iostate& __err) const
+    {
+      typedef char_traits<_CharT>		__traits_type;
+      const locale& __loc = __io._M_getloc();
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+      int* __matches = static_cast<int*>(__builtin_alloca(2 * sizeof(int)
+							  * __indexlen));
+      size_t __nmatches = 0;
+      size_t* __matches_lengths = 0;
+      size_t __pos = 0;
+
+      if (__beg != __end)
+	{
+	  const char_type __c = *__beg;
+	  for (size_t __i = 0; __i < 2 * __indexlen; ++__i)
+	    if (__c == __names[__i][0]
+		|| __c == __ctype.toupper(__names[__i][0]))
+	      __matches[__nmatches++] = __i;
+	}
+
+      if (__nmatches)
+	{
+	  ++__beg, ++__pos;
+
+	  __matches_lengths
+	    = static_cast<size_t*>(__builtin_alloca(sizeof(size_t)
+						    * __nmatches));
+	  for (size_t __i = 0; __i < __nmatches; ++__i)
+	    __matches_lengths[__i]
+	      = __traits_type::length(__names[__matches[__i]]);
+	}
+
+      for (; __beg != __end; ++__beg, ++__pos)
+	{
+	  size_t __nskipped = 0;
+	  const char_type __c = *__beg;
+	  for (size_t __i = 0; __i < __nmatches;)
+	    {
+	      const char_type* __name = __names[__matches[__i]];
+	      if (__pos >= __matches_lengths[__i])
+		++__nskipped, ++__i;
+	      else if (!(__name[__pos] == __c))
+		{
+		  --__nmatches;
+		  __matches[__i] = __matches[__nmatches];
+		  __matches_lengths[__i] = __matches_lengths[__nmatches];
+		}
+	      else
+		++__i;
+	    }
+	  if (__nskipped == __nmatches)
+	    break;
+	}
+
+      if ((__nmatches == 1 && __matches_lengths[0] == __pos)
+	  || (__nmatches == 2 && (__matches_lengths[0] == __pos
+				  || __matches_lengths[1] == __pos)))
+	__member = (__matches[0] >= __indexlen
+		    ? __matches[0] - __indexlen : __matches[0]);
+      else
+	__err |= ios_base::failbit;
+
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
+		ios_base::iostate& __err, tm* __tm) const
+    {
+      const locale& __loc = __io._M_getloc();
+      const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+      const char_type*  __times[2];
+      __tp._M_time_formats(__times);
+      __beg = _M_extract_via_format(__beg, __end, __io, __err, 
+				    __tm, __times[0]);
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
+		ios_base::iostate& __err, tm* __tm) const
+    {
+      const locale& __loc = __io._M_getloc();
+      const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+      const char_type*  __dates[2];
+      __tp._M_date_formats(__dates);
+      __beg = _M_extract_via_format(__beg, __end, __io, __err, 
+				    __tm, __dates[0]);
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
+		   ios_base::iostate& __err, tm* __tm) const
+    {
+      typedef char_traits<_CharT>		__traits_type;
+      const locale& __loc = __io._M_getloc();
+      const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+      const char_type* __days[14];
+      __tp._M_days_abbreviated(__days);
+      __tp._M_days(__days + 7);
+      int __tmpwday;
+      ios_base::iostate __tmperr = ios_base::goodbit;
+
+      __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7,
+				       __io, __tmperr);
+      if (!__tmperr)
+	__tm->tm_wday = __tmpwday;
+      else
+	__err |= ios_base::failbit;
+
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+     }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_monthname(iter_type __beg, iter_type __end,
+                     ios_base& __io, ios_base::iostate& __err, tm* __tm) const
+    {
+      typedef char_traits<_CharT>		__traits_type;
+      const locale& __loc = __io._M_getloc();
+      const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+      const char_type*  __months[24];
+      __tp._M_months_abbreviated(__months);
+      __tp._M_months(__months + 12);
+      int __tmpmon;
+      ios_base::iostate __tmperr = ios_base::goodbit;
+
+      __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12,
+				       __io, __tmperr);
+      if (!__tmperr)
+	__tm->tm_mon = __tmpmon;
+      else
+	__err |= ios_base::failbit;
+
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template<typename _CharT, typename _InIter>
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
+		ios_base::iostate& __err, tm* __tm) const
+    {
+      const locale& __loc = __io._M_getloc();
+      const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+      int __tmpyear;
+      ios_base::iostate __tmperr = ios_base::goodbit;
+
+      __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4,
+			     __io, __tmperr);
+      if (!__tmperr)
+	__tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900;
+      else
+	__err |= ios_base::failbit;
+
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    time_put<_CharT, _OutIter>::
+    put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+	const _CharT* __beg, const _CharT* __end) const
+    {
+      const locale& __loc = __io._M_getloc();
+      ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
+      for (; __beg != __end; ++__beg)
+	if (__ctype.narrow(*__beg, 0) != '%')
+	  {
+	    *__s = *__beg;
+	    ++__s;
+	  }
+	else if (++__beg != __end)
+	  {
+	    char __format;
+	    char __mod = 0;
+	    const char __c = __ctype.narrow(*__beg, 0);
+	    if (__c != 'E' && __c != 'O')
+	      __format = __c;
+	    else if (++__beg != __end)
+	      {
+		__mod = __c;
+		__format = __ctype.narrow(*__beg, 0);
+	      }
+	    else
+	      break;
+	    __s = this->do_put(__s, __io, __fill, __tm, __format, __mod);
+	  }
+	else
+	  break;
+      return __s;
+    }
+
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    time_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm,
+	   char __format, char __mod) const
+    {
+      const locale& __loc = __io._M_getloc();
+      ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
+      __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+
+      // NB: This size is arbitrary. Should this be a data member,
+      // initialized at construction?
+      const size_t __maxlen = 128;
+      char_type __res[__maxlen];
+
+      // NB: In IEE 1003.1-200x, and perhaps other locale models, it
+      // is possible that the format character will be longer than one
+      // character. Possibilities include 'E' or 'O' followed by a
+      // format character: if __mod is not the default argument, assume
+      // it's a valid modifier.
+      char_type __fmt[4];
+      __fmt[0] = __ctype.widen('%');
+      if (!__mod)
+	{
+	  __fmt[1] = __format;
+	  __fmt[2] = char_type();
+	}
+      else
+	{
+	  __fmt[1] = __mod;
+	  __fmt[2] = __format;
+	  __fmt[3] = char_type();
+	}
+
+      __tp._M_put(__res, __maxlen, __fmt, __tm);
+
+      // Write resulting, fully-formatted string to output iterator.
+      return std::__write(__s, __res, char_traits<char_type>::length(__res));
+    }
+
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class moneypunct<char, false>;
+  extern template class moneypunct<char, true>;
+  extern template class moneypunct_byname<char, false>;
+  extern template class moneypunct_byname<char, true>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE money_get<char>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE money_put<char>;
+  extern template class __timepunct<char>;
+  extern template class time_put<char>;
+  extern template class time_put_byname<char>;
+  extern template class time_get<char>;
+  extern template class time_get_byname<char>;
+  extern template class messages<char>;
+  extern template class messages_byname<char>;
+
+  extern template
+    const moneypunct<char, true>&
+    use_facet<moneypunct<char, true> >(const locale&);
+
+  extern template
+    const moneypunct<char, false>&
+    use_facet<moneypunct<char, false> >(const locale&);
+
+  extern template
+    const money_put<char>&
+    use_facet<money_put<char> >(const locale&);
+
+  extern template
+    const money_get<char>&
+    use_facet<money_get<char> >(const locale&);
+
+  extern template
+    const __timepunct<char>&
+    use_facet<__timepunct<char> >(const locale&);
+
+  extern template
+    const time_put<char>&
+    use_facet<time_put<char> >(const locale&);
+
+  extern template
+    const time_get<char>&
+    use_facet<time_get<char> >(const locale&);
+
+  extern template
+    const messages<char>&
+    use_facet<messages<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<moneypunct<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<money_put<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<money_get<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<__timepunct<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<time_put<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<time_get<char> >(const locale&);
+
+  extern template
+    bool
+    has_facet<messages<char> >(const locale&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class moneypunct<wchar_t, false>;
+  extern template class moneypunct<wchar_t, true>;
+  extern template class moneypunct_byname<wchar_t, false>;
+  extern template class moneypunct_byname<wchar_t, true>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE money_get<wchar_t>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE money_put<wchar_t>;
+  extern template class __timepunct<wchar_t>;
+  extern template class time_put<wchar_t>;
+  extern template class time_put_byname<wchar_t>;
+  extern template class time_get<wchar_t>;
+  extern template class time_get_byname<wchar_t>;
+  extern template class messages<wchar_t>;
+  extern template class messages_byname<wchar_t>;
+
+  extern template
+    const moneypunct<wchar_t, true>&
+    use_facet<moneypunct<wchar_t, true> >(const locale&);
+
+  extern template
+    const moneypunct<wchar_t, false>&
+    use_facet<moneypunct<wchar_t, false> >(const locale&);
+
+  extern template
+    const money_put<wchar_t>&
+    use_facet<money_put<wchar_t> >(const locale&);
+
+  extern template
+    const money_get<wchar_t>&
+    use_facet<money_get<wchar_t> >(const locale&);
+
+  extern template
+    const __timepunct<wchar_t>&
+    use_facet<__timepunct<wchar_t> >(const locale&);
+
+  extern template
+    const time_put<wchar_t>&
+    use_facet<time_put<wchar_t> >(const locale&);
+
+  extern template
+    const time_get<wchar_t>&
+    use_facet<time_get<wchar_t> >(const locale&);
+
+  extern template
+    const messages<wchar_t>&
+    use_facet<messages<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<moneypunct<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<money_put<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<money_get<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<__timepunct<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<time_put<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<time_get<wchar_t> >(const locale&);
+
+  extern template
+    bool
+    has_facet<messages<wchar_t> >(const locale&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/localefwd.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/localefwd.h
new file mode 100644
index 0000000..c81e39b
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/localefwd.h
@@ -0,0 +1,189 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file localefwd.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+#ifndef _LOCALE_FWD_H
+#define _LOCALE_FWD_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/c++locale.h>  // Defines __c_locale, config-specific include
+#include <iosfwd>            // For ostreambuf_iterator, istreambuf_iterator
+#include <cctype>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /** 
+   *  @defgroup locales Locales
+   *
+   *  Classes and functions for internationalization and localization.
+   */
+
+  // 22.1.1 Locale
+  class locale;
+
+  template<typename _Facet>
+    bool
+    has_facet(const locale&) throw();
+
+  template<typename _Facet>
+    const _Facet&
+    use_facet(const locale&);
+
+  // 22.1.3 Convenience interfaces
+  template<typename _CharT>
+    bool
+    isspace(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    isprint(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    iscntrl(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    isupper(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    islower(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    isalpha(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    isdigit(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    ispunct(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    isxdigit(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    isalnum(_CharT, const locale&);
+
+  template<typename _CharT>
+    bool
+    isgraph(_CharT, const locale&);
+
+  template<typename _CharT>
+    _CharT
+    toupper(_CharT, const locale&);
+
+  template<typename _CharT>
+    _CharT
+    tolower(_CharT, const locale&);
+
+  // 22.2.1 and 22.2.1.3 ctype
+  class ctype_base;
+  template<typename _CharT>
+    class ctype;
+  template<> class ctype<char>;
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<> class ctype<wchar_t>;
+#endif
+  template<typename _CharT>
+    class ctype_byname;
+  // NB: Specialized for char and wchar_t in locale_facets.h.
+
+  class codecvt_base;
+  template<typename _InternT, typename _ExternT, typename _StateT>
+    class codecvt;
+  template<> class codecvt<char, char, mbstate_t>;
+#ifdef _GLIBCXX_USE_WCHAR_T
+  template<> class codecvt<wchar_t, char, mbstate_t>;
+#endif
+  template<typename _InternT, typename _ExternT, typename _StateT>
+    class codecvt_byname;
+
+  // 22.2.2 and 22.2.3 numeric
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+  template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
+    class num_get;
+  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+    class num_put;
+_GLIBCXX_END_LDBL_NAMESPACE
+  template<typename _CharT> class numpunct;
+  template<typename _CharT> class numpunct_byname;
+
+  // 22.2.4 collation
+  template<typename _CharT>
+    class collate;
+  template<typename _CharT> class
+    collate_byname;
+
+  // 22.2.5 date and time
+  class time_base;
+  template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
+    class time_get;
+  template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
+    class time_get_byname;
+  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+    class time_put;
+  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+    class time_put_byname;
+
+  // 22.2.6 money
+  class money_base;
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+  template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
+    class money_get;
+  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+    class money_put;
+_GLIBCXX_END_LDBL_NAMESPACE
+  template<typename _CharT, bool _Intl = false>
+    class moneypunct;
+  template<typename _CharT, bool _Intl = false>
+    class moneypunct_byname;
+
+  // 22.2.7 message retrieval
+  class messages_base;
+  template<typename _CharT>
+    class messages;
+  template<typename _CharT>
+    class messages_byname;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/mask_array.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/mask_array.h
new file mode 100644
index 0000000..f915dd9
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/mask_array.h
@@ -0,0 +1,206 @@
+// The template and inlines for the -*- C++ -*- mask_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2009
+//  Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file mask_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _MASK_ARRAY_H
+#define _MASK_ARRAY_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup numeric_arrays
+   * @{
+   */
+
+  /**
+   *  @brief  Reference to selected subset of an array.
+   *
+   *  A mask_array is a reference to the actual elements of an array specified
+   *  by a bitmask in the form of an array of bool.  The way to get a
+   *  mask_array is to call operator[](valarray<bool>) on a valarray.  The
+   *  returned mask_array then permits carrying operations out on the
+   *  referenced subset of elements in the original valarray.
+   *
+   *  For example, if a mask_array is obtained using the array (false, true,
+   *  false, true) as an argument, the mask array has two elements referring
+   *  to array[1] and array[3] in the underlying array.
+   *
+   *  @param  Tp  Element type.
+   */
+  template <class _Tp>
+    class mask_array
+    {
+    public:
+      typedef _Tp value_type;
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 253. valarray helper functions are almost entirely useless
+
+      ///  Copy constructor.  Both slices refer to the same underlying array.
+      mask_array (const mask_array&);
+      
+      ///  Assignment operator.  Assigns elements to corresponding elements
+      ///  of @a a.
+      mask_array& operator=(const mask_array&);
+
+      void operator=(const valarray<_Tp>&) const;
+      ///  Multiply slice elements by corresponding elements of @a v.
+      void operator*=(const valarray<_Tp>&) const;
+      ///  Divide slice elements by corresponding elements of @a v.
+      void operator/=(const valarray<_Tp>&) const;
+      ///  Modulo slice elements by corresponding elements of @a v.
+      void operator%=(const valarray<_Tp>&) const;
+      ///  Add corresponding elements of @a v to slice elements.
+      void operator+=(const valarray<_Tp>&) const;
+      ///  Subtract corresponding elements of @a v from slice elements.
+      void operator-=(const valarray<_Tp>&) const;
+      ///  Logical xor slice elements with corresponding elements of @a v.
+      void operator^=(const valarray<_Tp>&) const;
+      ///  Logical and slice elements with corresponding elements of @a v.
+      void operator&=(const valarray<_Tp>&) const;
+      ///  Logical or slice elements with corresponding elements of @a v.
+      void operator|=(const valarray<_Tp>&) const;
+      ///  Left shift slice elements by corresponding elements of @a v.
+      void operator<<=(const valarray<_Tp>&) const;
+      ///  Right shift slice elements by corresponding elements of @a v.
+      void operator>>=(const valarray<_Tp>&) const;
+      ///  Assign all slice elements to @a t.
+      void operator=(const _Tp&) const;
+
+        //        ~mask_array ();
+
+      template<class _Dom>
+        void operator=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator*=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator/=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator%=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator+=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator-=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator^=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator&=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator|=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator<<=(const _Expr<_Dom,_Tp>&) const;
+      template<class _Dom>
+        void operator>>=(const _Expr<_Dom,_Tp>&) const;
+
+    private:
+      mask_array(_Array<_Tp>, size_t, _Array<bool>);
+      friend class valarray<_Tp>;
+
+      const size_t       _M_sz;
+      const _Array<bool> _M_mask;
+      const _Array<_Tp>  _M_array;
+
+      // not implemented
+      mask_array();
+    };
+
+  template<typename _Tp>
+    inline mask_array<_Tp>::mask_array(const mask_array<_Tp>& a)
+    : _M_sz(a._M_sz), _M_mask(a._M_mask), _M_array(a._M_array) {}
+
+  template<typename _Tp>
+    inline
+    mask_array<_Tp>::mask_array(_Array<_Tp> __a, size_t __s, _Array<bool> __m)
+    : _M_sz(__s), _M_mask(__m), _M_array(__a) {}
+
+  template<typename _Tp>
+    inline mask_array<_Tp>&
+    mask_array<_Tp>::operator=(const mask_array<_Tp>& __a)
+    {
+      std::__valarray_copy(__a._M_array, __a._M_mask,
+			   _M_sz, _M_array, _M_mask);
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline void
+    mask_array<_Tp>::operator=(const _Tp& __t) const
+    { std::__valarray_fill(_M_array, _M_sz, _M_mask, __t); }
+
+  template<typename _Tp>
+    inline void
+    mask_array<_Tp>::operator=(const valarray<_Tp>& __v) const
+    { std::__valarray_copy(_Array<_Tp>(__v), __v.size(), _M_array, _M_mask); }
+
+  template<typename _Tp>
+    template<class _Ex>
+      inline void
+      mask_array<_Tp>::operator=(const _Expr<_Ex, _Tp>& __e) const
+      { std::__valarray_copy(__e, __e.size(), _M_array, _M_mask); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name)				\
+  template<typename _Tp>						\
+    inline void								\
+    mask_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const	\
+    {									\
+      _Array_augmented_##_Name(_M_array, _M_mask,			\
+			       _Array<_Tp>(__v), __v.size());		\
+    }									\
+									\
+  template<typename _Tp>                                                \
+    template<class _Dom>			                        \
+      inline void							\
+      mask_array<_Tp>::operator _Op##=(const _Expr<_Dom, _Tp>& __e) const\
+      {									\
+	_Array_augmented_##_Name(_M_array, _M_mask, __e, __e.size());   \
+      }
+
+_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(%, __modulus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(-, __minus)
+_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
+_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
+_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
+_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+  // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _MASK_ARRAY_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/move.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/move.h
new file mode 100644
index 0000000..0211b3e
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/move.h
@@ -0,0 +1,128 @@
+// Move, forward and identity for C++0x + swap -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file move.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _MOVE_H
+#define _MOVE_H 1
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/concept_check.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <type_traits> // Brings in std::declval too.
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /// identity
+  template<typename _Tp>
+    struct identity
+    {
+      typedef _Tp type;
+    };
+
+  /// forward (as per N2835)
+  /// Forward lvalues as rvalues.
+  template<typename _Tp>
+    inline typename enable_if<!is_lvalue_reference<_Tp>::value, _Tp&&>::type
+    forward(typename std::identity<_Tp>::type& __t)
+    { return static_cast<_Tp&&>(__t); }
+
+  /// Forward rvalues as rvalues.
+  template<typename _Tp>
+    inline typename enable_if<!is_lvalue_reference<_Tp>::value, _Tp&&>::type
+    forward(typename std::identity<_Tp>::type&& __t)
+    { return static_cast<_Tp&&>(__t); }
+
+  // Forward lvalues as lvalues.
+  template<typename _Tp>
+    inline typename enable_if<is_lvalue_reference<_Tp>::value, _Tp>::type
+    forward(typename std::identity<_Tp>::type __t)
+    { return __t; }
+
+  // Prevent forwarding rvalues as const lvalues.
+  template<typename _Tp>
+    inline typename enable_if<is_lvalue_reference<_Tp>::value, _Tp>::type
+    forward(typename std::remove_reference<_Tp>::type&& __t) = delete;
+
+  /**
+   *  @brief Move a value.
+   *  @ingroup mutating_algorithms
+   *  @param  __t  A thing of arbitrary type.
+   *  @return Same, moved.
+  */
+  template<typename _Tp>
+    inline typename std::remove_reference<_Tp>::type&&
+    move(_Tp&& __t)
+    { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
+
+  /// declval, from type_traits.
+
+_GLIBCXX_END_NAMESPACE
+
+#define _GLIBCXX_MOVE(_Tp) std::move(_Tp)
+#define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val)
+#else
+#define _GLIBCXX_MOVE(_Tp) (_Tp)
+#define _GLIBCXX_FORWARD(_Tp, __val) (__val)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  @brief Swaps two values.
+   *  @ingroup mutating_algorithms
+   *  @param  __a  A thing of arbitrary type.
+   *  @param  __b  Another thing of arbitrary type.
+   *  @return   Nothing.
+  */
+  template<typename _Tp>
+    inline void
+    swap(_Tp& __a, _Tp& __b)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
+
+      _Tp __tmp = _GLIBCXX_MOVE(__a);
+      __a = _GLIBCXX_MOVE(__b);
+      __b = _GLIBCXX_MOVE(__tmp);
+    }
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // DR 809. std::swap should be overloaded for array types.
+  template<typename _Tp, size_t _Nm>
+    inline void
+    swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
+    {
+      for (size_t __n = 0; __n < _Nm; ++__n)
+	swap(__a[__n], __b[__n]);
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _MOVE_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ostream.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ostream.tcc
new file mode 100644
index 0000000..1147212
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ostream.tcc
@@ -0,0 +1,407 @@
+// ostream classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ostream.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.6.2  Output streams
+//
+
+#ifndef _OSTREAM_TCC
+#define _OSTREAM_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>::sentry::
+    sentry(basic_ostream<_CharT, _Traits>& __os)
+    : _M_ok(false), _M_os(__os)
+    {
+      // XXX MT
+      if (__os.tie() && __os.good())
+	__os.tie()->flush();
+
+      if (__os.good())
+	_M_ok = true;
+      else
+	__os.setstate(ios_base::failbit);
+    }
+
+  template<typename _CharT, typename _Traits>
+    template<typename _ValueT>
+      basic_ostream<_CharT, _Traits>&
+      basic_ostream<_CharT, _Traits>::
+      _M_insert(_ValueT __v)
+      {
+	sentry __cerb(*this);
+	if (__cerb)
+	  {
+	    ios_base::iostate __err = ios_base::goodbit;
+	    __try
+	      {
+		const __num_put_type& __np = __check_facet(this->_M_num_put);
+		if (__np.put(*this, *this, this->fill(), __v).failed())
+		  __err |= ios_base::badbit;
+	      }
+	    __catch(__cxxabiv1::__forced_unwind&)
+	      {
+		this->_M_setstate(ios_base::badbit);		
+		__throw_exception_again;
+	      }
+	    __catch(...)
+	      { this->_M_setstate(ios_base::badbit); }
+	    if (__err)
+	      this->setstate(__err);
+	  }
+	return *this;
+      }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    operator<<(short __n)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 117. basic_ostream uses nonexistent num_put member functions.
+      const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+      if (__fmt == ios_base::oct || __fmt == ios_base::hex)
+	return _M_insert(static_cast<long>(static_cast<unsigned short>(__n)));
+      else
+	return _M_insert(static_cast<long>(__n));
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    operator<<(int __n)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 117. basic_ostream uses nonexistent num_put member functions.
+      const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+      if (__fmt == ios_base::oct || __fmt == ios_base::hex)
+	return _M_insert(static_cast<long>(static_cast<unsigned int>(__n)));
+      else
+	return _M_insert(static_cast<long>(__n));
+    }
+  
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    operator<<(__streambuf_type* __sbin)
+    {
+      ios_base::iostate __err = ios_base::goodbit;
+      sentry __cerb(*this);
+      if (__cerb && __sbin)
+	{
+	  __try
+	    {
+	      if (!__copy_streambufs(__sbin, this->rdbuf()))
+		__err |= ios_base::failbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);		
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::failbit); }
+	}
+      else if (!__sbin)
+	__err |= ios_base::badbit;
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    put(char_type __c)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 60. What is a formatted input function?
+      // basic_ostream::put(char_type) is an unformatted output function.
+      // DR 63. Exception-handling policy for unformatted output.
+      // Unformatted output functions should catch exceptions thrown
+      // from streambuf members.
+      sentry __cerb(*this);
+      if (__cerb)
+	{
+	  ios_base::iostate __err = ios_base::goodbit;
+	  __try
+	    {
+	      const int_type __put = this->rdbuf()->sputc(__c);
+	      if (traits_type::eq_int_type(__put, traits_type::eof()))
+		__err |= ios_base::badbit;
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);		
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	  if (__err)
+	    this->setstate(__err);
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    write(const _CharT* __s, streamsize __n)
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 60. What is a formatted input function?
+      // basic_ostream::write(const char_type*, streamsize) is an
+      // unformatted output function.
+      // DR 63. Exception-handling policy for unformatted output.
+      // Unformatted output functions should catch exceptions thrown
+      // from streambuf members.
+      sentry __cerb(*this);
+      if (__cerb)
+	{
+	  __try
+	    { _M_write(__s, __n); }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      this->_M_setstate(ios_base::badbit);		
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { this->_M_setstate(ios_base::badbit); }
+	}
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    flush()
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 60. What is a formatted input function?
+      // basic_ostream::flush() is *not* an unformatted output function.
+      ios_base::iostate __err = ios_base::goodbit;
+      __try
+	{
+	  if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
+	    __err |= ios_base::badbit;
+	}
+      __catch(__cxxabiv1::__forced_unwind&)
+	{
+	  this->_M_setstate(ios_base::badbit);		
+	  __throw_exception_again;
+	}
+      __catch(...)
+	{ this->_M_setstate(ios_base::badbit); }
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    typename basic_ostream<_CharT, _Traits>::pos_type
+    basic_ostream<_CharT, _Traits>::
+    tellp()
+    {
+      pos_type __ret = pos_type(-1);
+      __try
+	{
+	  if (!this->fail())
+	    __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
+	}
+      __catch(__cxxabiv1::__forced_unwind&)
+	{
+	  this->_M_setstate(ios_base::badbit);		
+	  __throw_exception_again;
+	}
+      __catch(...)
+	{ this->_M_setstate(ios_base::badbit); }
+      return __ret;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    seekp(pos_type __pos)
+    {
+      ios_base::iostate __err = ios_base::goodbit;
+      __try
+	{
+	  if (!this->fail())
+	    {
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 136.  seekp, seekg setting wrong streams?
+	      const pos_type __p = this->rdbuf()->pubseekpos(__pos,
+							     ios_base::out);
+
+	      // 129. Need error indication from seekp() and seekg()
+	      if (__p == pos_type(off_type(-1)))
+		__err |= ios_base::failbit;
+	    }
+	}
+      __catch(__cxxabiv1::__forced_unwind&)
+	{
+	  this->_M_setstate(ios_base::badbit);		
+	  __throw_exception_again;
+	}
+      __catch(...)
+	{ this->_M_setstate(ios_base::badbit); }
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    seekp(off_type __off, ios_base::seekdir __dir)
+    {
+      ios_base::iostate __err = ios_base::goodbit;
+      __try
+	{
+	  if (!this->fail())
+	    {
+	      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	      // 136.  seekp, seekg setting wrong streams?
+	      const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
+							     ios_base::out);
+
+	      // 129. Need error indication from seekp() and seekg()
+	      if (__p == pos_type(off_type(-1)))
+		__err |= ios_base::failbit;
+	    }
+	}
+      __catch(__cxxabiv1::__forced_unwind&)
+	{
+	  this->_M_setstate(ios_base::badbit);		
+	  __throw_exception_again;
+	}
+      __catch(...)
+	{ this->_M_setstate(ios_base::badbit); }
+      if (__err)
+	this->setstate(__err);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
+    {
+      if (!__s)
+	__out.setstate(ios_base::badbit);
+      else
+	{
+	  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	  // 167.  Improper use of traits_type::length()
+	  const size_t __clen = char_traits<char>::length(__s);
+	  __try
+	    {
+	      struct __ptr_guard
+	      {
+		_CharT *__p;
+		__ptr_guard (_CharT *__ip): __p(__ip) { }
+		~__ptr_guard() { delete[] __p; }
+		_CharT* __get() { return __p; }
+	      } __pg (new _CharT[__clen]);
+
+	      _CharT *__ws = __pg.__get();
+	      for (size_t  __i = 0; __i < __clen; ++__i)
+		__ws[__i] = __out.widen(__s[__i]);
+	      __ostream_insert(__out, __ws, __clen);
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      __out._M_setstate(ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { __out._M_setstate(ios_base::badbit); }
+	}
+      return __out;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB:  This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class basic_ostream<char>;
+  extern template ostream& endl(ostream&);
+  extern template ostream& ends(ostream&);
+  extern template ostream& flush(ostream&);
+  extern template ostream& operator<<(ostream&, char);
+  extern template ostream& operator<<(ostream&, unsigned char);
+  extern template ostream& operator<<(ostream&, signed char);
+  extern template ostream& operator<<(ostream&, const char*);
+  extern template ostream& operator<<(ostream&, const unsigned char*);
+  extern template ostream& operator<<(ostream&, const signed char*);
+
+  extern template ostream& ostream::_M_insert(long);
+  extern template ostream& ostream::_M_insert(unsigned long);
+  extern template ostream& ostream::_M_insert(bool);
+#ifdef _GLIBCXX_USE_LONG_LONG
+  extern template ostream& ostream::_M_insert(long long);
+  extern template ostream& ostream::_M_insert(unsigned long long);
+#endif
+  extern template ostream& ostream::_M_insert(double);
+  extern template ostream& ostream::_M_insert(long double);
+  extern template ostream& ostream::_M_insert(const void*);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class basic_ostream<wchar_t>;
+  extern template wostream& endl(wostream&);
+  extern template wostream& ends(wostream&);
+  extern template wostream& flush(wostream&);
+  extern template wostream& operator<<(wostream&, wchar_t);
+  extern template wostream& operator<<(wostream&, char);
+  extern template wostream& operator<<(wostream&, const wchar_t*);
+  extern template wostream& operator<<(wostream&, const char*);
+
+  extern template wostream& wostream::_M_insert(long);
+  extern template wostream& wostream::_M_insert(unsigned long);
+  extern template wostream& wostream::_M_insert(bool);
+#ifdef _GLIBCXX_USE_LONG_LONG
+  extern template wostream& wostream::_M_insert(long long);
+  extern template wostream& wostream::_M_insert(unsigned long long);
+#endif
+  extern template wostream& wostream::_M_insert(double);
+  extern template wostream& wostream::_M_insert(long double);
+  extern template wostream& wostream::_M_insert(const void*);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ostream_insert.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ostream_insert.h
new file mode 100644
index 0000000..e0017ee
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/ostream_insert.h
@@ -0,0 +1,127 @@
+// Helpers for ostream inserters -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ostream_insert.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _OSTREAM_INSERT_H
+#define _OSTREAM_INSERT_H 1
+
+#pragma GCC system_header
+
+#include <iosfwd>
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _CharT, typename _Traits>
+    inline void
+    __ostream_write(basic_ostream<_CharT, _Traits>& __out,
+		    const _CharT* __s, streamsize __n)
+    {
+      typedef basic_ostream<_CharT, _Traits>       __ostream_type;      
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const streamsize __put = __out.rdbuf()->sputn(__s, __n);
+      if (__put != __n)
+	__out.setstate(__ios_base::badbit);
+    }
+
+  template<typename _CharT, typename _Traits>
+    inline void
+    __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n)
+    {
+      typedef basic_ostream<_CharT, _Traits>       __ostream_type;      
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const _CharT __c = __out.fill();
+      for (; __n > 0; --__n)
+	{
+	  const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c);
+	  if (_Traits::eq_int_type(__put, _Traits::eof()))
+	    {
+	      __out.setstate(__ios_base::badbit);
+	      break;
+	    }
+	}
+    }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    __ostream_insert(basic_ostream<_CharT, _Traits>& __out,
+		     const _CharT* __s, streamsize __n)
+    {
+      typedef basic_ostream<_CharT, _Traits>       __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      typename __ostream_type::sentry __cerb(__out);
+      if (__cerb)
+	{
+	  __try
+	    {
+	      const streamsize __w = __out.width();
+	      if (__w > __n)
+		{
+		  const bool __left = ((__out.flags()
+					& __ios_base::adjustfield)
+				       == __ios_base::left);
+		  if (!__left)
+		    __ostream_fill(__out, __w - __n);
+		  if (__out.good())
+		    __ostream_write(__out, __s, __n);
+		  if (__left && __out.good())
+		    __ostream_fill(__out, __w - __n);
+		}
+	      else
+		__ostream_write(__out, __s, __n);
+	      __out.width(0);
+	    }
+	  __catch(__cxxabiv1::__forced_unwind&)
+	    {
+	      __out._M_setstate(__ios_base::badbit);
+	      __throw_exception_again;
+	    }
+	  __catch(...)
+	    { __out._M_setstate(__ios_base::badbit); }
+	}
+      return __out;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB:  This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template wostream& __ostream_insert(wostream&, const wchar_t*,
+					     streamsize);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _OSTREAM_INSERT_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/postypes.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/postypes.h
new file mode 100644
index 0000000..8066d9b
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/postypes.h
@@ -0,0 +1,241 @@
+// Position types -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file postypes.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.4.1 - Types
+// ISO C++ 14882: 27.4.3 - Template class fpos
+//
+
+#ifndef _GLIBCXX_POSTYPES_H
+#define _GLIBCXX_POSTYPES_H 1
+
+#pragma GCC system_header
+
+#include <cwchar> // For mbstate_t
+
+// XXX If <stdint.h> is really needed, make sure to define the macros
+// before including it, in order not to break <tr1/cstdint> (and <cstdint>
+// in C++0x).  Reconsider all this as soon as possible...
+#if (defined(_GLIBCXX_HAVE_INT64_T) && !defined(_GLIBCXX_HAVE_INT64_T_LONG) \
+     && !defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG))
+
+#ifndef __STDC_LIMIT_MACROS
+# define _UNDEF__STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+#endif
+#ifndef __STDC_CONSTANT_MACROS
+# define _UNDEF__STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS
+#endif
+#include <stdint.h> // For int64_t
+#ifdef _UNDEF__STDC_LIMIT_MACROS
+# undef __STDC_LIMIT_MACROS
+# undef _UNDEF__STDC_LIMIT_MACROS
+#endif
+#ifdef _UNDEF__STDC_CONSTANT_MACROS
+# undef __STDC_CONSTANT_MACROS
+# undef _UNDEF__STDC_CONSTANT_MACROS
+#endif
+
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // The types streamoff, streampos and wstreampos and the class
+  // template fpos<> are described in clauses 21.1.2, 21.1.3, 27.1.2,
+  // 27.2, 27.4.1, 27.4.3 and D.6. Despite all this verbiage, the
+  // behaviour of these types is mostly implementation defined or
+  // unspecified. The behaviour in this implementation is as noted
+  // below.
+
+  /**
+   *  @brief  Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
+   *
+   *  In clauses 21.1.3.1 and 27.4.1 streamoff is described as an
+   *  implementation defined type.
+   *  Note: In versions of GCC up to and including GCC 3.3, streamoff
+   *  was typedef long.
+  */  
+#ifdef _GLIBCXX_HAVE_INT64_T_LONG
+  typedef long          streamoff;
+#elif defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)
+  typedef long long     streamoff;
+#elif defined(_GLIBCXX_HAVE_INT64_T) 
+  typedef int64_t       streamoff;
+#else
+  typedef long long     streamoff;
+#endif
+
+  /// Integral type for I/O operation counts and buffer sizes.
+  typedef ptrdiff_t	streamsize; // Signed integral type
+
+  /**
+   *  @brief  Class representing stream positions.
+   *
+   *  The standard places no requirements upon the template parameter StateT.
+   *  In this implementation StateT must be DefaultConstructible,
+   *  CopyConstructible and Assignable.  The standard only requires that fpos
+   *  should contain a member of type StateT. In this implementation it also
+   *  contains an offset stored as a signed integer.
+   *
+   *  @param  StateT  Type passed to and returned from state().
+   */
+  template<typename _StateT>
+    class fpos
+    {
+    private:
+      streamoff	                _M_off;
+      _StateT			_M_state;
+
+    public:
+      // The standard doesn't require that fpos objects can be default
+      // constructed. This implementation provides a default
+      // constructor that initializes the offset to 0 and default
+      // constructs the state.
+      fpos()
+      : _M_off(0), _M_state() { }
+
+      // The standard requires that fpos objects can be constructed
+      // from streamoff objects using the constructor syntax, and
+      // fails to give any meaningful semantics. In this
+      // implementation implicit conversion is also allowed, and this
+      // constructor stores the streamoff as the offset and default
+      // constructs the state.
+      /// Construct position from offset.
+      fpos(streamoff __off)
+      : _M_off(__off), _M_state() { }
+
+      /// Convert to streamoff.
+      operator streamoff() const { return _M_off; }
+
+      /// Remember the value of @a st.
+      void
+      state(_StateT __st)
+      { _M_state = __st; }
+
+      /// Return the last set value of @a st.
+      _StateT
+      state() const
+      { return _M_state; }
+
+      // The standard requires that this operator must be defined, but
+      // gives no semantics. In this implementation it just adds its
+      // argument to the stored offset and returns *this.
+      /// Add offset to this position.
+      fpos&
+      operator+=(streamoff __off)
+      {
+	_M_off += __off;
+	return *this;
+      }
+
+      // The standard requires that this operator must be defined, but
+      // gives no semantics. In this implementation it just subtracts
+      // its argument from the stored offset and returns *this.
+      /// Subtract offset from this position.
+      fpos&
+      operator-=(streamoff __off)
+      {
+	_M_off -= __off;
+	return *this;
+      }
+
+      // The standard requires that this operator must be defined, but
+      // defines its semantics only in terms of operator-. In this
+      // implementation it constructs a copy of *this, adds the
+      // argument to that copy using operator+= and then returns the
+      // copy.
+      /// Add position and offset.
+      fpos
+      operator+(streamoff __off) const
+      {
+	fpos __pos(*this);
+	__pos += __off;
+	return __pos;
+      }
+
+      // The standard requires that this operator must be defined, but
+      // defines its semantics only in terms of operator+. In this
+      // implementation it constructs a copy of *this, subtracts the
+      // argument from that copy using operator-= and then returns the
+      // copy.
+      /// Subtract offset from position.
+      fpos
+      operator-(streamoff __off) const
+      {
+	fpos __pos(*this);
+	__pos -= __off;
+	return __pos;
+      }
+
+      // The standard requires that this operator must be defined, but
+      // defines its semantics only in terms of operator+. In this
+      // implementation it returns the difference between the offset
+      // stored in *this and in the argument.
+      /// Subtract position to return offset.
+      streamoff
+      operator-(const fpos& __other) const
+      { return _M_off - __other._M_off; }
+    };
+
+  // The standard only requires that operator== must be an
+  // equivalence relation. In this implementation two fpos<StateT>
+  // objects belong to the same equivalence class if the contained
+  // offsets compare equal.
+  /// Test if equivalent to another position.
+  template<typename _StateT>
+    inline bool
+    operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
+    { return streamoff(__lhs) == streamoff(__rhs); }
+
+  template<typename _StateT>
+    inline bool
+    operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
+    { return streamoff(__lhs) != streamoff(__rhs); }
+
+  // Clauses 21.1.3.1 and 21.1.3.2 describe streampos and wstreampos
+  // as implementation defined types, but clause 27.2 requires that
+  // they must both be typedefs for fpos<mbstate_t>
+  /// File position for char streams.
+  typedef fpos<mbstate_t> streampos;
+  /// File position for wchar_t streams.
+  typedef fpos<mbstate_t> wstreampos;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /// File position for char16_t streams.
+  typedef fpos<mbstate_t> u16streampos;
+  /// File position for char32_t streams.
+  typedef fpos<mbstate_t> u32streampos;
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/random.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/random.h
new file mode 100644
index 0000000..aa21a10
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/random.h
@@ -0,0 +1,5342 @@
+// random number generation -*- C++ -*-
+
+// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/**
+ * @file bits/random.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#include <vector>
+
+namespace std
+{
+  // [26.4] Random number generation
+
+  /**
+   * @defgroup random Random Number Generation
+   * @ingroup numerics
+   *
+   * A facility for generating random numbers on selected distributions.
+   * @{
+   */
+
+  /**
+   * @brief A function template for converting the output of a (integral)
+   * uniform random number generator to a floatng point result in the range
+   * [0-1).
+   */
+  template<typename _RealType, size_t __bits,
+	   typename _UniformRandomNumberGenerator>
+    _RealType
+    generate_canonical(_UniformRandomNumberGenerator& __g);
+
+  /*
+   * Implementation-space details.
+   */
+  namespace __detail
+  {
+    template<typename _UIntType, size_t __w,
+	     bool = __w < static_cast<size_t>
+			  (std::numeric_limits<_UIntType>::digits)>
+      struct _Shift
+      { static const _UIntType __value = 0; };
+
+    template<typename _UIntType, size_t __w>
+      struct _Shift<_UIntType, __w, true>
+      { static const _UIntType __value = _UIntType(1) << __w; };
+
+    template<typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool>
+      struct _Mod;
+
+    // Dispatch based on modulus value to prevent divide-by-zero compile-time
+    // errors when m == 0.
+    template<typename _Tp, _Tp __m, _Tp __a = 1, _Tp __c = 0>
+      inline _Tp
+      __mod(_Tp __x)
+      { return _Mod<_Tp, __m, __a, __c, __m == 0>::__calc(__x); }
+
+    /*
+     * An adaptor class for converting the output of any Generator into
+     * the input for a specific Distribution.
+     */
+    template<typename _Engine, typename _DInputType>
+      struct _Adaptor
+      {
+
+      public:
+	_Adaptor(_Engine& __g)
+	: _M_g(__g) { }
+
+	_DInputType
+	min() const
+	{ return _DInputType(0); }
+
+	_DInputType
+	max() const
+	{ return _DInputType(1); }
+
+	/*
+	 * Converts a value generated by the adapted random number generator
+	 * into a value in the input domain for the dependent random number
+	 * distribution.
+	 */
+	_DInputType
+	operator()()
+	{
+	  return std::generate_canonical<_DInputType,
+	                            std::numeric_limits<_DInputType>::digits,
+	                            _Engine>(_M_g);
+	}
+
+      private:
+	_Engine& _M_g;
+      };
+  } // namespace __detail
+
+  /**
+   * @addtogroup random_generators Random Number Generators
+   * @ingroup random
+   *
+   * These classes define objects which provide random or pseudorandom
+   * numbers, either from a discrete or a continuous interval.  The
+   * random number generator supplied as a part of this library are
+   * all uniform random number generators which provide a sequence of
+   * random number uniformly distributed over their range.
+   *
+   * A number generator is a function object with an operator() that
+   * takes zero arguments and returns a number.
+   *
+   * A compliant random number generator must satisfy the following
+   * requirements.  <table border=1 cellpadding=10 cellspacing=0>
+   * <caption align=top>Random Number Generator Requirements</caption>
+   * <tr><td>To be documented.</td></tr> </table>
+   *
+   * @{
+   */
+
+  /**
+   * @brief A model of a linear congruential random number generator.
+   *
+   * A random number generator that produces pseudorandom numbers via
+   * linear function:
+   * @f[
+   *     x_{i+1}\leftarrow(ax_{i} + c) \bmod m 
+   * @f]
+   *
+   * The template parameter @p _UIntType must be an unsigned integral type
+   * large enough to store values up to (__m-1). If the template parameter
+   * @p __m is 0, the modulus @p __m used is
+   * std::numeric_limits<_UIntType>::max() plus 1. Otherwise, the template
+   * parameters @p __a and @p __c must be less than @p __m.
+   *
+   * The size of the state is @f$1@f$.
+   */
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    class linear_congruential_engine
+    {
+      static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+		    "substituting _UIntType not an unsigned integral type");
+      static_assert(__m == 0u || (__a < __m && __c < __m),
+		    "template argument substituting __m out of bounds");
+
+    public:
+      /** The type of the generated random value. */
+      typedef _UIntType result_type;
+
+      /** The multiplier. */
+      static const result_type multiplier   = __a;
+      /** An increment. */
+      static const result_type increment    = __c;
+      /** The modulus. */
+      static const result_type modulus      = __m;
+      static const result_type default_seed = 1u;
+
+      /**
+       * @brief Constructs a %linear_congruential_engine random number
+       *        generator engine with seed @p __s.  The default seed value
+       *        is 1.
+       *
+       * @param __s The initial seed value.
+       */
+      explicit
+      linear_congruential_engine(result_type __s = default_seed)
+      { seed(__s); }
+
+      /**
+       * @brief Constructs a %linear_congruential_engine random number
+       *        generator engine seeded from the seed sequence @p __q.
+       *
+       * @param __q the seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+	std::enable_if<!std::is_same<_Sseq, linear_congruential_engine>::value>
+	       ::type>
+        explicit
+        linear_congruential_engine(_Sseq& __q)
+        { seed(__q); }
+
+      /**
+       * @brief Reseeds the %linear_congruential_engine random number generator
+       *        engine sequence to the seed @p __s.
+       *
+       * @param __s The new seed.
+       */
+      void
+      seed(result_type __s = default_seed);
+
+      /**
+       * @brief Reseeds the %linear_congruential_engine random number generator
+       *        engine
+       * sequence using values from the seed sequence @p __q.
+       *
+       * @param __q the seed sequence.
+       */
+      template<typename _Sseq>
+        typename std::enable_if<std::is_class<_Sseq>::value>::type
+        seed(_Sseq& __q);
+
+      /**
+       * @brief Gets the smallest possible value in the output range.
+       *
+       * The minimum depends on the @p __c parameter: if it is zero, the
+       * minimum generated must be > 0, otherwise 0 is allowed.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      min() const
+      { return __c == 0u ? 1u : 0u; }
+
+      /**
+       * @brief Gets the largest possible value in the output range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      max() const
+      { return __m - 1u; }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       *
+       * @todo Look for a faster way to do discard.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * @brief Gets the next random number in the sequence.
+       */
+      result_type
+      operator()()
+      {
+	_M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x);
+	return _M_x;
+      }
+
+      /**
+       * @brief Compares two linear congruential random number generator
+       * objects of the same type for equality.
+       *
+       * @param __lhs A linear congruential random number generator object.
+       * @param __rhs Another linear congruential random number generator
+       *              object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+       */
+      friend bool
+      operator==(const linear_congruential_engine& __lhs,
+		 const linear_congruential_engine& __rhs)
+      { return __lhs._M_x == __rhs._M_x; }
+
+      /**
+       * @brief Writes the textual representation of the state x(i) of x to
+       *        @p __os.
+       *
+       * @param __os  The output stream.
+       * @param __lcr A % linear_congruential_engine random number generator.
+       * @returns __os.
+       */
+      template<typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
+	       _UIntType1 __m1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::linear_congruential_engine<_UIntType1,
+		   __a1, __c1, __m1>&);
+
+      /**
+       * @brief Sets the state of the engine by reading its textual
+       *        representation from @p __is.
+       *
+       * The textual representation must have been previously written using
+       * an output stream whose imbued locale and whose type's template
+       * specialization arguments _CharT and _Traits were the same as those
+       * of @p __is.
+       *
+       * @param __is  The input stream.
+       * @param __lcr A % linear_congruential_engine random number generator.
+       * @returns __is.
+       */
+      template<typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
+	       _UIntType1 __m1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::linear_congruential_engine<_UIntType1, __a1,
+		   __c1, __m1>&);
+
+    private:
+      _UIntType _M_x;
+    };
+
+  /**
+   * @brief Compares two linear congruential random number generator
+   * objects of the same type for inequality.
+   *
+   * @param __lhs A linear congruential random number generator object.
+   * @param __rhs Another linear congruential random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    inline bool
+    operator!=(const std::linear_congruential_engine<_UIntType, __a,
+	       __c, __m>& __lhs,
+	       const std::linear_congruential_engine<_UIntType, __a,
+	       __c, __m>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * A generalized feedback shift register discrete random number generator.
+   *
+   * This algorithm avoids multiplication and division and is designed to be
+   * friendly to a pipelined architecture.  If the parameters are chosen
+   * correctly, this generator will produce numbers with a very long period and
+   * fairly good apparent entropy, although still not cryptographically strong.
+   *
+   * The best way to use this generator is with the predefined mt19937 class.
+   *
+   * This algorithm was originally invented by Makoto Matsumoto and
+   * Takuji Nishimura.
+   *
+   * @var word_size   The number of bits in each element of the state vector.
+   * @var state_size  The degree of recursion.
+   * @var shift_size  The period parameter.
+   * @var mask_bits   The separation point bit index.
+   * @var parameter_a The last row of the twist matrix.
+   * @var output_u    The first right-shift tempering matrix parameter.
+   * @var output_s    The first left-shift tempering matrix parameter.
+   * @var output_b    The first left-shift tempering matrix mask.
+   * @var output_t    The second left-shift tempering matrix parameter.
+   * @var output_c    The second left-shift tempering matrix mask.
+   * @var output_l    The second right-shift tempering matrix parameter.
+   */
+  template<typename _UIntType, size_t __w,
+	   size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t,
+	   _UIntType __c, size_t __l, _UIntType __f>
+    class mersenne_twister_engine
+    {
+      static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+		    "substituting _UIntType not an unsigned integral type");
+      static_assert(1u <= __m && __m <= __n,
+		    "template argument substituting __m out of bounds");
+      static_assert(__r <= __w, "template argument substituting "
+		    "__r out of bound");
+      static_assert(__u <= __w, "template argument substituting "
+		    "__u out of bound");
+      static_assert(__s <= __w, "template argument substituting "
+		    "__s out of bound");
+      static_assert(__t <= __w, "template argument substituting "
+		    "__t out of bound");
+      static_assert(__l <= __w, "template argument substituting "
+		    "__l out of bound");
+      static_assert(__w <= std::numeric_limits<_UIntType>::digits,
+		    "template argument substituting __w out of bound");
+      static_assert(__a <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __a out of bound");
+      static_assert(__b <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __b out of bound");
+      static_assert(__c <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __c out of bound");
+      static_assert(__d <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __d out of bound");
+      static_assert(__f <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __f out of bound");
+
+    public:
+      /** The type of the generated random value. */
+      typedef _UIntType result_type;
+
+      // parameter values
+      static const size_t      word_size                 = __w;
+      static const size_t      state_size                = __n;
+      static const size_t      shift_size                = __m;
+      static const size_t      mask_bits                 = __r;
+      static const result_type xor_mask                  = __a;
+      static const size_t      tempering_u               = __u;
+      static const result_type tempering_d               = __d;
+      static const size_t      tempering_s               = __s;
+      static const result_type tempering_b               = __b;
+      static const size_t      tempering_t               = __t;
+      static const result_type tempering_c               = __c;
+      static const size_t      tempering_l               = __l;
+      static const result_type initialization_multiplier = __f;
+      static const result_type default_seed = 5489u;
+
+      // constructors and member function
+      explicit
+      mersenne_twister_engine(result_type __sd = default_seed)
+      { seed(__sd); }
+
+      /**
+       * @brief Constructs a %mersenne_twister_engine random number generator
+       *        engine seeded from the seed sequence @p __q.
+       *
+       * @param __q the seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+        std::enable_if<!std::is_same<_Sseq, mersenne_twister_engine>::value>
+	       ::type>
+        explicit
+        mersenne_twister_engine(_Sseq& __q)
+        { seed(__q); }
+
+      void
+      seed(result_type __sd = default_seed);
+
+      template<typename _Sseq>
+	typename std::enable_if<std::is_class<_Sseq>::value>::type
+        seed(_Sseq& __q);
+
+      /**
+       * @brief Gets the smallest possible value in the output range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      min() const
+      { return 0; };
+
+      /**
+       * @brief Gets the largest possible value in the output range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      max() const
+      { return __detail::_Shift<_UIntType, __w>::__value - 1; }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       *
+       * @todo Look for a faster way to do discard.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      result_type
+      operator()();
+
+      /**
+       * @brief Compares two % mersenne_twister_engine random number generator
+       *        objects of the same type for equality.
+       *
+       * @param __lhs A % mersenne_twister_engine random number generator
+       *              object.
+       * @param __rhs Another % mersenne_twister_engine random number
+       *              generator object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+       */
+      friend bool
+      operator==(const mersenne_twister_engine& __lhs,
+		 const mersenne_twister_engine& __rhs)
+      { return std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x); }
+
+      /**
+       * @brief Inserts the current state of a % mersenne_twister_engine
+       *        random number generator engine @p __x into the output stream
+       *        @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A % mersenne_twister_engine random number generator
+       *             engine.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _UIntType1,
+	       size_t __w1, size_t __n1,
+	       size_t __m1, size_t __r1,
+	       _UIntType1 __a1, size_t __u1,
+	       _UIntType1 __d1, size_t __s1,
+	       _UIntType1 __b1, size_t __t1,
+	       _UIntType1 __c1, size_t __l1, _UIntType1 __f1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::mersenne_twister_engine<_UIntType1, __w1, __n1,
+		   __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
+		   __l1, __f1>&);
+
+      /**
+       * @brief Extracts the current state of a % mersenne_twister_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A % mersenne_twister_engine random number generator
+       *             engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       * an error state.
+       */
+      template<typename _UIntType1,
+	       size_t __w1, size_t __n1,
+	       size_t __m1, size_t __r1,
+	       _UIntType1 __a1, size_t __u1,
+	       _UIntType1 __d1, size_t __s1,
+	       _UIntType1 __b1, size_t __t1,
+	       _UIntType1 __c1, size_t __l1, _UIntType1 __f1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::mersenne_twister_engine<_UIntType1, __w1, __n1, __m1,
+		   __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
+		   __l1, __f1>&);
+
+    private:
+      _UIntType _M_x[state_size];
+      size_t    _M_p;
+    };
+
+  /**
+   * @brief Compares two % mersenne_twister_engine random number generator
+   *        objects of the same type for inequality.
+   *
+   * @param __lhs A % mersenne_twister_engine random number generator
+   *              object.
+   * @param __rhs Another % mersenne_twister_engine random number
+   *              generator object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, size_t __w,
+	   size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t,
+	   _UIntType __c, size_t __l, _UIntType __f>
+    inline bool
+    operator!=(const std::mersenne_twister_engine<_UIntType, __w, __n, __m,
+	       __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs,
+	       const std::mersenne_twister_engine<_UIntType, __w, __n, __m,
+	       __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * @brief The Marsaglia-Zaman generator.
+   *
+   * This is a model of a Generalized Fibonacci discrete random number
+   * generator, sometimes referred to as the SWC generator.
+   *
+   * A discrete random number generator that produces pseudorandom
+   * numbers using:
+   * @f[
+   *     x_{i}\leftarrow(x_{i - s} - x_{i - r} - carry_{i-1}) \bmod m 
+   * @f]
+   *
+   * The size of the state is @f$r@f$
+   * and the maximum period of the generator is @f$(m^r - m^s - 1)@f$.
+   *
+   * @var _M_x     The state of the generator.  This is a ring buffer.
+   * @var _M_carry The carry.
+   * @var _M_p     Current index of x(i - r).
+   */
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    class subtract_with_carry_engine
+    {
+      static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+		    "substituting _UIntType not an unsigned integral type");
+      static_assert(0u < __s && __s < __r,
+		    "template argument substituting __s out of bounds");
+      static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits,
+		    "template argument substituting __w out of bounds");
+
+    public:
+      /** The type of the generated random value. */
+      typedef _UIntType result_type;
+
+      // parameter values
+      static const size_t      word_size    = __w;
+      static const size_t      short_lag    = __s;
+      static const size_t      long_lag     = __r;
+      static const result_type default_seed = 19780503u;
+
+      /**
+       * @brief Constructs an explicitly seeded % subtract_with_carry_engine
+       *        random number generator.
+       */
+      explicit
+      subtract_with_carry_engine(result_type __sd = default_seed)
+      { seed(__sd); }
+
+      /**
+       * @brief Constructs a %subtract_with_carry_engine random number engine
+       *        seeded from the seed sequence @p __q.
+       *
+       * @param __q the seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+        std::enable_if<!std::is_same<_Sseq, subtract_with_carry_engine>::value>
+	       ::type>
+        explicit
+        subtract_with_carry_engine(_Sseq& __q)
+        { seed(__q); }
+
+      /**
+       * @brief Seeds the initial state @f$x_0@f$ of the random number
+       *        generator.
+       *
+       * N1688[4.19] modifies this as follows.  If @p __value == 0,
+       * sets value to 19780503.  In any case, with a linear
+       * congruential generator lcg(i) having parameters @f$ m_{lcg} =
+       * 2147483563, a_{lcg} = 40014, c_{lcg} = 0, and lcg(0) = value
+       * @f$, sets @f$ x_{-r} \dots x_{-1} @f$ to @f$ lcg(1) \bmod m
+       * \dots lcg(r) \bmod m @f$ respectively.  If @f$ x_{-1} = 0 @f$
+       * set carry to 1, otherwise sets carry to 0.
+       */
+      void
+      seed(result_type __sd = default_seed);
+
+      /**
+       * @brief Seeds the initial state @f$x_0@f$ of the
+       * % subtract_with_carry_engine random number generator.
+       */
+      template<typename _Sseq>
+	typename std::enable_if<std::is_class<_Sseq>::value>::type
+        seed(_Sseq& __q);
+
+      /**
+       * @brief Gets the inclusive minimum value of the range of random
+       * integers returned by this generator.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      min() const
+      { return 0; }
+
+      /**
+       * @brief Gets the inclusive maximum value of the range of random
+       * integers returned by this generator.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      max() const
+      { return __detail::_Shift<_UIntType, __w>::__value - 1; }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       *
+       * @todo Look for a faster way to do discard.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * @brief Gets the next random number in the sequence.
+       */
+      result_type
+      operator()();
+
+      /**
+       * @brief Compares two % subtract_with_carry_engine random number
+       *        generator objects of the same type for equality.
+       *
+       * @param __lhs A % subtract_with_carry_engine random number generator
+       *              object.
+       * @param __rhs Another % subtract_with_carry_engine random number
+       *              generator object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+      */
+      friend bool
+      operator==(const subtract_with_carry_engine& __lhs,
+		 const subtract_with_carry_engine& __rhs)
+      { return std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x); }
+
+      /**
+       * @brief Inserts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x into the output stream
+       *        @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A % subtract_with_carry_engine random number generator
+       *             engine.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::subtract_with_carry_engine<_UIntType1, __w1,
+		   __s1, __r1>&);
+
+      /**
+       * @brief Extracts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A % subtract_with_carry_engine random number generator
+       *             engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       * an error state.
+       */
+      template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::subtract_with_carry_engine<_UIntType1, __w1,
+		   __s1, __r1>&);
+
+    private:
+      _UIntType  _M_x[long_lag];
+      _UIntType  _M_carry;
+      size_t     _M_p;
+    };
+
+  /**
+   * @brief Compares two % subtract_with_carry_engine random number
+   *        generator objects of the same type for inequality.
+   *
+   * @param __lhs A % subtract_with_carry_engine random number generator
+   *              object.
+   * @param __rhs Another % subtract_with_carry_engine random number
+   *              generator object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    inline bool
+    operator!=(const std::subtract_with_carry_engine<_UIntType, __w,
+	       __s, __r>& __lhs,
+	       const std::subtract_with_carry_engine<_UIntType, __w,
+	       __s, __r>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * Produces random numbers from some base engine by discarding blocks of
+   * data.
+   *
+   * 0 <= @p __r <= @p __p
+   */
+  template<typename _RandomNumberEngine, size_t __p, size_t __r>
+    class discard_block_engine
+    {
+      static_assert(1 <= __r && __r <= __p,
+		    "template argument substituting __r out of bounds");
+
+    public:
+      /** The type of the generated random value. */
+      typedef typename _RandomNumberEngine::result_type result_type;
+
+      // parameter values
+      static const size_t block_size = __p;
+      static const size_t used_block = __r;
+
+      /**
+       * @brief Constructs a default %discard_block_engine engine.
+       *
+       * The underlying engine is default constructed as well.
+       */
+      discard_block_engine()
+      : _M_b(), _M_n(0) { }
+
+      /**
+       * @brief Copy constructs a %discard_block_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param rng An existing (base class) engine object.
+       */
+      explicit
+      discard_block_engine(const _RandomNumberEngine& __rne)
+      : _M_b(__rne), _M_n(0) { }
+
+      /**
+       * @brief Move constructs a %discard_block_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param rng An existing (base class) engine object.
+       */
+      explicit
+      discard_block_engine(_RandomNumberEngine&& __rne)
+      : _M_b(std::move(__rne)), _M_n(0) { }
+
+      /**
+       * @brief Seed constructs a %discard_block_engine engine.
+       *
+       * Constructs the underlying generator engine seeded with @p __s.
+       * @param __s A seed value for the base class engine.
+       */
+      explicit
+      discard_block_engine(result_type __s)
+      : _M_b(__s), _M_n(0) { }
+
+      /**
+       * @brief Generator construct a %discard_block_engine engine.
+       *
+       * @param __q A seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+	std::enable_if<!std::is_same<_Sseq, discard_block_engine>::value
+		       && !std::is_same<_Sseq, _RandomNumberEngine>::value>
+	       ::type>
+        explicit
+        discard_block_engine(_Sseq& __q)
+	: _M_b(__q), _M_n(0)
+        { }
+
+      /**
+       * @brief Reseeds the %discard_block_engine object with the default
+       *        seed for the underlying base class generator engine.
+       */
+      void
+      seed()
+      {
+	_M_b.seed();
+	_M_n = 0;
+      }
+
+      /**
+       * @brief Reseeds the %discard_block_engine object with the default
+       *        seed for the underlying base class generator engine.
+       */
+      void
+      seed(result_type __s)
+      {
+	_M_b.seed(__s);
+	_M_n = 0;
+      }
+
+      /**
+       * @brief Reseeds the %discard_block_engine object with the given seed
+       *        sequence.
+       * @param __q A seed generator function.
+       */
+      template<typename _Sseq>
+        void
+        seed(_Sseq& __q)
+        {
+	  _M_b.seed(__q);
+	  _M_n = 0;
+	}
+
+      /**
+       * @brief Gets a const reference to the underlying generator engine
+       *        object.
+       */
+      const _RandomNumberEngine&
+      base() const
+      { return _M_b; }
+
+      /**
+       * @brief Gets the minimum value in the generated random number range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      min() const
+      { return _M_b.min(); }
+
+      /**
+       * @brief Gets the maximum value in the generated random number range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      max() const
+      { return _M_b.max(); }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       *
+       * @todo Look for a faster way to do discard.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * @brief Gets the next value in the generated random number sequence.
+       */
+      result_type
+      operator()();
+
+      /**
+       * @brief Compares two %discard_block_engine random number generator
+       *        objects of the same type for equality.
+       *
+       * @param __lhs A %discard_block_engine random number generator object.
+       * @param __rhs Another %discard_block_engine random number generator
+       *              object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+       */
+      friend bool
+      operator==(const discard_block_engine& __lhs,
+		 const discard_block_engine& __rhs)
+      { return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; }
+
+      /**
+       * @brief Inserts the current state of a %discard_block_engine random
+       *        number generator engine @p __x into the output stream
+       *        @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %discard_block_engine random number generator engine.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RandomNumberEngine1, size_t __p1, size_t __r1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::discard_block_engine<_RandomNumberEngine1,
+		   __p1, __r1>&);
+
+      /**
+       * @brief Extracts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %discard_block_engine random number generator engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       * an error state.
+       */
+      template<typename _RandomNumberEngine1, size_t __p1, size_t __r1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::discard_block_engine<_RandomNumberEngine1,
+		   __p1, __r1>&);
+
+    private:
+      _RandomNumberEngine _M_b;
+      size_t _M_n;
+    };
+
+  /**
+   * @brief Compares two %discard_block_engine random number generator
+   *        objects of the same type for inequality.
+   *
+   * @param __lhs A %discard_block_engine random number generator object.
+   * @param __rhs Another %discard_block_engine random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _RandomNumberEngine, size_t __p, size_t __r>
+    inline bool
+    operator!=(const std::discard_block_engine<_RandomNumberEngine, __p,
+	       __r>& __lhs,
+	       const std::discard_block_engine<_RandomNumberEngine, __p,
+	       __r>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * Produces random numbers by combining random numbers from some base
+   * engine to produce random numbers with a specifies number of bits @p __w.
+   */
+  template<typename _RandomNumberEngine, size_t __w, typename _UIntType>
+    class independent_bits_engine
+    {
+      static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+		    "substituting _UIntType not an unsigned integral type");
+      static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits,
+		    "template argument substituting __w out of bounds");
+
+    public:
+      /** The type of the generated random value. */
+      typedef _UIntType result_type;
+
+      /**
+       * @brief Constructs a default %independent_bits_engine engine.
+       *
+       * The underlying engine is default constructed as well.
+       */
+      independent_bits_engine()
+      : _M_b() { }
+
+      /**
+       * @brief Copy constructs a %independent_bits_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param rng An existing (base class) engine object.
+       */
+      explicit
+      independent_bits_engine(const _RandomNumberEngine& __rne)
+      : _M_b(__rne) { }
+
+      /**
+       * @brief Move constructs a %independent_bits_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param rng An existing (base class) engine object.
+       */
+      explicit
+      independent_bits_engine(_RandomNumberEngine&& __rne)
+      : _M_b(std::move(__rne)) { }
+
+      /**
+       * @brief Seed constructs a %independent_bits_engine engine.
+       *
+       * Constructs the underlying generator engine seeded with @p __s.
+       * @param __s A seed value for the base class engine.
+       */
+      explicit
+      independent_bits_engine(result_type __s)
+      : _M_b(__s) { }
+
+      /**
+       * @brief Generator construct a %independent_bits_engine engine.
+       *
+       * @param __q A seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+	std::enable_if<!std::is_same<_Sseq, independent_bits_engine>::value
+		       && !std::is_same<_Sseq, _RandomNumberEngine>::value>
+               ::type>
+        explicit
+        independent_bits_engine(_Sseq& __q)
+        : _M_b(__q)
+        { }
+
+      /**
+       * @brief Reseeds the %independent_bits_engine object with the default
+       *        seed for the underlying base class generator engine.
+       */
+      void
+      seed()
+      { _M_b.seed(); }
+
+      /**
+       * @brief Reseeds the %independent_bits_engine object with the default
+       *        seed for the underlying base class generator engine.
+       */
+      void
+      seed(result_type __s)
+      { _M_b.seed(__s); }
+
+      /**
+       * @brief Reseeds the %independent_bits_engine object with the given
+       *        seed sequence.
+       * @param __q A seed generator function.
+       */
+      template<typename _Sseq>
+        void
+        seed(_Sseq& __q)
+        { _M_b.seed(__q); }
+
+      /**
+       * @brief Gets a const reference to the underlying generator engine
+       *        object.
+       */
+      const _RandomNumberEngine&
+      base() const
+      { return _M_b; }
+
+      /**
+       * @brief Gets the minimum value in the generated random number range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      min() const
+      { return 0U; }
+
+      /**
+       * @brief Gets the maximum value in the generated random number range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      max() const
+      { return __detail::_Shift<_UIntType, __w>::__value - 1; }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       *
+       * @todo Look for a faster way to do discard.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * @brief Gets the next value in the generated random number sequence.
+       */
+      result_type
+      operator()();
+
+      /**
+       * @brief Compares two %independent_bits_engine random number generator
+       * objects of the same type for equality.
+       *
+       * @param __lhs A %independent_bits_engine random number generator
+       *              object.
+       * @param __rhs Another %independent_bits_engine random number generator
+       *              object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+       */
+      friend bool
+      operator==(const independent_bits_engine& __lhs,
+		 const independent_bits_engine& __rhs)
+      { return __lhs._M_b == __rhs._M_b; }
+
+      /**
+       * @brief Extracts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %independent_bits_engine random number generator
+       *             engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       *          an error state.
+       */
+      template<typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>& __is,
+		   std::independent_bits_engine<_RandomNumberEngine,
+		   __w, _UIntType>& __x)
+	{
+	  __is >> __x._M_b;
+	  return __is;
+	}
+
+    private:
+      _RandomNumberEngine _M_b;
+    };
+
+  /**
+   * @brief Compares two %independent_bits_engine random number generator
+   * objects of the same type for inequality.
+   *
+   * @param __lhs A %independent_bits_engine random number generator
+   *              object.
+   * @param __rhs Another %independent_bits_engine random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _RandomNumberEngine, size_t __w, typename _UIntType>
+    inline bool
+    operator!=(const std::independent_bits_engine<_RandomNumberEngine, __w,
+	       _UIntType>& __lhs,
+	       const std::independent_bits_engine<_RandomNumberEngine, __w,
+	       _UIntType>& __rhs)
+    { return !(__lhs == __rhs); }
+
+  /**
+   * @brief Inserts the current state of a %independent_bits_engine random
+   *        number generator engine @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %independent_bits_engine random number generator engine.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   *          an error state.
+   */
+  template<typename _RandomNumberEngine, size_t __w, typename _UIntType,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const std::independent_bits_engine<_RandomNumberEngine,
+	       __w, _UIntType>& __x)
+    {
+      __os << __x.base();
+      return __os;
+    }
+
+
+  /**
+   * @brief Produces random numbers by combining random numbers from some
+   * base engine to produce random numbers with a specifies number of bits
+   * @p __w.
+   */
+  template<typename _RandomNumberEngine, size_t __k>
+    class shuffle_order_engine
+    {
+      static_assert(1u <= __k, "template argument substituting "
+		    "__k out of bound");
+
+    public:
+      /** The type of the generated random value. */
+      typedef typename _RandomNumberEngine::result_type result_type;
+
+      static const size_t table_size = __k;
+
+      /**
+       * @brief Constructs a default %shuffle_order_engine engine.
+       *
+       * The underlying engine is default constructed as well.
+       */
+      shuffle_order_engine()
+      : _M_b()
+      { _M_initialize(); }
+
+      /**
+       * @brief Copy constructs a %shuffle_order_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param rng An existing (base class) engine object.
+       */
+      explicit
+      shuffle_order_engine(const _RandomNumberEngine& __rne)
+      : _M_b(__rne)
+      { _M_initialize(); }
+
+      /**
+       * @brief Move constructs a %shuffle_order_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param rng An existing (base class) engine object.
+       */
+      explicit
+      shuffle_order_engine(_RandomNumberEngine&& __rne)
+      : _M_b(std::move(__rne))
+      { _M_initialize(); }
+
+      /**
+       * @brief Seed constructs a %shuffle_order_engine engine.
+       *
+       * Constructs the underlying generator engine seeded with @p __s.
+       * @param __s A seed value for the base class engine.
+       */
+      explicit
+      shuffle_order_engine(result_type __s)
+      : _M_b(__s)
+      { _M_initialize(); }
+
+      /**
+       * @brief Generator construct a %shuffle_order_engine engine.
+       *
+       * @param __q A seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+	std::enable_if<!std::is_same<_Sseq, shuffle_order_engine>::value
+		       && !std::is_same<_Sseq, _RandomNumberEngine>::value>
+	       ::type>
+        explicit
+        shuffle_order_engine(_Sseq& __q)
+        : _M_b(__q)
+        { _M_initialize(); }
+
+      /**
+       * @brief Reseeds the %shuffle_order_engine object with the default seed
+                for the underlying base class generator engine.
+       */
+      void
+      seed()
+      {
+	_M_b.seed();
+	_M_initialize();
+      }
+
+      /**
+       * @brief Reseeds the %shuffle_order_engine object with the default seed
+       *        for the underlying base class generator engine.
+       */
+      void
+      seed(result_type __s)
+      {
+	_M_b.seed(__s);
+	_M_initialize();
+      }
+
+      /**
+       * @brief Reseeds the %shuffle_order_engine object with the given seed
+       *        sequence.
+       * @param __q A seed generator function.
+       */
+      template<typename _Sseq>
+        void
+        seed(_Sseq& __q)
+        {
+	  _M_b.seed(__q);
+	  _M_initialize();
+	}
+
+      /**
+       * Gets a const reference to the underlying generator engine object.
+       */
+      const _RandomNumberEngine&
+      base() const
+      { return _M_b; }
+
+      /**
+       * Gets the minimum value in the generated random number range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      min() const
+      { return _M_b.min(); }
+
+      /**
+       * Gets the maximum value in the generated random number range.
+       *
+       * @todo This should be constexpr.
+       */
+      result_type
+      max() const
+      { return _M_b.max(); }
+
+      /**
+       * Discard a sequence of random numbers.
+       *
+       * @todo Look for a faster way to do discard.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * Gets the next value in the generated random number sequence.
+       */
+      result_type
+      operator()();
+
+      /**
+       * Compares two %shuffle_order_engine random number generator objects
+       * of the same type for equality.
+       *
+       * @param __lhs A %shuffle_order_engine random number generator object.
+       * @param __rhs Another %shuffle_order_engine random number generator
+       *              object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+      */
+      friend bool
+      operator==(const shuffle_order_engine& __lhs,
+		 const shuffle_order_engine& __rhs)
+      { return __lhs._M_b == __rhs._M_b; }
+
+      /**
+       * @brief Inserts the current state of a %shuffle_order_engine random
+       *        number generator engine @p __x into the output stream
+	@p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %shuffle_order_engine random number generator engine.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RandomNumberEngine1, size_t __k1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::shuffle_order_engine<_RandomNumberEngine1,
+		   __k1>&);
+
+      /**
+       * @brief Extracts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %shuffle_order_engine random number generator engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       * an error state.
+       */
+      template<typename _RandomNumberEngine1, size_t __k1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::shuffle_order_engine<_RandomNumberEngine1, __k1>&);
+
+    private:
+      void _M_initialize()
+      {
+	for (size_t __i = 0; __i < __k; ++__i)
+	  _M_v[__i] = _M_b();
+	_M_y = _M_b();
+      }
+
+      _RandomNumberEngine _M_b;
+      result_type _M_v[__k];
+      result_type _M_y;
+    };
+
+  /**
+   * Compares two %shuffle_order_engine random number generator objects
+   * of the same type for inequality.
+   *
+   * @param __lhs A %shuffle_order_engine random number generator object.
+   * @param __rhs Another %shuffle_order_engine random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _RandomNumberEngine, size_t __k>
+    inline bool
+    operator!=(const std::shuffle_order_engine<_RandomNumberEngine,
+	       __k>& __lhs,
+	       const std::shuffle_order_engine<_RandomNumberEngine,
+	       __k>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * The classic Minimum Standard rand0 of Lewis, Goodman, and Miller.
+   */
+  typedef linear_congruential_engine<uint_fast32_t, 16807UL, 0UL, 2147483647UL>
+  minstd_rand0;
+
+  /**
+   * An alternative LCR (Lehmer Generator function).
+   */
+  typedef linear_congruential_engine<uint_fast32_t, 48271UL, 0UL, 2147483647UL>
+  minstd_rand;
+
+  /**
+   * The classic Mersenne Twister.
+   *
+   * Reference:
+   * M. Matsumoto and T. Nishimura, Mersenne Twister: A 623-Dimensionally
+   * Equidistributed Uniform Pseudo-Random Number Generator, ACM Transactions
+   * on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
+   */
+  typedef mersenne_twister_engine<
+    uint_fast32_t,
+    32, 624, 397, 31,
+    0x9908b0dfUL, 11,
+    0xffffffffUL, 7,
+    0x9d2c5680UL, 15,
+    0xefc60000UL, 18, 1812433253UL> mt19937;
+
+  /**
+   * An alternative Mersenne Twister.
+   */
+  typedef mersenne_twister_engine<
+    uint_fast64_t,
+    64, 312, 156, 31,
+    0xb5026f5aa96619e9ULL, 29,
+    0x5555555555555555ULL, 17,
+    0x71d67fffeda60000ULL, 37,
+    0xfff7eee000000000ULL, 43,
+    6364136223846793005ULL> mt19937_64;
+
+  typedef subtract_with_carry_engine<uint_fast32_t, 24, 10, 24>
+    ranlux24_base;
+
+  typedef subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>
+    ranlux48_base;
+
+  typedef discard_block_engine<ranlux24_base, 223, 23> ranlux24;
+
+  typedef discard_block_engine<ranlux48_base, 389, 11> ranlux48;
+
+  typedef shuffle_order_engine<minstd_rand0, 256> knuth_b;
+
+  typedef minstd_rand0 default_random_engine;
+
+  /**
+   * A standard interface to a platform-specific non-deterministic
+   * random number generator (if any are available).
+   */
+  class random_device
+  {
+  public:
+    /** The type of the generated random value. */
+    typedef unsigned int result_type;
+
+    // constructors, destructors and member functions
+
+#ifdef _GLIBCXX_USE_RANDOM_TR1
+
+    explicit
+    random_device(const std::string& __token = "/dev/urandom")
+    {
+      if ((__token != "/dev/urandom" && __token != "/dev/random")
+	  || !(_M_file = std::fopen(__token.c_str(), "rb")))
+	std::__throw_runtime_error(__N("random_device::"
+				       "random_device(const std::string&)"));
+    }
+
+    ~random_device()
+    { std::fclose(_M_file); }
+
+#else
+
+    explicit
+    random_device(const std::string& __token = "mt19937")
+    : _M_mt(_M_strtoul(__token)) { }
+
+  private:
+    static unsigned long
+    _M_strtoul(const std::string& __str)
+    {
+      unsigned long __ret = 5489UL;
+      if (__str != "mt19937")
+	{
+	  const char* __nptr = __str.c_str();
+	  char* __endptr;
+	  __ret = std::strtoul(__nptr, &__endptr, 0);
+	  if (*__nptr == '\0' || *__endptr != '\0')
+	    std::__throw_runtime_error(__N("random_device::_M_strtoul"
+					   "(const std::string&)"));
+	}
+      return __ret;
+    }
+
+  public:
+
+#endif
+
+    result_type
+    min() const
+    { return std::numeric_limits<result_type>::min(); }
+
+    result_type
+    max() const
+    { return std::numeric_limits<result_type>::max(); }
+
+    double
+    entropy() const
+    { return 0.0; }
+
+    result_type
+    operator()()
+    {
+#ifdef _GLIBCXX_USE_RANDOM_TR1
+      result_type __ret;
+      std::fread(reinterpret_cast<void*>(&__ret), sizeof(result_type),
+		 1, _M_file);
+      return __ret;
+#else
+      return _M_mt();
+#endif
+    }
+
+    // No copy functions.
+    random_device(const random_device&) = delete;
+    void operator=(const random_device&) = delete;
+
+  private:
+
+#ifdef _GLIBCXX_USE_RANDOM_TR1
+    FILE*        _M_file;
+#else
+    mt19937      _M_mt;
+#endif
+  };
+
+  /* @} */ // group random_generators
+
+  /**
+   * @addtogroup random_distributions Random Number Distributions
+   * @ingroup random
+   * @{
+   */
+
+  /**
+   * @addtogroup random_distributions_uniform Uniform
+   * @ingroup random_distributions
+   * @{
+   */
+
+  /**
+   * @brief Uniform discrete distribution for random numbers.
+   * A discrete random distribution on the range @f$[min, max]@f$ with equal
+   * probability throughout the range.
+   */
+  template<typename _IntType = int>
+    class uniform_int_distribution
+    {
+      static_assert(std::is_integral<_IntType>::value,
+		    "template argument not an integral type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _IntType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef uniform_int_distribution<_IntType> distribution_type;
+
+	explicit
+	param_type(_IntType __a = 0,
+		   _IntType __b = std::numeric_limits<_IntType>::max())
+	: _M_a(__a), _M_b(__b)
+	{
+	  _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b);
+	}
+
+	result_type
+	a() const
+	{ return _M_a; }
+
+	result_type
+	b() const
+	{ return _M_b; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
+
+      private:
+	_IntType _M_a;
+	_IntType _M_b;
+      };
+
+    public:
+      /**
+       * @brief Constructs a uniform distribution object.
+       */
+      explicit
+      uniform_int_distribution(_IntType __a = 0,
+			   _IntType __b = std::numeric_limits<_IntType>::max())
+      : _M_param(__a, __b)
+      { }
+
+      explicit
+      uniform_int_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       *
+       * Does nothing for the uniform integer distribution.
+       */
+      void
+      reset() { }
+
+      result_type
+      a() const
+      { return _M_param.a(); }
+
+      result_type
+      b() const
+      { return _M_param.b(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the inclusive lower bound of the distribution range.
+       */
+      result_type
+      min() const
+      { return this->a(); }
+
+      /**
+       * @brief Returns the inclusive upper bound of the distribution range.
+       */
+      result_type
+      max() const
+      { return this->b(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+        { return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+      param_type _M_param;
+    };
+
+  /**
+   * @brief Return true if two uniform integer distributions have
+   *        the same parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator==(const std::uniform_int_distribution<_IntType>& __d1,
+	       const std::uniform_int_distribution<_IntType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+   * @brief Return true if two uniform integer distributions have
+   *        different parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::uniform_int_distribution<_IntType>& __d1,
+	       const std::uniform_int_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+  /**
+   * @brief Inserts a %uniform_int_distribution random number
+   *        distribution @p __x into the output stream @p os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %uniform_int_distribution random number distribution.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   * an error state.
+   */
+  template<typename _IntType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>&,
+	       const std::uniform_int_distribution<_IntType>&);
+
+  /**
+   * @brief Extracts a %uniform_int_distribution random number distribution
+   * @p __x from the input stream @p __is.
+   *
+   * @param __is An input stream.
+   * @param __x  A %uniform_int_distribution random number generator engine.
+   *
+   * @returns The input stream with @p __x extracted or in an error state.
+   */
+  template<typename _IntType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>&,
+	       std::uniform_int_distribution<_IntType>&);
+
+
+  /**
+   * @brief Uniform continuous distribution for random numbers.
+   *
+   * A continuous random distribution on the range [min, max) with equal
+   * probability throughout the range.  The URNG should be real-valued and
+   * deliver number in the range [0, 1).
+   */
+  template<typename _RealType = double>
+    class uniform_real_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef uniform_real_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __a = _RealType(0),
+		   _RealType __b = _RealType(1))
+	: _M_a(__a), _M_b(__b)
+	{
+	  _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b);
+	}
+
+	result_type
+	a() const
+	{ return _M_a; }
+
+	result_type
+	b() const
+	{ return _M_b; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
+
+      private:
+	_RealType _M_a;
+	_RealType _M_b;
+      };
+
+    public:
+      /**
+       * @brief Constructs a uniform_real_distribution object.
+       *
+       * @param __min [IN]  The lower bound of the distribution.
+       * @param __max [IN]  The upper bound of the distribution.
+       */
+      explicit
+      uniform_real_distribution(_RealType __a = _RealType(0),
+				_RealType __b = _RealType(1))
+      : _M_param(__a, __b)
+      { }
+
+      explicit
+      uniform_real_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       *
+       * Does nothing for the uniform real distribution.
+       */
+      void
+      reset() { }
+
+      result_type
+      a() const
+      { return _M_param.a(); }
+
+      result_type
+      b() const
+      { return _M_param.b(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the inclusive lower bound of the distribution range.
+       */
+      result_type
+      min() const
+      { return this->a(); }
+
+      /**
+       * @brief Returns the inclusive upper bound of the distribution range.
+       */
+      result_type
+      max() const
+      { return this->b(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+        { return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p)
+	{
+	  __detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+	    __aurng(__urng);
+	  return (__aurng() * (__p.b() - __p.a())) + __p.a();
+	}
+
+    private:
+      param_type _M_param;
+    };
+
+  /**
+   * @brief Return true if two uniform real distributions have
+   *        the same parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator==(const std::uniform_real_distribution<_IntType>& __d1,
+	       const std::uniform_real_distribution<_IntType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+   * @brief Return true if two uniform real distributions have
+   *        different parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::uniform_real_distribution<_IntType>& __d1,
+	       const std::uniform_real_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+  /**
+   * @brief Inserts a %uniform_real_distribution random number
+   *        distribution @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %uniform_real_distribution random number distribution.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   *          an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>&,
+	       const std::uniform_real_distribution<_RealType>&);
+
+  /**
+   * @brief Extracts a %uniform_real_distribution random number distribution
+   * @p __x from the input stream @p __is.
+   *
+   * @param __is An input stream.
+   * @param __x  A %uniform_real_distribution random number generator engine.
+   *
+   * @returns The input stream with @p __x extracted or in an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>&,
+	       std::uniform_real_distribution<_RealType>&);
+
+  /* @} */ // group random_distributions_uniform
+
+  /**
+   * @addtogroup random_distributions_normal Normal
+   * @ingroup random_distributions
+   * @{
+   */
+
+  /**
+   * @brief A normal continuous distribution for random numbers.
+   *
+   * The formula for the normal probability density function is
+   * @f[
+   *     p(x|\mu,\sigma) = \frac{1}{\sigma \sqrt{2 \pi}}
+   *            e^{- \frac{{x - \mu}^ {2}}{2 \sigma ^ {2}} } 
+   * @f]
+   */
+  template<typename _RealType = double>
+    class normal_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef normal_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __mean = _RealType(0),
+		   _RealType __stddev = _RealType(1))
+	: _M_mean(__mean), _M_stddev(__stddev)
+	{
+	  _GLIBCXX_DEBUG_ASSERT(_M_stddev > _RealType(0));
+	}
+
+	_RealType
+	mean() const
+	{ return _M_mean; }
+
+	_RealType
+	stddev() const
+	{ return _M_stddev; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return (__p1._M_mean == __p2._M_mean
+		  && __p1._M_stddev == __p2._M_stddev); }
+
+      private:
+	_RealType _M_mean;
+	_RealType _M_stddev;
+      };
+
+    public:
+      /**
+       * Constructs a normal distribution with parameters @f$mean@f$ and
+       * standard deviation.
+       */
+      explicit
+      normal_distribution(result_type __mean = result_type(0),
+			  result_type __stddev = result_type(1))
+      : _M_param(__mean, __stddev), _M_saved_available(false)
+      { }
+
+      explicit
+      normal_distribution(const param_type& __p)
+      : _M_param(__p), _M_saved_available(false)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { _M_saved_available = false; }
+
+      /**
+       * @brief Returns the mean of the distribution.
+       */
+      _RealType
+      mean() const
+      { return _M_param.mean(); }
+
+      /**
+       * @brief Returns the standard deviation of the distribution.
+       */
+      _RealType
+      stddev() const
+      { return _M_param.stddev(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return std::numeric_limits<result_type>::min(); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+      /**
+       * @brief Return true if two normal distributions have
+       *        the same parameters and the sequences that would
+       *        be generated are equal.
+       */
+      template<typename _RealType1>
+	friend bool
+        operator==(const std::normal_distribution<_RealType1>& __d1,
+		   const std::normal_distribution<_RealType1>& __d2);
+
+      /**
+       * @brief Inserts a %normal_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %normal_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::normal_distribution<_RealType1>&);
+
+      /**
+       * @brief Extracts a %normal_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %normal_distribution random number generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error
+       *          state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::normal_distribution<_RealType1>&);
+
+    private:
+      param_type  _M_param;
+      result_type _M_saved;
+      bool        _M_saved_available;
+    };
+
+  /**
+   * @brief Return true if two normal distributions are different.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::normal_distribution<_RealType>& __d1,
+	       const std::normal_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /**
+   * @brief A lognormal_distribution random number distribution.
+   *
+   * The formula for the normal probability mass function is
+   * @f[
+   *     p(x|m,s) = \frac{1}{sx\sqrt{2\pi}}
+   *                \exp{-\frac{(\ln{x} - m)^2}{2s^2}} 
+   * @f]
+   */
+  template<typename _RealType = double>
+    class lognormal_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef lognormal_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __m = _RealType(0),
+		   _RealType __s = _RealType(1))
+	: _M_m(__m), _M_s(__s)
+	{ }
+
+	_RealType
+	m() const
+	{ return _M_m; }
+
+	_RealType
+	s() const
+	{ return _M_s; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_m == __p2._M_m && __p1._M_s == __p2._M_s; }
+
+      private:
+	_RealType _M_m;
+	_RealType _M_s;
+      };
+
+      explicit
+      lognormal_distribution(_RealType __m = _RealType(0),
+			     _RealType __s = _RealType(1))
+      : _M_param(__m, __s), _M_nd()
+      { }
+
+      explicit
+      lognormal_distribution(const param_type& __p)
+      : _M_param(__p), _M_nd()
+      { }
+
+      /**
+       * Resets the distribution state.
+       */
+      void
+      reset()
+      { _M_nd.reset(); }
+
+      /**
+       *
+       */
+      _RealType
+      m() const
+      { return _M_param.m(); }
+
+      _RealType
+      s() const
+      { return _M_param.s(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return result_type(0); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p)
+        { return std::exp(__p.s() * _M_nd(__urng) + __p.m()); }
+
+      /**
+       * @brief Return true if two lognormal distributions have
+       *        the same parameters and the sequences that would
+       *        be generated are equal.
+       */
+      template<typename _RealType1>
+        friend bool
+        operator==(const std::lognormal_distribution<_RealType1>& __d1,
+		   const std::lognormal_distribution<_RealType1>& __d2)
+        { return (__d1.param() == __d2.param()
+		  && __d1._M_nd == __d2._M_nd); }
+
+      /**
+       * @brief Inserts a %lognormal_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %lognormal_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::lognormal_distribution<_RealType1>&);
+
+      /**
+       * @brief Extracts a %lognormal_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x A %lognormal_distribution random number
+       *            generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::lognormal_distribution<_RealType1>&);
+
+    private:
+      param_type _M_param;
+
+      std::normal_distribution<result_type> _M_nd;
+    };
+
+  /**
+   * @brief Return true if two lognormal distributions are different.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::lognormal_distribution<_RealType>& __d1,
+	       const std::lognormal_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /**
+   * @brief A gamma continuous distribution for random numbers.
+   *
+   * The formula for the gamma probability density function is:
+   * @f[
+   *     p(x|\alpha,\beta) = \frac{1}{\beta\Gamma(\alpha)}
+   *                         (x/\beta)^{\alpha - 1} e^{-x/\beta} 
+   * @f]
+   */
+  template<typename _RealType = double>
+    class gamma_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef gamma_distribution<_RealType> distribution_type;
+	friend class gamma_distribution<_RealType>;
+
+	explicit
+	param_type(_RealType __alpha_val = _RealType(1),
+		   _RealType __beta_val = _RealType(1))
+	: _M_alpha(__alpha_val), _M_beta(__beta_val)
+	{
+	  _GLIBCXX_DEBUG_ASSERT(_M_alpha > _RealType(0));
+	  _M_initialize();
+	}
+
+	_RealType
+	alpha() const
+	{ return _M_alpha; }
+
+	_RealType
+	beta() const
+	{ return _M_beta; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return (__p1._M_alpha == __p2._M_alpha
+		  && __p1._M_beta == __p2._M_beta); }
+
+      private:
+	void
+	_M_initialize();
+
+	_RealType _M_alpha;
+	_RealType _M_beta;
+
+	_RealType _M_malpha, _M_a2;
+      };
+
+    public:
+      /**
+       * @brief Constructs a gamma distribution with parameters
+       * @f$\alpha@f$ and @f$\beta@f$.
+       */
+      explicit
+      gamma_distribution(_RealType __alpha_val = _RealType(1),
+			 _RealType __beta_val = _RealType(1))
+      : _M_param(__alpha_val, __beta_val), _M_nd()
+      { }
+
+      explicit
+      gamma_distribution(const param_type& __p)
+      : _M_param(__p), _M_nd()
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { _M_nd.reset(); }
+
+      /**
+       * @brief Returns the @f$\alpha@f$ of the distribution.
+       */
+      _RealType
+      alpha() const
+      { return _M_param.alpha(); }
+
+      /**
+       * @brief Returns the @f$\beta@f$ of the distribution.
+       */
+      _RealType
+      beta() const
+      { return _M_param.beta(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return result_type(0); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+      /**
+       * @brief Return true if two gamma distributions have the same
+       *        parameters and the sequences that would be generated
+       *        are equal.
+       */
+      template<typename _RealType1>
+        friend bool
+        operator==(const std::gamma_distribution<_RealType1>& __d1,
+		   const std::gamma_distribution<_RealType1>& __d2)
+        { return (__d1.param() == __d2.param()
+		  && __d1._M_nd == __d2._M_nd); }
+
+      /**
+       * @brief Inserts a %gamma_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %gamma_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::gamma_distribution<_RealType1>&);
+
+      /**
+       * @brief Extracts a %gamma_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %gamma_distribution random number generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::gamma_distribution<_RealType1>&);
+
+    private:
+      param_type _M_param;
+
+      std::normal_distribution<result_type> _M_nd;
+    };
+
+  /**
+   * @brief Return true if two gamma distributions are different.
+   */
+   template<typename _RealType>
+    inline bool
+     operator!=(const std::gamma_distribution<_RealType>& __d1,
+		const std::gamma_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /**
+   * @brief A chi_squared_distribution random number distribution.
+   *
+   * The formula for the normal probability mass function is
+   * @f$p(x|n) = \frac{x^{(n/2) - 1}e^{-x/2}}{\Gamma(n/2) 2^{n/2}}@f$
+   */
+  template<typename _RealType = double>
+    class chi_squared_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef chi_squared_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __n = _RealType(1))
+	: _M_n(__n)
+	{ }
+
+	_RealType
+	n() const
+	{ return _M_n; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_n == __p2._M_n; }
+
+      private:
+	_RealType _M_n;
+      };
+
+      explicit
+      chi_squared_distribution(_RealType __n = _RealType(1))
+      : _M_param(__n), _M_gd(__n / 2)
+      { }
+
+      explicit
+      chi_squared_distribution(const param_type& __p)
+      : _M_param(__p), _M_gd(__p.n() / 2)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { _M_gd.reset(); }
+
+      /**
+       *
+       */
+      _RealType
+      n() const
+      { return _M_param.n(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return result_type(0); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return 2 * _M_gd(__urng); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p)
+        {
+	  typedef typename std::gamma_distribution<result_type>::param_type
+	    param_type;
+	  return 2 * _M_gd(__urng, param_type(__p.n() / 2));
+	}
+
+      /**
+       * @brief Return true if two Chi-squared distributions have
+       *        the same parameters and the sequences that would be
+       *        generated are equal.
+       */
+      template<typename _RealType1>
+        friend bool
+        operator==(const std::chi_squared_distribution<_RealType1>& __d1,
+		   const std::chi_squared_distribution<_RealType1>& __d2)
+        { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; }
+
+      /**
+       * @brief Inserts a %chi_squared_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %chi_squared_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::chi_squared_distribution<_RealType1>&);
+
+      /**
+       * @brief Extracts a %chi_squared_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x A %chi_squared_distribution random number
+       *            generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::chi_squared_distribution<_RealType1>&);
+
+    private:
+      param_type _M_param;
+
+      std::gamma_distribution<result_type> _M_gd;
+    };
+
+  /**
+   * @brief Return true if two Chi-squared distributions are different.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::chi_squared_distribution<_RealType>& __d1,
+	       const std::chi_squared_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /**
+   * @brief A cauchy_distribution random number distribution.
+   *
+   * The formula for the normal probability mass function is
+   * @f$p(x|a,b) = (\pi b (1 + (\frac{x-a}{b})^2))^{-1}@f$
+   */
+  template<typename _RealType = double>
+    class cauchy_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef cauchy_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __a = _RealType(0),
+		   _RealType __b = _RealType(1))
+	: _M_a(__a), _M_b(__b)
+	{ }
+
+	_RealType
+	a() const
+	{ return _M_a; }
+
+	_RealType
+	b() const
+	{ return _M_b; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
+
+      private:
+	_RealType _M_a;
+	_RealType _M_b;
+      };
+
+      explicit
+      cauchy_distribution(_RealType __a = _RealType(0),
+			  _RealType __b = _RealType(1))
+      : _M_param(__a, __b)
+      { }
+
+      explicit
+      cauchy_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { }
+
+      /**
+       *
+       */
+      _RealType
+      a() const
+      { return _M_param.a(); }
+
+      _RealType
+      b() const
+      { return _M_param.b(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return std::numeric_limits<result_type>::min(); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+    private:
+      param_type _M_param;
+    };
+
+  /**
+   * @brief Return true if two Cauchy distributions have
+   *        the same parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator==(const std::cauchy_distribution<_RealType>& __d1,
+	       const std::cauchy_distribution<_RealType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+   * @brief Return true if two Cauchy distributions have
+   *        different parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::cauchy_distribution<_RealType>& __d1,
+	       const std::cauchy_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+  /**
+   * @brief Inserts a %cauchy_distribution random number distribution
+   * @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %cauchy_distribution random number distribution.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   * an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>&,
+	       const std::cauchy_distribution<_RealType>&);
+
+  /**
+   * @brief Extracts a %cauchy_distribution random number distribution
+   * @p __x from the input stream @p __is.
+   *
+   * @param __is An input stream.
+   * @param __x A %cauchy_distribution random number
+   *            generator engine.
+   *
+   * @returns The input stream with @p __x extracted or in an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>&,
+	       std::cauchy_distribution<_RealType>&);
+
+
+  /**
+   * @brief A fisher_f_distribution random number distribution.
+   *
+   * The formula for the normal probability mass function is
+   * @f[
+   *     p(x|m,n) = \frac{\Gamma((m+n)/2)}{\Gamma(m/2)\Gamma(n/2)}
+   *                (\frac{m}{n})^{m/2} x^{(m/2)-1}
+   *                (1 + \frac{mx}{n})^{-(m+n)/2} 
+   * @f]
+   */
+  template<typename _RealType = double>
+    class fisher_f_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef fisher_f_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __m = _RealType(1),
+		   _RealType __n = _RealType(1))
+	: _M_m(__m), _M_n(__n)
+	{ }
+
+	_RealType
+	m() const
+	{ return _M_m; }
+
+	_RealType
+	n() const
+	{ return _M_n; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; }
+
+      private:
+	_RealType _M_m;
+	_RealType _M_n;
+      };
+
+      explicit
+      fisher_f_distribution(_RealType __m = _RealType(1),
+			    _RealType __n = _RealType(1))
+      : _M_param(__m, __n), _M_gd_x(__m / 2), _M_gd_y(__n / 2)
+      { }
+
+      explicit
+      fisher_f_distribution(const param_type& __p)
+      : _M_param(__p), _M_gd_x(__p.m() / 2), _M_gd_y(__p.n() / 2)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      {
+	_M_gd_x.reset();
+	_M_gd_y.reset();
+      }
+
+      /**
+       *
+       */
+      _RealType
+      m() const
+      { return _M_param.m(); }
+
+      _RealType
+      n() const
+      { return _M_param.n(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return result_type(0); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return (_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p)
+        {
+	  typedef typename std::gamma_distribution<result_type>::param_type
+	    param_type;
+	  return ((_M_gd_x(__urng, param_type(__p.m() / 2)) * n())
+		  / (_M_gd_y(__urng, param_type(__p.n() / 2)) * m()));
+	}
+
+      /**
+       * @brief Return true if two Fisher f distributions have
+       *        the same parameters and the sequences that would
+       *        be generated are equal.
+       */
+      template<typename _RealType1>
+        friend bool
+        operator==(const std::fisher_f_distribution<_RealType1>& __d1,
+		   const std::fisher_f_distribution<_RealType1>& __d2)
+        { return (__d1.param() == __d2.param()
+		  && __d1._M_gd_x == __d2._M_gd_x
+		  && __d1._M_gd_y == __d2._M_gd_y); }
+
+      /**
+       * @brief Inserts a %fisher_f_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %fisher_f_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::fisher_f_distribution<_RealType1>&);
+
+      /**
+       * @brief Extracts a %fisher_f_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x A %fisher_f_distribution random number
+       *            generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::fisher_f_distribution<_RealType1>&);
+
+    private:
+      param_type _M_param;
+
+      std::gamma_distribution<result_type> _M_gd_x, _M_gd_y;
+    };
+
+  /**
+   * @brief Return true if two Fisher f distributions are diferent.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::fisher_f_distribution<_RealType>& __d1,
+	       const std::fisher_f_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+  /**
+   * @brief A student_t_distribution random number distribution.
+   *
+   * The formula for the normal probability mass function is:
+   * @f[
+   *     p(x|n) = \frac{1}{\sqrt(n\pi)} \frac{\Gamma((n+1)/2)}{\Gamma(n/2)}
+   *              (1 + \frac{x^2}{n}) ^{-(n+1)/2} 
+   * @f]
+   */
+  template<typename _RealType = double>
+    class student_t_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef student_t_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __n = _RealType(1))
+	: _M_n(__n)
+	{ }
+
+	_RealType
+	n() const
+	{ return _M_n; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_n == __p2._M_n; }
+
+      private:
+	_RealType _M_n;
+      };
+
+      explicit
+      student_t_distribution(_RealType __n = _RealType(1))
+      : _M_param(__n), _M_nd(), _M_gd(__n / 2, 2)
+      { }
+
+      explicit
+      student_t_distribution(const param_type& __p)
+      : _M_param(__p), _M_nd(), _M_gd(__p.n() / 2, 2)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      {
+	_M_nd.reset();
+	_M_gd.reset();
+      }
+
+      /**
+       *
+       */
+      _RealType
+      n() const
+      { return _M_param.n(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return std::numeric_limits<result_type>::min(); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+        operator()(_UniformRandomNumberGenerator& __urng)
+        { return _M_nd(__urng) * std::sqrt(n() / _M_gd(__urng)); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p)
+        {
+	  typedef typename std::gamma_distribution<result_type>::param_type
+	    param_type;
+	
+	  const result_type __g = _M_gd(__urng, param_type(__p.n() / 2, 2));
+	  return _M_nd(__urng) * std::sqrt(__p.n() / __g);
+        }
+
+      /**
+       * @brief Return true if two Student t distributions have
+       *        the same parameters and the sequences that would
+       *        be generated are equal.
+       */
+      template<typename _RealType1>
+        friend bool
+        operator==(const std::student_t_distribution<_RealType1>& __d1,
+		   const std::student_t_distribution<_RealType1>& __d2)
+        { return (__d1.param() == __d2.param()
+		  && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); }
+
+      /**
+       * @brief Inserts a %student_t_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %student_t_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::student_t_distribution<_RealType1>&);
+
+      /**
+       * @brief Extracts a %student_t_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x A %student_t_distribution random number
+       *            generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::student_t_distribution<_RealType1>&);
+
+    private:
+      param_type _M_param;
+
+      std::normal_distribution<result_type> _M_nd;
+      std::gamma_distribution<result_type> _M_gd;
+    };
+
+  /**
+   * @brief Return true if two Student t distributions are different.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::student_t_distribution<_RealType>& __d1,
+	       const std::student_t_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /* @} */ // group random_distributions_normal
+
+  /**
+   * @addtogroup random_distributions_bernoulli Bernoulli
+   * @ingroup random_distributions
+   * @{
+   */
+
+  /**
+   * @brief A Bernoulli random number distribution.
+   *
+   * Generates a sequence of true and false values with likelihood @f$p@f$
+   * that true will come up and @f$(1 - p)@f$ that false will appear.
+   */
+  class bernoulli_distribution
+  {
+  public:
+    /** The type of the range of the distribution. */
+    typedef bool result_type;
+    /** Parameter type. */
+    struct param_type
+    {
+      typedef bernoulli_distribution distribution_type;
+
+      explicit
+      param_type(double __p = 0.5)
+      : _M_p(__p)
+      {
+	_GLIBCXX_DEBUG_ASSERT((_M_p >= 0.0) && (_M_p <= 1.0));
+      }
+
+      double
+      p() const
+      { return _M_p; }
+
+      friend bool
+      operator==(const param_type& __p1, const param_type& __p2)
+      { return __p1._M_p == __p2._M_p; }
+
+    private:
+      double _M_p;
+    };
+
+  public:
+    /**
+     * @brief Constructs a Bernoulli distribution with likelihood @p p.
+     *
+     * @param __p  [IN]  The likelihood of a true result being returned.
+     *                   Must be in the interval @f$[0, 1]@f$.
+     */
+    explicit
+    bernoulli_distribution(double __p = 0.5)
+    : _M_param(__p)
+    { }
+
+    explicit
+    bernoulli_distribution(const param_type& __p)
+    : _M_param(__p)
+    { }
+
+    /**
+     * @brief Resets the distribution state.
+     *
+     * Does nothing for a Bernoulli distribution.
+     */
+    void
+    reset() { }
+
+    /**
+     * @brief Returns the @p p parameter of the distribution.
+     */
+    double
+    p() const
+    { return _M_param.p(); }
+
+    /**
+     * @brief Returns the parameter set of the distribution.
+     */
+    param_type
+    param() const
+    { return _M_param; }
+
+    /**
+     * @brief Sets the parameter set of the distribution.
+     * @param __param The new parameter set of the distribution.
+     */
+    void
+    param(const param_type& __param)
+    { _M_param = __param; }
+
+    /**
+     * @brief Returns the greatest lower bound value of the distribution.
+     */
+    result_type
+    min() const
+    { return std::numeric_limits<result_type>::min(); }
+
+    /**
+     * @brief Returns the least upper bound value of the distribution.
+     */
+    result_type
+    max() const
+    { return std::numeric_limits<result_type>::max(); }
+
+    /**
+     * @brief Generating functions.
+     */
+    template<typename _UniformRandomNumberGenerator>
+      result_type
+      operator()(_UniformRandomNumberGenerator& __urng)
+      { return this->operator()(__urng, this->param()); }
+
+    template<typename _UniformRandomNumberGenerator>
+      result_type
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __p)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, double>
+	  __aurng(__urng);
+	if ((__aurng() - __aurng.min())
+	     < __p.p() * (__aurng.max() - __aurng.min()))
+	  return true;
+	return false;
+      }
+
+  private:
+    param_type _M_param;
+  };
+
+  /**
+   * @brief Return true if two Bernoulli distributions have
+   *        the same parameters.
+   */
+  inline bool
+  operator==(const std::bernoulli_distribution& __d1,
+	     const std::bernoulli_distribution& __d2)
+  { return __d1.param() == __d2.param(); }
+
+  /**
+   * @brief Return true if two Bernoulli distributions have
+   *        different parameters.
+   */
+  inline bool
+  operator!=(const std::bernoulli_distribution& __d1,
+	     const std::bernoulli_distribution& __d2)
+  { return !(__d1 == __d2); }
+
+  /**
+   * @brief Inserts a %bernoulli_distribution random number distribution
+   * @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %bernoulli_distribution random number distribution.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   * an error state.
+   */
+  template<typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>&,
+	       const std::bernoulli_distribution&);
+
+  /**
+   * @brief Extracts a %bernoulli_distribution random number distribution
+   * @p __x from the input stream @p __is.
+   *
+   * @param __is An input stream.
+   * @param __x  A %bernoulli_distribution random number generator engine.
+   *
+   * @returns The input stream with @p __x extracted or in an error state.
+   */
+  template<typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       std::bernoulli_distribution& __x)
+    {
+      double __p;
+      __is >> __p;
+      __x.param(bernoulli_distribution::param_type(__p));
+      return __is;
+    }
+
+
+  /**
+   * @brief A discrete binomial random number distribution.
+   *
+   * The formula for the binomial probability density function is
+   * @f$p(i|t,p) = \binom{n}{i} p^i (1 - p)^{t - i}@f$ where @f$t@f$
+   * and @f$p@f$ are the parameters of the distribution.
+   */
+  template<typename _IntType = int>
+    class binomial_distribution
+    {
+      static_assert(std::is_integral<_IntType>::value,
+		    "template argument not an integral type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _IntType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef binomial_distribution<_IntType> distribution_type;
+	friend class binomial_distribution<_IntType>;
+
+	explicit
+	param_type(_IntType __t = _IntType(1), double __p = 0.5)
+	: _M_t(__t), _M_p(__p)
+	{
+	  _GLIBCXX_DEBUG_ASSERT((_M_t >= _IntType(0))
+				&& (_M_p >= 0.0)
+				&& (_M_p <= 1.0));
+	  _M_initialize();
+	}
+
+	_IntType
+	t() const
+	{ return _M_t; }
+
+	double
+	p() const
+	{ return _M_p; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; }
+
+      private:
+	void
+	_M_initialize();
+
+	_IntType _M_t;
+	double _M_p;
+
+	double _M_q;
+#if _GLIBCXX_USE_C99_MATH_TR1
+	double _M_d1, _M_d2, _M_s1, _M_s2, _M_c,
+	       _M_a1, _M_a123, _M_s, _M_lf, _M_lp1p;
+#endif
+	bool   _M_easy;
+      };
+
+      // constructors and member function
+      explicit
+      binomial_distribution(_IntType __t = _IntType(1),
+			    double __p = 0.5)
+      : _M_param(__t, __p), _M_nd()
+      { }
+
+      explicit
+      binomial_distribution(const param_type& __p)
+      : _M_param(__p), _M_nd()
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { _M_nd.reset(); }
+
+      /**
+       * @brief Returns the distribution @p t parameter.
+       */
+      _IntType
+      t() const
+      { return _M_param.t(); }
+
+      /**
+       * @brief Returns the distribution @p p parameter.
+       */
+      double
+      p() const
+      { return _M_param.p(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return 0; }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return _M_param.t(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+      /**
+       * @brief Return true if two binomial distributions have
+       *        the same parameters and the sequences that would
+       *        be generated are equal.
+       */
+      template<typename _IntType1>
+	friend bool
+        operator==(const std::binomial_distribution<_IntType1>& __d1,
+		   const std::binomial_distribution<_IntType1>& __d2)
+#ifdef _GLIBCXX_USE_C99_MATH_TR1
+	{ return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
+#else
+        { return __d1.param() == __d2.param(); }
+#endif
+
+      /**
+       * @brief Inserts a %binomial_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %binomial_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _IntType1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::binomial_distribution<_IntType1>&);
+
+      /**
+       * @brief Extracts a %binomial_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %binomial_distribution random number generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error
+       *          state.
+       */
+      template<typename _IntType1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::binomial_distribution<_IntType1>&);
+
+    private:
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	_M_waiting(_UniformRandomNumberGenerator& __urng, _IntType __t);
+
+      param_type _M_param;
+
+      // NB: Unused when _GLIBCXX_USE_C99_MATH_TR1 is undefined.
+      std::normal_distribution<double> _M_nd;
+    };
+
+  /**
+   * @brief Return true if two binomial distributions are different.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::binomial_distribution<_IntType>& __d1,
+	       const std::binomial_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /**
+   * @brief A discrete geometric random number distribution.
+   *
+   * The formula for the geometric probability density function is
+   * @f$p(i|p) = (1 - p)p^{i-1}@f$ where @f$p@f$ is the parameter of the
+   * distribution.
+   */
+  template<typename _IntType = int>
+    class geometric_distribution
+    {
+      static_assert(std::is_integral<_IntType>::value,
+		    "template argument not an integral type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _IntType  result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef geometric_distribution<_IntType> distribution_type;
+	friend class geometric_distribution<_IntType>;
+
+	explicit
+	param_type(double __p = 0.5)
+	: _M_p(__p)
+	{
+	  _GLIBCXX_DEBUG_ASSERT((_M_p >= 0.0)
+			     && (_M_p <= 1.0));
+	  _M_initialize();
+	}
+
+	double
+	p() const
+	{ return _M_p; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_p == __p2._M_p; }
+
+      private:
+	void
+	_M_initialize()
+	{ _M_log_p = std::log(_M_p); }
+
+	double _M_p;
+
+	double _M_log_p;
+      };
+
+      // constructors and member function
+      explicit
+      geometric_distribution(double __p = 0.5)
+      : _M_param(__p)
+      { }
+
+      explicit
+      geometric_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       *
+       * Does nothing for the geometric distribution.
+       */
+      void
+      reset() { }
+
+      /**
+       * @brief Returns the distribution parameter @p p.
+       */
+      double
+      p() const
+      { return _M_param.p(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return 0; }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+    private:
+      param_type _M_param;
+    };
+
+  /**
+   * @brief Return true if two geometric distributions have
+   *        the same parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator==(const std::geometric_distribution<_IntType>& __d1,
+	       const std::geometric_distribution<_IntType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+   * @brief Return true if two geometric distributions have
+   *        different parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::geometric_distribution<_IntType>& __d1,
+	       const std::geometric_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+  /**
+   * @brief Inserts a %geometric_distribution random number distribution
+   * @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %geometric_distribution random number distribution.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   * an error state.
+   */
+  template<typename _IntType,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>&,
+	       const std::geometric_distribution<_IntType>&);
+
+  /**
+   * @brief Extracts a %geometric_distribution random number distribution
+   * @p __x from the input stream @p __is.
+   *
+   * @param __is An input stream.
+   * @param __x  A %geometric_distribution random number generator engine.
+   *
+   * @returns The input stream with @p __x extracted or in an error state.
+   */
+  template<typename _IntType,
+	   typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>&,
+	       std::geometric_distribution<_IntType>&);
+
+
+  /**
+   * @brief A negative_binomial_distribution random number distribution.
+   *
+   * The formula for the negative binomial probability mass function is
+   * @f$p(i) = \binom{n}{i} p^i (1 - p)^{t - i}@f$ where @f$t@f$
+   * and @f$p@f$ are the parameters of the distribution.
+   */
+  template<typename _IntType = int>
+    class negative_binomial_distribution
+    {
+      static_assert(std::is_integral<_IntType>::value,
+		    "template argument not an integral type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _IntType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef negative_binomial_distribution<_IntType> distribution_type;
+
+	explicit
+	param_type(_IntType __k = 1, double __p = 0.5)
+	: _M_k(__k), _M_p(__p)
+	{ }
+
+	_IntType
+	k() const
+	{ return _M_k; }
+
+	double
+	p() const
+	{ return _M_p; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; }
+
+      private:
+	_IntType _M_k;
+	double _M_p;
+      };
+
+      explicit
+      negative_binomial_distribution(_IntType __k = 1, double __p = 0.5)
+      : _M_param(__k, __p), _M_gd(__k, __p / (1.0 - __p))
+      { }
+
+      explicit
+      negative_binomial_distribution(const param_type& __p)
+      : _M_param(__p), _M_gd(__p.k(), __p.p() / (1.0 - __p.p()))
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { _M_gd.reset(); }
+
+      /**
+       * @brief Return the @f$k@f$ parameter of the distribution.
+       */
+      _IntType
+      k() const
+      { return _M_param.k(); }
+
+      /**
+       * @brief Return the @f$p@f$ parameter of the distribution.
+       */
+      double
+      p() const
+      { return _M_param.p(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return result_type(0); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+        operator()(_UniformRandomNumberGenerator& __urng);
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+      /**
+       * @brief Return true if two negative binomial distributions have
+       *        the same parameters and the sequences that would be
+       *        generated are equal.
+       */
+      template<typename _IntType1>
+        friend bool
+        operator==(const std::negative_binomial_distribution<_IntType1>& __d1,
+		   const std::negative_binomial_distribution<_IntType1>& __d2)
+        { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; }
+
+      /**
+       * @brief Inserts a %negative_binomial_distribution random
+       *        number distribution @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %negative_binomial_distribution random number
+       *             distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       *          an error state.
+       */
+      template<typename _IntType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::negative_binomial_distribution<_IntType1>&);
+
+      /**
+       * @brief Extracts a %negative_binomial_distribution random number
+       *        distribution @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x A %negative_binomial_distribution random number
+       *            generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error state.
+       */
+      template<typename _IntType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::negative_binomial_distribution<_IntType1>&);
+
+    private:
+      param_type _M_param;
+
+      std::gamma_distribution<double> _M_gd;
+    };
+
+  /**
+   * @brief Return true if two negative binomial distributions are different.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::negative_binomial_distribution<_IntType>& __d1,
+	       const std::negative_binomial_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /* @} */ // group random_distributions_bernoulli
+
+  /**
+   * @addtogroup random_distributions_poisson Poisson
+   * @ingroup random_distributions
+   * @{
+   */
+
+  /**
+   * @brief A discrete Poisson random number distribution.
+   *
+   * The formula for the Poisson probability density function is
+   * @f$p(i|\mu) = \frac{\mu^i}{i!} e^{-\mu}@f$ where @f$\mu@f$ is the
+   * parameter of the distribution.
+   */
+  template<typename _IntType = int>
+    class poisson_distribution
+    {
+      static_assert(std::is_integral<_IntType>::value,
+		    "template argument not an integral type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _IntType  result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef poisson_distribution<_IntType> distribution_type;
+	friend class poisson_distribution<_IntType>;
+
+	explicit
+	param_type(double __mean = 1.0)
+	: _M_mean(__mean)
+	{
+	  _GLIBCXX_DEBUG_ASSERT(_M_mean > 0.0);
+	  _M_initialize();
+	}
+
+	double
+	mean() const
+	{ return _M_mean; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_mean == __p2._M_mean; }
+
+      private:
+	// Hosts either log(mean) or the threshold of the simple method.
+	void
+	_M_initialize();
+
+	double _M_mean;
+
+	double _M_lm_thr;
+#if _GLIBCXX_USE_C99_MATH_TR1
+	double _M_lfm, _M_sm, _M_d, _M_scx, _M_1cx, _M_c2b, _M_cb;
+#endif
+      };
+
+      // constructors and member function
+      explicit
+      poisson_distribution(double __mean = 1.0)
+      : _M_param(__mean), _M_nd()
+      { }
+
+      explicit
+      poisson_distribution(const param_type& __p)
+      : _M_param(__p), _M_nd()
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { _M_nd.reset(); }
+
+      /**
+       * @brief Returns the distribution parameter @p mean.
+       */
+      double
+      mean() const
+      { return _M_param.mean(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return 0; }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+       /**
+	* @brief Return true if two Poisson distributions have the same
+	*        parameters and the sequences that would be generated
+	*        are equal.
+	*/
+      template<typename _IntType1>
+        friend bool
+        operator==(const std::poisson_distribution<_IntType1>& __d1,
+		   const std::poisson_distribution<_IntType1>& __d2)
+#ifdef _GLIBCXX_USE_C99_MATH_TR1
+        { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
+#else
+        { return __d1.param() == __d2.param(); }
+#endif
+
+      /**
+       * @brief Inserts a %poisson_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %poisson_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _IntType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::poisson_distribution<_IntType1>&);
+
+      /**
+       * @brief Extracts a %poisson_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %poisson_distribution random number generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error
+       *          state.
+       */
+      template<typename _IntType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::poisson_distribution<_IntType1>&);
+
+    private:
+      param_type _M_param;
+
+      // NB: Unused when _GLIBCXX_USE_C99_MATH_TR1 is undefined.
+      std::normal_distribution<double> _M_nd;
+    };
+
+  /**
+   * @brief Return true if two Poisson distributions are different.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::poisson_distribution<_IntType>& __d1,
+	       const std::poisson_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /**
+   * @brief An exponential continuous distribution for random numbers.
+   *
+   * The formula for the exponential probability density function is
+   * @f$p(x|\lambda) = \lambda e^{-\lambda x}@f$.
+   *
+   * <table border=1 cellpadding=10 cellspacing=0>
+   * <caption align=top>Distribution Statistics</caption>
+   * <tr><td>Mean</td><td>@f$\frac{1}{\lambda}@f$</td></tr>
+   * <tr><td>Median</td><td>@f$\frac{\ln 2}{\lambda}@f$</td></tr>
+   * <tr><td>Mode</td><td>@f$zero@f$</td></tr>
+   * <tr><td>Range</td><td>@f$[0, \infty]@f$</td></tr>
+   * <tr><td>Standard Deviation</td><td>@f$\frac{1}{\lambda}@f$</td></tr>
+   * </table>
+   */
+  template<typename _RealType = double>
+    class exponential_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef exponential_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __lambda = _RealType(1))
+	: _M_lambda(__lambda)
+	{
+	  _GLIBCXX_DEBUG_ASSERT(_M_lambda > _RealType(0));
+	}
+
+	_RealType
+	lambda() const
+	{ return _M_lambda; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_lambda == __p2._M_lambda; }
+
+      private:
+	_RealType _M_lambda;
+      };
+
+    public:
+      /**
+       * @brief Constructs an exponential distribution with inverse scale
+       *        parameter @f$\lambda@f$.
+       */
+      explicit
+      exponential_distribution(const result_type& __lambda = result_type(1))
+      : _M_param(__lambda)
+      { }
+
+      explicit
+      exponential_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       *
+       * Has no effect on exponential distributions.
+       */
+      void
+      reset() { }
+
+      /**
+       * @brief Returns the inverse scale parameter of the distribution.
+       */
+      _RealType
+      lambda() const
+      { return _M_param.lambda(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return result_type(0); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+        { return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p)
+	{
+	  __detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+	    __aurng(__urng);
+	  return -std::log(__aurng()) / __p.lambda();
+	}
+
+    private:
+      param_type _M_param;
+    };
+
+  /**
+   * @brief Return true if two exponential distributions have the same
+   *        parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator==(const std::exponential_distribution<_RealType>& __d1,
+	       const std::exponential_distribution<_RealType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+   * @brief Return true if two exponential distributions have different
+   *        parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::exponential_distribution<_RealType>& __d1,
+	       const std::exponential_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+  /**
+   * @brief Inserts a %exponential_distribution random number distribution
+   * @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %exponential_distribution random number distribution.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   * an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>&,
+	       const std::exponential_distribution<_RealType>&);
+
+  /**
+   * @brief Extracts a %exponential_distribution random number distribution
+   * @p __x from the input stream @p __is.
+   *
+   * @param __is An input stream.
+   * @param __x A %exponential_distribution random number
+   *            generator engine.
+   *
+   * @returns The input stream with @p __x extracted or in an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>&,
+	       std::exponential_distribution<_RealType>&);
+
+
+  /**
+   * @brief A weibull_distribution random number distribution.
+   *
+   * The formula for the normal probability density function is:
+   * @f[
+   *     p(x|\alpha,\beta) = \frac{\alpha}{\beta} (\frac{x}{\beta})^{\alpha-1}
+   *                         \exp{(-(\frac{x}{\beta})^\alpha)} 
+   * @f]
+   */
+  template<typename _RealType = double>
+    class weibull_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef weibull_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __a = _RealType(1),
+		   _RealType __b = _RealType(1))
+	: _M_a(__a), _M_b(__b)
+	{ }
+
+	_RealType
+	a() const
+	{ return _M_a; }
+
+	_RealType
+	b() const
+	{ return _M_b; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
+
+      private:
+	_RealType _M_a;
+	_RealType _M_b;
+      };
+
+      explicit
+      weibull_distribution(_RealType __a = _RealType(1),
+			   _RealType __b = _RealType(1))
+      : _M_param(__a, __b)
+      { }
+
+      explicit
+      weibull_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { }
+
+      /**
+       * @brief Return the @f$a@f$ parameter of the distribution.
+       */
+      _RealType
+      a() const
+      { return _M_param.a(); }
+
+      /**
+       * @brief Return the @f$b@f$ parameter of the distribution.
+       */
+      _RealType
+      b() const
+      { return _M_param.b(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return result_type(0); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+    private:
+      param_type _M_param;
+    };
+
+   /**
+    * @brief Return true if two Weibull distributions have the same
+    *        parameters.
+    */
+  template<typename _RealType>
+    inline bool
+    operator==(const std::weibull_distribution<_RealType>& __d1,
+	       const std::weibull_distribution<_RealType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+   /**
+    * @brief Return true if two Weibull distributions have different
+    *        parameters.
+    */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::weibull_distribution<_RealType>& __d1,
+	       const std::weibull_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+  /**
+   * @brief Inserts a %weibull_distribution random number distribution
+   * @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %weibull_distribution random number distribution.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   * an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>&,
+	       const std::weibull_distribution<_RealType>&);
+
+  /**
+   * @brief Extracts a %weibull_distribution random number distribution
+   * @p __x from the input stream @p __is.
+   *
+   * @param __is An input stream.
+   * @param __x A %weibull_distribution random number
+   *            generator engine.
+   *
+   * @returns The input stream with @p __x extracted or in an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>&,
+	       std::weibull_distribution<_RealType>&);
+
+
+  /**
+   * @brief A extreme_value_distribution random number distribution.
+   *
+   * The formula for the normal probability mass function is
+   * @f[
+   *     p(x|a,b) = \frac{1}{b}
+   *                \exp( \frac{a-x}{b} - \exp(\frac{a-x}{b})) 
+   * @f]
+   */
+  template<typename _RealType = double>
+    class extreme_value_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef extreme_value_distribution<_RealType> distribution_type;
+
+	explicit
+	param_type(_RealType __a = _RealType(0),
+		   _RealType __b = _RealType(1))
+	: _M_a(__a), _M_b(__b)
+	{ }
+
+	_RealType
+	a() const
+	{ return _M_a; }
+
+	_RealType
+	b() const
+	{ return _M_b; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
+
+      private:
+	_RealType _M_a;
+	_RealType _M_b;
+      };
+
+      explicit
+      extreme_value_distribution(_RealType __a = _RealType(0),
+				 _RealType __b = _RealType(1))
+      : _M_param(__a, __b)
+      { }
+
+      explicit
+      extreme_value_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { }
+
+      /**
+       * @brief Return the @f$a@f$ parameter of the distribution.
+       */
+      _RealType
+      a() const
+      { return _M_param.a(); }
+
+      /**
+       * @brief Return the @f$b@f$ parameter of the distribution.
+       */
+      _RealType
+      b() const
+      { return _M_param.b(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return std::numeric_limits<result_type>::min(); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return std::numeric_limits<result_type>::max(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+    private:
+      param_type _M_param;
+    };
+
+  /**
+    * @brief Return true if two extreme value distributions have the same
+    *        parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator==(const std::extreme_value_distribution<_RealType>& __d1,
+	       const std::extreme_value_distribution<_RealType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+    * @brief Return true if two extreme value distributions have different
+    *        parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::extreme_value_distribution<_RealType>& __d1,
+	       const std::extreme_value_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+  /**
+   * @brief Inserts a %extreme_value_distribution random number distribution
+   * @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %extreme_value_distribution random number distribution.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   * an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>&,
+	       const std::extreme_value_distribution<_RealType>&);
+
+  /**
+   * @brief Extracts a %extreme_value_distribution random number
+   *        distribution @p __x from the input stream @p __is.
+   *
+   * @param __is An input stream.
+   * @param __x A %extreme_value_distribution random number
+   *            generator engine.
+   *
+   * @returns The input stream with @p __x extracted or in an error state.
+   */
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>&,
+	       std::extreme_value_distribution<_RealType>&);
+
+
+  /**
+   * @brief A discrete_distribution random number distribution.
+   *
+   * The formula for the discrete probability mass function is
+   *
+   */
+  template<typename _IntType = int>
+    class discrete_distribution
+    {
+      static_assert(std::is_integral<_IntType>::value,
+		    "template argument not an integral type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _IntType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef discrete_distribution<_IntType> distribution_type;
+	friend class discrete_distribution<_IntType>;
+
+	param_type()
+	: _M_prob(), _M_cp()
+	{ _M_initialize(); }
+
+	template<typename _InputIterator>
+	  param_type(_InputIterator __wbegin,
+		     _InputIterator __wend)
+	  : _M_prob(__wbegin, __wend), _M_cp()
+	  { _M_initialize(); }
+
+	param_type(initializer_list<double> __wil)
+	: _M_prob(__wil.begin(), __wil.end()), _M_cp()
+	{ _M_initialize(); }
+
+	template<typename _Func>
+	  param_type(size_t __nw, double __xmin, double __xmax,
+		     _Func __fw);
+
+	std::vector<double>
+	probabilities() const
+	{ return _M_prob; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_prob == __p2._M_prob; }
+
+      private:
+	void
+	_M_initialize();
+
+	std::vector<double> _M_prob;
+	std::vector<double> _M_cp;
+      };
+
+      discrete_distribution()
+      : _M_param()
+      { }
+
+      template<typename _InputIterator>
+	discrete_distribution(_InputIterator __wbegin,
+			      _InputIterator __wend)
+	: _M_param(__wbegin, __wend)
+	{ }
+
+      discrete_distribution(initializer_list<double> __wl)
+      : _M_param(__wl)
+      { }
+
+      template<typename _Func>
+	discrete_distribution(size_t __nw, double __xmin, double __xmax,
+			      _Func __fw)
+	: _M_param(__nw, __xmin, __xmax, __fw)
+	{ }
+
+      explicit
+      discrete_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { }
+
+      /**
+       * @brief Returns the probabilities of the distribution.
+       */
+      std::vector<double>
+      probabilities() const
+      { return _M_param.probabilities(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return result_type(0); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return this->_M_param._M_prob.size() - 1; }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+      /**
+       * @brief Inserts a %discrete_distribution random number distribution
+       * @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %discrete_distribution random number distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _IntType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::discrete_distribution<_IntType1>&);
+
+      /**
+       * @brief Extracts a %discrete_distribution random number distribution
+       * @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x A %discrete_distribution random number
+       *            generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error
+       *          state.
+       */
+      template<typename _IntType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::discrete_distribution<_IntType1>&);
+
+    private:
+      param_type _M_param;
+    };
+
+  /**
+    * @brief Return true if two discrete distributions have the same
+    *        parameters.
+    */
+  template<typename _IntType>
+    inline bool
+    operator==(const std::discrete_distribution<_IntType>& __d1,
+	       const std::discrete_distribution<_IntType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+    * @brief Return true if two discrete distributions have different
+    *        parameters.
+    */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::discrete_distribution<_IntType>& __d1,
+	       const std::discrete_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /**
+   * @brief A piecewise_constant_distribution random number distribution.
+   *
+   * The formula for the piecewise constant probability mass function is
+   *
+   */
+  template<typename _RealType = double>
+    class piecewise_constant_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef piecewise_constant_distribution<_RealType> distribution_type;
+	friend class piecewise_constant_distribution<_RealType>;
+
+	param_type()
+	: _M_int(), _M_den(), _M_cp()
+	{ _M_initialize(); }
+
+	template<typename _InputIteratorB, typename _InputIteratorW>
+	  param_type(_InputIteratorB __bfirst,
+		     _InputIteratorB __bend,
+		     _InputIteratorW __wbegin);
+
+	template<typename _Func>
+	  param_type(initializer_list<_RealType> __bi, _Func __fw);
+
+	template<typename _Func>
+	  param_type(size_t __nw, _RealType __xmin, _RealType __xmax,
+		     _Func __fw);
+
+	std::vector<_RealType>
+	intervals() const
+	{ return _M_int; }
+
+	std::vector<double>
+	densities() const
+	{ return _M_den; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; }
+
+      private:
+	void
+	_M_initialize();
+
+	std::vector<_RealType> _M_int;
+	std::vector<double> _M_den;
+	std::vector<double> _M_cp;
+      };
+
+      explicit
+      piecewise_constant_distribution()
+      : _M_param()
+      { }
+
+      template<typename _InputIteratorB, typename _InputIteratorW>
+	piecewise_constant_distribution(_InputIteratorB __bfirst,
+					_InputIteratorB __bend,
+					_InputIteratorW __wbegin)
+	: _M_param(__bfirst, __bend, __wbegin)
+	{ }
+
+      template<typename _Func>
+	piecewise_constant_distribution(initializer_list<_RealType> __bl,
+					_Func __fw)
+	: _M_param(__bl, __fw)
+	{ }
+
+      template<typename _Func>
+	piecewise_constant_distribution(size_t __nw,
+					_RealType __xmin, _RealType __xmax,
+					_Func __fw)
+	: _M_param(__nw, __xmin, __xmax, __fw)
+	{ }
+
+      explicit
+      piecewise_constant_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * @brief Resets the distribution state.
+       */
+      void
+      reset()
+      { }
+
+      /**
+       * @brief Returns a vector of the intervals.
+       */
+      std::vector<_RealType>
+      intervals() const
+      { return _M_param.intervals(); }
+
+      /**
+       * @brief Returns a vector of the probability densities.
+       */
+      std::vector<double>
+      densities() const
+      { return _M_param.densities(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return this->_M_param._M_int.front(); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return this->_M_param._M_int.back(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+      /**
+       * @brief Inserts a %piecewise_constan_distribution random
+       *        number distribution @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %piecewise_constan_distribution random number
+       *             distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::piecewise_constant_distribution<_RealType1>&);
+
+      /**
+       * @brief Extracts a %piecewise_constan_distribution random
+       *        number distribution @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x A %piecewise_constan_distribution random number
+       *            generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error
+       *          state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::piecewise_constant_distribution<_RealType1>&);
+
+    private:
+      param_type _M_param;
+    };
+
+  /**
+    * @brief Return true if two piecewise constant distributions have the
+    *        same parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator==(const std::piecewise_constant_distribution<_RealType>& __d1,
+	       const std::piecewise_constant_distribution<_RealType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+    * @brief Return true if two piecewise constant distributions have 
+    *        different parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::piecewise_constant_distribution<_RealType>& __d1,
+	       const std::piecewise_constant_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /**
+   * @brief A piecewise_linear_distribution random number distribution.
+   *
+   * The formula for the piecewise linear probability mass function is
+   *
+   */
+  template<typename _RealType = double>
+    class piecewise_linear_distribution
+    {
+      static_assert(std::is_floating_point<_RealType>::value,
+		    "template argument not a floating point type");
+
+    public:
+      /** The type of the range of the distribution. */
+      typedef _RealType result_type;
+      /** Parameter type. */
+      struct param_type
+      {
+	typedef piecewise_linear_distribution<_RealType> distribution_type;
+	friend class piecewise_linear_distribution<_RealType>;
+
+	param_type()
+	: _M_int(), _M_den(), _M_cp(), _M_m()
+	{ _M_initialize(); }
+
+	template<typename _InputIteratorB, typename _InputIteratorW>
+	  param_type(_InputIteratorB __bfirst,
+		     _InputIteratorB __bend,
+		     _InputIteratorW __wbegin);
+
+	template<typename _Func>
+	  param_type(initializer_list<_RealType> __bl, _Func __fw);
+
+	template<typename _Func>
+	  param_type(size_t __nw, _RealType __xmin, _RealType __xmax,
+		     _Func __fw);
+
+	std::vector<_RealType>
+	intervals() const
+	{ return _M_int; }
+
+	std::vector<double>
+	densities() const
+	{ return _M_den; }
+
+	friend bool
+	operator==(const param_type& __p1, const param_type& __p2)
+	{ return (__p1._M_int == __p2._M_int
+		  && __p1._M_den == __p2._M_den); }
+
+      private:
+	void
+	_M_initialize();
+
+	std::vector<_RealType> _M_int;
+	std::vector<double> _M_den;
+	std::vector<double> _M_cp;
+	std::vector<double> _M_m;
+      };
+
+      explicit
+      piecewise_linear_distribution()
+      : _M_param()
+      { }
+
+      template<typename _InputIteratorB, typename _InputIteratorW>
+	piecewise_linear_distribution(_InputIteratorB __bfirst,
+				      _InputIteratorB __bend,
+				      _InputIteratorW __wbegin)
+	: _M_param(__bfirst, __bend, __wbegin)
+	{ }
+
+      template<typename _Func>
+	piecewise_linear_distribution(initializer_list<_RealType> __bl,
+				      _Func __fw)
+	: _M_param(__bl, __fw)
+	{ }
+
+      template<typename _Func>
+	piecewise_linear_distribution(size_t __nw,
+				      _RealType __xmin, _RealType __xmax,
+				      _Func __fw)
+	: _M_param(__nw, __xmin, __xmax, __fw)
+	{ }
+
+      explicit
+      piecewise_linear_distribution(const param_type& __p)
+      : _M_param(__p)
+      { }
+
+      /**
+       * Resets the distribution state.
+       */
+      void
+      reset()
+      { }
+
+      /**
+       * @brief Return the intervals of the distribution.
+       */
+      std::vector<_RealType>
+      intervals() const
+      { return _M_param.intervals(); }
+
+      /**
+       * @brief Return a vector of the probability densities of the
+       *        distribution.
+       */
+      std::vector<double>
+      densities() const
+      { return _M_param.densities(); }
+
+      /**
+       * @brief Returns the parameter set of the distribution.
+       */
+      param_type
+      param() const
+      { return _M_param; }
+
+      /**
+       * @brief Sets the parameter set of the distribution.
+       * @param __param The new parameter set of the distribution.
+       */
+      void
+      param(const param_type& __param)
+      { _M_param = __param; }
+
+      /**
+       * @brief Returns the greatest lower bound value of the distribution.
+       */
+      result_type
+      min() const
+      { return this->_M_param._M_int.front(); }
+
+      /**
+       * @brief Returns the least upper bound value of the distribution.
+       */
+      result_type
+      max() const
+      { return this->_M_param._M_int.back(); }
+
+      /**
+       * @brief Generating functions.
+       */
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng)
+	{ return this->operator()(__urng, this->param()); }
+
+      template<typename _UniformRandomNumberGenerator>
+	result_type
+	operator()(_UniformRandomNumberGenerator& __urng,
+		   const param_type& __p);
+
+      /**
+       * @brief Inserts a %piecewise_linear_distribution random number
+       *        distribution @p __x into the output stream @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %piecewise_linear_distribution random number
+       *             distribution.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       *          an error state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::piecewise_linear_distribution<_RealType1>&);
+
+      /**
+       * @brief Extracts a %piecewise_linear_distribution random number
+       *        distribution @p __x from the input stream @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %piecewise_linear_distribution random number
+       *             generator engine.
+       *
+       * @returns The input stream with @p __x extracted or in an error
+       *          state.
+       */
+      template<typename _RealType1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::piecewise_linear_distribution<_RealType1>&);
+
+    private:
+      param_type _M_param;
+    };
+
+  /**
+    * @brief Return true if two piecewise linear distributions have the
+    *        same parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator==(const std::piecewise_linear_distribution<_RealType>& __d1,
+	       const std::piecewise_linear_distribution<_RealType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+    * @brief Return true if two piecewise linear distributions have
+    *        different parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::piecewise_linear_distribution<_RealType>& __d1,
+	       const std::piecewise_linear_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
+  /* @} */ // group random_distributions_poisson
+
+  /* @} */ // group random_distributions
+
+  /**
+   * @addtogroup random_utilities Random Number Utilities
+   * @ingroup random
+   * @{
+   */
+
+  /**
+   * @brief The seed_seq class generates sequences of seeds for random
+   *        number generators.
+   */
+  class seed_seq
+  {
+
+  public:
+    /** The type of the seed vales. */
+    typedef uint_least32_t result_type;
+
+    /** Default constructor. */
+    seed_seq()
+    : _M_v()
+    { }
+
+    template<typename _IntType>
+      seed_seq(std::initializer_list<_IntType> il);
+
+    template<typename _InputIterator>
+      seed_seq(_InputIterator __begin, _InputIterator __end);
+
+    // generating functions
+    template<typename _RandomAccessIterator>
+      void
+      generate(_RandomAccessIterator __begin, _RandomAccessIterator __end);
+
+    // property functions
+    size_t size() const
+    { return _M_v.size(); }
+
+    template<typename OutputIterator>
+      void
+      param(OutputIterator __dest) const
+      { std::copy(_M_v.begin(), _M_v.end(), __dest); }
+
+  private:
+    ///
+    std::vector<result_type> _M_v;
+  };
+
+  /* @} */ // group random_utilities
+
+  /* @} */ // group random
+
+}
+
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/random.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/random.tcc
new file mode 100644
index 0000000..7efd6f8
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/random.tcc
@@ -0,0 +1,2786 @@
+// random number generation (out of line) -*- C++ -*-
+
+// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/random.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#include <numeric> // std::accumulate and std::partial_sum
+
+namespace std
+{
+  /*
+   * (Further) implementation-space details.
+   */
+  namespace __detail
+  {
+    // General case for x = (ax + c) mod m -- use Schrage's algorithm to
+    // avoid integer overflow.
+    //
+    // Because a and c are compile-time integral constants the compiler
+    // kindly elides any unreachable paths.
+    //
+    // Preconditions:  a > 0, m > 0.
+    //
+    template<typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool>
+      struct _Mod
+      {
+	static _Tp
+	__calc(_Tp __x)
+	{
+	  if (__a == 1)
+	    __x %= __m;
+	  else
+	    {
+	      static const _Tp __q = __m / __a;
+	      static const _Tp __r = __m % __a;
+
+	      _Tp __t1 = __a * (__x % __q);
+	      _Tp __t2 = __r * (__x / __q);
+	      if (__t1 >= __t2)
+		__x = __t1 - __t2;
+	      else
+		__x = __m - __t2 + __t1;
+	    }
+
+	  if (__c != 0)
+	    {
+	      const _Tp __d = __m - __x;
+	      if (__d > __c)
+		__x += __c;
+	      else
+		__x = __c - __d;
+	    }
+	  return __x;
+	}
+      };
+
+    // Special case for m == 0 -- use unsigned integer overflow as modulo
+    // operator.
+    template<typename _Tp, _Tp __m, _Tp __a, _Tp __c>
+      struct _Mod<_Tp, __m, __a, __c, true>
+      {
+	static _Tp
+	__calc(_Tp __x)
+	{ return __a * __x + __c; }
+      };
+
+    template<typename _InputIterator, typename _OutputIterator,
+	     typename _UnaryOperation>
+      _OutputIterator
+      __transform(_InputIterator __first, _InputIterator __last,
+		  _OutputIterator __result, _UnaryOperation __unary_op)
+      {
+	for (; __first != __last; ++__first, ++__result)
+	  *__result = __unary_op(*__first);
+	return __result;
+      }
+  } // namespace __detail
+
+
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    const _UIntType
+    linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier;
+
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    const _UIntType
+    linear_congruential_engine<_UIntType, __a, __c, __m>::increment;
+
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    const _UIntType
+    linear_congruential_engine<_UIntType, __a, __c, __m>::modulus;
+
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    const _UIntType
+    linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed;
+
+  /**
+   * Seeds the LCR with integral value @p __s, adjusted so that the
+   * ring identity is never a member of the convergence set.
+   */
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    void
+    linear_congruential_engine<_UIntType, __a, __c, __m>::
+    seed(result_type __s)
+    {
+      if ((__detail::__mod<_UIntType, __m>(__c) == 0)
+	  && (__detail::__mod<_UIntType, __m>(__s) == 0))
+	_M_x = 1;
+      else
+	_M_x = __detail::__mod<_UIntType, __m>(__s);
+    }
+
+  /**
+   * Seeds the LCR engine with a value generated by @p __q.
+   */
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    template<typename _Sseq>
+      typename std::enable_if<std::is_class<_Sseq>::value>::type
+      linear_congruential_engine<_UIntType, __a, __c, __m>::
+      seed(_Sseq& __q)
+      {
+	const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits
+	                                : std::__lg(__m);
+	const _UIntType __k = (__k0 + 31) / 32;
+	uint_least32_t __arr[__k + 3];
+	__q.generate(__arr + 0, __arr + __k + 3);
+	_UIntType __factor = 1u;
+	_UIntType __sum = 0u;
+	for (size_t __j = 0; __j < __k; ++__j)
+	  {
+	    __sum += __arr[__j + 3] * __factor;
+	    __factor *= __detail::_Shift<_UIntType, 32>::__value;
+	  }
+	seed(__sum);
+      }
+
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const linear_congruential_engine<_UIntType,
+						__a, __c, __m>& __lcr)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+      __os.fill(__os.widen(' '));
+
+      __os << __lcr._M_x;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      return __os;
+    }
+
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m,
+	   typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       linear_congruential_engine<_UIntType, __a, __c, __m>& __lcr)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec);
+
+      __is >> __lcr._M_x;
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const size_t
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::word_size;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const size_t
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::state_size;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const size_t
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::shift_size;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const size_t
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::mask_bits;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const _UIntType
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::xor_mask;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const size_t
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::tempering_u;
+   
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const _UIntType
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::tempering_d;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const size_t
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::tempering_s;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const _UIntType
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::tempering_b;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const size_t
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::tempering_t;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const _UIntType
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::tempering_c;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const size_t
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::tempering_l;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const _UIntType
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::
+                                              initialization_multiplier;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    const _UIntType
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::default_seed;
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    void
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::
+    seed(result_type __sd)
+    {
+      _M_x[0] = __detail::__mod<_UIntType,
+	__detail::_Shift<_UIntType, __w>::__value>(__sd);
+
+      for (size_t __i = 1; __i < state_size; ++__i)
+	{
+	  _UIntType __x = _M_x[__i - 1];
+	  __x ^= __x >> (__w - 2);
+	  __x *= __f;
+	  __x += __detail::__mod<_UIntType, __n>(__i);
+	  _M_x[__i] = __detail::__mod<_UIntType,
+	    __detail::_Shift<_UIntType, __w>::__value>(__x);
+	}
+      _M_p = state_size;
+    }
+
+  template<typename _UIntType,
+	   size_t __w, size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    template<typename _Sseq>
+      typename std::enable_if<std::is_class<_Sseq>::value>::type
+      mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			      __s, __b, __t, __c, __l, __f>::
+      seed(_Sseq& __q)
+      {
+	const _UIntType __upper_mask = (~_UIntType()) << __r;
+	const size_t __k = (__w + 31) / 32;
+	uint_least32_t __arr[__n * __k];
+	__q.generate(__arr + 0, __arr + __n * __k);
+
+	bool __zero = true;
+	for (size_t __i = 0; __i < state_size; ++__i)
+	  {
+	    _UIntType __factor = 1u;
+	    _UIntType __sum = 0u;
+	    for (size_t __j = 0; __j < __k; ++__j)
+	      {
+		__sum += __arr[__k * __i + __j] * __factor;
+		__factor *= __detail::_Shift<_UIntType, 32>::__value;
+	      }
+	    _M_x[__i] = __detail::__mod<_UIntType,
+	      __detail::_Shift<_UIntType, __w>::__value>(__sum);
+
+	    if (__zero)
+	      {
+		if (__i == 0)
+		  {
+		    if ((_M_x[0] & __upper_mask) != 0u)
+		      __zero = false;
+		  }
+		else if (_M_x[__i] != 0u)
+		  __zero = false;
+	      }
+	  }
+        if (__zero)
+          _M_x[0] = __detail::_Shift<_UIntType, __w - 1>::__value;
+      }
+
+  template<typename _UIntType, size_t __w,
+	   size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f>
+    typename
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::result_type
+    mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+			    __s, __b, __t, __c, __l, __f>::
+    operator()()
+    {
+      // Reload the vector - cost is O(n) amortized over n calls.
+      if (_M_p >= state_size)
+	{
+	  const _UIntType __upper_mask = (~_UIntType()) << __r;
+	  const _UIntType __lower_mask = ~__upper_mask;
+
+	  for (size_t __k = 0; __k < (__n - __m); ++__k)
+	    {
+	      _UIntType __y = ((_M_x[__k] & __upper_mask)
+			       | (_M_x[__k + 1] & __lower_mask));
+	      _M_x[__k] = (_M_x[__k + __m] ^ (__y >> 1)
+			   ^ ((__y & 0x01) ? __a : 0));
+	    }
+
+	  for (size_t __k = (__n - __m); __k < (__n - 1); ++__k)
+	    {
+	      _UIntType __y = ((_M_x[__k] & __upper_mask)
+			       | (_M_x[__k + 1] & __lower_mask));
+	      _M_x[__k] = (_M_x[__k + (__m - __n)] ^ (__y >> 1)
+			   ^ ((__y & 0x01) ? __a : 0));
+	    }
+
+	  _UIntType __y = ((_M_x[__n - 1] & __upper_mask)
+			   | (_M_x[0] & __lower_mask));
+	  _M_x[__n - 1] = (_M_x[__m - 1] ^ (__y >> 1)
+			   ^ ((__y & 0x01) ? __a : 0));
+	  _M_p = 0;
+	}
+
+      // Calculate o(x(i)).
+      result_type __z = _M_x[_M_p++];
+      __z ^= (__z >> __u) & __d;
+      __z ^= (__z << __s) & __b;
+      __z ^= (__z << __t) & __c;
+      __z ^= (__z >> __l);
+
+      return __z;
+    }
+
+  template<typename _UIntType, size_t __w,
+	   size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const mersenne_twister_engine<_UIntType, __w, __n, __m,
+	       __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+      __os.fill(__space);
+
+      for (size_t __i = 0; __i < __n - 1; ++__i)
+	__os << __x._M_x[__i] << __space;
+      __os << __x._M_x[__n - 1];
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      return __os;
+    }
+
+  template<typename _UIntType, size_t __w,
+	   size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+	   _UIntType __f, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       mersenne_twister_engine<_UIntType, __w, __n, __m,
+	       __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      for (size_t __i = 0; __i < __n; ++__i)
+	__is >> __x._M_x[__i];
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    const size_t
+    subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size;
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    const size_t
+    subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag;
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    const size_t
+    subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag;
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    const _UIntType
+    subtract_with_carry_engine<_UIntType, __w, __s, __r>::default_seed;
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    void
+    subtract_with_carry_engine<_UIntType, __w, __s, __r>::
+    seed(result_type __value)
+    {
+      std::linear_congruential_engine<result_type, 40014u, 0u, 2147483563u>
+	__lcg(__value == 0u ? default_seed : __value);
+
+      const size_t __n = (__w + 31) / 32;
+
+      for (size_t __i = 0; __i < long_lag; ++__i)
+	{
+	  _UIntType __sum = 0u;
+	  _UIntType __factor = 1u;
+	  for (size_t __j = 0; __j < __n; ++__j)
+	    {
+	      __sum += __detail::__mod<uint_least32_t,
+		       __detail::_Shift<uint_least32_t, 32>::__value>
+			 (__lcg()) * __factor;
+	      __factor *= __detail::_Shift<_UIntType, 32>::__value;
+	    }
+	  _M_x[__i] = __detail::__mod<_UIntType,
+	    __detail::_Shift<_UIntType, __w>::__value>(__sum);
+	}
+      _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
+      _M_p = 0;
+    }
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    template<typename _Sseq>
+      typename std::enable_if<std::is_class<_Sseq>::value>::type
+      subtract_with_carry_engine<_UIntType, __w, __s, __r>::
+      seed(_Sseq& __q)
+      {
+	const size_t __k = (__w + 31) / 32;
+	uint_least32_t __arr[__r * __k];
+	__q.generate(__arr + 0, __arr + __r * __k);
+
+	for (size_t __i = 0; __i < long_lag; ++__i)
+	  {
+	    _UIntType __sum = 0u;
+	    _UIntType __factor = 1u;
+	    for (size_t __j = 0; __j < __k; ++__j)
+	      {
+		__sum += __arr[__k * __i + __j] * __factor;
+		__factor *= __detail::_Shift<_UIntType, 32>::__value;
+	      }
+	    _M_x[__i] = __detail::__mod<_UIntType,
+	      __detail::_Shift<_UIntType, __w>::__value>(__sum);
+	  }
+	_M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
+	_M_p = 0;
+      }
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    typename subtract_with_carry_engine<_UIntType, __w, __s, __r>::
+	     result_type
+    subtract_with_carry_engine<_UIntType, __w, __s, __r>::
+    operator()()
+    {
+      // Derive short lag index from current index.
+      long __ps = _M_p - short_lag;
+      if (__ps < 0)
+	__ps += long_lag;
+
+      // Calculate new x(i) without overflow or division.
+      // NB: Thanks to the requirements for _UIntType, _M_x[_M_p] + _M_carry
+      // cannot overflow.
+      _UIntType __xi;
+      if (_M_x[__ps] >= _M_x[_M_p] + _M_carry)
+	{
+	  __xi = _M_x[__ps] - _M_x[_M_p] - _M_carry;
+	  _M_carry = 0;
+	}
+      else
+	{
+	  __xi = (__detail::_Shift<_UIntType, __w>::__value
+		  - _M_x[_M_p] - _M_carry + _M_x[__ps]);
+	  _M_carry = 1;
+	}
+      _M_x[_M_p] = __xi;
+
+      // Adjust current index to loop around in ring buffer.
+      if (++_M_p >= long_lag)
+	_M_p = 0;
+
+      return __xi;
+    }
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const subtract_with_carry_engine<_UIntType,
+						__w, __s, __r>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+      __os.fill(__space);
+
+      for (size_t __i = 0; __i < __r; ++__i)
+	__os << __x._M_x[__i] << __space;
+      __os << __x._M_carry;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      return __os;
+    }
+
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r,
+	   typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       subtract_with_carry_engine<_UIntType, __w, __s, __r>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      for (size_t __i = 0; __i < __r; ++__i)
+	__is >> __x._M_x[__i];
+      __is >> __x._M_carry;
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RandomNumberEngine, size_t __p, size_t __r>
+    const size_t
+    discard_block_engine<_RandomNumberEngine, __p, __r>::block_size;
+
+  template<typename _RandomNumberEngine, size_t __p, size_t __r>
+    const size_t
+    discard_block_engine<_RandomNumberEngine, __p, __r>::used_block;
+
+  template<typename _RandomNumberEngine, size_t __p, size_t __r>
+    typename discard_block_engine<_RandomNumberEngine,
+			   __p, __r>::result_type
+    discard_block_engine<_RandomNumberEngine, __p, __r>::
+    operator()()
+    {
+      if (_M_n >= used_block)
+	{
+	  _M_b.discard(block_size - _M_n);
+	  _M_n = 0;
+	}
+      ++_M_n;
+      return _M_b();
+    }
+
+  template<typename _RandomNumberEngine, size_t __p, size_t __r,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const discard_block_engine<_RandomNumberEngine,
+	       __p, __r>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+      __os.fill(__space);
+
+      __os << __x.base() << __space << __x._M_n;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      return __os;
+    }
+
+  template<typename _RandomNumberEngine, size_t __p, size_t __r,
+	   typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       discard_block_engine<_RandomNumberEngine, __p, __r>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      __is >> __x._M_b >> __x._M_n;
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RandomNumberEngine, size_t __w, typename _UIntType>
+    typename independent_bits_engine<_RandomNumberEngine, __w, _UIntType>::
+      result_type
+    independent_bits_engine<_RandomNumberEngine, __w, _UIntType>::
+    operator()()
+    {
+      const long double __r = static_cast<long double>(_M_b.max())
+			    - static_cast<long double>(_M_b.min()) + 1.0L;
+      const result_type __m = std::log(__r) / std::log(2.0L);
+      result_type __n, __n0, __y0, __y1, __s0, __s1;
+      for (size_t __i = 0; __i < 2; ++__i)
+	{
+	  __n = (__w + __m - 1) / __m + __i;
+	  __n0 = __n - __w % __n;
+	  const result_type __w0 = __w / __n;
+	  const result_type __w1 = __w0 + 1;
+	  __s0 = result_type(1) << __w0;
+	  __s1 = result_type(1) << __w1;
+	  __y0 = __s0 * (__r / __s0);
+	  __y1 = __s1 * (__r / __s1);
+	  if (__r - __y0 <= __y0 / __n)
+	    break;
+	}
+
+      result_type __sum = 0;
+      for (size_t __k = 0; __k < __n0; ++__k)
+	{
+	  result_type __u;
+	  do
+	    __u = _M_b() - _M_b.min();
+	  while (__u >= __y0);
+	  __sum = __s0 * __sum + __u % __s0;
+	}
+      for (size_t __k = __n0; __k < __n; ++__k)
+	{
+	  result_type __u;
+	  do
+	    __u = _M_b() - _M_b.min();
+	  while (__u >= __y1);
+	  __sum = __s1 * __sum + __u % __s1;
+	}
+      return __sum;
+    }
+
+
+  template<typename _RandomNumberEngine, size_t __k>
+    const size_t
+    shuffle_order_engine<_RandomNumberEngine, __k>::table_size;
+
+  template<typename _RandomNumberEngine, size_t __k>
+    typename shuffle_order_engine<_RandomNumberEngine, __k>::result_type
+    shuffle_order_engine<_RandomNumberEngine, __k>::
+    operator()()
+    {
+      size_t __j = __k * ((_M_y - _M_b.min())
+			  / (_M_b.max() - _M_b.min() + 1.0L));
+      _M_y = _M_v[__j];
+      _M_v[__j] = _M_b();
+
+      return _M_y;
+    }
+
+  template<typename _RandomNumberEngine, size_t __k,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const shuffle_order_engine<_RandomNumberEngine, __k>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+      __os.fill(__space);
+
+      __os << __x.base();
+      for (size_t __i = 0; __i < __k; ++__i)
+	__os << __space << __x._M_v[__i];
+      __os << __space << __x._M_y;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      return __os;
+    }
+
+  template<typename _RandomNumberEngine, size_t __k,
+	   typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       shuffle_order_engine<_RandomNumberEngine, __k>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      __is >> __x._M_b;
+      for (size_t __i = 0; __i < __k; ++__i)
+	__is >> __x._M_v[__i];
+      __is >> __x._M_y;
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _IntType>
+    template<typename _UniformRandomNumberGenerator>
+      typename uniform_int_distribution<_IntType>::result_type
+      uniform_int_distribution<_IntType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	// XXX Must be fixed to work well for *arbitrary* __urng.max(),
+	// __urng.min(), __param.b(), __param.a().  Currently works fine only
+	// in the most common case __urng.max() - __urng.min() >=
+	// __param.b() - __param.a(), with __urng.max() > __urng.min() >= 0.
+	typedef typename std::make_unsigned<typename
+	  _UniformRandomNumberGenerator::result_type>::type __urntype;
+	typedef typename std::make_unsigned<result_type>::type __utype;
+	typedef typename std::conditional<(sizeof(__urntype) > sizeof(__utype)),
+	  __urntype, __utype>::type __uctype;
+
+	result_type __ret;
+
+	const __urntype __urnmin = __urng.min();
+	const __urntype __urnmax = __urng.max();
+	const __urntype __urnrange = __urnmax - __urnmin;
+	const __uctype __urange = __param.b() - __param.a();
+	const __uctype __udenom = (__urnrange <= __urange
+				   ? 1 : __urnrange / (__urange + 1));
+	do
+	  __ret = (__urntype(__urng()) -  __urnmin) / __udenom;
+	while (__ret > __param.b() - __param.a());
+
+	return __ret + __param.a();
+      }
+
+  template<typename _IntType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const uniform_int_distribution<_IntType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+
+      __os << __x.a() << __space << __x.b();
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      return __os;
+    }
+
+  template<typename _IntType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       uniform_int_distribution<_IntType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _IntType __a, __b;
+      __is >> __a >> __b;
+      __x.param(typename uniform_int_distribution<_IntType>::
+		param_type(__a, __b));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const uniform_real_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.a() << __space << __x.b();
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       uniform_real_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::skipws);
+
+      _RealType __a, __b;
+      __is >> __a >> __b;
+      __x.param(typename uniform_real_distribution<_RealType>::
+		param_type(__a, __b));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const bernoulli_distribution& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__os.widen(' '));
+      __os.precision(std::numeric_limits<double>::max_digits10);
+
+      __os << __x.p();
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+
+  template<typename _IntType>
+    template<typename _UniformRandomNumberGenerator>
+      typename geometric_distribution<_IntType>::result_type
+      geometric_distribution<_IntType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	// About the epsilon thing see this thread:
+	// http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00971.html
+	const double __naf =
+	  (1 - std::numeric_limits<double>::epsilon()) / 2;
+	// The largest _RealType convertible to _IntType.
+	const double __thr =
+	  std::numeric_limits<_IntType>::max() + __naf;
+	__detail::_Adaptor<_UniformRandomNumberGenerator, double>
+	  __aurng(__urng);
+
+	double __cand;
+	do
+	  __cand = std::ceil(std::log(__aurng()) / __param._M_log_p);
+	while (__cand >= __thr);
+
+	return result_type(__cand + __naf);
+      }
+
+  template<typename _IntType,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const geometric_distribution<_IntType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__os.widen(' '));
+      __os.precision(std::numeric_limits<double>::max_digits10);
+
+      __os << __x.p();
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _IntType,
+	   typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       geometric_distribution<_IntType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::skipws);
+
+      double __p;
+      __is >> __p;
+      __x.param(typename geometric_distribution<_IntType>::param_type(__p));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _IntType>
+    template<typename _UniformRandomNumberGenerator>
+      typename negative_binomial_distribution<_IntType>::result_type
+      negative_binomial_distribution<_IntType>::
+      operator()(_UniformRandomNumberGenerator& __urng)
+      {
+	const double __y = _M_gd(__urng);
+
+	// XXX Is the constructor too slow?
+	std::poisson_distribution<result_type> __poisson(__y);
+	return __poisson(__urng);
+      }
+
+  template<typename _IntType>
+    template<typename _UniformRandomNumberGenerator>
+      typename negative_binomial_distribution<_IntType>::result_type
+      negative_binomial_distribution<_IntType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __p)
+      {
+	typedef typename std::gamma_distribution<result_type>::param_type
+	  param_type;
+	
+	const double __y =
+	  _M_gd(__urng, param_type(__p.k(), __p.p() / (1.0 - __p.p())));
+
+	std::poisson_distribution<result_type> __poisson(__y);
+	return __poisson(__urng);
+      }
+
+  template<typename _IntType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const negative_binomial_distribution<_IntType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__os.widen(' '));
+      __os.precision(std::numeric_limits<double>::max_digits10);
+
+      __os << __x.k() << __space << __x.p()
+	   << __space << __x._M_gd;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _IntType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       negative_binomial_distribution<_IntType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::skipws);
+
+      _IntType __k;
+      double __p;
+      __is >> __k >> __p >> __x._M_gd;
+      __x.param(typename negative_binomial_distribution<_IntType>::
+		param_type(__k, __p));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _IntType>
+    void
+    poisson_distribution<_IntType>::param_type::
+    _M_initialize()
+    {
+#if _GLIBCXX_USE_C99_MATH_TR1
+      if (_M_mean >= 12)
+	{
+	  const double __m = std::floor(_M_mean);
+	  _M_lm_thr = std::log(_M_mean);
+	  _M_lfm = std::lgamma(__m + 1);
+	  _M_sm = std::sqrt(__m);
+
+	  const double __pi_4 = 0.7853981633974483096156608458198757L;
+	  const double __dx = std::sqrt(2 * __m * std::log(32 * __m
+							      / __pi_4));
+	  _M_d = std::round(std::max(6.0, std::min(__m, __dx)));
+	  const double __cx = 2 * __m + _M_d;
+	  _M_scx = std::sqrt(__cx / 2);
+	  _M_1cx = 1 / __cx;
+
+	  _M_c2b = std::sqrt(__pi_4 * __cx) * std::exp(_M_1cx);
+	  _M_cb = 2 * __cx * std::exp(-_M_d * _M_1cx * (1 + _M_d / 2))
+		/ _M_d;
+	}
+      else
+#endif
+	_M_lm_thr = std::exp(-_M_mean);
+      }
+
+  /**
+   * A rejection algorithm when mean >= 12 and a simple method based
+   * upon the multiplication of uniform random variates otherwise.
+   * NB: The former is available only if _GLIBCXX_USE_C99_MATH_TR1
+   * is defined.
+   *
+   * Reference:
+   * Devroye, L. Non-Uniform Random Variates Generation. Springer-Verlag,
+   * New York, 1986, Ch. X, Sects. 3.3 & 3.4 (+ Errata!).
+   */
+  template<typename _IntType>
+    template<typename _UniformRandomNumberGenerator>
+      typename poisson_distribution<_IntType>::result_type
+      poisson_distribution<_IntType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, double>
+	  __aurng(__urng);
+#if _GLIBCXX_USE_C99_MATH_TR1
+	if (__param.mean() >= 12)
+	  {
+	    double __x;
+
+	    // See comments above...
+	    const double __naf =
+	      (1 - std::numeric_limits<double>::epsilon()) / 2;
+	    const double __thr =
+	      std::numeric_limits<_IntType>::max() + __naf;
+
+	    const double __m = std::floor(__param.mean());
+	    // sqrt(pi / 2)
+	    const double __spi_2 = 1.2533141373155002512078826424055226L;
+	    const double __c1 = __param._M_sm * __spi_2;
+	    const double __c2 = __param._M_c2b + __c1;
+	    const double __c3 = __c2 + 1;
+	    const double __c4 = __c3 + 1;
+	    // e^(1 / 78)
+	    const double __e178 = 1.0129030479320018583185514777512983L;
+	    const double __c5 = __c4 + __e178;
+	    const double __c = __param._M_cb + __c5;
+	    const double __2cx = 2 * (2 * __m + __param._M_d);
+
+	    bool __reject = true;
+	    do
+	      {
+		const double __u = __c * __aurng();
+		const double __e = -std::log(__aurng());
+
+		double __w = 0.0;
+
+		if (__u <= __c1)
+		  {
+		    const double __n = _M_nd(__urng);
+		    const double __y = -std::abs(__n) * __param._M_sm - 1;
+		    __x = std::floor(__y);
+		    __w = -__n * __n / 2;
+		    if (__x < -__m)
+		      continue;
+		  }
+		else if (__u <= __c2)
+		  {
+		    const double __n = _M_nd(__urng);
+		    const double __y = 1 + std::abs(__n) * __param._M_scx;
+		    __x = std::ceil(__y);
+		    __w = __y * (2 - __y) * __param._M_1cx;
+		    if (__x > __param._M_d)
+		      continue;
+		  }
+		else if (__u <= __c3)
+		  // NB: This case not in the book, nor in the Errata,
+		  // but should be ok...
+		  __x = -1;
+		else if (__u <= __c4)
+		  __x = 0;
+		else if (__u <= __c5)
+		  __x = 1;
+		else
+		  {
+		    const double __v = -std::log(__aurng());
+		    const double __y = __param._M_d
+				     + __v * __2cx / __param._M_d;
+		    __x = std::ceil(__y);
+		    __w = -__param._M_d * __param._M_1cx * (1 + __y / 2);
+		  }
+
+		__reject = (__w - __e - __x * __param._M_lm_thr
+			    > __param._M_lfm - std::lgamma(__x + __m + 1));
+
+		__reject |= __x + __m >= __thr;
+
+	      } while (__reject);
+
+	    return result_type(__x + __m + __naf);
+	  }
+	else
+#endif
+	  {
+	    _IntType     __x = 0;
+	    double __prod = 1.0;
+
+	    do
+	      {
+		__prod *= __aurng();
+		__x += 1;
+	      }
+	    while (__prod > __param._M_lm_thr);
+
+	    return __x - 1;
+	  }
+      }
+
+  template<typename _IntType,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const poisson_distribution<_IntType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<double>::max_digits10);
+
+      __os << __x.mean() << __space << __x._M_nd;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _IntType,
+	   typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       poisson_distribution<_IntType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::skipws);
+
+      double __mean;
+      __is >> __mean >> __x._M_nd;
+      __x.param(typename poisson_distribution<_IntType>::param_type(__mean));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _IntType>
+    void
+    binomial_distribution<_IntType>::param_type::
+    _M_initialize()
+    {
+      const double __p12 = _M_p <= 0.5 ? _M_p : 1.0 - _M_p;
+
+      _M_easy = true;
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+      if (_M_t * __p12 >= 8)
+	{
+	  _M_easy = false;
+	  const double __np = std::floor(_M_t * __p12);
+	  const double __pa = __np / _M_t;
+	  const double __1p = 1 - __pa;
+
+	  const double __pi_4 = 0.7853981633974483096156608458198757L;
+	  const double __d1x =
+	    std::sqrt(__np * __1p * std::log(32 * __np
+					     / (81 * __pi_4 * __1p)));
+	  _M_d1 = std::round(std::max(1.0, __d1x));
+	  const double __d2x =
+	    std::sqrt(__np * __1p * std::log(32 * _M_t * __1p
+					     / (__pi_4 * __pa)));
+	  _M_d2 = std::round(std::max(1.0, __d2x));
+
+	  // sqrt(pi / 2)
+	  const double __spi_2 = 1.2533141373155002512078826424055226L;
+	  _M_s1 = std::sqrt(__np * __1p) * (1 + _M_d1 / (4 * __np));
+	  _M_s2 = std::sqrt(__np * __1p) * (1 + _M_d2 / (4 * _M_t * __1p));
+	  _M_c = 2 * _M_d1 / __np;
+	  _M_a1 = std::exp(_M_c) * _M_s1 * __spi_2;
+	  const double __a12 = _M_a1 + _M_s2 * __spi_2;
+	  const double __s1s = _M_s1 * _M_s1;
+	  _M_a123 = __a12 + (std::exp(_M_d1 / (_M_t * __1p))
+			     * 2 * __s1s / _M_d1
+			     * std::exp(-_M_d1 * _M_d1 / (2 * __s1s)));
+	  const double __s2s = _M_s2 * _M_s2;
+	  _M_s = (_M_a123 + 2 * __s2s / _M_d2
+		  * std::exp(-_M_d2 * _M_d2 / (2 * __s2s)));
+	  _M_lf = (std::lgamma(__np + 1)
+		   + std::lgamma(_M_t - __np + 1));
+	  _M_lp1p = std::log(__pa / __1p);
+
+	  _M_q = -std::log(1 - (__p12 - __pa) / __1p);
+	}
+      else
+#endif
+	_M_q = -std::log(1 - __p12);
+    }
+
+  template<typename _IntType>
+    template<typename _UniformRandomNumberGenerator>
+      typename binomial_distribution<_IntType>::result_type
+      binomial_distribution<_IntType>::
+      _M_waiting(_UniformRandomNumberGenerator& __urng, _IntType __t)
+      {
+	_IntType __x = 0;
+	double __sum = 0.0;
+	__detail::_Adaptor<_UniformRandomNumberGenerator, double>
+	  __aurng(__urng);
+
+	do
+	  {
+	    const double __e = -std::log(__aurng());
+	    __sum += __e / (__t - __x);
+	    __x += 1;
+	  }
+	while (__sum <= _M_param._M_q);
+
+	return __x - 1;
+      }
+
+  /**
+   * A rejection algorithm when t * p >= 8 and a simple waiting time
+   * method - the second in the referenced book - otherwise.
+   * NB: The former is available only if _GLIBCXX_USE_C99_MATH_TR1
+   * is defined.
+   *
+   * Reference:
+   * Devroye, L. Non-Uniform Random Variates Generation. Springer-Verlag,
+   * New York, 1986, Ch. X, Sect. 4 (+ Errata!).
+   */
+  template<typename _IntType>
+    template<typename _UniformRandomNumberGenerator>
+      typename binomial_distribution<_IntType>::result_type
+      binomial_distribution<_IntType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	result_type __ret;
+	const _IntType __t = __param.t();
+	const _IntType __p = __param.p();
+	const double __p12 = __p <= 0.5 ? __p : 1.0 - __p;
+	__detail::_Adaptor<_UniformRandomNumberGenerator, double>
+	  __aurng(__urng);
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+	if (!__param._M_easy)
+	  {
+	    double __x;
+
+	    // See comments above...
+	    const double __naf =
+	      (1 - std::numeric_limits<double>::epsilon()) / 2;
+	    const double __thr =
+	      std::numeric_limits<_IntType>::max() + __naf;
+
+	    const double __np = std::floor(__t * __p12);
+
+	    // sqrt(pi / 2)
+	    const double __spi_2 = 1.2533141373155002512078826424055226L;
+	    const double __a1 = __param._M_a1;
+	    const double __a12 = __a1 + __param._M_s2 * __spi_2;
+	    const double __a123 = __param._M_a123;
+	    const double __s1s = __param._M_s1 * __param._M_s1;
+	    const double __s2s = __param._M_s2 * __param._M_s2;
+
+	    bool __reject;
+	    do
+	      {
+		const double __u = __param._M_s * __aurng();
+
+		double __v;
+
+		if (__u <= __a1)
+		  {
+		    const double __n = _M_nd(__urng);
+		    const double __y = __param._M_s1 * std::abs(__n);
+		    __reject = __y >= __param._M_d1;
+		    if (!__reject)
+		      {
+			const double __e = -std::log(__aurng());
+			__x = std::floor(__y);
+			__v = -__e - __n * __n / 2 + __param._M_c;
+		      }
+		  }
+		else if (__u <= __a12)
+		  {
+		    const double __n = _M_nd(__urng);
+		    const double __y = __param._M_s2 * std::abs(__n);
+		    __reject = __y >= __param._M_d2;
+		    if (!__reject)
+		      {
+			const double __e = -std::log(__aurng());
+			__x = std::floor(-__y);
+			__v = -__e - __n * __n / 2;
+		      }
+		  }
+		else if (__u <= __a123)
+		  {
+		    const double __e1 = -std::log(__aurng());
+		    const double __e2 = -std::log(__aurng());
+
+		    const double __y = __param._M_d1
+				     + 2 * __s1s * __e1 / __param._M_d1;
+		    __x = std::floor(__y);
+		    __v = (-__e2 + __param._M_d1 * (1 / (__t - __np)
+						    -__y / (2 * __s1s)));
+		    __reject = false;
+		  }
+		else
+		  {
+		    const double __e1 = -std::log(__aurng());
+		    const double __e2 = -std::log(__aurng());
+
+		    const double __y = __param._M_d2
+				     + 2 * __s2s * __e1 / __param._M_d2;
+		    __x = std::floor(-__y);
+		    __v = -__e2 - __param._M_d2 * __y / (2 * __s2s);
+		    __reject = false;
+		  }
+
+		__reject = __reject || __x < -__np || __x > __t - __np;
+		if (!__reject)
+		  {
+		    const double __lfx =
+		      std::lgamma(__np + __x + 1)
+		      + std::lgamma(__t - (__np + __x) + 1);
+		    __reject = __v > __param._M_lf - __lfx
+			     + __x * __param._M_lp1p;
+		  }
+
+		__reject |= __x + __np >= __thr;
+	      }
+	    while (__reject);
+
+	    __x += __np + __naf;
+
+	    const _IntType __z = _M_waiting(__urng, __t - _IntType(__x));
+	    __ret = _IntType(__x) + __z;
+	  }
+	else
+#endif
+	  __ret = _M_waiting(__urng, __t);
+
+	if (__p12 != __p)
+	  __ret = __t - __ret;
+	return __ret;
+      }
+
+  template<typename _IntType,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const binomial_distribution<_IntType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<double>::max_digits10);
+
+      __os << __x.t() << __space << __x.p()
+	   << __space << __x._M_nd;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _IntType,
+	   typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       binomial_distribution<_IntType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _IntType __t;
+      double __p;
+      __is >> __t >> __p >> __x._M_nd;
+      __x.param(typename binomial_distribution<_IntType>::
+		param_type(__t, __p));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const exponential_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__os.widen(' '));
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.lambda();
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       exponential_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __lambda;
+      __is >> __lambda;
+      __x.param(typename exponential_distribution<_RealType>::
+		param_type(__lambda));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  /**
+   * Polar method due to Marsaglia.
+   *
+   * Devroye, L. Non-Uniform Random Variates Generation. Springer-Verlag,
+   * New York, 1986, Ch. V, Sect. 4.4.
+   */
+  template<typename _RealType>
+    template<typename _UniformRandomNumberGenerator>
+      typename normal_distribution<_RealType>::result_type
+      normal_distribution<_RealType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	result_type __ret;
+	__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+	  __aurng(__urng);
+
+	if (_M_saved_available)
+	  {
+	    _M_saved_available = false;
+	    __ret = _M_saved;
+	  }
+	else
+	  {
+	    result_type __x, __y, __r2;
+	    do
+	      {
+		__x = result_type(2.0) * __aurng() - 1.0;
+		__y = result_type(2.0) * __aurng() - 1.0;
+		__r2 = __x * __x + __y * __y;
+	      }
+	    while (__r2 > 1.0 || __r2 == 0.0);
+
+	    const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2);
+	    _M_saved = __x * __mult;
+	    _M_saved_available = true;
+	    __ret = __y * __mult;
+	  }
+
+	__ret = __ret * __param.stddev() + __param.mean();
+	return __ret;
+      }
+
+  template<typename _RealType>
+    bool
+    operator==(const std::normal_distribution<_RealType>& __d1,
+	       const std::normal_distribution<_RealType>& __d2)
+    {
+      if (__d1._M_param == __d2._M_param
+	  && __d1._M_saved_available == __d2._M_saved_available)
+	{
+	  if (__d1._M_saved_available
+	      && __d1._M_saved == __d2._M_saved)
+	    return true;
+	  else if(!__d1._M_saved_available)
+	    return true;
+	  else
+	    return false;
+	}
+      else
+	return false;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const normal_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.mean() << __space << __x.stddev()
+	   << __space << __x._M_saved_available;
+      if (__x._M_saved_available)
+	__os << __space << __x._M_saved;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       normal_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      double __mean, __stddev;
+      __is >> __mean >> __stddev
+	   >> __x._M_saved_available;
+      if (__x._M_saved_available)
+	__is >> __x._M_saved;
+      __x.param(typename normal_distribution<_RealType>::
+		param_type(__mean, __stddev));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const lognormal_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.m() << __space << __x.s()
+	   << __space << __x._M_nd;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       lognormal_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __m, __s;
+      __is >> __m >> __s >> __x._M_nd;
+      __x.param(typename lognormal_distribution<_RealType>::
+		param_type(__m, __s));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const chi_squared_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.n() << __space << __x._M_gd;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       chi_squared_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __n;
+      __is >> __n >> __x._M_gd;
+      __x.param(typename chi_squared_distribution<_RealType>::
+		param_type(__n));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType>
+    template<typename _UniformRandomNumberGenerator>
+      typename cauchy_distribution<_RealType>::result_type
+      cauchy_distribution<_RealType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __p)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+	  __aurng(__urng);
+	_RealType __u;
+	do
+	  __u = __aurng();
+	while (__u == 0.5);
+
+	const _RealType __pi = 3.1415926535897932384626433832795029L;
+	return __p.a() + __p.b() * std::tan(__pi * __u);
+      }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const cauchy_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.a() << __space << __x.b();
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       cauchy_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __a, __b;
+      __is >> __a >> __b;
+      __x.param(typename cauchy_distribution<_RealType>::
+		param_type(__a, __b));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const fisher_f_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.m() << __space << __x.n()
+	   << __space << __x._M_gd_x << __space << __x._M_gd_y;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       fisher_f_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __m, __n;
+      __is >> __m >> __n >> __x._M_gd_x >> __x._M_gd_y;
+      __x.param(typename fisher_f_distribution<_RealType>::
+		param_type(__m, __n));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const student_t_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.n() << __space << __x._M_nd << __space << __x._M_gd;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       student_t_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __n;
+      __is >> __n >> __x._M_nd >> __x._M_gd;
+      __x.param(typename student_t_distribution<_RealType>::param_type(__n));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType>
+    void
+    gamma_distribution<_RealType>::param_type::
+    _M_initialize()
+    {
+      _M_malpha = _M_alpha < 1.0 ? _M_alpha + _RealType(1.0) : _M_alpha;
+
+      const _RealType __a1 = _M_malpha - _RealType(1.0) / _RealType(3.0);
+      _M_a2 = _RealType(1.0) / std::sqrt(_RealType(9.0) * __a1);
+    }
+
+  /**
+   * Marsaglia, G. and Tsang, W. W.
+   * "A Simple Method for Generating Gamma Variables"
+   * ACM Transactions on Mathematical Software, 26, 3, 363-372, 2000.
+   */
+  template<typename _RealType>
+    template<typename _UniformRandomNumberGenerator>
+      typename gamma_distribution<_RealType>::result_type
+      gamma_distribution<_RealType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+	  __aurng(__urng);
+
+	result_type __u, __v, __n;
+	const result_type __a1 = (__param._M_malpha
+				  - _RealType(1.0) / _RealType(3.0));
+
+	do
+	  {
+	    do
+	      {
+		__n = _M_nd(__urng);
+		__v = result_type(1.0) + __param._M_a2 * __n; 
+	      }
+	    while (__v <= 0.0);
+
+	    __v = __v * __v * __v;
+	    __u = __aurng();
+	  }
+	while (__u > result_type(1.0) - 0.331 * __n * __n * __n * __n
+	       && (std::log(__u) > (0.5 * __n * __n + __a1
+				    * (1.0 - __v + std::log(__v)))));
+
+	if (__param.alpha() == __param._M_malpha)
+	  return __a1 * __v * __param.beta();
+	else
+	  {
+	    do
+	      __u = __aurng();
+	    while (__u == 0.0);
+	    
+	    return (std::pow(__u, result_type(1.0) / __param.alpha())
+		    * __a1 * __v * __param.beta());
+	  }
+      }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const gamma_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.alpha() << __space << __x.beta()
+	   << __space << __x._M_nd;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       gamma_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __alpha_val, __beta_val;
+      __is >> __alpha_val >> __beta_val >> __x._M_nd;
+      __x.param(typename gamma_distribution<_RealType>::
+		param_type(__alpha_val, __beta_val));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType>
+    template<typename _UniformRandomNumberGenerator>
+      typename weibull_distribution<_RealType>::result_type
+      weibull_distribution<_RealType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __p)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+	  __aurng(__urng);
+	return __p.b() * std::pow(-std::log(__aurng()),
+				  result_type(1) / __p.a());
+      }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const weibull_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.a() << __space << __x.b();
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       weibull_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __a, __b;
+      __is >> __a >> __b;
+      __x.param(typename weibull_distribution<_RealType>::
+		param_type(__a, __b));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType>
+    template<typename _UniformRandomNumberGenerator>
+      typename extreme_value_distribution<_RealType>::result_type
+      extreme_value_distribution<_RealType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __p)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+	  __aurng(__urng);
+	return __p.a() - __p.b() * std::log(-std::log(__aurng()));
+      }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const extreme_value_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      __os << __x.a() << __space << __x.b();
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       extreme_value_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      _RealType __a, __b;
+      __is >> __a >> __b;
+      __x.param(typename extreme_value_distribution<_RealType>::
+		param_type(__a, __b));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _IntType>
+    void
+    discrete_distribution<_IntType>::param_type::
+    _M_initialize()
+    {
+      if (_M_prob.size() < 2)
+	{
+	  _M_prob.clear();
+	  _M_prob.push_back(1.0);
+	  return;
+	}
+
+      const double __sum = std::accumulate(_M_prob.begin(),
+					   _M_prob.end(), 0.0);
+      // Now normalize the probabilites.
+      __detail::__transform(_M_prob.begin(), _M_prob.end(), _M_prob.begin(),
+			  std::bind2nd(std::divides<double>(), __sum));
+      // Accumulate partial sums.
+      _M_cp.reserve(_M_prob.size());
+      std::partial_sum(_M_prob.begin(), _M_prob.end(),
+		       std::back_inserter(_M_cp));
+      // Make sure the last cumulative probability is one.
+      _M_cp[_M_cp.size() - 1] = 1.0;
+    }
+
+  template<typename _IntType>
+    template<typename _Func>
+      discrete_distribution<_IntType>::param_type::
+      param_type(size_t __nw, double __xmin, double __xmax, _Func __fw)
+      : _M_prob(), _M_cp()
+      {
+	const size_t __n = __nw == 0 ? 1 : __nw;
+	const double __delta = (__xmax - __xmin) / __n;
+
+	_M_prob.reserve(__n);
+	for (size_t __k = 0; __k < __nw; ++__k)
+	  _M_prob.push_back(__fw(__xmin + __k * __delta + 0.5 * __delta));
+
+	_M_initialize();
+      }
+
+  template<typename _IntType>
+    template<typename _UniformRandomNumberGenerator>
+      typename discrete_distribution<_IntType>::result_type
+      discrete_distribution<_IntType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, double>
+	  __aurng(__urng);
+
+	const double __p = __aurng();
+	auto __pos = std::lower_bound(__param._M_cp.begin(),
+				      __param._M_cp.end(), __p);
+
+	return __pos - __param._M_cp.begin();
+      }
+
+  template<typename _IntType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const discrete_distribution<_IntType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<double>::max_digits10);
+
+      std::vector<double> __prob = __x.probabilities();
+      __os << __prob.size();
+      for (auto __dit = __prob.begin(); __dit != __prob.end(); ++__dit)
+	__os << __space << *__dit;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _IntType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       discrete_distribution<_IntType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      size_t __n;
+      __is >> __n;
+
+      std::vector<double> __prob_vec;
+      __prob_vec.reserve(__n);
+      for (; __n != 0; --__n)
+	{
+	  double __prob;
+	  __is >> __prob;
+	  __prob_vec.push_back(__prob);
+	}
+
+      __x.param(typename discrete_distribution<_IntType>::
+		param_type(__prob_vec.begin(), __prob_vec.end()));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType>
+    void
+    piecewise_constant_distribution<_RealType>::param_type::
+    _M_initialize()
+    {
+      if (_M_int.size() < 2)
+	{
+	  _M_int.clear();
+	  _M_int.reserve(2);
+	  _M_int.push_back(_RealType(0));
+	  _M_int.push_back(_RealType(1));
+
+	  _M_den.clear();
+	  _M_den.push_back(1.0);
+
+	  return;
+	}
+
+      const double __sum = std::accumulate(_M_den.begin(),
+					   _M_den.end(), 0.0);
+
+      __detail::__transform(_M_den.begin(), _M_den.end(), _M_den.begin(),
+			    std::bind2nd(std::divides<double>(), __sum));
+
+      _M_cp.reserve(_M_den.size());
+      std::partial_sum(_M_den.begin(), _M_den.end(),
+		       std::back_inserter(_M_cp));
+
+      // Make sure the last cumulative probability is one.
+      _M_cp[_M_cp.size() - 1] = 1.0;
+
+      for (size_t __k = 0; __k < _M_den.size(); ++__k)
+	_M_den[__k] /= _M_int[__k + 1] - _M_int[__k];
+    }
+
+  template<typename _RealType>
+    template<typename _InputIteratorB, typename _InputIteratorW>
+      piecewise_constant_distribution<_RealType>::param_type::
+      param_type(_InputIteratorB __bbegin,
+		 _InputIteratorB __bend,
+		 _InputIteratorW __wbegin)
+      : _M_int(), _M_den(), _M_cp()
+      {
+	if (__bbegin != __bend)
+	  {
+	    for (;;)
+	      {
+		_M_int.push_back(*__bbegin);
+		++__bbegin;
+		if (__bbegin == __bend)
+		  break;
+
+		_M_den.push_back(*__wbegin);
+		++__wbegin;
+	      }
+	  }
+
+	_M_initialize();
+      }
+
+  template<typename _RealType>
+    template<typename _Func>
+      piecewise_constant_distribution<_RealType>::param_type::
+      param_type(initializer_list<_RealType> __bl, _Func __fw)
+      : _M_int(), _M_den(), _M_cp()
+      {
+	_M_int.reserve(__bl.size());
+	for (auto __biter = __bl.begin(); __biter != __bl.end(); ++__biter)
+	  _M_int.push_back(*__biter);
+
+	_M_den.reserve(_M_int.size() - 1);
+	for (size_t __k = 0; __k < _M_int.size() - 1; ++__k)
+	  _M_den.push_back(__fw(0.5 * (_M_int[__k + 1] + _M_int[__k])));
+
+	_M_initialize();
+      }
+
+  template<typename _RealType>
+    template<typename _Func>
+      piecewise_constant_distribution<_RealType>::param_type::
+      param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw)
+      : _M_int(), _M_den(), _M_cp()
+      {
+	const size_t __n = __nw == 0 ? 1 : __nw;
+	const _RealType __delta = (__xmax - __xmin) / __n;
+
+	_M_int.reserve(__n + 1);
+	for (size_t __k = 0; __k <= __nw; ++__k)
+	  _M_int.push_back(__xmin + __k * __delta);
+
+	_M_den.reserve(__n);
+	for (size_t __k = 0; __k < __nw; ++__k)
+	  _M_den.push_back(__fw(_M_int[__k] + 0.5 * __delta));
+
+	_M_initialize();
+      }
+
+  template<typename _RealType>
+    template<typename _UniformRandomNumberGenerator>
+      typename piecewise_constant_distribution<_RealType>::result_type
+      piecewise_constant_distribution<_RealType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, double>
+	  __aurng(__urng);
+
+	const double __p = __aurng();
+	auto __pos = std::lower_bound(__param._M_cp.begin(),
+				      __param._M_cp.end(), __p);
+	const size_t __i = __pos - __param._M_cp.begin();
+
+	const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0;
+
+	return __param._M_int[__i] + (__p - __pref) / __param._M_den[__i];
+      }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const piecewise_constant_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      std::vector<_RealType> __int = __x.intervals();
+      __os << __int.size() - 1;
+
+      for (auto __xit = __int.begin(); __xit != __int.end(); ++__xit)
+	__os << __space << *__xit;
+
+      std::vector<double> __den = __x.densities();
+      for (auto __dit = __den.begin(); __dit != __den.end(); ++__dit)
+	__os << __space << *__dit;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       piecewise_constant_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      size_t __n;
+      __is >> __n;
+
+      std::vector<_RealType> __int_vec;
+      __int_vec.reserve(__n + 1);
+      for (size_t __i = 0; __i <= __n; ++__i)
+	{
+	  _RealType __int;
+	  __is >> __int;
+	  __int_vec.push_back(__int);
+	}
+
+      std::vector<double> __den_vec;
+      __den_vec.reserve(__n);
+      for (size_t __i = 0; __i < __n; ++__i)
+	{
+	  double __den;
+	  __is >> __den;
+	  __den_vec.push_back(__den);
+	}
+
+      __x.param(typename piecewise_constant_distribution<_RealType>::
+	  param_type(__int_vec.begin(), __int_vec.end(), __den_vec.begin()));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _RealType>
+    void
+    piecewise_linear_distribution<_RealType>::param_type::
+    _M_initialize()
+    {
+      if (_M_int.size() < 2)
+	{
+	  _M_int.clear();
+	  _M_int.reserve(2);
+	  _M_int.push_back(_RealType(0));
+	  _M_int.push_back(_RealType(1));
+
+	  _M_den.clear();
+	  _M_den.reserve(2);
+	  _M_den.push_back(1.0);
+	  _M_den.push_back(1.0);
+
+	  return;
+	}
+
+      double __sum = 0.0;
+      _M_cp.reserve(_M_int.size() - 1);
+      _M_m.reserve(_M_int.size() - 1);
+      for (size_t __k = 0; __k < _M_int.size() - 1; ++__k)
+	{
+	  const _RealType __delta = _M_int[__k + 1] - _M_int[__k];
+	  __sum += 0.5 * (_M_den[__k + 1] + _M_den[__k]) * __delta;
+	  _M_cp.push_back(__sum);
+	  _M_m.push_back((_M_den[__k + 1] - _M_den[__k]) / __delta);
+	}
+
+      //  Now normalize the densities...
+      __detail::__transform(_M_den.begin(), _M_den.end(), _M_den.begin(),
+			  std::bind2nd(std::divides<double>(), __sum));
+      //  ... and partial sums... 
+      __detail::__transform(_M_cp.begin(), _M_cp.end(), _M_cp.begin(),
+			    std::bind2nd(std::divides<double>(), __sum));
+      //  ... and slopes.
+      __detail::__transform(_M_m.begin(), _M_m.end(), _M_m.begin(),
+			    std::bind2nd(std::divides<double>(), __sum));
+      //  Make sure the last cumulative probablility is one.
+      _M_cp[_M_cp.size() - 1] = 1.0;
+     }
+
+  template<typename _RealType>
+    template<typename _InputIteratorB, typename _InputIteratorW>
+      piecewise_linear_distribution<_RealType>::param_type::
+      param_type(_InputIteratorB __bbegin,
+		 _InputIteratorB __bend,
+		 _InputIteratorW __wbegin)
+      : _M_int(), _M_den(), _M_cp(), _M_m()
+      {
+	for (; __bbegin != __bend; ++__bbegin, ++__wbegin)
+	  {
+	    _M_int.push_back(*__bbegin);
+	    _M_den.push_back(*__wbegin);
+	  }
+
+	_M_initialize();
+      }
+
+  template<typename _RealType>
+    template<typename _Func>
+      piecewise_linear_distribution<_RealType>::param_type::
+      param_type(initializer_list<_RealType> __bl, _Func __fw)
+      : _M_int(), _M_den(), _M_cp(), _M_m()
+      {
+	_M_int.reserve(__bl.size());
+	_M_den.reserve(__bl.size());
+	for (auto __biter = __bl.begin(); __biter != __bl.end(); ++__biter)
+	  {
+	    _M_int.push_back(*__biter);
+	    _M_den.push_back(__fw(*__biter));
+	  }
+
+	_M_initialize();
+      }
+
+  template<typename _RealType>
+    template<typename _Func>
+      piecewise_linear_distribution<_RealType>::param_type::
+      param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw)
+      : _M_int(), _M_den(), _M_cp(), _M_m()
+      {
+	const size_t __n = __nw == 0 ? 1 : __nw;
+	const _RealType __delta = (__xmax - __xmin) / __n;
+
+	_M_int.reserve(__n + 1);
+	_M_den.reserve(__n + 1);
+	for (size_t __k = 0; __k <= __nw; ++__k)
+	  {
+	    _M_int.push_back(__xmin + __k * __delta);
+	    _M_den.push_back(__fw(_M_int[__k] + __delta));
+	  }
+
+	_M_initialize();
+      }
+
+  template<typename _RealType>
+    template<typename _UniformRandomNumberGenerator>
+      typename piecewise_linear_distribution<_RealType>::result_type
+      piecewise_linear_distribution<_RealType>::
+      operator()(_UniformRandomNumberGenerator& __urng,
+		 const param_type& __param)
+      {
+	__detail::_Adaptor<_UniformRandomNumberGenerator, double>
+	  __aurng(__urng);
+
+	const double __p = __aurng();
+	if (__param._M_m.empty())
+	  return __p;
+
+	auto __pos = std::lower_bound(__param._M_cp.begin(),
+				      __param._M_cp.end(), __p);
+	const size_t __i = __pos - __param._M_cp.begin();
+
+	const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0;
+
+	const double __a = 0.5 * __param._M_m[__i];
+	const double __b = __param._M_den[__i];
+	const double __cm = __p - __pref;
+
+	_RealType __x = __param._M_int[__i];
+	if (__a == 0)
+	  __x += __cm / __b;
+	else
+	  {
+	    const double __d = __b * __b + 4.0 * __a * __cm;
+	    __x += 0.5 * (std::sqrt(__d) - __b) / __a;
+          }
+
+        return __x;
+      }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const piecewise_linear_distribution<_RealType>& __x)
+    {
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
+      const _CharT __fill = __os.fill();
+      const std::streamsize __precision = __os.precision();
+      const _CharT __space = __os.widen(' ');
+      __os.flags(__ios_base::scientific | __ios_base::left);
+      __os.fill(__space);
+      __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+      std::vector<_RealType> __int = __x.intervals();
+      __os << __int.size() - 1;
+
+      for (auto __xit = __int.begin(); __xit != __int.end(); ++__xit)
+	__os << __space << *__xit;
+
+      std::vector<double> __den = __x.densities();
+      for (auto __dit = __den.begin(); __dit != __den.end(); ++__dit)
+	__os << __space << *__dit;
+
+      __os.flags(__flags);
+      __os.fill(__fill);
+      __os.precision(__precision);
+      return __os;
+    }
+
+  template<typename _RealType, typename _CharT, typename _Traits>
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is,
+	       piecewise_linear_distribution<_RealType>& __x)
+    {
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
+
+      size_t __n;
+      __is >> __n;
+
+      std::vector<_RealType> __int_vec;
+      __int_vec.reserve(__n + 1);
+      for (size_t __i = 0; __i <= __n; ++__i)
+	{
+	  _RealType __int;
+	  __is >> __int;
+	  __int_vec.push_back(__int);
+	}
+
+      std::vector<double> __den_vec;
+      __den_vec.reserve(__n + 1);
+      for (size_t __i = 0; __i <= __n; ++__i)
+	{
+	  double __den;
+	  __is >> __den;
+	  __den_vec.push_back(__den);
+	}
+
+      __x.param(typename piecewise_linear_distribution<_RealType>::
+	  param_type(__int_vec.begin(), __int_vec.end(), __den_vec.begin()));
+
+      __is.flags(__flags);
+      return __is;
+    }
+
+
+  template<typename _IntType>
+    seed_seq::seed_seq(std::initializer_list<_IntType> __il)
+    {
+      for (auto __iter = __il.begin(); __iter != __il.end(); ++__iter)
+	_M_v.push_back(__detail::__mod<result_type,
+		       __detail::_Shift<result_type, 32>::__value>(*__iter));
+    }
+
+  template<typename _InputIterator>
+    seed_seq::seed_seq(_InputIterator __begin, _InputIterator __end)
+    {
+      for (_InputIterator __iter = __begin; __iter != __end; ++__iter)
+	_M_v.push_back(__detail::__mod<result_type,
+		       __detail::_Shift<result_type, 32>::__value>(*__iter));
+    }
+
+  template<typename _RandomAccessIterator>
+    void
+    seed_seq::generate(_RandomAccessIterator __begin,
+		       _RandomAccessIterator __end)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+        _Type;
+
+      if (__begin == __end)
+	return;
+
+      std::fill(__begin, __end, _Type(0x8b8b8b8bu));
+
+      const size_t __n = __end - __begin;
+      const size_t __s = _M_v.size();
+      const size_t __t = (__n >= 623) ? 11
+		       : (__n >=  68) ? 7
+		       : (__n >=  39) ? 5
+		       : (__n >=   7) ? 3
+		       : (__n - 1) / 2;
+      const size_t __p = (__n - __t) / 2;
+      const size_t __q = __p + __t;
+      const size_t __m = std::max(__s + 1, __n);
+
+      for (size_t __k = 0; __k < __m; ++__k)
+	{
+	  _Type __arg = (__begin[__k % __n]
+			 ^ __begin[(__k + __p) % __n]
+			 ^ __begin[(__k - 1) % __n]);
+	  _Type __r1 = __arg ^ (__arg << 27);
+	  __r1 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value,
+	                         1664525u, 0u>(__r1);
+	  _Type __r2 = __r1;
+	  if (__k == 0)
+	    __r2 += __s;
+	  else if (__k <= __s)
+	    __r2 += __k % __n + _M_v[__k - 1];
+	  else
+	    __r2 += __k % __n;
+	  __r2 = __detail::__mod<_Type,
+	           __detail::_Shift<_Type, 32>::__value>(__r2);
+	  __begin[(__k + __p) % __n] += __r1;
+	  __begin[(__k + __q) % __n] += __r2;
+	  __begin[__k % __n] = __r2;
+	}
+
+      for (size_t __k = __m; __k < __m + __n; ++__k)
+	{
+	  _Type __arg = (__begin[__k % __n]
+			 + __begin[(__k + __p) % __n]
+			 + __begin[(__k - 1) % __n]);
+	  _Type __r3 = __arg ^ (__arg << 27);
+	  __r3 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value,
+	                         1566083941u, 0u>(__r3);
+	  _Type __r4 = __r3 - __k % __n;
+	  __r4 = __detail::__mod<_Type,
+	           __detail::_Shift<_Type, 32>::__value>(__r4);
+	  __begin[(__k + __p) % __n] ^= __r4;
+	  __begin[(__k + __q) % __n] ^= __r3;
+	  __begin[__k % __n] = __r4;
+	}
+    }
+
+  template<typename _RealType, size_t __bits,
+	   typename _UniformRandomNumberGenerator>
+    _RealType
+    generate_canonical(_UniformRandomNumberGenerator& __urng)
+    {
+      const size_t __b
+	= std::min(static_cast<size_t>(std::numeric_limits<_RealType>::digits),
+                   __bits);
+      const long double __r = static_cast<long double>(__urng.max())
+			    - static_cast<long double>(__urng.min()) + 1.0L;
+      const size_t __log2r = std::log(__r) / std::log(2.0L);
+      size_t __k = std::max<size_t>(1UL, (__b + __log2r - 1UL) / __log2r);
+      _RealType __sum = _RealType(0);
+      _RealType __tmp = _RealType(1);
+      for (; __k != 0; --__k)
+	{
+	  __sum += _RealType(__urng() - __urng.min()) * __tmp;
+	  __tmp *= __r;
+	}
+      return __sum / __tmp;
+    }
+}
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/shared_ptr.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/shared_ptr.h
new file mode 100644
index 0000000..5e19600
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/shared_ptr.h
@@ -0,0 +1,478 @@
+// shared_ptr and weak_ptr implementation -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+// GCC Note: Based on files from version 1.32.0 of the Boost library.
+
+//  shared_count.hpp
+//  Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+//  shared_ptr.hpp
+//  Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+//  Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+//  weak_ptr.hpp
+//  Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+//  enable_shared_from_this.hpp
+//  Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+/** @file bits/shared_ptr.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _SHARED_PTR_H
+#define _SHARED_PTR_H 1
+
+#include <bits/shared_ptr_base.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup pointer_abstractions
+   * @{
+   */
+
+  /// 2.2.3.7 shared_ptr I/O
+  template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
+    inline std::basic_ostream<_Ch, _Tr>&
+    operator<<(std::basic_ostream<_Ch, _Tr>& __os,
+	       const __shared_ptr<_Tp, _Lp>& __p)
+    {
+      __os << __p.get();
+      return __os;
+    }
+
+  /// 2.2.3.10 shared_ptr get_deleter (experimental)
+  template<typename _Del, typename _Tp, _Lock_policy _Lp>
+    inline _Del*
+    get_deleter(const __shared_ptr<_Tp, _Lp>& __p)
+    {
+#ifdef __GXX_RTTI
+      return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del)));
+#else
+      return 0;
+#endif
+    }
+
+
+  /**
+   *  @brief  A smart pointer with reference-counted copy semantics.
+   *
+   *  The object pointed to is deleted when the last shared_ptr pointing to
+   *  it is destroyed or reset.
+  */
+  template<typename _Tp>
+    class shared_ptr : public __shared_ptr<_Tp>
+    {
+    public:
+      /**
+       *  @brief  Construct an empty %shared_ptr.
+       *  @post   use_count()==0 && get()==0
+       */
+      shared_ptr() : __shared_ptr<_Tp>() { }
+
+      /**
+       *  @brief  Construct a %shared_ptr that owns the pointer @a __p.
+       *  @param  __p  A pointer that is convertible to element_type*.
+       *  @post   use_count() == 1 && get() == __p
+       *  @throw  std::bad_alloc, in which case @c delete @a __p is called.
+       */
+      template<typename _Tp1>
+	explicit shared_ptr(_Tp1* __p) : __shared_ptr<_Tp>(__p) { }
+
+      /**
+       *  @brief  Construct a %shared_ptr that owns the pointer @a __p
+       *          and the deleter @a __d.
+       *  @param  __p  A pointer.
+       *  @param  __d  A deleter.
+       *  @post   use_count() == 1 && get() == __p
+       *  @throw  std::bad_alloc, in which case @a __d(__p) is called.
+       *
+       *  Requirements: _Deleter's copy constructor and destructor must
+       *  not throw
+       *
+       *  __shared_ptr will release __p by calling __d(__p)
+       */
+      template<typename _Tp1, typename _Deleter>
+	shared_ptr(_Tp1* __p, _Deleter __d) : __shared_ptr<_Tp>(__p, __d) { }
+
+      /**
+       *  @brief  Construct a %shared_ptr that owns the pointer @a __p
+       *          and the deleter @a __d.
+       *  @param  __p  A pointer.
+       *  @param  __d  A deleter.
+       *  @param  __a  An allocator.
+       *  @post   use_count() == 1 && get() == __p
+       *  @throw  std::bad_alloc, in which case @a __d(__p) is called.
+       *
+       *  Requirements: _Deleter's copy constructor and destructor must
+       *  not throw _Alloc's copy constructor and destructor must not
+       *  throw.
+       *
+       *  __shared_ptr will release __p by calling __d(__p)
+       */
+      template<typename _Tp1, typename _Deleter, typename _Alloc>
+	shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+	: __shared_ptr<_Tp>(__p, __d, __a) { }
+
+      // Aliasing constructor
+
+      /**
+       *  @brief  Constructs a %shared_ptr instance that stores @a __p
+       *          and shares ownership with @a __r.
+       *  @param  __r  A %shared_ptr.
+       *  @param  __p  A pointer that will remain valid while @a *__r is valid.
+       *  @post   get() == __p && use_count() == __r.use_count()
+       *
+       *  This can be used to construct a @c shared_ptr to a sub-object
+       *  of an object managed by an existing @c shared_ptr.
+       *
+       * @code
+       * shared_ptr< pair<int,int> > pii(new pair<int,int>());
+       * shared_ptr<int> pi(pii, &pii->first);
+       * assert(pii.use_count() == 2);
+       * @endcode
+       */
+      template<typename _Tp1>
+	shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p)
+	: __shared_ptr<_Tp>(__r, __p) { }
+
+      /**
+       *  @brief  If @a __r is empty, constructs an empty %shared_ptr;
+       *          otherwise construct a %shared_ptr that shares ownership
+       *          with @a __r.
+       *  @param  __r  A %shared_ptr.
+       *  @post   get() == __r.get() && use_count() == __r.use_count()
+       */
+      template<typename _Tp1>
+	shared_ptr(const shared_ptr<_Tp1>& __r) : __shared_ptr<_Tp>(__r) { }
+
+      /**
+       *  @brief  Move-constructs a %shared_ptr instance from @a __r.
+       *  @param  __r  A %shared_ptr rvalue.
+       *  @post   *this contains the old value of @a __r, @a __r is empty.
+       */
+      shared_ptr(shared_ptr&& __r)
+      : __shared_ptr<_Tp>(std::move(__r)) { }
+
+      /**
+       *  @brief  Move-constructs a %shared_ptr instance from @a __r.
+       *  @param  __r  A %shared_ptr rvalue.
+       *  @post   *this contains the old value of @a __r, @a __r is empty.
+       */
+      template<typename _Tp1>
+	shared_ptr(shared_ptr<_Tp1>&& __r)
+	: __shared_ptr<_Tp>(std::move(__r)) { }
+
+      /**
+       *  @brief  Constructs a %shared_ptr that shares ownership with @a __r
+       *          and stores a copy of the pointer stored in @a __r.
+       *  @param  __r  A weak_ptr.
+       *  @post   use_count() == __r.use_count()
+       *  @throw  bad_weak_ptr when __r.expired(),
+       *          in which case the constructor has no effect.
+       */
+      template<typename _Tp1>
+	explicit shared_ptr(const weak_ptr<_Tp1>& __r)
+	: __shared_ptr<_Tp>(__r) { }
+
+#if _GLIBCXX_DEPRECATED
+      template<typename _Tp1>
+	shared_ptr(std::auto_ptr<_Tp1>&& __r)
+	: __shared_ptr<_Tp>(std::move(__r)) { }
+#endif
+
+      template<typename _Tp1, typename _Del>
+	shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+	: __shared_ptr<_Tp>(std::move(__r)) { }
+
+      template<typename _Tp1>
+	shared_ptr&
+	operator=(const shared_ptr<_Tp1>& __r) // never throws
+	{
+	  this->__shared_ptr<_Tp>::operator=(__r);
+	  return *this;
+	}
+
+#if _GLIBCXX_DEPRECATED
+      template<typename _Tp1>
+	shared_ptr&
+	operator=(std::auto_ptr<_Tp1>&& __r)
+	{
+	  this->__shared_ptr<_Tp>::operator=(std::move(__r));
+	  return *this;
+	}
+#endif
+
+      shared_ptr&
+      operator=(shared_ptr&& __r)
+      {
+	this->__shared_ptr<_Tp>::operator=(std::move(__r));
+	return *this;
+      }
+
+      template<class _Tp1>
+	shared_ptr&
+	operator=(shared_ptr<_Tp1>&& __r)
+	{
+	  this->__shared_ptr<_Tp>::operator=(std::move(__r));
+	  return *this;
+	}
+
+      template<typename _Tp1, typename _Del>
+	shared_ptr&
+	operator=(std::unique_ptr<_Tp1, _Del>&& __r)
+	{
+	  this->__shared_ptr<_Tp>::operator=(std::move(__r));
+	  return *this;
+	}
+
+    private:
+      // This constructor is non-standard, it is used by allocate_shared.
+      template<typename _Alloc, typename... _Args>
+	shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+	: __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
+	{ }
+
+      template<typename _Tp1, typename _Alloc, typename... _Args>
+	friend shared_ptr<_Tp1>
+	allocate_shared(_Alloc __a, _Args&&... __args);
+    };
+
+  // 20.8.13.2.7 shared_ptr comparisons
+  template<typename _Tp1, typename _Tp2>
+    inline bool
+    operator==(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
+    { return __a.get() == __b.get(); }
+
+  template<typename _Tp1, typename _Tp2>
+    inline bool
+    operator!=(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
+    { return __a.get() != __b.get(); }
+
+  template<typename _Tp1, typename _Tp2>
+    inline bool
+    operator<(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
+    { return __a.get() < __b.get(); }
+
+  template<typename _Tp>
+    struct less<shared_ptr<_Tp>> : public _Sp_less<shared_ptr<_Tp>>
+    { };
+
+  // 20.8.13.2.9 shared_ptr specialized algorithms.
+  template<typename _Tp>
+    inline void
+    swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b)
+    { __a.swap(__b); }
+
+  // 20.8.13.2.10 shared_ptr casts.
+  template<typename _Tp, typename _Tp1>
+    inline shared_ptr<_Tp>
+    static_pointer_cast(const shared_ptr<_Tp1>& __r)
+    { return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); }
+
+  template<typename _Tp, typename _Tp1>
+    inline shared_ptr<_Tp>
+    const_pointer_cast(const shared_ptr<_Tp1>& __r)
+    { return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); }
+
+  template<typename _Tp, typename _Tp1>
+    inline shared_ptr<_Tp>
+    dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
+    {
+      if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
+	return shared_ptr<_Tp>(__r, __p);
+      return shared_ptr<_Tp>();
+    }
+
+
+  /**
+   *  @brief  A smart pointer with weak semantics.
+   *
+   *  With forwarding constructors and assignment operators.
+   */
+  template<typename _Tp>
+    class weak_ptr : public __weak_ptr<_Tp>
+    {
+    public:
+      weak_ptr() : __weak_ptr<_Tp>() { }
+
+      template<typename _Tp1>
+	weak_ptr(const weak_ptr<_Tp1>& __r)
+	: __weak_ptr<_Tp>(__r) { }
+
+      template<typename _Tp1>
+	weak_ptr(const shared_ptr<_Tp1>& __r)
+	: __weak_ptr<_Tp>(__r) { }
+
+      template<typename _Tp1>
+	weak_ptr&
+	operator=(const weak_ptr<_Tp1>& __r) // never throws
+	{
+	  this->__weak_ptr<_Tp>::operator=(__r);
+	  return *this;
+	}
+
+      template<typename _Tp1>
+	weak_ptr&
+	operator=(const shared_ptr<_Tp1>& __r) // never throws
+	{
+	  this->__weak_ptr<_Tp>::operator=(__r);
+	  return *this;
+	}
+
+      shared_ptr<_Tp>
+      lock() const // never throws
+      {
+#ifdef __GTHREADS
+	if (this->expired())
+	  return shared_ptr<_Tp>();
+
+	__try
+	  {
+	    return shared_ptr<_Tp>(*this);
+	  }
+	__catch(const bad_weak_ptr&)
+	  {
+	    return shared_ptr<_Tp>();
+	  }
+#else
+	return this->expired() ? shared_ptr<_Tp>() : shared_ptr<_Tp>(*this);
+#endif
+      }
+    };
+
+  // 20.8.13.3.7 weak_ptr specialized algorithms.
+  template<typename _Tp>
+    inline void
+    swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b)
+    { __a.swap(__b); }
+
+
+  /// Primary template owner_less
+  template<typename _Tp>
+    struct owner_less;
+
+  /// Partial specialization of owner_less for shared_ptr.
+  template<typename _Tp>
+    struct owner_less<shared_ptr<_Tp>>
+    : public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>>
+    { };
+
+  /// Partial specialization of owner_less for weak_ptr.
+  template<typename _Tp>
+    struct owner_less<weak_ptr<_Tp>>
+    : public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>>
+    { };
+
+  /**
+   *  @brief Base class allowing use of member function shared_from_this.
+   */
+  template<typename _Tp>
+    class enable_shared_from_this
+    {
+    protected:
+      enable_shared_from_this() { }
+
+      enable_shared_from_this(const enable_shared_from_this&) { }
+
+      enable_shared_from_this&
+      operator=(const enable_shared_from_this&)
+      { return *this; }
+
+      ~enable_shared_from_this() { }
+
+    public:
+      shared_ptr<_Tp>
+      shared_from_this()
+      { return shared_ptr<_Tp>(this->_M_weak_this); }
+
+      shared_ptr<const _Tp>
+      shared_from_this() const
+      { return shared_ptr<const _Tp>(this->_M_weak_this); }
+
+    private:
+      template<typename _Tp1>
+	void
+	_M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const
+	{ _M_weak_this._M_assign(__p, __n); }
+
+      template<typename _Tp1>
+	friend void
+	__enable_shared_from_this_helper(const __shared_count<>& __pn,
+					 const enable_shared_from_this* __pe,
+					 const _Tp1* __px)
+	{
+	  if (__pe != 0)
+	    __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
+	}
+
+      mutable weak_ptr<_Tp>  _M_weak_this;
+    };
+
+  /**
+   *  @brief  Create an object that is owned by a shared_ptr.
+   *  @param  __a     An allocator.
+   *  @param  __args  Arguments for the @a _Tp object's constructor.
+   *  @return A shared_ptr that owns the newly created object.
+   *  @throw  An exception thrown from @a _Alloc::allocate or from the
+   *          constructor of @a _Tp.
+   *
+   *  A copy of @a __a will be used to allocate memory for the shared_ptr
+   *  and the new object.
+   */
+  template<typename _Tp, typename _Alloc, typename... _Args>
+    inline shared_ptr<_Tp>
+    allocate_shared(_Alloc __a, _Args&&... __args)
+    {
+      return shared_ptr<_Tp>(_Sp_make_shared_tag(), std::forward<_Alloc>(__a),
+			     std::forward<_Args>(__args)...);
+    }
+
+  /**
+   *  @brief  Create an object that is owned by a shared_ptr.
+   *  @param  __args  Arguments for the @a _Tp object's constructor.
+   *  @return A shared_ptr that owns the newly created object.
+   *  @throw  std::bad_alloc, or an exception thrown from the
+   *          constructor of @a _Tp.
+   */
+  template<typename _Tp, typename... _Args>
+    inline shared_ptr<_Tp>
+    make_shared(_Args&&... __args)
+    {
+      typedef typename std::remove_const<_Tp>::type _Tp_nc;
+      return allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
+				  std::forward<_Args>(__args)...);
+    }
+
+  // @} group pointer_abstractions
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _SHARED_PTR_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/shared_ptr_base.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/shared_ptr_base.h
new file mode 100644
index 0000000..1999f36
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/shared_ptr_base.h
@@ -0,0 +1,1138 @@
+// shared_ptr and weak_ptr implementation details -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+// GCC Note: Based on files from version 1.32.0 of the Boost library.
+
+//  shared_count.hpp
+//  Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+//  shared_ptr.hpp
+//  Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+//  Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+//  weak_ptr.hpp
+//  Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+//  enable_shared_from_this.hpp
+//  Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+/** @file bits/shared_ptr_base.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _SHARED_PTR_BASE_H
+#define _SHARED_PTR_BASE_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // Forward declarations.
+  template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+    class __shared_ptr;
+
+  template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+    class __weak_ptr;
+
+  template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+    class __enable_shared_from_this;
+
+  template<typename _Tp>
+    class shared_ptr;
+
+  template<typename _Tp>
+    class weak_ptr;
+
+  template<typename _Tp>
+    struct owner_less;
+
+  template<typename _Tp>
+    class enable_shared_from_this;
+
+  template<_Lock_policy _Lp = __default_lock_policy>
+    class __weak_count;
+
+  template<_Lock_policy _Lp = __default_lock_policy>
+    class __shared_count;
+
+
+  // Counted ptr with no deleter or allocator support
+  template<typename _Ptr, _Lock_policy _Lp>
+    class _Sp_counted_ptr : public _Sp_counted_base<_Lp>
+    {
+    public:
+      _Sp_counted_ptr(_Ptr __p)
+      : _M_ptr(__p) { }
+
+      virtual void
+      _M_dispose() // nothrow
+      { delete _M_ptr; }
+
+      virtual void
+      _M_destroy() // nothrow
+      { delete this; }
+
+      virtual void*
+      _M_get_deleter(const std::type_info& __ti)
+      { return 0; }
+
+      _Sp_counted_ptr(const _Sp_counted_ptr&) = delete;
+      _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete;
+
+    protected:
+      _Ptr             _M_ptr;  // copy constructor must not throw
+    };
+
+  // Support for custom deleter and/or allocator
+  template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
+    class _Sp_counted_deleter : public _Sp_counted_ptr<_Ptr, _Lp>
+    {
+      typedef typename _Alloc::template
+	  rebind<_Sp_counted_deleter>::other _My_alloc_type;
+
+      // Helper class that stores the Deleter and also acts as an allocator.
+      // Used to dispose of the owned pointer and the internal refcount
+      // Requires that copies of _Alloc can free each other's memory.
+      struct _My_Deleter
+      : public _My_alloc_type    // copy constructor must not throw
+      {
+	_Deleter _M_del;         // copy constructor must not throw
+	_My_Deleter(_Deleter __d, const _Alloc& __a)
+	  : _My_alloc_type(__a), _M_del(__d) { }
+      };
+
+    protected:
+      typedef _Sp_counted_ptr<_Ptr, _Lp> _Base_type;
+
+    public:
+      // __d(__p) must not throw.
+      _Sp_counted_deleter(_Ptr __p, _Deleter __d)
+      : _Base_type(__p), _M_del(__d, _Alloc()) { }
+
+      // __d(__p) must not throw.
+      _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a)
+      : _Base_type(__p), _M_del(__d, __a) { }
+
+      virtual void
+      _M_dispose() // nothrow
+      { _M_del._M_del(_Base_type::_M_ptr); }
+
+      virtual void
+      _M_destroy() // nothrow
+      {
+	_My_alloc_type __a(_M_del);
+	this->~_Sp_counted_deleter();
+	__a.deallocate(this, 1);
+      }
+
+      virtual void*
+      _M_get_deleter(const std::type_info& __ti)
+      {
+#ifdef __GXX_RTTI
+        return __ti == typeid(_Deleter) ? &_M_del._M_del : 0;
+#else
+        return 0;
+#endif
+      }
+
+    protected:
+      _My_Deleter      _M_del;  // copy constructor must not throw
+    };
+
+  // helpers for make_shared / allocate_shared
+
+  template<typename _Tp>
+    struct _Sp_destroy_inplace
+    {
+      void operator()(_Tp* __p) const { if (__p) __p->~_Tp(); }
+    };
+
+  struct _Sp_make_shared_tag { };
+
+  template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
+    class _Sp_counted_ptr_inplace
+    : public _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
+    {
+      typedef _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
+	_Base_type;
+
+    public:
+      _Sp_counted_ptr_inplace(_Alloc __a)
+      : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
+      , _M_storage()
+      {
+	void* __p = &_M_storage;
+	::new (__p) _Tp();  // might throw
+	_Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
+      }
+
+      template<typename... _Args>
+	_Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
+	: _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
+	, _M_storage()
+	{
+	  void* __p = &_M_storage;
+	  ::new (__p) _Tp(std::forward<_Args>(__args)...);  // might throw
+	  _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
+	}
+
+      // Override because the allocator needs to know the dynamic type
+      virtual void
+      _M_destroy() // nothrow
+      {
+	typedef typename _Alloc::template
+	    rebind<_Sp_counted_ptr_inplace>::other _My_alloc_type;
+	_My_alloc_type __a(_Base_type::_M_del);
+	this->~_Sp_counted_ptr_inplace();
+	__a.deallocate(this, 1);
+      }
+
+      // Sneaky trick so __shared_ptr can get the managed pointer
+      virtual void*
+      _M_get_deleter(const std::type_info& __ti)
+      {
+#ifdef __GXX_RTTI
+	return __ti == typeid(_Sp_make_shared_tag)
+	       ? static_cast<void*>(&_M_storage)
+	       : _Base_type::_M_get_deleter(__ti);
+#else
+        return 0;
+#endif
+      }
+
+    private:
+      typename aligned_storage<sizeof(_Tp), alignment_of<_Tp>::value>::type
+	_M_storage;
+    };
+
+  template<_Lock_policy _Lp>
+    class __shared_count
+    {
+    public:
+      __shared_count() : _M_pi(0) // nothrow
+      { }
+
+      template<typename _Ptr>
+	__shared_count(_Ptr __p) : _M_pi(0)
+	{
+	  __try
+	    {
+	      _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
+	    }
+	  __catch(...)
+	    {
+	      delete __p;
+	      __throw_exception_again;
+	    }
+	}
+
+      template<typename _Ptr, typename _Deleter>
+	__shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
+	{
+	  // The allocator's value_type doesn't matter, will rebind it anyway.
+	  typedef std::allocator<int> _Alloc;
+	  typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
+	  typedef std::allocator<_Sp_cd_type> _Alloc2;
+	  _Alloc2 __a2;
+	  __try
+	    {
+	      _M_pi = __a2.allocate(1);
+	      ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d);
+	    }
+	  __catch(...)
+	    {
+	      __d(__p); // Call _Deleter on __p.
+	      if (_M_pi)
+		__a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
+	      __throw_exception_again;
+	    }
+	}
+
+      template<typename _Ptr, typename _Deleter, typename _Alloc>
+	__shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
+	{
+	  typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
+	  typedef typename _Alloc::template rebind<_Sp_cd_type>::other _Alloc2;
+	  _Alloc2 __a2(__a);
+	  __try
+	    {
+	      _M_pi = __a2.allocate(1);
+	      ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a);
+	    }
+	  __catch(...)
+	    {
+	      __d(__p); // Call _Deleter on __p.
+	      if (_M_pi)
+		__a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
+	      __throw_exception_again;
+	    }
+	}
+
+      template<typename _Tp, typename _Alloc, typename... _Args>
+	__shared_count(_Sp_make_shared_tag, _Tp*, _Alloc __a, _Args&&... __args)
+	: _M_pi(0)
+	{
+	  typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
+	  typedef typename _Alloc::template rebind<_Sp_cp_type>::other _Alloc2;
+	  _Alloc2 __a2(__a);
+	  __try
+	    {
+	      _M_pi = __a2.allocate(1);
+	      ::new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a,
+		    std::forward<_Args>(__args)...);
+	    }
+	  __catch(...)
+	    {
+	      if (_M_pi)
+		__a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1);
+	      __throw_exception_again;
+	    }
+	}
+
+#if _GLIBCXX_DEPRECATED
+      // Special case for auto_ptr<_Tp> to provide the strong guarantee.
+      template<typename _Tp>
+	__shared_count(std::auto_ptr<_Tp>&& __r)
+	: _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get()))
+	{ __r.release(); }
+#endif
+
+      // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
+      template<typename _Tp, typename _Del>
+	__shared_count(std::unique_ptr<_Tp, _Del>&& __r)
+	: _M_pi(_S_create_from_up(std::move(__r)))
+	{ __r.release(); }
+
+      // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
+      explicit __shared_count(const __weak_count<_Lp>& __r);
+
+      ~__shared_count() // nothrow
+      {
+	if (_M_pi != 0)
+	  _M_pi->_M_release();
+      }
+
+      __shared_count(const __shared_count& __r)
+      : _M_pi(__r._M_pi) // nothrow
+      {
+	if (_M_pi != 0)
+	  _M_pi->_M_add_ref_copy();
+      }
+
+      __shared_count&
+      operator=(const __shared_count& __r) // nothrow
+      {
+	_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+	if (__tmp != _M_pi)
+	  {
+	    if (__tmp != 0)
+	      __tmp->_M_add_ref_copy();
+	    if (_M_pi != 0)
+	      _M_pi->_M_release();
+	    _M_pi = __tmp;
+	  }
+	return *this;
+      }
+
+      void
+      _M_swap(__shared_count& __r) // nothrow
+      {
+	_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+	__r._M_pi = _M_pi;
+	_M_pi = __tmp;
+      }
+
+      long
+      _M_get_use_count() const // nothrow
+      { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+      bool
+      _M_unique() const // nothrow
+      { return this->_M_get_use_count() == 1; }
+
+      void*
+      _M_get_deleter(const std::type_info& __ti) const
+      { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
+
+      bool
+      _M_less(const __shared_count& __rhs) const
+      { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+      bool
+      _M_less(const __weak_count<_Lp>& __rhs) const
+      { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+      // Friend function injected into enclosing namespace and found by ADL
+      friend inline bool
+      operator==(const __shared_count& __a, const __shared_count& __b)
+      { return __a._M_pi == __b._M_pi; }
+
+    private:
+      friend class __weak_count<_Lp>;
+
+      template<typename _Tp, typename _Del>
+	static _Sp_counted_base<_Lp>*
+	_S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
+	  typename std::enable_if<!std::is_reference<_Del>::value>::type* = 0)
+	{
+	  return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<_Tp>,
+	    _Lp>(__r.get(), __r.get_deleter());
+	}
+
+      template<typename _Tp, typename _Del>
+	static _Sp_counted_base<_Lp>*
+	_S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
+	  typename std::enable_if<std::is_reference<_Del>::value>::type* = 0)
+	{
+	  typedef typename std::remove_reference<_Del>::type _Del1;
+	  typedef std::reference_wrapper<_Del1> _Del2;
+	  return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<_Tp>,
+	    _Lp>(__r.get(), std::ref(__r.get_deleter()));
+	}
+
+      _Sp_counted_base<_Lp>*  _M_pi;
+    };
+
+
+  template<_Lock_policy _Lp>
+    class __weak_count
+    {
+    public:
+      __weak_count() : _M_pi(0) // nothrow
+      { }
+
+      __weak_count(const __shared_count<_Lp>& __r) : _M_pi(__r._M_pi) // nothrow
+      {
+	if (_M_pi != 0)
+	  _M_pi->_M_weak_add_ref();
+      }
+
+      __weak_count(const __weak_count<_Lp>& __r) : _M_pi(__r._M_pi) // nothrow
+      {
+	if (_M_pi != 0)
+	  _M_pi->_M_weak_add_ref();
+      }
+
+      ~__weak_count() // nothrow
+      {
+	if (_M_pi != 0)
+	  _M_pi->_M_weak_release();
+      }
+
+      __weak_count<_Lp>&
+      operator=(const __shared_count<_Lp>& __r) // nothrow
+      {
+	_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+	if (__tmp != 0)
+	  __tmp->_M_weak_add_ref();
+	if (_M_pi != 0)
+	  _M_pi->_M_weak_release();
+	_M_pi = __tmp;
+	return *this;
+      }
+
+      __weak_count<_Lp>&
+      operator=(const __weak_count<_Lp>& __r) // nothrow
+      {
+	_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+	if (__tmp != 0)
+	  __tmp->_M_weak_add_ref();
+	if (_M_pi != 0)
+	  _M_pi->_M_weak_release();
+	_M_pi = __tmp;
+	return *this;
+      }
+
+      void
+      _M_swap(__weak_count<_Lp>& __r) // nothrow
+      {
+	_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+	__r._M_pi = _M_pi;
+	_M_pi = __tmp;
+      }
+
+      long
+      _M_get_use_count() const // nothrow
+      { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+      bool
+      _M_less(const __weak_count& __rhs) const
+      { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+      bool
+      _M_less(const __shared_count<_Lp>& __rhs) const
+      { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+      // Friend function injected into enclosing namespace and found by ADL
+      friend inline bool
+      operator==(const __weak_count& __a, const __weak_count& __b)
+      { return __a._M_pi == __b._M_pi; }
+
+    private:
+      friend class __shared_count<_Lp>;
+
+      _Sp_counted_base<_Lp>*  _M_pi;
+    };
+
+  // Now that __weak_count is defined we can define this constructor:
+  template<_Lock_policy _Lp>
+    inline __shared_count<_Lp>:: __shared_count(const __weak_count<_Lp>& __r)
+    : _M_pi(__r._M_pi)
+    {
+      if (_M_pi != 0)
+	_M_pi->_M_add_ref_lock();
+      else
+	__throw_bad_weak_ptr();
+    }
+
+
+  // Support for enable_shared_from_this.
+
+  // Friend of __enable_shared_from_this.
+  template<_Lock_policy _Lp, typename _Tp1, typename _Tp2>
+    void
+    __enable_shared_from_this_helper(const __shared_count<_Lp>&,
+				     const __enable_shared_from_this<_Tp1,
+				     _Lp>*, const _Tp2*);
+
+  // Friend of enable_shared_from_this.
+  template<typename _Tp1, typename _Tp2>
+    void
+    __enable_shared_from_this_helper(const __shared_count<>&,
+				     const enable_shared_from_this<_Tp1>*,
+				     const _Tp2*);
+
+  template<_Lock_policy _Lp>
+    inline void
+    __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...)
+    { }
+
+
+  template<typename _Tp, _Lock_policy _Lp>
+    class __shared_ptr
+    {
+    public:
+      typedef _Tp   element_type;
+
+      __shared_ptr() : _M_ptr(0), _M_refcount() // never throws
+      { }
+
+      template<typename _Tp1>
+	explicit __shared_ptr(_Tp1* __p) : _M_ptr(__p), _M_refcount(__p)
+	{
+	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+	  // __glibcxx_function_requires(_CompleteConcept<_Tp1*>)
+	  __enable_shared_from_this_helper(_M_refcount, __p, __p);
+	}
+
+      template<typename _Tp1, typename _Deleter>
+	__shared_ptr(_Tp1* __p, _Deleter __d)
+	: _M_ptr(__p), _M_refcount(__p, __d)
+	{
+	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+	  // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
+	  __enable_shared_from_this_helper(_M_refcount, __p, __p);
+	}
+
+      template<typename _Tp1, typename _Deleter, typename _Alloc>
+	__shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+	: _M_ptr(__p), _M_refcount(__p, __d, __a)
+	{
+	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+	  // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
+	  __enable_shared_from_this_helper(_M_refcount, __p, __p);
+	}
+
+      template<typename _Tp1>
+	__shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p)
+	: _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
+	{ }
+
+      //  generated copy constructor, assignment, destructor are fine.
+
+      template<typename _Tp1>
+	__shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
+	: _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+	{ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+
+      __shared_ptr(__shared_ptr&& __r)
+      : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+      {
+	_M_refcount._M_swap(__r._M_refcount);
+	__r._M_ptr = 0;
+      }
+
+      template<typename _Tp1>
+	__shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r)
+	: _M_ptr(__r._M_ptr), _M_refcount() // never throws
+	{
+	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+	  _M_refcount._M_swap(__r._M_refcount);
+	  __r._M_ptr = 0;
+	}
+
+      template<typename _Tp1>
+	explicit __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+	: _M_refcount(__r._M_refcount) // may throw
+	{
+	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+
+	  // It is now safe to copy __r._M_ptr, as
+	  // _M_refcount(__r._M_refcount) did not throw.
+	  _M_ptr = __r._M_ptr;
+	}
+
+      // If an exception is thrown this constructor has no effect.
+      template<typename _Tp1, typename _Del>
+	__shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+	: _M_ptr(__r.get()), _M_refcount()
+	{
+	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+	  _Tp1* __tmp = __r.get();
+	  _M_refcount = __shared_count<_Lp>(std::move(__r));
+	  __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
+	}
+
+#if _GLIBCXX_DEPRECATED
+      // Postcondition: use_count() == 1 and __r.get() == 0
+      template<typename _Tp1>
+	__shared_ptr(std::auto_ptr<_Tp1>&& __r)
+	: _M_ptr(__r.get()), _M_refcount()
+	{
+	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+	  // TODO requires _Tp1 is complete, delete __r.release() well-formed
+	  _Tp1* __tmp = __r.get();
+	  _M_refcount = __shared_count<_Lp>(std::move(__r));
+	  __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
+	}
+#endif
+
+      template<typename _Tp1>
+	__shared_ptr&
+	operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+	{
+	  _M_ptr = __r._M_ptr;
+	  _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
+	  return *this;
+	}
+
+#if _GLIBCXX_DEPRECATED
+      template<typename _Tp1>
+	__shared_ptr&
+	operator=(std::auto_ptr<_Tp1>&& __r)
+	{
+	  __shared_ptr(std::move(__r)).swap(*this);
+	  return *this;
+	}
+#endif
+
+      __shared_ptr&
+      operator=(__shared_ptr&& __r)
+      {
+	__shared_ptr(std::move(__r)).swap(*this);
+	return *this;
+      }
+
+      template<class _Tp1>
+	__shared_ptr&
+	operator=(__shared_ptr<_Tp1, _Lp>&& __r)
+	{
+	  __shared_ptr(std::move(__r)).swap(*this);
+	  return *this;
+	}
+
+      template<typename _Tp1, typename _Del>
+	__shared_ptr&
+	operator=(std::unique_ptr<_Tp1, _Del>&& __r)
+	{
+	  __shared_ptr(std::move(__r)).swap(*this);
+	  return *this;
+	}
+
+      void
+      reset() // never throws
+      { __shared_ptr().swap(*this); }
+
+      template<typename _Tp1>
+	void
+	reset(_Tp1* __p) // _Tp1 must be complete.
+	{
+	  // Catch self-reset errors.
+	  _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != _M_ptr);
+	  __shared_ptr(__p).swap(*this);
+	}
+
+      template<typename _Tp1, typename _Deleter>
+	void
+	reset(_Tp1* __p, _Deleter __d)
+	{ __shared_ptr(__p, __d).swap(*this); }
+
+      template<typename _Tp1, typename _Deleter, typename _Alloc>
+	void
+	reset(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+	{ __shared_ptr(__p, __d, __a).swap(*this); }
+
+      // Allow class instantiation when _Tp is [cv-qual] void.
+      typename std::add_lvalue_reference<_Tp>::type
+      operator*() const // never throws
+      {
+	_GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+	return *_M_ptr;
+      }
+
+      _Tp*
+      operator->() const // never throws
+      {
+	_GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+	return _M_ptr;
+      }
+
+      _Tp*
+      get() const // never throws
+      { return _M_ptr; }
+
+      explicit operator bool() const // never throws
+      { return _M_ptr == 0 ? false : true; }
+
+      bool
+      unique() const // never throws
+      { return _M_refcount._M_unique(); }
+
+      long
+      use_count() const // never throws
+      { return _M_refcount._M_get_use_count(); }
+
+      void
+      swap(__shared_ptr<_Tp, _Lp>& __other) // never throws
+      {
+	std::swap(_M_ptr, __other._M_ptr);
+	_M_refcount._M_swap(__other._M_refcount);
+      }
+
+      template<typename _Tp1>
+	bool
+	owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const
+	{ return _M_refcount._M_less(__rhs._M_refcount); }
+
+      template<typename _Tp1>
+	bool
+	owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const
+	{ return _M_refcount._M_less(__rhs._M_refcount); }
+
+#ifdef __GXX_RTTI
+    protected:
+      // This constructor is non-standard, it is used by allocate_shared.
+      template<typename _Alloc, typename... _Args>
+	__shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+	: _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
+				std::forward<_Args>(__args)...)
+	{
+	  // _M_ptr needs to point to the newly constructed object.
+	  // This relies on _Sp_counted_ptr_inplace::_M_get_deleter.
+	  void* __p = _M_refcount._M_get_deleter(typeid(__tag));
+	  _M_ptr = static_cast<_Tp*>(__p);
+	  __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr);
+	}
+#else
+      template<typename _Alloc>
+        struct _Deleter
+        {
+          void operator()(_Tp* __ptr)
+          {
+            _M_alloc.destroy(__ptr);
+            _M_alloc.deallocate(__ptr, 1);
+          }
+          _Alloc _M_alloc;
+        };
+
+      template<typename _Alloc, typename... _Args>
+	__shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+	: _M_ptr(), _M_refcount()
+        {
+	  typedef typename _Alloc::template rebind<_Tp>::other _Alloc2;
+          _Deleter<_Alloc2> __del = { _Alloc2(__a) };
+          _M_ptr = __del._M_alloc.allocate(1);
+	  __try
+	    {
+              __del._M_alloc.construct(_M_ptr, std::forward<_Args>(__args)...);
+	    }
+	  __catch(...)
+	    {
+              __del._M_alloc.deallocate(_M_ptr, 1);
+	      __throw_exception_again;
+	    }
+          __shared_count<_Lp> __count(_M_ptr, __del, __del._M_alloc);
+          _M_refcount._M_swap(__count);
+	  __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr);
+        }
+#endif
+
+      template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc,
+	       typename... _Args>
+	friend __shared_ptr<_Tp1, _Lp1>
+	__allocate_shared(_Alloc __a, _Args&&... __args);
+
+    private:
+      void*
+      _M_get_deleter(const std::type_info& __ti) const
+      { return _M_refcount._M_get_deleter(__ti); }
+
+      template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+      template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+
+      template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
+	friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&);
+
+      _Tp*	   	   _M_ptr;         // Contained pointer.
+      __shared_count<_Lp>  _M_refcount;    // Reference counter.
+    };
+
+
+  // 20.8.13.2.7 shared_ptr comparisons
+  template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+    inline bool
+    operator==(const __shared_ptr<_Tp1, _Lp>& __a,
+	       const __shared_ptr<_Tp2, _Lp>& __b)
+    { return __a.get() == __b.get(); }
+
+  template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+    inline bool
+    operator!=(const __shared_ptr<_Tp1, _Lp>& __a,
+	       const __shared_ptr<_Tp2, _Lp>& __b)
+    { return __a.get() != __b.get(); }
+
+  template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+    inline bool
+    operator<(const __shared_ptr<_Tp1, _Lp>& __a,
+	      const __shared_ptr<_Tp2, _Lp>& __b)
+    { return __a.get() < __b.get(); }
+
+  template<typename _Sp>
+    struct _Sp_less : public binary_function<_Sp, _Sp, bool>
+    {
+      bool
+      operator()(const _Sp& __lhs, const _Sp& __rhs) const
+      {
+	typedef typename _Sp::element_type element_type;
+	return std::less<element_type*>()(__lhs.get(), __rhs.get());
+      }
+    };
+
+  template<typename _Tp, _Lock_policy _Lp>
+    struct less<__shared_ptr<_Tp, _Lp>>
+    : public _Sp_less<__shared_ptr<_Tp, _Lp>>
+    { };
+
+  // XXX LessThanComparable<_Tp> concept should provide >, >= and <=
+  template<typename _Tp, _Lock_policy _Lp>
+    inline bool
+    operator>(const __shared_ptr<_Tp, _Lp>& __a,
+	      const __shared_ptr<_Tp, _Lp>& __b)
+    { return __a.get() > __b.get(); }
+
+  template<typename _Tp, _Lock_policy _Lp>
+    inline bool
+    operator>=(const __shared_ptr<_Tp, _Lp>& __a,
+	       const __shared_ptr<_Tp, _Lp>& __b)
+    { return __a.get() >= __b.get(); }
+
+  template<typename _Tp, _Lock_policy _Lp>
+    inline bool
+    operator<=(const __shared_ptr<_Tp, _Lp>& __a,
+	       const __shared_ptr<_Tp, _Lp>& __b)
+    { return __a.get() <= __b.get(); }
+
+  // 2.2.3.8 shared_ptr specialized algorithms.
+  template<typename _Tp, _Lock_policy _Lp>
+    inline void
+    swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
+    { __a.swap(__b); }
+
+  // 2.2.3.9 shared_ptr casts
+
+  // The seemingly equivalent code:
+  // shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))
+  // will eventually result in undefined behaviour, attempting to
+  // delete the same object twice.
+  /// static_pointer_cast
+  template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+    inline __shared_ptr<_Tp, _Lp>
+    static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+    { return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__r.get())); }
+
+  // The seemingly equivalent code:
+  // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))
+  // will eventually result in undefined behaviour, attempting to
+  // delete the same object twice.
+  /// const_pointer_cast
+  template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+    inline __shared_ptr<_Tp, _Lp>
+    const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+    { return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__r.get())); }
+
+  // The seemingly equivalent code:
+  // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))
+  // will eventually result in undefined behaviour, attempting to
+  // delete the same object twice.
+  /// dynamic_pointer_cast
+  template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+    inline __shared_ptr<_Tp, _Lp>
+    dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+    {
+      if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
+	return __shared_ptr<_Tp, _Lp>(__r, __p);
+      return __shared_ptr<_Tp, _Lp>();
+    }
+
+
+  template<typename _Tp, _Lock_policy _Lp>
+    class __weak_ptr
+    {
+    public:
+      typedef _Tp element_type;
+
+      __weak_ptr() : _M_ptr(0), _M_refcount() // never throws
+      { }
+
+      // Generated copy constructor, assignment, destructor are fine.
+
+      // The "obvious" converting constructor implementation:
+      //
+      //  template<typename _Tp1>
+      //    __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+      //    : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+      //    { }
+      //
+      // has a serious problem.
+      //
+      //  __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr)
+      //  conversion may require access to *__r._M_ptr (virtual inheritance).
+      //
+      // It is not possible to avoid spurious access violations since
+      // in multithreaded programs __r._M_ptr may be invalidated at any point.
+      template<typename _Tp1>
+	__weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+	: _M_refcount(__r._M_refcount) // never throws
+	{
+	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+	  _M_ptr = __r.lock().get();
+	}
+
+      template<typename _Tp1>
+	__weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
+	: _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+	{ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+
+      template<typename _Tp1>
+	__weak_ptr&
+	operator=(const __weak_ptr<_Tp1, _Lp>& __r) // never throws
+	{
+	  _M_ptr = __r.lock().get();
+	  _M_refcount = __r._M_refcount;
+	  return *this;
+	}
+
+      template<typename _Tp1>
+	__weak_ptr&
+	operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+	{
+	  _M_ptr = __r._M_ptr;
+	  _M_refcount = __r._M_refcount;
+	  return *this;
+	}
+
+      __shared_ptr<_Tp, _Lp>
+      lock() const // never throws
+      {
+#ifdef __GTHREADS
+	// Optimization: avoid throw overhead.
+	if (expired())
+	  return __shared_ptr<element_type, _Lp>();
+
+	__try
+	  {
+	    return __shared_ptr<element_type, _Lp>(*this);
+	  }
+	__catch(const bad_weak_ptr&)
+	  {
+	    // Q: How can we get here?
+	    // A: Another thread may have invalidated r after the
+	    //    use_count test above.
+	    return __shared_ptr<element_type, _Lp>();
+	  }
+
+#else
+	// Optimization: avoid try/catch overhead when single threaded.
+	return expired() ? __shared_ptr<element_type, _Lp>()
+			 : __shared_ptr<element_type, _Lp>(*this);
+
+#endif
+      } // XXX MT
+
+      long
+      use_count() const // never throws
+      { return _M_refcount._M_get_use_count(); }
+
+      bool
+      expired() const // never throws
+      { return _M_refcount._M_get_use_count() == 0; }
+
+      template<typename _Tp1>
+	bool
+	owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const
+	{ return _M_refcount._M_less(__rhs._M_refcount); }
+
+      template<typename _Tp1>
+	bool
+	owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const
+	{ return _M_refcount._M_less(__rhs._M_refcount); }
+
+      void
+      reset() // never throws
+      { __weak_ptr().swap(*this); }
+
+      void
+      swap(__weak_ptr& __s) // never throws
+      {
+	std::swap(_M_ptr, __s._M_ptr);
+	_M_refcount._M_swap(__s._M_refcount);
+      }
+
+    private:
+      // Used by __enable_shared_from_this.
+      void
+      _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount)
+      {
+	_M_ptr = __ptr;
+	_M_refcount = __refcount;
+      }
+
+      template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+      template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+      friend class __enable_shared_from_this<_Tp, _Lp>;
+      friend class enable_shared_from_this<_Tp>;
+
+      _Tp*	 	 _M_ptr;         // Contained pointer.
+      __weak_count<_Lp>  _M_refcount;    // Reference counter.
+    };
+
+  // 20.8.13.3.7 weak_ptr specialized algorithms.
+  template<typename _Tp, _Lock_policy _Lp>
+    inline void
+    swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b)
+    { __a.swap(__b); }
+
+  template<typename _Tp, typename _Tp1>
+    struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __lhs, const _Tp& __rhs) const
+      { return __lhs.owner_before(__rhs); }
+
+      bool
+      operator()(const _Tp& __lhs, const _Tp1& __rhs) const
+      { return __lhs.owner_before(__rhs); }
+
+      bool
+      operator()(const _Tp1& __lhs, const _Tp& __rhs) const
+      { return __lhs.owner_before(__rhs); }
+    };
+
+  template<typename _Tp, _Lock_policy _Lp>
+    struct owner_less<__shared_ptr<_Tp, _Lp>>
+    : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>>
+    { };
+
+  template<typename _Tp, _Lock_policy _Lp>
+    struct owner_less<__weak_ptr<_Tp, _Lp>>
+    : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>>
+    { };
+
+
+  template<typename _Tp, _Lock_policy _Lp>
+    class __enable_shared_from_this
+    {
+    protected:
+      __enable_shared_from_this() { }
+
+      __enable_shared_from_this(const __enable_shared_from_this&) { }
+
+      __enable_shared_from_this&
+      operator=(const __enable_shared_from_this&)
+      { return *this; }
+
+      ~__enable_shared_from_this() { }
+
+    public:
+      __shared_ptr<_Tp, _Lp>
+      shared_from_this()
+      { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
+
+      __shared_ptr<const _Tp, _Lp>
+      shared_from_this() const
+      { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
+
+    private:
+      template<typename _Tp1>
+	void
+	_M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const
+	{ _M_weak_this._M_assign(__p, __n); }
+
+      template<typename _Tp1>
+	friend void
+	__enable_shared_from_this_helper(const __shared_count<_Lp>& __pn,
+					 const __enable_shared_from_this* __pe,
+					 const _Tp1* __px)
+	{
+	  if (__pe != 0)
+	    __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
+	}
+
+      mutable __weak_ptr<_Tp, _Lp>  _M_weak_this;
+    };
+
+
+  template<typename _Tp, _Lock_policy _Lp, typename _Alloc, typename... _Args>
+    inline __shared_ptr<_Tp, _Lp>
+    __allocate_shared(_Alloc __a, _Args&&... __args)
+    {
+      return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(),
+	  std::forward<_Alloc>(__a), std::forward<_Args>(__args)...);
+    }
+
+  template<typename _Tp, _Lock_policy _Lp, typename... _Args>
+    inline __shared_ptr<_Tp, _Lp>
+    __make_shared(_Args&&... __args)
+    {
+      typedef typename std::remove_const<_Tp>::type _Tp_nc;
+      return __allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(),
+					 std::forward<_Args>(__args)...);
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _SHARED_PTR_BASE_H
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/slice_array.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/slice_array.h
new file mode 100644
index 0000000..566c764
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/slice_array.h
@@ -0,0 +1,272 @@
+// The template and inlines for the -*- C++ -*- slice_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file slice_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _SLICE_ARRAY_H
+#define _SLICE_ARRAY_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup numeric_arrays
+   * @{
+   */
+
+  /**
+   *  @brief  Class defining one-dimensional subset of an array.
+   *
+   *  The slice class represents a one-dimensional subset of an array,
+   *  specified by three parameters: start offset, size, and stride.  The
+   *  start offset is the index of the first element of the array that is part
+   *  of the subset.  The size is the total number of elements in the subset.
+   *  Stride is the distance between each successive array element to include
+   *  in the subset.
+   *
+   *  For example, with an array of size 10, and a slice with offset 1, size 3
+   *  and stride 2, the subset consists of array elements 1, 3, and 5.
+   */
+  class slice
+  {
+  public:
+    ///  Construct an empty slice.
+    slice();
+
+    /**
+     *  @brief  Construct a slice.
+     *
+     *  @param  o  Offset in array of first element.
+     *  @param  d  Number of elements in slice.
+     *  @param  s  Stride between array elements.
+     */
+    slice(size_t, size_t, size_t);
+
+    ///  Return array offset of first slice element.
+    size_t start() const;
+    ///  Return size of slice.
+    size_t size() const;
+    ///  Return array stride of slice.
+    size_t stride() const;
+
+  private:
+    size_t _M_off;                      // offset
+    size_t _M_sz;			// size
+    size_t _M_st;			// stride unit
+  };
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 543. valarray slice default constructor
+  inline
+  slice::slice() 
+  : _M_off(0), _M_sz(0), _M_st(0) {}
+
+  inline
+  slice::slice(size_t __o, size_t __d, size_t __s)
+  : _M_off(__o), _M_sz(__d), _M_st(__s) {}
+
+  inline size_t
+  slice::start() const
+  { return _M_off; }
+
+  inline size_t
+  slice::size() const
+  { return _M_sz; }
+
+  inline size_t
+  slice::stride() const
+  { return _M_st; }
+
+  /**
+   *  @brief  Reference to one-dimensional subset of an array.
+   *
+   *  A slice_array is a reference to the actual elements of an array
+   *  specified by a slice.  The way to get a slice_array is to call
+   *  operator[](slice) on a valarray.  The returned slice_array then permits
+   *  carrying operations out on the referenced subset of elements in the
+   *  original valarray.  For example, operator+=(valarray) will add values
+   *  to the subset of elements in the underlying valarray this slice_array
+   *  refers to.
+   *
+   *  @param  Tp  Element type.
+   */
+  template<typename _Tp>
+    class slice_array
+    {
+    public:
+      typedef _Tp value_type;
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 253. valarray helper functions are almost entirely useless
+
+      ///  Copy constructor.  Both slices refer to the same underlying array.
+      slice_array(const slice_array&);
+
+      ///  Assignment operator.  Assigns slice elements to corresponding
+      ///  elements of @a a.
+      slice_array& operator=(const slice_array&);
+
+      ///  Assign slice elements to corresponding elements of @a v.
+      void operator=(const valarray<_Tp>&) const;
+      ///  Multiply slice elements by corresponding elements of @a v.
+      void operator*=(const valarray<_Tp>&) const;
+      ///  Divide slice elements by corresponding elements of @a v.
+      void operator/=(const valarray<_Tp>&) const;
+      ///  Modulo slice elements by corresponding elements of @a v.
+      void operator%=(const valarray<_Tp>&) const;
+      ///  Add corresponding elements of @a v to slice elements.
+      void operator+=(const valarray<_Tp>&) const;
+      ///  Subtract corresponding elements of @a v from slice elements.
+      void operator-=(const valarray<_Tp>&) const;
+      ///  Logical xor slice elements with corresponding elements of @a v.
+      void operator^=(const valarray<_Tp>&) const;
+      ///  Logical and slice elements with corresponding elements of @a v.
+      void operator&=(const valarray<_Tp>&) const;
+      ///  Logical or slice elements with corresponding elements of @a v.
+      void operator|=(const valarray<_Tp>&) const;
+      ///  Left shift slice elements by corresponding elements of @a v.
+      void operator<<=(const valarray<_Tp>&) const;
+      ///  Right shift slice elements by corresponding elements of @a v.
+      void operator>>=(const valarray<_Tp>&) const;
+      ///  Assign all slice elements to @a t.
+      void operator=(const _Tp &) const;
+      //        ~slice_array ();
+
+      template<class _Dom>
+        void operator=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator*=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator/=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator%=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator+=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator-=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator^=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator&=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator|=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator<<=(const _Expr<_Dom, _Tp>&) const;
+      template<class _Dom>
+	void operator>>=(const _Expr<_Dom, _Tp>&) const;
+
+    private:
+      friend class valarray<_Tp>;
+      slice_array(_Array<_Tp>, const slice&);
+
+      const size_t      _M_sz;
+      const size_t      _M_stride;
+      const _Array<_Tp> _M_array;
+
+      // not implemented
+      slice_array();
+    };
+
+  template<typename _Tp>
+    inline
+    slice_array<_Tp>::slice_array(_Array<_Tp> __a, const slice& __s)
+    : _M_sz(__s.size()), _M_stride(__s.stride()),
+      _M_array(__a.begin() + __s.start()) {}
+
+  template<typename _Tp>
+    inline
+    slice_array<_Tp>::slice_array(const slice_array<_Tp>& a)
+    : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {}
+
+  //    template<typename _Tp>
+  //    inline slice_array<_Tp>::~slice_array () {}
+
+  template<typename _Tp>
+    inline slice_array<_Tp>&
+    slice_array<_Tp>::operator=(const slice_array<_Tp>& __a)
+    {
+      std::__valarray_copy(__a._M_array, __a._M_sz, __a._M_stride,
+			   _M_array, _M_stride);
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline void
+    slice_array<_Tp>::operator=(const _Tp& __t) const
+    { std::__valarray_fill(_M_array, _M_sz, _M_stride, __t); }
+
+  template<typename _Tp>
+    inline void
+    slice_array<_Tp>::operator=(const valarray<_Tp>& __v) const
+    { std::__valarray_copy(_Array<_Tp>(__v), _M_array, _M_sz, _M_stride); }
+
+  template<typename _Tp>
+  template<class _Dom>
+    inline void
+    slice_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const
+    { std::__valarray_copy(__e, _M_sz, _M_array, _M_stride); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(_Op,_Name)				\
+  template<typename _Tp>						\
+    inline void								\
+    slice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const	\
+    {									\
+      _Array_augmented_##_Name(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v));\
+    }									\
+									\
+  template<typename _Tp>                                                \
+    template<class _Dom>				                \
+      inline void							\
+      slice_array<_Tp>::operator _Op##=(const _Expr<_Dom,_Tp>& __e) const\
+      {									\
+	  _Array_augmented_##_Name(_M_array, _M_stride, __e, _M_sz);	\
+      }
+
+
+_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(%, __modulus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(-, __minus)
+_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
+_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
+_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
+_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+  // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _SLICE_ARRAY_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/sstream.tcc b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/sstream.tcc
new file mode 100644
index 0000000..0f9db8e
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/sstream.tcc
@@ -0,0 +1,273 @@
+// String based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file sstream.tcc
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.7  String-based streams
+//
+
+#ifndef _SSTREAM_TCC
+#define _SSTREAM_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template <class _CharT, class _Traits, class _Alloc>
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    pbackfail(int_type __c)
+    {
+      int_type __ret = traits_type::eof();
+      if (this->eback() < this->gptr())
+	{
+	  // Try to put back __c into input sequence in one of three ways.
+	  // Order these tests done in is unspecified by the standard.
+	  const bool __testeof = traits_type::eq_int_type(__c, __ret);
+	  if (!__testeof)
+	    {
+	      const bool __testeq = traits_type::eq(traits_type::
+						    to_char_type(__c),
+						    this->gptr()[-1]);	  
+	      const bool __testout = this->_M_mode & ios_base::out;
+	      if (__testeq || __testout)
+		{
+		  this->gbump(-1);
+		  if (!__testeq)
+		    *this->gptr() = traits_type::to_char_type(__c);
+		  __ret = __c;
+		}
+	    }
+	  else
+	    {
+	      this->gbump(-1);
+	      __ret = traits_type::not_eof(__c);
+	    }
+	}
+      return __ret;
+    }
+
+  template <class _CharT, class _Traits, class _Alloc>
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    overflow(int_type __c)
+    {
+      const bool __testout = this->_M_mode & ios_base::out;
+      if (__builtin_expect(!__testout, false))
+	return traits_type::eof();
+
+      const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
+      if (__builtin_expect(__testeof, false))
+	return traits_type::not_eof(__c);
+
+      const __size_type __capacity = _M_string.capacity();
+      const __size_type __max_size = _M_string.max_size();
+      const bool __testput = this->pptr() < this->epptr();
+      if (__builtin_expect(!__testput && __capacity == __max_size, false))
+	return traits_type::eof();
+
+      // Try to append __c into output sequence in one of two ways.
+      // Order these tests done in is unspecified by the standard.
+      const char_type __conv = traits_type::to_char_type(__c);
+      if (!__testput)
+	{
+	  // NB: Start ostringstream buffers at 512 chars.  This is an
+	  // experimental value (pronounced "arbitrary" in some of the
+	  // hipper English-speaking countries), and can be changed to
+	  // suit particular needs.
+	  //
+	  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+	  // 169. Bad efficiency of overflow() mandated
+	  // 432. stringbuf::overflow() makes only one write position
+	  //      available
+	  const __size_type __opt_len = std::max(__size_type(2 * __capacity),
+						 __size_type(512));
+	  const __size_type __len = std::min(__opt_len, __max_size);
+	  __string_type __tmp;
+	  __tmp.reserve(__len);
+	  if (this->pbase())
+	    __tmp.assign(this->pbase(), this->epptr() - this->pbase());
+	  __tmp.push_back(__conv);
+	  _M_string.swap(__tmp);
+	  _M_sync(const_cast<char_type*>(_M_string.data()),
+		  this->gptr() - this->eback(), this->pptr() - this->pbase());
+	}
+      else
+	*this->pptr() = __conv;
+      this->pbump(1);
+      return __c;
+    }
+
+  template <class _CharT, class _Traits, class _Alloc>
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    underflow()
+    {
+      int_type __ret = traits_type::eof();
+      const bool __testin = this->_M_mode & ios_base::in;
+      if (__testin)
+	{
+	  // Update egptr() to match the actual string end.
+	  _M_update_egptr();
+
+	  if (this->gptr() < this->egptr())
+	    __ret = traits_type::to_int_type(*this->gptr());
+	}
+      return __ret;
+    }
+
+  template <class _CharT, class _Traits, class _Alloc>
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
+    {
+      pos_type __ret =  pos_type(off_type(-1));
+      bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
+      bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
+      const bool __testboth = __testin && __testout && __way != ios_base::cur;
+      __testin &= !(__mode & ios_base::out);
+      __testout &= !(__mode & ios_base::in);
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 453. basic_stringbuf::seekoff need not always fail for an empty stream.
+      const char_type* __beg = __testin ? this->eback() : this->pbase();
+      if ((__beg || !__off) && (__testin || __testout || __testboth))
+	{
+	  _M_update_egptr();
+
+	  off_type __newoffi = __off;
+	  off_type __newoffo = __newoffi;
+	  if (__way == ios_base::cur)
+	    {
+	      __newoffi += this->gptr() - __beg;
+	      __newoffo += this->pptr() - __beg;
+	    }
+	  else if (__way == ios_base::end)
+	    __newoffo = __newoffi += this->egptr() - __beg;
+
+	  if ((__testin || __testboth)
+	      && __newoffi >= 0
+	      && this->egptr() - __beg >= __newoffi)
+	    {
+	      this->gbump((__beg + __newoffi) - this->gptr());
+	      __ret = pos_type(__newoffi);
+	    }
+	  if ((__testout || __testboth)
+	      && __newoffo >= 0
+	      && this->egptr() - __beg >= __newoffo)
+	    {
+	      this->pbump((__beg + __newoffo) - this->pptr());
+	      __ret = pos_type(__newoffo);
+	    }
+	}
+      return __ret;
+    }
+
+  template <class _CharT, class _Traits, class _Alloc>
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    seekpos(pos_type __sp, ios_base::openmode __mode)
+    {
+      pos_type __ret =  pos_type(off_type(-1));
+      const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
+      const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
+
+      const char_type* __beg = __testin ? this->eback() : this->pbase();
+      if ((__beg || !off_type(__sp)) && (__testin || __testout))
+	{
+	  _M_update_egptr();
+
+	  const off_type __pos(__sp);
+	  const bool __testpos = (0 <= __pos
+				  && __pos <= this->egptr() - __beg);
+	  if (__testpos)
+	    {
+	      if (__testin)
+		this->gbump((__beg + __pos) - this->gptr());
+	      if (__testout)
+                this->pbump((__beg + __pos) - this->pptr());
+	      __ret = __sp;
+	    }
+	}
+      return __ret;
+    }
+
+  template <class _CharT, class _Traits, class _Alloc>
+    void
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    _M_sync(char_type* __base, __size_type __i, __size_type __o)
+    {
+      const bool __testin = _M_mode & ios_base::in;
+      const bool __testout = _M_mode & ios_base::out;
+      char_type* __endg = __base + _M_string.size();
+      char_type* __endp = __base + _M_string.capacity();
+
+      if (__base != _M_string.data())
+	{
+	  // setbuf: __i == size of buffer area (_M_string.size() == 0).
+	  __endg += __i;
+	  __i = 0;
+	  __endp = __endg;
+	}
+
+      if (__testin)
+	this->setg(__base, __base + __i, __endg);
+      if (__testout)
+	{
+	  this->setp(__base, __endp);
+	  this->pbump(__o);
+	  // egptr() always tracks the string end.  When !__testin,
+	  // for the correct functioning of the streambuf inlines
+	  // the other get area pointers are identical.
+	  if (!__testin)
+	    this->setg(__endg, __endg, __endg);
+	}
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.
+  // NB:  This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+  extern template class basic_stringbuf<char>;
+  extern template class basic_istringstream<char>;
+  extern template class basic_ostringstream<char>;
+  extern template class basic_stringstream<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+  extern template class basic_stringbuf<wchar_t>;
+  extern template class basic_istringstream<wchar_t>;
+  extern template class basic_ostringstream<wchar_t>;
+  extern template class basic_stringstream<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_algo.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_algo.h
new file mode 100644
index 0000000..5b4991e
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_algo.h
@@ -0,0 +1,6082 @@
+// Algorithm implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_algo.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_ALGO_H
+#define _STL_ALGO_H 1
+
+#include <cstdlib>             // for rand
+#include <bits/algorithmfwd.h>
+#include <bits/stl_heap.h>
+#include <bits/stl_tempbuf.h>  // for _Temporary_buffer
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <random> // for std::uniform_int_distribution
+#endif
+
+// See concept_check.h for the __glibcxx_*_requires macros.
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /// Swaps the median value of *__a, *__b and *__c to *__a
+  template<typename _Iterator>
+    void
+    __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_Iterator>::value_type>)
+
+      if (*__a < *__b)
+	{
+	  if (*__b < *__c)
+	    std::iter_swap(__a, __b);
+	  else if (*__a < *__c)
+	    std::iter_swap(__a, __c);
+	}
+      else if (*__a < *__c)
+	return;
+      else if (*__b < *__c)
+	std::iter_swap(__a, __c);
+      else
+	std::iter_swap(__a, __b);
+    }
+
+  /// Swaps the median value of *__a, *__b and *__c under __comp to *__a
+  template<typename _Iterator, typename _Compare>
+    void
+    __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c,
+			_Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BinaryFunctionConcept<_Compare, bool,
+	    typename iterator_traits<_Iterator>::value_type,
+	    typename iterator_traits<_Iterator>::value_type>)
+
+      if (__comp(*__a, *__b))
+	{
+	  if (__comp(*__b, *__c))
+	    std::iter_swap(__a, __b);
+	  else if (__comp(*__a, *__c))
+	    std::iter_swap(__a, __c);
+	}
+      else if (__comp(*__a, *__c))
+	return;
+      else if (__comp(*__b, *__c))
+	std::iter_swap(__a, __c);
+      else
+	std::iter_swap(__a, __b);
+    }
+
+  // for_each
+
+  /// This is an overload used by find() for the Input Iterator case.
+  template<typename _InputIterator, typename _Tp>
+    inline _InputIterator
+    __find(_InputIterator __first, _InputIterator __last,
+	   const _Tp& __val, input_iterator_tag)
+    {
+      while (__first != __last && !(*__first == __val))
+	++__first;
+      return __first;
+    }
+
+  /// This is an overload used by find_if() for the Input Iterator case.
+  template<typename _InputIterator, typename _Predicate>
+    inline _InputIterator
+    __find_if(_InputIterator __first, _InputIterator __last,
+	      _Predicate __pred, input_iterator_tag)
+    {
+      while (__first != __last && !bool(__pred(*__first)))
+	++__first;
+      return __first;
+    }
+
+  /// This is an overload used by find() for the RAI case.
+  template<typename _RandomAccessIterator, typename _Tp>
+    _RandomAccessIterator
+    __find(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	   const _Tp& __val, random_access_iterator_tag)
+    {
+      typename iterator_traits<_RandomAccessIterator>::difference_type
+	__trip_count = (__last - __first) >> 2;
+
+      for (; __trip_count > 0; --__trip_count)
+	{
+	  if (*__first == __val)
+	    return __first;
+	  ++__first;
+
+	  if (*__first == __val)
+	    return __first;
+	  ++__first;
+
+	  if (*__first == __val)
+	    return __first;
+	  ++__first;
+
+	  if (*__first == __val)
+	    return __first;
+	  ++__first;
+	}
+
+      switch (__last - __first)
+	{
+	case 3:
+	  if (*__first == __val)
+	    return __first;
+	  ++__first;
+	case 2:
+	  if (*__first == __val)
+	    return __first;
+	  ++__first;
+	case 1:
+	  if (*__first == __val)
+	    return __first;
+	  ++__first;
+	case 0:
+	default:
+	  return __last;
+	}
+    }
+
+  /// This is an overload used by find_if() for the RAI case.
+  template<typename _RandomAccessIterator, typename _Predicate>
+    _RandomAccessIterator
+    __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      _Predicate __pred, random_access_iterator_tag)
+    {
+      typename iterator_traits<_RandomAccessIterator>::difference_type
+	__trip_count = (__last - __first) >> 2;
+
+      for (; __trip_count > 0; --__trip_count)
+	{
+	  if (__pred(*__first))
+	    return __first;
+	  ++__first;
+
+	  if (__pred(*__first))
+	    return __first;
+	  ++__first;
+
+	  if (__pred(*__first))
+	    return __first;
+	  ++__first;
+
+	  if (__pred(*__first))
+	    return __first;
+	  ++__first;
+	}
+
+      switch (__last - __first)
+	{
+	case 3:
+	  if (__pred(*__first))
+	    return __first;
+	  ++__first;
+	case 2:
+	  if (__pred(*__first))
+	    return __first;
+	  ++__first;
+	case 1:
+	  if (__pred(*__first))
+	    return __first;
+	  ++__first;
+	case 0:
+	default:
+	  return __last;
+	}
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /// This is an overload used by find_if_not() for the Input Iterator case.
+  template<typename _InputIterator, typename _Predicate>
+    inline _InputIterator
+    __find_if_not(_InputIterator __first, _InputIterator __last,
+		  _Predicate __pred, input_iterator_tag)
+    {
+      while (__first != __last && bool(__pred(*__first)))
+	++__first;
+      return __first;
+    }
+
+  /// This is an overload used by find_if_not() for the RAI case.
+  template<typename _RandomAccessIterator, typename _Predicate>
+    _RandomAccessIterator
+    __find_if_not(_RandomAccessIterator __first, _RandomAccessIterator __last,
+		  _Predicate __pred, random_access_iterator_tag)
+    {
+      typename iterator_traits<_RandomAccessIterator>::difference_type
+	__trip_count = (__last - __first) >> 2;
+
+      for (; __trip_count > 0; --__trip_count)
+	{
+	  if (!bool(__pred(*__first)))
+	    return __first;
+	  ++__first;
+
+	  if (!bool(__pred(*__first)))
+	    return __first;
+	  ++__first;
+
+	  if (!bool(__pred(*__first)))
+	    return __first;
+	  ++__first;
+
+	  if (!bool(__pred(*__first)))
+	    return __first;
+	  ++__first;
+	}
+
+      switch (__last - __first)
+	{
+	case 3:
+	  if (!bool(__pred(*__first)))
+	    return __first;
+	  ++__first;
+	case 2:
+	  if (!bool(__pred(*__first)))
+	    return __first;
+	  ++__first;
+	case 1:
+	  if (!bool(__pred(*__first)))
+	    return __first;
+	  ++__first;
+	case 0:
+	default:
+	  return __last;
+	}
+    }
+#endif
+
+  // set_difference
+  // set_intersection
+  // set_symmetric_difference
+  // set_union
+  // for_each
+  // find
+  // find_if
+  // find_first_of
+  // adjacent_find
+  // count
+  // count_if
+  // search
+
+  /**
+   *  This is an uglified
+   *  search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&)
+   *  overloaded for forward iterators.
+  */
+  template<typename _ForwardIterator, typename _Integer, typename _Tp>
+    _ForwardIterator
+    __search_n(_ForwardIterator __first, _ForwardIterator __last,
+	       _Integer __count, const _Tp& __val,
+	       std::forward_iterator_tag)
+    {
+      __first = _GLIBCXX_STD_P::find(__first, __last, __val);
+      while (__first != __last)
+	{
+	  typename iterator_traits<_ForwardIterator>::difference_type
+	    __n = __count;
+	  _ForwardIterator __i = __first;
+	  ++__i;
+	  while (__i != __last && __n != 1 && *__i == __val)
+	    {
+	      ++__i;
+	      --__n;
+	    }
+	  if (__n == 1)
+	    return __first;
+	  if (__i == __last)
+	    return __last;
+	  __first = _GLIBCXX_STD_P::find(++__i, __last, __val);
+	}
+      return __last;
+    }
+
+  /**
+   *  This is an uglified
+   *  search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&)
+   *  overloaded for random access iterators.
+  */
+  template<typename _RandomAccessIter, typename _Integer, typename _Tp>
+    _RandomAccessIter
+    __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
+	       _Integer __count, const _Tp& __val, 
+	       std::random_access_iterator_tag)
+    {
+      
+      typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
+	_DistanceType;
+
+      _DistanceType __tailSize = __last - __first;
+      const _DistanceType __pattSize = __count;
+
+      if (__tailSize < __pattSize)
+        return __last;
+
+      const _DistanceType __skipOffset = __pattSize - 1;
+      _RandomAccessIter __lookAhead = __first + __skipOffset;
+      __tailSize -= __pattSize;
+
+      while (1) // the main loop...
+	{
+	  // __lookAhead here is always pointing to the last element of next 
+	  // possible match.
+	  while (!(*__lookAhead == __val)) // the skip loop...
+	    {
+	      if (__tailSize < __pattSize)
+		return __last;  // Failure
+	      __lookAhead += __pattSize;
+	      __tailSize -= __pattSize;
+	    }
+	  _DistanceType __remainder = __skipOffset;
+	  for (_RandomAccessIter __backTrack = __lookAhead - 1; 
+	       *__backTrack == __val; --__backTrack)
+	    {
+	      if (--__remainder == 0)
+		return (__lookAhead - __skipOffset); // Success
+	    }
+	  if (__remainder > __tailSize)
+	    return __last; // Failure
+	  __lookAhead += __remainder;
+	  __tailSize -= __remainder;
+	}
+    }
+
+  // search_n
+
+  /**
+   *  This is an uglified
+   *  search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&,
+   *	       _BinaryPredicate)
+   *  overloaded for forward iterators.
+  */
+  template<typename _ForwardIterator, typename _Integer, typename _Tp,
+           typename _BinaryPredicate>
+    _ForwardIterator
+    __search_n(_ForwardIterator __first, _ForwardIterator __last,
+	       _Integer __count, const _Tp& __val,
+	       _BinaryPredicate __binary_pred, std::forward_iterator_tag)
+    {
+      while (__first != __last && !bool(__binary_pred(*__first, __val)))
+        ++__first;
+
+      while (__first != __last)
+	{
+	  typename iterator_traits<_ForwardIterator>::difference_type
+	    __n = __count;
+	  _ForwardIterator __i = __first;
+	  ++__i;
+	  while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val)))
+	    {
+	      ++__i;
+	      --__n;
+	    }
+	  if (__n == 1)
+	    return __first;
+	  if (__i == __last)
+	    return __last;
+	  __first = ++__i;
+	  while (__first != __last
+		 && !bool(__binary_pred(*__first, __val)))
+	    ++__first;
+	}
+      return __last;
+    }
+
+  /**
+   *  This is an uglified
+   *  search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&,
+   *	       _BinaryPredicate)
+   *  overloaded for random access iterators.
+  */
+  template<typename _RandomAccessIter, typename _Integer, typename _Tp,
+	   typename _BinaryPredicate>
+    _RandomAccessIter
+    __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
+	       _Integer __count, const _Tp& __val,
+	       _BinaryPredicate __binary_pred, std::random_access_iterator_tag)
+    {
+      
+      typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
+	_DistanceType;
+
+      _DistanceType __tailSize = __last - __first;
+      const _DistanceType __pattSize = __count;
+
+      if (__tailSize < __pattSize)
+        return __last;
+
+      const _DistanceType __skipOffset = __pattSize - 1;
+      _RandomAccessIter __lookAhead = __first + __skipOffset;
+      __tailSize -= __pattSize;
+
+      while (1) // the main loop...
+	{
+	  // __lookAhead here is always pointing to the last element of next 
+	  // possible match.
+	  while (!bool(__binary_pred(*__lookAhead, __val))) // the skip loop...
+	    {
+	      if (__tailSize < __pattSize)
+		return __last;  // Failure
+	      __lookAhead += __pattSize;
+	      __tailSize -= __pattSize;
+	    }
+	  _DistanceType __remainder = __skipOffset;
+	  for (_RandomAccessIter __backTrack = __lookAhead - 1; 
+	       __binary_pred(*__backTrack, __val); --__backTrack)
+	    {
+	      if (--__remainder == 0)
+		return (__lookAhead - __skipOffset); // Success
+	    }
+	  if (__remainder > __tailSize)
+	    return __last; // Failure
+	  __lookAhead += __remainder;
+	  __tailSize -= __remainder;
+	}
+    }
+
+  // find_end for forward iterators.
+  template<typename _ForwardIterator1, typename _ForwardIterator2>
+    _ForwardIterator1
+    __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+	       _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+	       forward_iterator_tag, forward_iterator_tag)
+    {
+      if (__first2 == __last2)
+	return __last1;
+      else
+	{
+	  _ForwardIterator1 __result = __last1;
+	  while (1)
+	    {
+	      _ForwardIterator1 __new_result
+		= _GLIBCXX_STD_P::search(__first1, __last1, __first2, __last2);
+	      if (__new_result == __last1)
+		return __result;
+	      else
+		{
+		  __result = __new_result;
+		  __first1 = __new_result;
+		  ++__first1;
+		}
+	    }
+	}
+    }
+
+  template<typename _ForwardIterator1, typename _ForwardIterator2,
+	   typename _BinaryPredicate>
+    _ForwardIterator1
+    __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+	       _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+	       forward_iterator_tag, forward_iterator_tag,
+	       _BinaryPredicate __comp)
+    {
+      if (__first2 == __last2)
+	return __last1;
+      else
+	{
+	  _ForwardIterator1 __result = __last1;
+	  while (1)
+	    {
+	      _ForwardIterator1 __new_result
+		= _GLIBCXX_STD_P::search(__first1, __last1, __first2,
+					 __last2, __comp);
+	      if (__new_result == __last1)
+		return __result;
+	      else
+		{
+		  __result = __new_result;
+		  __first1 = __new_result;
+		  ++__first1;
+		}
+	    }
+	}
+    }
+
+  // find_end for bidirectional iterators (much faster).
+  template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
+    _BidirectionalIterator1
+    __find_end(_BidirectionalIterator1 __first1,
+	       _BidirectionalIterator1 __last1,
+	       _BidirectionalIterator2 __first2,
+	       _BidirectionalIterator2 __last2,
+	       bidirectional_iterator_tag, bidirectional_iterator_tag)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator1>)
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator2>)
+
+      typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
+      typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
+
+      _RevIterator1 __rlast1(__first1);
+      _RevIterator2 __rlast2(__first2);
+      _RevIterator1 __rresult = _GLIBCXX_STD_P::search(_RevIterator1(__last1),
+						       __rlast1,
+						       _RevIterator2(__last2),
+						       __rlast2);
+
+      if (__rresult == __rlast1)
+	return __last1;
+      else
+	{
+	  _BidirectionalIterator1 __result = __rresult.base();
+	  std::advance(__result, -std::distance(__first2, __last2));
+	  return __result;
+	}
+    }
+
+  template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+	   typename _BinaryPredicate>
+    _BidirectionalIterator1
+    __find_end(_BidirectionalIterator1 __first1,
+	       _BidirectionalIterator1 __last1,
+	       _BidirectionalIterator2 __first2,
+	       _BidirectionalIterator2 __last2,
+	       bidirectional_iterator_tag, bidirectional_iterator_tag,
+	       _BinaryPredicate __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator1>)
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator2>)
+
+      typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
+      typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
+
+      _RevIterator1 __rlast1(__first1);
+      _RevIterator2 __rlast2(__first2);
+      _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
+					    _RevIterator2(__last2), __rlast2,
+					    __comp);
+
+      if (__rresult == __rlast1)
+	return __last1;
+      else
+	{
+	  _BidirectionalIterator1 __result = __rresult.base();
+	  std::advance(__result, -std::distance(__first2, __last2));
+	  return __result;
+	}
+    }
+
+  /**
+   *  @brief  Find last matching subsequence in a sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  Start of range to search.
+   *  @param  last1   End of range to search.
+   *  @param  first2  Start of sequence to match.
+   *  @param  last2   End of sequence to match.
+   *  @return   The last iterator @c i in the range
+   *  @p [first1,last1-(last2-first2)) such that @c *(i+N) == @p *(first2+N)
+   *  for each @c N in the range @p [0,last2-first2), or @p last1 if no
+   *  such iterator exists.
+   *
+   *  Searches the range @p [first1,last1) for a sub-sequence that compares
+   *  equal value-by-value with the sequence given by @p [first2,last2) and
+   *  returns an iterator to the first element of the sub-sequence, or
+   *  @p last1 if the sub-sequence is not found.  The sub-sequence will be the
+   *  last such subsequence contained in [first,last1).
+   *
+   *  Because the sub-sequence must lie completely within the range
+   *  @p [first1,last1) it must start at a position less than
+   *  @p last1-(last2-first2) where @p last2-first2 is the length of the
+   *  sub-sequence.
+   *  This means that the returned iterator @c i will be in the range
+   *  @p [first1,last1-(last2-first2))
+  */
+  template<typename _ForwardIterator1, typename _ForwardIterator2>
+    inline _ForwardIterator1
+    find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+	     _ForwardIterator2 __first2, _ForwardIterator2 __last2)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_ForwardIterator1>::value_type,
+	    typename iterator_traits<_ForwardIterator2>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+      __glibcxx_requires_valid_range(__first2, __last2);
+
+      return std::__find_end(__first1, __last1, __first2, __last2,
+			     std::__iterator_category(__first1),
+			     std::__iterator_category(__first2));
+    }
+
+  /**
+   *  @brief  Find last matching subsequence in a sequence using a predicate.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  Start of range to search.
+   *  @param  last1   End of range to search.
+   *  @param  first2  Start of sequence to match.
+   *  @param  last2   End of sequence to match.
+   *  @param  comp    The predicate to use.
+   *  @return   The last iterator @c i in the range
+   *  @p [first1,last1-(last2-first2)) such that @c predicate(*(i+N), @p
+   *  (first2+N)) is true for each @c N in the range @p [0,last2-first2), or
+   *  @p last1 if no such iterator exists.
+   *
+   *  Searches the range @p [first1,last1) for a sub-sequence that compares
+   *  equal value-by-value with the sequence given by @p [first2,last2) using
+   *  comp as a predicate and returns an iterator to the first element of the
+   *  sub-sequence, or @p last1 if the sub-sequence is not found.  The
+   *  sub-sequence will be the last such subsequence contained in
+   *  [first,last1).
+   *
+   *  Because the sub-sequence must lie completely within the range
+   *  @p [first1,last1) it must start at a position less than
+   *  @p last1-(last2-first2) where @p last2-first2 is the length of the
+   *  sub-sequence.
+   *  This means that the returned iterator @c i will be in the range
+   *  @p [first1,last1-(last2-first2))
+  */
+  template<typename _ForwardIterator1, typename _ForwardIterator2,
+	   typename _BinaryPredicate>
+    inline _ForwardIterator1
+    find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+	     _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+	     _BinaryPredicate __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_ForwardIterator1>::value_type,
+	    typename iterator_traits<_ForwardIterator2>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+      __glibcxx_requires_valid_range(__first2, __last2);
+
+      return std::__find_end(__first1, __last1, __first2, __last2,
+			     std::__iterator_category(__first1),
+			     std::__iterator_category(__first2),
+			     __comp);
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /**
+   *  @brief  Checks that a predicate is true for all the elements
+   *          of a sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  pred    A predicate.
+   *  @return  True if the check is true, false otherwise.
+   *
+   *  Returns true if @p pred is true for each element in the range
+   *  @p [first,last), and false otherwise.
+  */
+  template<typename _InputIterator, typename _Predicate>
+    inline bool
+    all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+    { return __last == std::find_if_not(__first, __last, __pred); }
+
+  /**
+   *  @brief  Checks that a predicate is false for all the elements
+   *          of a sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  pred    A predicate.
+   *  @return  True if the check is true, false otherwise.
+   *
+   *  Returns true if @p pred is false for each element in the range
+   *  @p [first,last), and false otherwise.
+  */
+  template<typename _InputIterator, typename _Predicate>
+    inline bool
+    none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+    { return __last == _GLIBCXX_STD_P::find_if(__first, __last, __pred); }
+
+  /**
+   *  @brief  Checks that a predicate is false for at least an element
+   *          of a sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  pred    A predicate.
+   *  @return  True if the check is true, false otherwise.
+   *
+   *  Returns true if an element exists in the range @p [first,last) such that
+   *  @p pred is true, and false otherwise.
+  */
+  template<typename _InputIterator, typename _Predicate>
+    inline bool
+    any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+    { return !std::none_of(__first, __last, __pred); }
+
+  /**
+   *  @brief  Find the first element in a sequence for which a
+   *          predicate is false.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  pred   A predicate.
+   *  @return   The first iterator @c i in the range @p [first,last)
+   *  such that @p pred(*i) is false, or @p last if no such iterator exists.
+  */
+  template<typename _InputIterator, typename _Predicate>
+    inline _InputIterator
+    find_if_not(_InputIterator __first, _InputIterator __last,
+		_Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	      typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+      return std::__find_if_not(__first, __last, __pred,
+				std::__iterator_category(__first));
+    }
+
+  /**
+   *  @brief  Checks whether the sequence is partitioned.
+   *  @ingroup mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  pred   A predicate.
+   *  @return  True if the range @p [first,last) is partioned by @p pred,
+   *  i.e. if all elements that satisfy @p pred appear before those that
+   *  do not.
+  */
+  template<typename _InputIterator, typename _Predicate>
+    inline bool
+    is_partitioned(_InputIterator __first, _InputIterator __last,
+		   _Predicate __pred)
+    {
+      __first = std::find_if_not(__first, __last, __pred);
+      return std::none_of(__first, __last, __pred);
+    }
+
+  /**
+   *  @brief  Find the partition point of a partitioned range.
+   *  @ingroup mutating_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  pred    A predicate.
+   *  @return  An iterator @p mid such that @p all_of(first, mid, pred)
+   *           and @p none_of(mid, last, pred) are both true.
+  */
+  template<typename _ForwardIterator, typename _Predicate>
+    _ForwardIterator
+    partition_point(_ForwardIterator __first, _ForwardIterator __last,
+		    _Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	      typename iterator_traits<_ForwardIterator>::value_type>)
+
+      // A specific debug-mode test will be necessary...
+      __glibcxx_requires_valid_range(__first, __last);
+
+      typedef typename iterator_traits<_ForwardIterator>::difference_type
+	_DistanceType;
+
+      _DistanceType __len = std::distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIterator __middle;
+
+      while (__len > 0)
+	{
+	  __half = __len >> 1;
+	  __middle = __first;
+	  std::advance(__middle, __half);
+	  if (__pred(*__middle))
+	    {
+	      __first = __middle;
+	      ++__first;
+	      __len = __len - __half - 1;
+	    }
+	  else
+	    __len = __half;
+	}
+      return __first;
+    }
+#endif
+
+
+  /**
+   *  @brief Copy a sequence, removing elements of a given value.
+   *  @ingroup mutating_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  result  An output iterator.
+   *  @param  value   The value to be removed.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) not equal to @p value
+   *  to the range beginning at @p result.
+   *  remove_copy() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+  */
+  template<typename _InputIterator, typename _OutputIterator, typename _Tp>
+    _OutputIterator
+    remove_copy(_InputIterator __first, _InputIterator __last,
+		_OutputIterator __result, const _Tp& __value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIterator>::value_type, _Tp>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	if (!(*__first == __value))
+	  {
+	    *__result = *__first;
+	    ++__result;
+	  }
+      return __result;
+    }
+
+  /**
+   *  @brief Copy a sequence, removing elements for which a predicate is true.
+   *  @ingroup mutating_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  result  An output iterator.
+   *  @param  pred    A predicate.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) for which
+   *  @p pred returns false to the range beginning at @p result.
+   *
+   *  remove_copy_if() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+  */
+  template<typename _InputIterator, typename _OutputIterator,
+	   typename _Predicate>
+    _OutputIterator
+    remove_copy_if(_InputIterator __first, _InputIterator __last,
+		   _OutputIterator __result, _Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	if (!bool(__pred(*__first)))
+	  {
+	    *__result = *__first;
+	    ++__result;
+	  }
+      return __result;
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /**
+   *  @brief Copy the elements of a sequence for which a predicate is true.
+   *  @ingroup mutating_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  result  An output iterator.
+   *  @param  pred    A predicate.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) for which
+   *  @p pred returns true to the range beginning at @p result.
+   *
+   *  copy_if() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+  */
+  template<typename _InputIterator, typename _OutputIterator,
+	   typename _Predicate>
+    _OutputIterator
+    copy_if(_InputIterator __first, _InputIterator __last,
+	    _OutputIterator __result, _Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	if (__pred(*__first))
+	  {
+	    *__result = *__first;
+	    ++__result;
+	  }
+      return __result;
+    }
+
+
+  template<typename _InputIterator, typename _Size, typename _OutputIterator>
+    _OutputIterator
+    __copy_n(_InputIterator __first, _Size __n,
+	     _OutputIterator __result, input_iterator_tag)
+    {
+      for (; __n > 0; --__n)
+	{
+	  *__result = *__first;
+	  ++__first;
+	  ++__result;
+	}
+      return __result;
+    }
+
+  template<typename _RandomAccessIterator, typename _Size,
+	   typename _OutputIterator>
+    inline _OutputIterator
+    __copy_n(_RandomAccessIterator __first, _Size __n,
+	     _OutputIterator __result, random_access_iterator_tag)
+    { return std::copy(__first, __first + __n, __result); }
+
+  /**
+   *  @brief Copies the range [first,first+n) into [result,result+n).
+   *  @ingroup mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  n      The number of elements to copy.
+   *  @param  result An output iterator.
+   *  @return  result+n.
+   *
+   *  This inline function will boil down to a call to @c memmove whenever
+   *  possible.  Failing that, if random access iterators are passed, then the
+   *  loop count will be known (and therefore a candidate for compiler
+   *  optimizations such as unrolling).
+  */
+  template<typename _InputIterator, typename _Size, typename _OutputIterator>
+    inline _OutputIterator
+    copy_n(_InputIterator __first, _Size __n, _OutputIterator __result)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+	    typename iterator_traits<_InputIterator>::value_type>)
+
+      return std::__copy_n(__first, __n, __result,
+			   std::__iterator_category(__first));
+    }
+
+  /**
+   *  @brief Copy the elements of a sequence to separate output sequences
+   *         depending on the truth value of a predicate.
+   *  @ingroup mutating_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  out_true   An output iterator.
+   *  @param  out_false  An output iterator.
+   *  @param  pred    A predicate.
+   *  @return   A pair designating the ends of the resulting sequences.
+   *
+   *  Copies each element in the range @p [first,last) for which
+   *  @p pred returns true to the range beginning at @p out_true
+   *  and each element for which @p pred returns false to @p out_false.
+  */
+  template<typename _InputIterator, typename _OutputIterator1,
+	   typename _OutputIterator2, typename _Predicate>
+    pair<_OutputIterator1, _OutputIterator2>
+    partition_copy(_InputIterator __first, _InputIterator __last,
+		   _OutputIterator1 __out_true, _OutputIterator2 __out_false,
+		   _Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator1,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator2,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+      
+      for (; __first != __last; ++__first)
+	if (__pred(*__first))
+	  {
+	    *__out_true = *__first;
+	    ++__out_true;
+	  }
+	else
+	  {
+	    *__out_false = *__first;
+	    ++__out_false;
+	  }
+
+      return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false);
+    }
+#endif
+
+  /**
+   *  @brief Remove elements from a sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  value  The value to be removed.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  All elements equal to @p value are removed from the range
+   *  @p [first,last).
+   *
+   *  remove() is stable, so the relative order of elements that are
+   *  not removed is unchanged.
+   *
+   *  Elements between the end of the resulting sequence and @p last
+   *  are still present, but their value is unspecified.
+  */
+  template<typename _ForwardIterator, typename _Tp>
+    _ForwardIterator
+    remove(_ForwardIterator __first, _ForwardIterator __last,
+	   const _Tp& __value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      __first = _GLIBCXX_STD_P::find(__first, __last, __value);
+      if(__first == __last)
+        return __first;
+      _ForwardIterator __result = __first;
+      ++__first;
+      for(; __first != __last; ++__first)
+        if(!(*__first == __value))
+          {
+            *__result = _GLIBCXX_MOVE(*__first);
+            ++__result;
+          }
+      return __result;
+    }
+
+  /**
+   *  @brief Remove elements from a sequence using a predicate.
+   *  @ingroup mutating_algorithms
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @param  pred   A predicate.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  All elements for which @p pred returns true are removed from the range
+   *  @p [first,last).
+   *
+   *  remove_if() is stable, so the relative order of elements that are
+   *  not removed is unchanged.
+   *
+   *  Elements between the end of the resulting sequence and @p last
+   *  are still present, but their value is unspecified.
+  */
+  template<typename _ForwardIterator, typename _Predicate>
+    _ForwardIterator
+    remove_if(_ForwardIterator __first, _ForwardIterator __last,
+	      _Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      __first = _GLIBCXX_STD_P::find_if(__first, __last, __pred);
+      if(__first == __last)
+        return __first;
+      _ForwardIterator __result = __first;
+      ++__first;
+      for(; __first != __last; ++__first)
+        if(!bool(__pred(*__first)))
+          {
+            *__result = _GLIBCXX_MOVE(*__first);
+            ++__result;
+          }
+      return __result;
+    }
+
+  /**
+   *  @brief Remove consecutive duplicate values from a sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @return  An iterator designating the end of the resulting sequence.
+   *
+   *  Removes all but the first element from each group of consecutive
+   *  values that compare equal.
+   *  unique() is stable, so the relative order of elements that are
+   *  not removed is unchanged.
+   *  Elements between the end of the resulting sequence and @p last
+   *  are still present, but their value is unspecified.
+  */
+  template<typename _ForwardIterator>
+    _ForwardIterator
+    unique(_ForwardIterator __first, _ForwardIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_EqualityComparableConcept<
+		     typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      // Skip the beginning, if already unique.
+      __first = _GLIBCXX_STD_P::adjacent_find(__first, __last);
+      if (__first == __last)
+	return __last;
+
+      // Do the real copy work.
+      _ForwardIterator __dest = __first;
+      ++__first;
+      while (++__first != __last)
+	if (!(*__dest == *__first))
+	  *++__dest = _GLIBCXX_MOVE(*__first);
+      return ++__dest;
+    }
+
+  /**
+   *  @brief Remove consecutive values from a sequence using a predicate.
+   *  @ingroup mutating_algorithms
+   *  @param  first        A forward iterator.
+   *  @param  last         A forward iterator.
+   *  @param  binary_pred  A binary predicate.
+   *  @return  An iterator designating the end of the resulting sequence.
+   *
+   *  Removes all but the first element from each group of consecutive
+   *  values for which @p binary_pred returns true.
+   *  unique() is stable, so the relative order of elements that are
+   *  not removed is unchanged.
+   *  Elements between the end of the resulting sequence and @p last
+   *  are still present, but their value is unspecified.
+  */
+  template<typename _ForwardIterator, typename _BinaryPredicate>
+    _ForwardIterator
+    unique(_ForwardIterator __first, _ForwardIterator __last,
+           _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+		typename iterator_traits<_ForwardIterator>::value_type,
+		typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      // Skip the beginning, if already unique.
+      __first = _GLIBCXX_STD_P::adjacent_find(__first, __last, __binary_pred);
+      if (__first == __last)
+	return __last;
+
+      // Do the real copy work.
+      _ForwardIterator __dest = __first;
+      ++__first;
+      while (++__first != __last)
+	if (!bool(__binary_pred(*__dest, *__first)))
+	  *++__dest = _GLIBCXX_MOVE(*__first);
+      return ++__dest;
+    }
+
+  /**
+   *  This is an uglified unique_copy(_InputIterator, _InputIterator,
+   *                                  _OutputIterator)
+   *  overloaded for forward iterators and output iterator as result.
+  */
+  template<typename _ForwardIterator, typename _OutputIterator>
+    _OutputIterator
+    __unique_copy(_ForwardIterator __first, _ForwardIterator __last,
+		  _OutputIterator __result,
+		  forward_iterator_tag, output_iterator_tag)
+    {
+      // concept requirements -- taken care of in dispatching function
+      _ForwardIterator __next = __first;
+      *__result = *__first;
+      while (++__next != __last)
+	if (!(*__first == *__next))
+	  {
+	    __first = __next;
+	    *++__result = *__first;
+	  }
+      return ++__result;
+    }
+
+  /**
+   *  This is an uglified unique_copy(_InputIterator, _InputIterator,
+   *                                  _OutputIterator)
+   *  overloaded for input iterators and output iterator as result.
+  */
+  template<typename _InputIterator, typename _OutputIterator>
+    _OutputIterator
+    __unique_copy(_InputIterator __first, _InputIterator __last,
+		  _OutputIterator __result,
+		  input_iterator_tag, output_iterator_tag)
+    {
+      // concept requirements -- taken care of in dispatching function
+      typename iterator_traits<_InputIterator>::value_type __value = *__first;
+      *__result = __value;
+      while (++__first != __last)
+	if (!(__value == *__first))
+	  {
+	    __value = *__first;
+	    *++__result = __value;
+	  }
+      return ++__result;
+    }
+
+  /**
+   *  This is an uglified unique_copy(_InputIterator, _InputIterator,
+   *                                  _OutputIterator)
+   *  overloaded for input iterators and forward iterator as result.
+  */
+  template<typename _InputIterator, typename _ForwardIterator>
+    _ForwardIterator
+    __unique_copy(_InputIterator __first, _InputIterator __last,
+		  _ForwardIterator __result,
+		  input_iterator_tag, forward_iterator_tag)
+    {
+      // concept requirements -- taken care of in dispatching function
+      *__result = *__first;
+      while (++__first != __last)
+	if (!(*__result == *__first))
+	  *++__result = *__first;
+      return ++__result;
+    }
+
+  /**
+   *  This is an uglified
+   *  unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+   *              _BinaryPredicate)
+   *  overloaded for forward iterators and output iterator as result.
+  */
+  template<typename _ForwardIterator, typename _OutputIterator,
+	   typename _BinaryPredicate>
+    _OutputIterator
+    __unique_copy(_ForwardIterator __first, _ForwardIterator __last,
+		  _OutputIterator __result, _BinaryPredicate __binary_pred,
+		  forward_iterator_tag, output_iterator_tag)
+    {
+      // concept requirements -- iterators already checked
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	  typename iterator_traits<_ForwardIterator>::value_type,
+	  typename iterator_traits<_ForwardIterator>::value_type>)
+
+      _ForwardIterator __next = __first;
+      *__result = *__first;
+      while (++__next != __last)
+	if (!bool(__binary_pred(*__first, *__next)))
+	  {
+	    __first = __next;
+	    *++__result = *__first;
+	  }
+      return ++__result;
+    }
+
+  /**
+   *  This is an uglified
+   *  unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+   *              _BinaryPredicate)
+   *  overloaded for input iterators and output iterator as result.
+  */
+  template<typename _InputIterator, typename _OutputIterator,
+	   typename _BinaryPredicate>
+    _OutputIterator
+    __unique_copy(_InputIterator __first, _InputIterator __last,
+		  _OutputIterator __result, _BinaryPredicate __binary_pred,
+		  input_iterator_tag, output_iterator_tag)
+    {
+      // concept requirements -- iterators already checked
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	  typename iterator_traits<_InputIterator>::value_type,
+	  typename iterator_traits<_InputIterator>::value_type>)
+
+      typename iterator_traits<_InputIterator>::value_type __value = *__first;
+      *__result = __value;
+      while (++__first != __last)
+	if (!bool(__binary_pred(__value, *__first)))
+	  {
+	    __value = *__first;
+	    *++__result = __value;
+	  }
+      return ++__result;
+    }
+
+  /**
+   *  This is an uglified
+   *  unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+   *              _BinaryPredicate)
+   *  overloaded for input iterators and forward iterator as result.
+  */
+  template<typename _InputIterator, typename _ForwardIterator,
+	   typename _BinaryPredicate>
+    _ForwardIterator
+    __unique_copy(_InputIterator __first, _InputIterator __last,
+		  _ForwardIterator __result, _BinaryPredicate __binary_pred,
+		  input_iterator_tag, forward_iterator_tag)
+    {
+      // concept requirements -- iterators already checked
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	  typename iterator_traits<_ForwardIterator>::value_type,
+	  typename iterator_traits<_InputIterator>::value_type>)
+
+      *__result = *__first;
+      while (++__first != __last)
+	if (!bool(__binary_pred(*__result, *__first)))
+	  *++__result = *__first;
+      return ++__result;
+    }
+
+  /**
+   *  This is an uglified reverse(_BidirectionalIterator,
+   *                              _BidirectionalIterator)
+   *  overloaded for bidirectional iterators.
+  */
+  template<typename _BidirectionalIterator>
+    void
+    __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last,
+	      bidirectional_iterator_tag)
+    {
+      while (true)
+	if (__first == __last || __first == --__last)
+	  return;
+	else
+	  {
+	    std::iter_swap(__first, __last);
+	    ++__first;
+	  }
+    }
+
+  /**
+   *  This is an uglified reverse(_BidirectionalIterator,
+   *                              _BidirectionalIterator)
+   *  overloaded for random access iterators.
+  */
+  template<typename _RandomAccessIterator>
+    void
+    __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      random_access_iterator_tag)
+    {
+      if (__first == __last)
+	return;
+      --__last;
+      while (__first < __last)
+	{
+	  std::iter_swap(__first, __last);
+	  ++__first;
+	  --__last;
+	}
+    }
+
+  /**
+   *  @brief Reverse a sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first  A bidirectional iterator.
+   *  @param  last   A bidirectional iterator.
+   *  @return   reverse() returns no value.
+   *
+   *  Reverses the order of the elements in the range @p [first,last),
+   *  so that the first element becomes the last etc.
+   *  For every @c i such that @p 0<=i<=(last-first)/2), @p reverse()
+   *  swaps @p *(first+i) and @p *(last-(i+1))
+  */
+  template<typename _BidirectionalIterator>
+    inline void
+    reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+				  _BidirectionalIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+      std::__reverse(__first, __last, std::__iterator_category(__first));
+    }
+
+  /**
+   *  @brief Copy a sequence, reversing its elements.
+   *  @ingroup mutating_algorithms
+   *  @param  first   A bidirectional iterator.
+   *  @param  last    A bidirectional iterator.
+   *  @param  result  An output iterator.
+   *  @return  An iterator designating the end of the resulting sequence.
+   *
+   *  Copies the elements in the range @p [first,last) to the range
+   *  @p [result,result+(last-first)) such that the order of the
+   *  elements is reversed.
+   *  For every @c i such that @p 0<=i<=(last-first), @p reverse_copy()
+   *  performs the assignment @p *(result+(last-first)-i) = *(first+i).
+   *  The ranges @p [first,last) and @p [result,result+(last-first))
+   *  must not overlap.
+  */
+  template<typename _BidirectionalIterator, typename _OutputIterator>
+    _OutputIterator
+    reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last,
+		 _OutputIterator __result)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+		typename iterator_traits<_BidirectionalIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      while (__first != __last)
+	{
+	  --__last;
+	  *__result = *__last;
+	  ++__result;
+	}
+      return __result;
+    }
+
+  /**
+   *  This is a helper function for the rotate algorithm specialized on RAIs.
+   *  It returns the greatest common divisor of two integer values.
+  */
+  template<typename _EuclideanRingElement>
+    _EuclideanRingElement
+    __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
+    {
+      while (__n != 0)
+	{
+	  _EuclideanRingElement __t = __m % __n;
+	  __m = __n;
+	  __n = __t;
+	}
+      return __m;
+    }
+
+  /// This is a helper function for the rotate algorithm.
+  template<typename _ForwardIterator>
+    void
+    __rotate(_ForwardIterator __first,
+	     _ForwardIterator __middle,
+	     _ForwardIterator __last,
+	     forward_iterator_tag)
+    {
+      if (__first == __middle || __last  == __middle)
+	return;
+
+      _ForwardIterator __first2 = __middle;
+      do
+	{
+	  std::iter_swap(__first, __first2);
+	  ++__first;
+	  ++__first2;
+	  if (__first == __middle)
+	    __middle = __first2;
+	}
+      while (__first2 != __last);
+
+      __first2 = __middle;
+
+      while (__first2 != __last)
+	{
+	  std::iter_swap(__first, __first2);
+	  ++__first;
+	  ++__first2;
+	  if (__first == __middle)
+	    __middle = __first2;
+	  else if (__first2 == __last)
+	    __first2 = __middle;
+	}
+    }
+
+   /// This is a helper function for the rotate algorithm.
+  template<typename _BidirectionalIterator>
+    void
+    __rotate(_BidirectionalIterator __first,
+	     _BidirectionalIterator __middle,
+	     _BidirectionalIterator __last,
+	      bidirectional_iterator_tag)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+				  _BidirectionalIterator>)
+
+      if (__first == __middle || __last  == __middle)
+	return;
+
+      std::__reverse(__first,  __middle, bidirectional_iterator_tag());
+      std::__reverse(__middle, __last,   bidirectional_iterator_tag());
+
+      while (__first != __middle && __middle != __last)
+	{
+	  std::iter_swap(__first, --__last);
+	  ++__first;
+	}
+
+      if (__first == __middle)
+	std::__reverse(__middle, __last,   bidirectional_iterator_tag());
+      else
+	std::__reverse(__first,  __middle, bidirectional_iterator_tag());
+    }
+
+  /// This is a helper function for the rotate algorithm.
+  template<typename _RandomAccessIterator>
+    void
+    __rotate(_RandomAccessIterator __first,
+	     _RandomAccessIterator __middle,
+	     _RandomAccessIterator __last,
+	     random_access_iterator_tag)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+				  _RandomAccessIterator>)
+
+      if (__first == __middle || __last  == __middle)
+	return;
+
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_Distance;
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      _Distance __n = __last   - __first;
+      _Distance __k = __middle - __first;
+
+      if (__k == __n - __k)
+	{
+	  std::swap_ranges(__first, __middle, __middle);
+	  return;
+	}
+
+      _RandomAccessIterator __p = __first;
+
+      for (;;)
+	{
+	  if (__k < __n - __k)
+	    {
+	      if (__is_pod(_ValueType) && __k == 1)
+		{
+		  _ValueType __t = _GLIBCXX_MOVE(*__p);
+		  _GLIBCXX_MOVE3(__p + 1, __p + __n, __p);
+		  *(__p + __n - 1) = _GLIBCXX_MOVE(__t);
+		  return;
+		}
+	      _RandomAccessIterator __q = __p + __k;
+	      for (_Distance __i = 0; __i < __n - __k; ++ __i)
+		{
+		  std::iter_swap(__p, __q);
+		  ++__p;
+		  ++__q;
+		}
+	      __n %= __k;
+	      if (__n == 0)
+		return;
+	      std::swap(__n, __k);
+	      __k = __n - __k;
+	    }
+	  else
+	    {
+	      __k = __n - __k;
+	      if (__is_pod(_ValueType) && __k == 1)
+		{
+		  _ValueType __t = _GLIBCXX_MOVE(*(__p + __n - 1));
+		  _GLIBCXX_MOVE_BACKWARD3(__p, __p + __n - 1, __p + __n);
+		  *__p = _GLIBCXX_MOVE(__t);
+		  return;
+		}
+	      _RandomAccessIterator __q = __p + __n;
+	      __p = __q - __k;
+	      for (_Distance __i = 0; __i < __n - __k; ++ __i)
+		{
+		  --__p;
+		  --__q;
+		  std::iter_swap(__p, __q);
+		}
+	      __n %= __k;
+	      if (__n == 0)
+		return;
+	      std::swap(__n, __k);
+	    }
+	}
+    }
+
+  /**
+   *  @brief Rotate the elements of a sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first   A forward iterator.
+   *  @param  middle  A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @return  Nothing.
+   *
+   *  Rotates the elements of the range @p [first,last) by @p (middle-first)
+   *  positions so that the element at @p middle is moved to @p first, the
+   *  element at @p middle+1 is moved to @first+1 and so on for each element
+   *  in the range @p [first,last).
+   *
+   *  This effectively swaps the ranges @p [first,middle) and
+   *  @p [middle,last).
+   *
+   *  Performs @p *(first+(n+(last-middle))%(last-first))=*(first+n) for
+   *  each @p n in the range @p [0,last-first).
+  */
+  template<typename _ForwardIterator>
+    inline void
+    rotate(_ForwardIterator __first, _ForwardIterator __middle,
+	   _ForwardIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_requires_valid_range(__first, __middle);
+      __glibcxx_requires_valid_range(__middle, __last);
+
+      typedef typename iterator_traits<_ForwardIterator>::iterator_category
+	_IterType;
+      std::__rotate(__first, __middle, __last, _IterType());
+    }
+
+  /**
+   *  @brief Copy a sequence, rotating its elements.
+   *  @ingroup mutating_algorithms
+   *  @param  first   A forward iterator.
+   *  @param  middle  A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  result  An output iterator.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies the elements of the range @p [first,last) to the range
+   *  beginning at @result, rotating the copied elements by @p (middle-first)
+   *  positions so that the element at @p middle is moved to @p result, the
+   *  element at @p middle+1 is moved to @result+1 and so on for each element
+   *  in the range @p [first,last).
+   *
+   *  Performs @p *(result+(n+(last-middle))%(last-first))=*(first+n) for
+   *  each @p n in the range @p [0,last-first).
+  */
+  template<typename _ForwardIterator, typename _OutputIterator>
+    _OutputIterator
+    rotate_copy(_ForwardIterator __first, _ForwardIterator __middle,
+                _ForwardIterator __last, _OutputIterator __result)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+		typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __middle);
+      __glibcxx_requires_valid_range(__middle, __last);
+
+      return std::copy(__first, __middle,
+                       std::copy(__middle, __last, __result));
+    }
+
+  /// This is a helper function...
+  template<typename _ForwardIterator, typename _Predicate>
+    _ForwardIterator
+    __partition(_ForwardIterator __first, _ForwardIterator __last,
+		_Predicate __pred, forward_iterator_tag)
+    {
+      if (__first == __last)
+	return __first;
+
+      while (__pred(*__first))
+	if (++__first == __last)
+	  return __first;
+
+      _ForwardIterator __next = __first;
+
+      while (++__next != __last)
+	if (__pred(*__next))
+	  {
+	    std::iter_swap(__first, __next);
+	    ++__first;
+	  }
+
+      return __first;
+    }
+
+  /// This is a helper function...
+  template<typename _BidirectionalIterator, typename _Predicate>
+    _BidirectionalIterator
+    __partition(_BidirectionalIterator __first, _BidirectionalIterator __last,
+		_Predicate __pred, bidirectional_iterator_tag)
+    {
+      while (true)
+	{
+	  while (true)
+	    if (__first == __last)
+	      return __first;
+	    else if (__pred(*__first))
+	      ++__first;
+	    else
+	      break;
+	  --__last;
+	  while (true)
+	    if (__first == __last)
+	      return __first;
+	    else if (!bool(__pred(*__last)))
+	      --__last;
+	    else
+	      break;
+	  std::iter_swap(__first, __last);
+	  ++__first;
+	}
+    }
+
+  // partition
+
+  /// This is a helper function...
+  template<typename _ForwardIterator, typename _Predicate, typename _Distance>
+    _ForwardIterator
+    __inplace_stable_partition(_ForwardIterator __first,
+			       _ForwardIterator __last,
+			       _Predicate __pred, _Distance __len)
+    {
+      if (__len == 1)
+	return __pred(*__first) ? __last : __first;
+      _ForwardIterator __middle = __first;
+      std::advance(__middle, __len / 2);
+      _ForwardIterator __begin = std::__inplace_stable_partition(__first,
+								 __middle,
+								 __pred,
+								 __len / 2);
+      _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last,
+							       __pred,
+							       __len
+							       - __len / 2);
+      std::rotate(__begin, __middle, __end);
+      std::advance(__begin, std::distance(__middle, __end));
+      return __begin;
+    }
+
+  /// This is a helper function...
+  template<typename _ForwardIterator, typename _Pointer, typename _Predicate,
+	   typename _Distance>
+    _ForwardIterator
+    __stable_partition_adaptive(_ForwardIterator __first,
+				_ForwardIterator __last,
+				_Predicate __pred, _Distance __len,
+				_Pointer __buffer,
+				_Distance __buffer_size)
+    {
+      if (__len <= __buffer_size)
+	{
+	  _ForwardIterator __result1 = __first;
+	  _Pointer __result2 = __buffer;
+	  for (; __first != __last; ++__first)
+	    if (__pred(*__first))
+	      {
+		*__result1 = _GLIBCXX_MOVE(*__first);
+		++__result1;
+	      }
+	    else
+	      {
+		*__result2 = _GLIBCXX_MOVE(*__first);
+		++__result2;
+	      }
+	  _GLIBCXX_MOVE3(__buffer, __result2, __result1);
+	  return __result1;
+	}
+      else
+	{
+	  _ForwardIterator __middle = __first;
+	  std::advance(__middle, __len / 2);
+	  _ForwardIterator __begin =
+	    std::__stable_partition_adaptive(__first, __middle, __pred,
+					     __len / 2, __buffer,
+					     __buffer_size);
+	  _ForwardIterator __end =
+	    std::__stable_partition_adaptive(__middle, __last, __pred,
+					     __len - __len / 2,
+					     __buffer, __buffer_size);
+	  std::rotate(__begin, __middle, __end);
+	  std::advance(__begin, std::distance(__middle, __end));
+	  return __begin;
+	}
+    }
+
+  /**
+   *  @brief Move elements for which a predicate is true to the beginning
+   *         of a sequence, preserving relative ordering.
+   *  @ingroup mutating_algorithms
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  pred    A predicate functor.
+   *  @return  An iterator @p middle such that @p pred(i) is true for each
+   *  iterator @p i in the range @p [first,middle) and false for each @p i
+   *  in the range @p [middle,last).
+   *
+   *  Performs the same function as @p partition() with the additional
+   *  guarantee that the relative ordering of elements in each group is
+   *  preserved, so any two elements @p x and @p y in the range
+   *  @p [first,last) such that @p pred(x)==pred(y) will have the same
+   *  relative ordering after calling @p stable_partition().
+  */
+  template<typename _ForwardIterator, typename _Predicate>
+    _ForwardIterator
+    stable_partition(_ForwardIterator __first, _ForwardIterator __last,
+		     _Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __first;
+      else
+	{
+	  typedef typename iterator_traits<_ForwardIterator>::value_type
+	    _ValueType;
+	  typedef typename iterator_traits<_ForwardIterator>::difference_type
+	    _DistanceType;
+
+	  _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first,
+								__last);
+	if (__buf.size() > 0)
+	  return
+	    std::__stable_partition_adaptive(__first, __last, __pred,
+					  _DistanceType(__buf.requested_size()),
+					  __buf.begin(),
+					  _DistanceType(__buf.size()));
+	else
+	  return
+	    std::__inplace_stable_partition(__first, __last, __pred,
+					 _DistanceType(__buf.requested_size()));
+	}
+    }
+
+  /// This is a helper function for the sort routines.
+  template<typename _RandomAccessIterator>
+    void
+    __heap_select(_RandomAccessIterator __first,
+		  _RandomAccessIterator __middle,
+		  _RandomAccessIterator __last)
+    {
+      std::make_heap(__first, __middle);
+      for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
+	if (*__i < *__first)
+	  std::__pop_heap(__first, __middle, __i);
+    }
+
+  /// This is a helper function for the sort routines.
+  template<typename _RandomAccessIterator, typename _Compare>
+    void
+    __heap_select(_RandomAccessIterator __first,
+		  _RandomAccessIterator __middle,
+		  _RandomAccessIterator __last, _Compare __comp)
+    {
+      std::make_heap(__first, __middle, __comp);
+      for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
+	if (__comp(*__i, *__first))
+	  std::__pop_heap(__first, __middle, __i, __comp);
+    }
+
+  // partial_sort
+
+  /**
+   *  @brief Copy the smallest elements of a sequence.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  result_first   A random-access iterator.
+   *  @param  result_last    Another random-access iterator.
+   *  @return   An iterator indicating the end of the resulting sequence.
+   *
+   *  Copies and sorts the smallest N values from the range @p [first,last)
+   *  to the range beginning at @p result_first, where the number of
+   *  elements to be copied, @p N, is the smaller of @p (last-first) and
+   *  @p (result_last-result_first).
+   *  After the sort if @p i and @j are iterators in the range
+   *  @p [result_first,result_first+N) such that @i precedes @j then
+   *  @p *j<*i is false.
+   *  The value returned is @p result_first+N.
+  */
+  template<typename _InputIterator, typename _RandomAccessIterator>
+    _RandomAccessIterator
+    partial_sort_copy(_InputIterator __first, _InputIterator __last,
+		      _RandomAccessIterator __result_first,
+		      _RandomAccessIterator __result_last)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type
+	_InputValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_OutputValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_ConvertibleConcept<_InputValueType,
+				  _OutputValueType>)
+      __glibcxx_function_requires(_LessThanOpConcept<_InputValueType,
+				                     _OutputValueType>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_OutputValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+      __glibcxx_requires_valid_range(__result_first, __result_last);
+
+      if (__result_first == __result_last)
+	return __result_last;
+      _RandomAccessIterator __result_real_last = __result_first;
+      while(__first != __last && __result_real_last != __result_last)
+	{
+	  *__result_real_last = *__first;
+	  ++__result_real_last;
+	  ++__first;
+	}
+      std::make_heap(__result_first, __result_real_last);
+      while (__first != __last)
+	{
+	  if (*__first < *__result_first)
+	    std::__adjust_heap(__result_first, _DistanceType(0),
+			       _DistanceType(__result_real_last
+					     - __result_first),
+			       _InputValueType(*__first));
+	  ++__first;
+	}
+      std::sort_heap(__result_first, __result_real_last);
+      return __result_real_last;
+    }
+
+  /**
+   *  @brief Copy the smallest elements of a sequence using a predicate for
+   *         comparison.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    Another input iterator.
+   *  @param  result_first   A random-access iterator.
+   *  @param  result_last    Another random-access iterator.
+   *  @param  comp    A comparison functor.
+   *  @return   An iterator indicating the end of the resulting sequence.
+   *
+   *  Copies and sorts the smallest N values from the range @p [first,last)
+   *  to the range beginning at @p result_first, where the number of
+   *  elements to be copied, @p N, is the smaller of @p (last-first) and
+   *  @p (result_last-result_first).
+   *  After the sort if @p i and @j are iterators in the range
+   *  @p [result_first,result_first+N) such that @i precedes @j then
+   *  @p comp(*j,*i) is false.
+   *  The value returned is @p result_first+N.
+  */
+  template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare>
+    _RandomAccessIterator
+    partial_sort_copy(_InputIterator __first, _InputIterator __last,
+		      _RandomAccessIterator __result_first,
+		      _RandomAccessIterator __result_last,
+		      _Compare __comp)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type
+	_InputValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_OutputValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+				  _RandomAccessIterator>)
+      __glibcxx_function_requires(_ConvertibleConcept<_InputValueType,
+				  _OutputValueType>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _InputValueType, _OutputValueType>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _OutputValueType, _OutputValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+      __glibcxx_requires_valid_range(__result_first, __result_last);
+
+      if (__result_first == __result_last)
+	return __result_last;
+      _RandomAccessIterator __result_real_last = __result_first;
+      while(__first != __last && __result_real_last != __result_last)
+	{
+	  *__result_real_last = *__first;
+	  ++__result_real_last;
+	  ++__first;
+	}
+      std::make_heap(__result_first, __result_real_last, __comp);
+      while (__first != __last)
+	{
+	  if (__comp(*__first, *__result_first))
+	    std::__adjust_heap(__result_first, _DistanceType(0),
+			       _DistanceType(__result_real_last
+					     - __result_first),
+			       _InputValueType(*__first),
+			       __comp);
+	  ++__first;
+	}
+      std::sort_heap(__result_first, __result_real_last, __comp);
+      return __result_real_last;
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator>
+    void
+    __unguarded_linear_insert(_RandomAccessIterator __last)
+    {
+      typename iterator_traits<_RandomAccessIterator>::value_type
+	__val = _GLIBCXX_MOVE(*__last);
+      _RandomAccessIterator __next = __last;
+      --__next;
+      while (__val < *__next)
+	{
+	  *__last = _GLIBCXX_MOVE(*__next);
+	  __last = __next;
+	  --__next;
+	}
+      *__last = _GLIBCXX_MOVE(__val);
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator, typename _Compare>
+    void
+    __unguarded_linear_insert(_RandomAccessIterator __last,
+			      _Compare __comp)
+    {
+      typename iterator_traits<_RandomAccessIterator>::value_type
+	__val = _GLIBCXX_MOVE(*__last);
+      _RandomAccessIterator __next = __last;
+      --__next;
+      while (__comp(__val, *__next))
+	{
+	  *__last = _GLIBCXX_MOVE(*__next);
+	  __last = __next;
+	  --__next;
+	}
+      *__last = _GLIBCXX_MOVE(__val);
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator>
+    void
+    __insertion_sort(_RandomAccessIterator __first,
+		     _RandomAccessIterator __last)
+    {
+      if (__first == __last)
+	return;
+
+      for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+	{
+	  if (*__i < *__first)
+	    {
+	      typename iterator_traits<_RandomAccessIterator>::value_type
+		__val = _GLIBCXX_MOVE(*__i);
+	      _GLIBCXX_MOVE_BACKWARD3(__first, __i, __i + 1);
+	      *__first = _GLIBCXX_MOVE(__val);
+	    }
+	  else
+	    std::__unguarded_linear_insert(__i);
+	}
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator, typename _Compare>
+    void
+    __insertion_sort(_RandomAccessIterator __first,
+		     _RandomAccessIterator __last, _Compare __comp)
+    {
+      if (__first == __last) return;
+
+      for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+	{
+	  if (__comp(*__i, *__first))
+	    {
+	      typename iterator_traits<_RandomAccessIterator>::value_type
+		__val = _GLIBCXX_MOVE(*__i);
+	      _GLIBCXX_MOVE_BACKWARD3(__first, __i, __i + 1);
+	      *__first = _GLIBCXX_MOVE(__val);
+	    }
+	  else
+	    std::__unguarded_linear_insert(__i, __comp);
+	}
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator>
+    inline void
+    __unguarded_insertion_sort(_RandomAccessIterator __first,
+			       _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
+	std::__unguarded_linear_insert(__i);
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline void
+    __unguarded_insertion_sort(_RandomAccessIterator __first,
+			       _RandomAccessIterator __last, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
+	std::__unguarded_linear_insert(__i, __comp);
+    }
+
+  /**
+   *  @doctodo
+   *  This controls some aspect of the sort routines.
+  */
+  enum { _S_threshold = 16 };
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator>
+    void
+    __final_insertion_sort(_RandomAccessIterator __first,
+			   _RandomAccessIterator __last)
+    {
+      if (__last - __first > int(_S_threshold))
+	{
+	  std::__insertion_sort(__first, __first + int(_S_threshold));
+	  std::__unguarded_insertion_sort(__first + int(_S_threshold), __last);
+	}
+      else
+	std::__insertion_sort(__first, __last);
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator, typename _Compare>
+    void
+    __final_insertion_sort(_RandomAccessIterator __first,
+			   _RandomAccessIterator __last, _Compare __comp)
+    {
+      if (__last - __first > int(_S_threshold))
+	{
+	  std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
+	  std::__unguarded_insertion_sort(__first + int(_S_threshold), __last,
+					  __comp);
+	}
+      else
+	std::__insertion_sort(__first, __last, __comp);
+    }
+
+  /// This is a helper function...
+  template<typename _RandomAccessIterator, typename _Tp>
+    _RandomAccessIterator
+    __unguarded_partition(_RandomAccessIterator __first,
+			  _RandomAccessIterator __last, const _Tp& __pivot)
+    {
+      while (true)
+	{
+	  while (*__first < __pivot)
+	    ++__first;
+	  --__last;
+	  while (__pivot < *__last)
+	    --__last;
+	  if (!(__first < __last))
+	    return __first;
+	  std::iter_swap(__first, __last);
+	  ++__first;
+	}
+    }
+
+  /// This is a helper function...
+  template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
+    _RandomAccessIterator
+    __unguarded_partition(_RandomAccessIterator __first,
+			  _RandomAccessIterator __last,
+			  const _Tp& __pivot, _Compare __comp)
+    {
+      while (true)
+	{
+	  while (__comp(*__first, __pivot))
+	    ++__first;
+	  --__last;
+	  while (__comp(__pivot, *__last))
+	    --__last;
+	  if (!(__first < __last))
+	    return __first;
+	  std::iter_swap(__first, __last);
+	  ++__first;
+	}
+    }
+
+  /// This is a helper function...
+  template<typename _RandomAccessIterator>
+    inline _RandomAccessIterator
+    __unguarded_partition_pivot(_RandomAccessIterator __first,
+				_RandomAccessIterator __last)
+    {
+      _RandomAccessIterator __mid = __first + (__last - __first) / 2;
+      std::__move_median_first(__first, __mid, (__last - 1));
+      return std::__unguarded_partition(__first + 1, __last, *__first);
+    }
+
+
+  /// This is a helper function...
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline _RandomAccessIterator
+    __unguarded_partition_pivot(_RandomAccessIterator __first,
+				_RandomAccessIterator __last, _Compare __comp)
+    {
+      _RandomAccessIterator __mid = __first + (__last - __first) / 2;
+      std::__move_median_first(__first, __mid, (__last - 1), __comp);
+      return std::__unguarded_partition(__first + 1, __last, *__first, __comp);
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator, typename _Size>
+    void
+    __introsort_loop(_RandomAccessIterator __first,
+		     _RandomAccessIterator __last,
+		     _Size __depth_limit)
+    {
+      while (__last - __first > int(_S_threshold))
+	{
+	  if (__depth_limit == 0)
+	    {
+	      _GLIBCXX_STD_P::partial_sort(__first, __last, __last);
+	      return;
+	    }
+	  --__depth_limit;
+	  _RandomAccessIterator __cut =
+	    std::__unguarded_partition_pivot(__first, __last);
+	  std::__introsort_loop(__cut, __last, __depth_limit);
+	  __last = __cut;
+	}
+    }
+
+  /// This is a helper function for the sort routine.
+  template<typename _RandomAccessIterator, typename _Size, typename _Compare>
+    void
+    __introsort_loop(_RandomAccessIterator __first,
+		     _RandomAccessIterator __last,
+		     _Size __depth_limit, _Compare __comp)
+    {
+      while (__last - __first > int(_S_threshold))
+	{
+	  if (__depth_limit == 0)
+	    {
+	      _GLIBCXX_STD_P::partial_sort(__first, __last, __last, __comp);
+	      return;
+	    }
+	  --__depth_limit;
+	  _RandomAccessIterator __cut =
+	    std::__unguarded_partition_pivot(__first, __last, __comp);
+	  std::__introsort_loop(__cut, __last, __depth_limit, __comp);
+	  __last = __cut;
+	}
+    }
+
+  // sort
+
+  template<typename _RandomAccessIterator, typename _Size>
+    void
+    __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+		  _RandomAccessIterator __last, _Size __depth_limit)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      while (__last - __first > 3)
+	{
+	  if (__depth_limit == 0)
+	    {
+	      std::__heap_select(__first, __nth + 1, __last);
+
+	      // Place the nth largest element in its final position.
+	      std::iter_swap(__first, __nth);
+	      return;
+	    }
+	  --__depth_limit;
+	  _RandomAccessIterator __cut =
+	    std::__unguarded_partition_pivot(__first, __last);
+	  if (__cut <= __nth)
+	    __first = __cut;
+	  else
+	    __last = __cut;
+	}
+      std::__insertion_sort(__first, __last);
+    }
+
+  template<typename _RandomAccessIterator, typename _Size, typename _Compare>
+    void
+    __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+		  _RandomAccessIterator __last, _Size __depth_limit,
+		  _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      while (__last - __first > 3)
+	{
+	  if (__depth_limit == 0)
+	    {
+	      std::__heap_select(__first, __nth + 1, __last, __comp);
+	      // Place the nth largest element in its final position.
+	      std::iter_swap(__first, __nth);
+	      return;
+	    }
+	  --__depth_limit;
+	  _RandomAccessIterator __cut =
+	    std::__unguarded_partition_pivot(__first, __last, __comp);
+	  if (__cut <= __nth)
+	    __first = __cut;
+	  else
+	    __last = __cut;
+	}
+      std::__insertion_sort(__first, __last, __comp);
+    }
+
+  // nth_element
+
+  // lower_bound moved to stl_algobase.h
+
+  /**
+   *  @brief Finds the first position in which @a val could be inserted
+   *         without changing the ordering.
+   *  @ingroup binary_search_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return An iterator pointing to the first element <em>not less
+   *           than</em> @a val, or end() if every element is less
+   *           than @a val.
+   *  @ingroup binary_search_algorithms
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template<typename _ForwardIterator, typename _Tp, typename _Compare>
+    _ForwardIterator
+    lower_bound(_ForwardIterator __first, _ForwardIterator __last,
+		const _Tp& __val, _Compare __comp)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_ForwardIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType, _Tp>)
+      __glibcxx_requires_partitioned_lower_pred(__first, __last,
+						__val, __comp);
+
+      _DistanceType __len = std::distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIterator __middle;
+
+      while (__len > 0)
+	{
+	  __half = __len >> 1;
+	  __middle = __first;
+	  std::advance(__middle, __half);
+	  if (__comp(*__middle, __val))
+	    {
+	      __first = __middle;
+	      ++__first;
+	      __len = __len - __half - 1;
+	    }
+	  else
+	    __len = __half;
+	}
+      return __first;
+    }
+
+  /**
+   *  @brief Finds the last position in which @a val could be inserted
+   *         without changing the ordering.
+   *  @ingroup binary_search_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @return  An iterator pointing to the first element greater than @a val,
+   *           or end() if no elements are greater than @a val.
+   *  @ingroup binary_search_algorithms
+  */
+  template<typename _ForwardIterator, typename _Tp>
+    _ForwardIterator
+    upper_bound(_ForwardIterator __first, _ForwardIterator __last,
+		const _Tp& __val)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_ForwardIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
+      __glibcxx_requires_partitioned_upper(__first, __last, __val);
+
+      _DistanceType __len = std::distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIterator __middle;
+
+      while (__len > 0)
+	{
+	  __half = __len >> 1;
+	  __middle = __first;
+	  std::advance(__middle, __half);
+	  if (__val < *__middle)
+	    __len = __half;
+	  else
+	    {
+	      __first = __middle;
+	      ++__first;
+	      __len = __len - __half - 1;
+	    }
+	}
+      return __first;
+    }
+
+  /**
+   *  @brief Finds the last position in which @a val could be inserted
+   *         without changing the ordering.
+   *  @ingroup binary_search_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  An iterator pointing to the first element greater than @a val,
+   *           or end() if no elements are greater than @a val.
+   *  @ingroup binary_search_algorithms
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template<typename _ForwardIterator, typename _Tp, typename _Compare>
+    _ForwardIterator
+    upper_bound(_ForwardIterator __first, _ForwardIterator __last,
+		const _Tp& __val, _Compare __comp)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_ForwardIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _Tp, _ValueType>)
+      __glibcxx_requires_partitioned_upper_pred(__first, __last,
+						__val, __comp);
+
+      _DistanceType __len = std::distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIterator __middle;
+
+      while (__len > 0)
+	{
+	  __half = __len >> 1;
+	  __middle = __first;
+	  std::advance(__middle, __half);
+	  if (__comp(__val, *__middle))
+	    __len = __half;
+	  else
+	    {
+	      __first = __middle;
+	      ++__first;
+	      __len = __len - __half - 1;
+	    }
+	}
+      return __first;
+    }
+
+  /**
+   *  @brief Finds the largest subrange in which @a val could be inserted
+   *         at any place in it without changing the ordering.
+   *  @ingroup binary_search_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @return  An pair of iterators defining the subrange.
+   *  @ingroup binary_search_algorithms
+   *
+   *  This is equivalent to
+   *  @code
+   *    std::make_pair(lower_bound(first, last, val),
+   *                   upper_bound(first, last, val))
+   *  @endcode
+   *  but does not actually call those functions.
+  */
+  template<typename _ForwardIterator, typename _Tp>
+    pair<_ForwardIterator, _ForwardIterator>
+    equal_range(_ForwardIterator __first, _ForwardIterator __last,
+		const _Tp& __val)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_ForwardIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>)
+      __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)	
+      __glibcxx_requires_partitioned_lower(__first, __last, __val);
+      __glibcxx_requires_partitioned_upper(__first, __last, __val);      
+
+      _DistanceType __len = std::distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIterator __middle, __left, __right;
+
+      while (__len > 0)
+	{
+	  __half = __len >> 1;
+	  __middle = __first;
+	  std::advance(__middle, __half);
+	  if (*__middle < __val)
+	    {
+	      __first = __middle;
+	      ++__first;
+	      __len = __len - __half - 1;
+	    }
+	  else if (__val < *__middle)
+	    __len = __half;
+	  else
+	    {
+	      __left = std::lower_bound(__first, __middle, __val);
+	      std::advance(__first, __len);
+	      __right = std::upper_bound(++__middle, __first, __val);
+	      return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
+	    }
+	}
+      return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
+    }
+
+  /**
+   *  @brief Finds the largest subrange in which @a val could be inserted
+   *         at any place in it without changing the ordering.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  An pair of iterators defining the subrange.
+   *  @ingroup binary_search_algorithms
+   *
+   *  This is equivalent to
+   *  @code
+   *    std::make_pair(lower_bound(first, last, val, comp),
+   *                   upper_bound(first, last, val, comp))
+   *  @endcode
+   *  but does not actually call those functions.
+  */
+  template<typename _ForwardIterator, typename _Tp, typename _Compare>
+    pair<_ForwardIterator, _ForwardIterator>
+    equal_range(_ForwardIterator __first, _ForwardIterator __last,
+		const _Tp& __val,
+		_Compare __comp)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_ForwardIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType, _Tp>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _Tp, _ValueType>)
+      __glibcxx_requires_partitioned_lower_pred(__first, __last,
+						__val, __comp);
+      __glibcxx_requires_partitioned_upper_pred(__first, __last,
+						__val, __comp);
+
+      _DistanceType __len = std::distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIterator __middle, __left, __right;
+
+      while (__len > 0)
+	{
+	  __half = __len >> 1;
+	  __middle = __first;
+	  std::advance(__middle, __half);
+	  if (__comp(*__middle, __val))
+	    {
+	      __first = __middle;
+	      ++__first;
+	      __len = __len - __half - 1;
+	    }
+	  else if (__comp(__val, *__middle))
+	    __len = __half;
+	  else
+	    {
+	      __left = std::lower_bound(__first, __middle, __val, __comp);
+	      std::advance(__first, __len);
+	      __right = std::upper_bound(++__middle, __first, __val, __comp);
+	      return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
+	    }
+	}
+      return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
+    }
+
+  /**
+   *  @brief Determines whether an element exists in a range.
+   *  @ingroup binary_search_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @return  True if @a val (or its equivalent) is in [@a first,@a last ].
+   *
+   *  Note that this does not actually return an iterator to @a val.  For
+   *  that, use std::find or a container's specialized find member functions.
+  */
+  template<typename _ForwardIterator, typename _Tp>
+    bool
+    binary_search(_ForwardIterator __first, _ForwardIterator __last,
+                  const _Tp& __val)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
+      __glibcxx_requires_partitioned_lower(__first, __last, __val);
+      __glibcxx_requires_partitioned_upper(__first, __last, __val);
+
+      _ForwardIterator __i = std::lower_bound(__first, __last, __val);
+      return __i != __last && !(__val < *__i);
+    }
+
+  /**
+   *  @brief Determines whether an element exists in a range.
+   *  @ingroup binary_search_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  True if @a val (or its equivalent) is in [@a first,@a last ].
+   *
+   *  Note that this does not actually return an iterator to @a val.  For
+   *  that, use std::find or a container's specialized find member functions.
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template<typename _ForwardIterator, typename _Tp, typename _Compare>
+    bool
+    binary_search(_ForwardIterator __first, _ForwardIterator __last,
+                  const _Tp& __val, _Compare __comp)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _Tp, _ValueType>)
+      __glibcxx_requires_partitioned_lower_pred(__first, __last,
+						__val, __comp);
+      __glibcxx_requires_partitioned_upper_pred(__first, __last,
+						__val, __comp);
+
+      _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp);
+      return __i != __last && !bool(__comp(__val, *__i));
+    }
+
+  // merge
+
+  /// This is a helper function for the merge routines.
+  template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+	   typename _BidirectionalIterator3>
+    _BidirectionalIterator3
+    __merge_backward(_BidirectionalIterator1 __first1,
+		     _BidirectionalIterator1 __last1,
+		     _BidirectionalIterator2 __first2,
+		     _BidirectionalIterator2 __last2,
+		     _BidirectionalIterator3 __result)
+    {
+      if (__first1 == __last1)
+	return std::copy_backward(__first2, __last2, __result);
+      if (__first2 == __last2)
+	return std::copy_backward(__first1, __last1, __result);
+      --__last1;
+      --__last2;
+      while (true)
+	{
+	  if (*__last2 < *__last1)
+	    {
+	      *--__result = *__last1;
+	      if (__first1 == __last1)
+		return std::copy_backward(__first2, ++__last2, __result);
+	      --__last1;
+	    }
+	  else
+	    {
+	      *--__result = *__last2;
+	      if (__first2 == __last2)
+		return std::copy_backward(__first1, ++__last1, __result);
+	      --__last2;
+	    }
+	}
+    }
+
+  /// This is a helper function for the merge routines.
+  template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+	   typename _BidirectionalIterator3, typename _Compare>
+    _BidirectionalIterator3
+    __merge_backward(_BidirectionalIterator1 __first1,
+		     _BidirectionalIterator1 __last1,
+		     _BidirectionalIterator2 __first2,
+		     _BidirectionalIterator2 __last2,
+		     _BidirectionalIterator3 __result,
+		     _Compare __comp)
+    {
+      if (__first1 == __last1)
+	return std::copy_backward(__first2, __last2, __result);
+      if (__first2 == __last2)
+	return std::copy_backward(__first1, __last1, __result);
+      --__last1;
+      --__last2;
+      while (true)
+	{
+	  if (__comp(*__last2, *__last1))
+	    {
+	      *--__result = *__last1;
+	      if (__first1 == __last1)
+		return std::copy_backward(__first2, ++__last2, __result);
+	      --__last1;
+	    }
+	  else
+	    {
+	      *--__result = *__last2;
+	      if (__first2 == __last2)
+		return std::copy_backward(__first1, ++__last1, __result);
+	      --__last2;
+	    }
+	}
+    }
+
+  /// This is a helper function for the merge routines.
+  template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+	   typename _Distance>
+    _BidirectionalIterator1
+    __rotate_adaptive(_BidirectionalIterator1 __first,
+		      _BidirectionalIterator1 __middle,
+		      _BidirectionalIterator1 __last,
+		      _Distance __len1, _Distance __len2,
+		      _BidirectionalIterator2 __buffer,
+		      _Distance __buffer_size)
+    {
+      _BidirectionalIterator2 __buffer_end;
+      if (__len1 > __len2 && __len2 <= __buffer_size)
+	{
+	  __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
+	  _GLIBCXX_MOVE_BACKWARD3(__first, __middle, __last);
+	  return _GLIBCXX_MOVE3(__buffer, __buffer_end, __first);
+	}
+      else if (__len1 <= __buffer_size)
+	{
+	  __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
+	  _GLIBCXX_MOVE3(__middle, __last, __first);
+	  return _GLIBCXX_MOVE_BACKWARD3(__buffer, __buffer_end, __last);
+	}
+      else
+	{
+	  std::rotate(__first, __middle, __last);
+	  std::advance(__first, std::distance(__middle, __last));
+	  return __first;
+	}
+    }
+
+  /// This is a helper function for the merge routines.
+  template<typename _BidirectionalIterator, typename _Distance,
+	   typename _Pointer>
+    void
+    __merge_adaptive(_BidirectionalIterator __first,
+                     _BidirectionalIterator __middle,
+		     _BidirectionalIterator __last,
+		     _Distance __len1, _Distance __len2,
+		     _Pointer __buffer, _Distance __buffer_size)
+    {
+      if (__len1 <= __len2 && __len1 <= __buffer_size)
+	{
+	  _Pointer __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
+	  _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__middle),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__last),
+				__first);
+	}
+      else if (__len2 <= __buffer_size)
+	{
+	  _Pointer __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
+	  std::__merge_backward(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__middle),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end),
+				__last);
+	}
+      else
+	{
+	  _BidirectionalIterator __first_cut = __first;
+	  _BidirectionalIterator __second_cut = __middle;
+	  _Distance __len11 = 0;
+	  _Distance __len22 = 0;
+	  if (__len1 > __len2)
+	    {
+	      __len11 = __len1 / 2;
+	      std::advance(__first_cut, __len11);
+	      __second_cut = std::lower_bound(__middle, __last,
+					      *__first_cut);
+	      __len22 = std::distance(__middle, __second_cut);
+	    }
+	  else
+	    {
+	      __len22 = __len2 / 2;
+	      std::advance(__second_cut, __len22);
+	      __first_cut = std::upper_bound(__first, __middle,
+					     *__second_cut);
+	      __len11 = std::distance(__first, __first_cut);
+	    }
+	  _BidirectionalIterator __new_middle =
+	    std::__rotate_adaptive(__first_cut, __middle, __second_cut,
+				   __len1 - __len11, __len22, __buffer,
+				   __buffer_size);
+	  std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
+				__len22, __buffer, __buffer_size);
+	  std::__merge_adaptive(__new_middle, __second_cut, __last,
+				__len1 - __len11,
+				__len2 - __len22, __buffer, __buffer_size);
+	}
+    }
+
+  /// This is a helper function for the merge routines.
+  template<typename _BidirectionalIterator, typename _Distance, 
+	   typename _Pointer, typename _Compare>
+    void
+    __merge_adaptive(_BidirectionalIterator __first,
+                     _BidirectionalIterator __middle,
+		     _BidirectionalIterator __last,
+		     _Distance __len1, _Distance __len2,
+		     _Pointer __buffer, _Distance __buffer_size,
+		     _Compare __comp)
+    {
+      if (__len1 <= __len2 && __len1 <= __buffer_size)
+	{
+	  _Pointer __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
+	  _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__middle),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__last),
+				__first, __comp);
+	}
+      else if (__len2 <= __buffer_size)
+	{
+	  _Pointer __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
+	  std::__merge_backward(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__middle),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer),
+				_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end),
+				__last,__comp);
+	}
+      else
+	{
+	  _BidirectionalIterator __first_cut = __first;
+	  _BidirectionalIterator __second_cut = __middle;
+	  _Distance __len11 = 0;
+	  _Distance __len22 = 0;
+	  if (__len1 > __len2)
+	    {
+	      __len11 = __len1 / 2;
+	      std::advance(__first_cut, __len11);
+	      __second_cut = std::lower_bound(__middle, __last, *__first_cut,
+					      __comp);
+	      __len22 = std::distance(__middle, __second_cut);
+	    }
+	  else
+	    {
+	      __len22 = __len2 / 2;
+	      std::advance(__second_cut, __len22);
+	      __first_cut = std::upper_bound(__first, __middle, *__second_cut,
+					     __comp);
+	      __len11 = std::distance(__first, __first_cut);
+	    }
+	  _BidirectionalIterator __new_middle =
+	    std::__rotate_adaptive(__first_cut, __middle, __second_cut,
+				   __len1 - __len11, __len22, __buffer,
+				   __buffer_size);
+	  std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
+				__len22, __buffer, __buffer_size, __comp);
+	  std::__merge_adaptive(__new_middle, __second_cut, __last,
+				__len1 - __len11,
+				__len2 - __len22, __buffer,
+				__buffer_size, __comp);
+	}
+    }
+
+  /// This is a helper function for the merge routines.
+  template<typename _BidirectionalIterator, typename _Distance>
+    void
+    __merge_without_buffer(_BidirectionalIterator __first,
+			   _BidirectionalIterator __middle,
+			   _BidirectionalIterator __last,
+			   _Distance __len1, _Distance __len2)
+    {
+      if (__len1 == 0 || __len2 == 0)
+	return;
+      if (__len1 + __len2 == 2)
+	{
+	  if (*__middle < *__first)
+	    std::iter_swap(__first, __middle);
+	  return;
+	}
+      _BidirectionalIterator __first_cut = __first;
+      _BidirectionalIterator __second_cut = __middle;
+      _Distance __len11 = 0;
+      _Distance __len22 = 0;
+      if (__len1 > __len2)
+	{
+	  __len11 = __len1 / 2;
+	  std::advance(__first_cut, __len11);
+	  __second_cut = std::lower_bound(__middle, __last, *__first_cut);
+	  __len22 = std::distance(__middle, __second_cut);
+	}
+      else
+	{
+	  __len22 = __len2 / 2;
+	  std::advance(__second_cut, __len22);
+	  __first_cut = std::upper_bound(__first, __middle, *__second_cut);
+	  __len11 = std::distance(__first, __first_cut);
+	}
+      std::rotate(__first_cut, __middle, __second_cut);
+      _BidirectionalIterator __new_middle = __first_cut;
+      std::advance(__new_middle, std::distance(__middle, __second_cut));
+      std::__merge_without_buffer(__first, __first_cut, __new_middle,
+				  __len11, __len22);
+      std::__merge_without_buffer(__new_middle, __second_cut, __last,
+				  __len1 - __len11, __len2 - __len22);
+    }
+
+  /// This is a helper function for the merge routines.
+  template<typename _BidirectionalIterator, typename _Distance,
+	   typename _Compare>
+    void
+    __merge_without_buffer(_BidirectionalIterator __first,
+                           _BidirectionalIterator __middle,
+			   _BidirectionalIterator __last,
+			   _Distance __len1, _Distance __len2,
+			   _Compare __comp)
+    {
+      if (__len1 == 0 || __len2 == 0)
+	return;
+      if (__len1 + __len2 == 2)
+	{
+	  if (__comp(*__middle, *__first))
+	    std::iter_swap(__first, __middle);
+	  return;
+	}
+      _BidirectionalIterator __first_cut = __first;
+      _BidirectionalIterator __second_cut = __middle;
+      _Distance __len11 = 0;
+      _Distance __len22 = 0;
+      if (__len1 > __len2)
+	{
+	  __len11 = __len1 / 2;
+	  std::advance(__first_cut, __len11);
+	  __second_cut = std::lower_bound(__middle, __last, *__first_cut,
+					  __comp);
+	  __len22 = std::distance(__middle, __second_cut);
+	}
+      else
+	{
+	  __len22 = __len2 / 2;
+	  std::advance(__second_cut, __len22);
+	  __first_cut = std::upper_bound(__first, __middle, *__second_cut,
+					 __comp);
+	  __len11 = std::distance(__first, __first_cut);
+	}
+      std::rotate(__first_cut, __middle, __second_cut);
+      _BidirectionalIterator __new_middle = __first_cut;
+      std::advance(__new_middle, std::distance(__middle, __second_cut));
+      std::__merge_without_buffer(__first, __first_cut, __new_middle,
+				  __len11, __len22, __comp);
+      std::__merge_without_buffer(__new_middle, __second_cut, __last,
+				  __len1 - __len11, __len2 - __len22, __comp);
+    }
+
+  /**
+   *  @brief Merges two sorted ranges in place.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  middle  Another iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Merges two sorted and consecutive ranges, [first,middle) and
+   *  [middle,last), and puts the result in [first,last).  The output will
+   *  be sorted.  The sort is @e stable, that is, for equivalent
+   *  elements in the two ranges, elements from the first range will always
+   *  come before elements from the second.
+   *
+   *  If enough additional memory is available, this takes (last-first)-1
+   *  comparisons.  Otherwise an NlogN algorithm is used, where N is
+   *  distance(first,last).
+  */
+  template<typename _BidirectionalIterator>
+    void
+    inplace_merge(_BidirectionalIterator __first,
+		  _BidirectionalIterator __middle,
+		  _BidirectionalIterator __last)
+    {
+      typedef typename iterator_traits<_BidirectionalIterator>::value_type
+          _ValueType;
+      typedef typename iterator_traits<_BidirectionalIterator>::difference_type
+          _DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+	    _BidirectionalIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+      __glibcxx_requires_sorted(__first, __middle);
+      __glibcxx_requires_sorted(__middle, __last);
+
+      if (__first == __middle || __middle == __last)
+	return;
+
+      _DistanceType __len1 = std::distance(__first, __middle);
+      _DistanceType __len2 = std::distance(__middle, __last);
+
+      _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
+								  __last);
+      if (__buf.begin() == 0)
+	std::__merge_without_buffer(__first, __middle, __last, __len1, __len2);
+      else
+	std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
+			      __buf.begin(), _DistanceType(__buf.size()));
+    }
+
+  /**
+   *  @brief Merges two sorted ranges in place.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  middle  Another iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  Nothing.
+   *
+   *  Merges two sorted and consecutive ranges, [first,middle) and
+   *  [middle,last), and puts the result in [first,last).  The output will
+   *  be sorted.  The sort is @e stable, that is, for equivalent
+   *  elements in the two ranges, elements from the first range will always
+   *  come before elements from the second.
+   *
+   *  If enough additional memory is available, this takes (last-first)-1
+   *  comparisons.  Otherwise an NlogN algorithm is used, where N is
+   *  distance(first,last).
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template<typename _BidirectionalIterator, typename _Compare>
+    void
+    inplace_merge(_BidirectionalIterator __first,
+		  _BidirectionalIterator __middle,
+		  _BidirectionalIterator __last,
+		  _Compare __comp)
+    {
+      typedef typename iterator_traits<_BidirectionalIterator>::value_type
+          _ValueType;
+      typedef typename iterator_traits<_BidirectionalIterator>::difference_type
+          _DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+	    _BidirectionalIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+	    _ValueType, _ValueType>)
+      __glibcxx_requires_sorted_pred(__first, __middle, __comp);
+      __glibcxx_requires_sorted_pred(__middle, __last, __comp);
+
+      if (__first == __middle || __middle == __last)
+	return;
+
+      const _DistanceType __len1 = std::distance(__first, __middle);
+      const _DistanceType __len2 = std::distance(__middle, __last);
+
+      _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
+								  __last);
+      if (__buf.begin() == 0)
+	std::__merge_without_buffer(__first, __middle, __last, __len1,
+				    __len2, __comp);
+      else
+	std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
+			      __buf.begin(), _DistanceType(__buf.size()),
+			      __comp);
+    }
+
+  template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
+	   typename _Distance>
+    void
+    __merge_sort_loop(_RandomAccessIterator1 __first,
+		      _RandomAccessIterator1 __last,
+		      _RandomAccessIterator2 __result,
+		      _Distance __step_size)
+    {
+      const _Distance __two_step = 2 * __step_size;
+
+      while (__last - __first >= __two_step)
+	{
+	  __result = _GLIBCXX_STD_P::merge(
+			_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+			_GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size),
+			_GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size),
+			_GLIBCXX_MAKE_MOVE_ITERATOR(__first + __two_step),
+			__result);
+	  __first += __two_step;
+	}
+
+      __step_size = std::min(_Distance(__last - __first), __step_size);
+      _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+			    _GLIBCXX_MAKE_MOVE_ITERATOR(__first +
+							__step_size),
+			    _GLIBCXX_MAKE_MOVE_ITERATOR(__first +
+							__step_size),
+			    _GLIBCXX_MAKE_MOVE_ITERATOR(__last),
+			    __result);
+    }
+
+  template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
+	   typename _Distance, typename _Compare>
+    void
+    __merge_sort_loop(_RandomAccessIterator1 __first,
+		      _RandomAccessIterator1 __last,
+		      _RandomAccessIterator2 __result, _Distance __step_size,
+		      _Compare __comp)
+    {
+      const _Distance __two_step = 2 * __step_size;
+
+      while (__last - __first >= __two_step)
+	{
+	  __result = _GLIBCXX_STD_P::merge(
+			_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+			_GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size),
+			_GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size),
+			_GLIBCXX_MAKE_MOVE_ITERATOR(__first + __two_step),
+			__result, __comp);
+	  __first += __two_step;
+	}
+      __step_size = std::min(_Distance(__last - __first), __step_size);
+
+      _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+			    _GLIBCXX_MAKE_MOVE_ITERATOR(__first +
+							__step_size),
+			    _GLIBCXX_MAKE_MOVE_ITERATOR(__first +
+							__step_size),
+			    _GLIBCXX_MAKE_MOVE_ITERATOR(__last),
+			    __result, __comp);
+    }
+
+  template<typename _RandomAccessIterator, typename _Distance>
+    void
+    __chunk_insertion_sort(_RandomAccessIterator __first,
+			   _RandomAccessIterator __last,
+			   _Distance __chunk_size)
+    {
+      while (__last - __first >= __chunk_size)
+	{
+	  std::__insertion_sort(__first, __first + __chunk_size);
+	  __first += __chunk_size;
+	}
+      std::__insertion_sort(__first, __last);
+    }
+
+  template<typename _RandomAccessIterator, typename _Distance,
+	   typename _Compare>
+    void
+    __chunk_insertion_sort(_RandomAccessIterator __first,
+			   _RandomAccessIterator __last,
+			   _Distance __chunk_size, _Compare __comp)
+    {
+      while (__last - __first >= __chunk_size)
+	{
+	  std::__insertion_sort(__first, __first + __chunk_size, __comp);
+	  __first += __chunk_size;
+	}
+      std::__insertion_sort(__first, __last, __comp);
+    }
+
+  enum { _S_chunk_size = 7 };
+
+  template<typename _RandomAccessIterator, typename _Pointer>
+    void
+    __merge_sort_with_buffer(_RandomAccessIterator __first,
+			     _RandomAccessIterator __last,
+                             _Pointer __buffer)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_Distance;
+
+      const _Distance __len = __last - __first;
+      const _Pointer __buffer_last = __buffer + __len;
+
+      _Distance __step_size = _S_chunk_size;
+      std::__chunk_insertion_sort(__first, __last, __step_size);
+
+      while (__step_size < __len)
+	{
+	  std::__merge_sort_loop(__first, __last, __buffer, __step_size);
+	  __step_size *= 2;
+	  std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
+	  __step_size *= 2;
+	}
+    }
+
+  template<typename _RandomAccessIterator, typename _Pointer, typename _Compare>
+    void
+    __merge_sort_with_buffer(_RandomAccessIterator __first,
+			     _RandomAccessIterator __last,
+                             _Pointer __buffer, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_Distance;
+
+      const _Distance __len = __last - __first;
+      const _Pointer __buffer_last = __buffer + __len;
+
+      _Distance __step_size = _S_chunk_size;
+      std::__chunk_insertion_sort(__first, __last, __step_size, __comp);
+
+      while (__step_size < __len)
+	{
+	  std::__merge_sort_loop(__first, __last, __buffer,
+				 __step_size, __comp);
+	  __step_size *= 2;
+	  std::__merge_sort_loop(__buffer, __buffer_last, __first,
+				 __step_size, __comp);
+	  __step_size *= 2;
+	}
+    }
+
+  template<typename _RandomAccessIterator, typename _Pointer,
+	   typename _Distance>
+    void
+    __stable_sort_adaptive(_RandomAccessIterator __first,
+			   _RandomAccessIterator __last,
+                           _Pointer __buffer, _Distance __buffer_size)
+    {
+      const _Distance __len = (__last - __first + 1) / 2;
+      const _RandomAccessIterator __middle = __first + __len;
+      if (__len > __buffer_size)
+	{
+	  std::__stable_sort_adaptive(__first, __middle,
+				      __buffer, __buffer_size);
+	  std::__stable_sort_adaptive(__middle, __last,
+				      __buffer, __buffer_size);
+	}
+      else
+	{
+	  std::__merge_sort_with_buffer(__first, __middle, __buffer);
+	  std::__merge_sort_with_buffer(__middle, __last, __buffer);
+	}
+      std::__merge_adaptive(__first, __middle, __last,
+			    _Distance(__middle - __first),
+			    _Distance(__last - __middle),
+			    __buffer, __buffer_size);
+    }
+
+  template<typename _RandomAccessIterator, typename _Pointer,
+	   typename _Distance, typename _Compare>
+    void
+    __stable_sort_adaptive(_RandomAccessIterator __first,
+			   _RandomAccessIterator __last,
+                           _Pointer __buffer, _Distance __buffer_size,
+                           _Compare __comp)
+    {
+      const _Distance __len = (__last - __first + 1) / 2;
+      const _RandomAccessIterator __middle = __first + __len;
+      if (__len > __buffer_size)
+	{
+	  std::__stable_sort_adaptive(__first, __middle, __buffer,
+				      __buffer_size, __comp);
+	  std::__stable_sort_adaptive(__middle, __last, __buffer,
+				      __buffer_size, __comp);
+	}
+      else
+	{
+	  std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp);
+	  std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp);
+	}
+      std::__merge_adaptive(__first, __middle, __last,
+			    _Distance(__middle - __first),
+			    _Distance(__last - __middle),
+			    __buffer, __buffer_size,
+			    __comp);
+    }
+
+  /// This is a helper function for the stable sorting routines.
+  template<typename _RandomAccessIterator>
+    void
+    __inplace_stable_sort(_RandomAccessIterator __first,
+			  _RandomAccessIterator __last)
+    {
+      if (__last - __first < 15)
+	{
+	  std::__insertion_sort(__first, __last);
+	  return;
+	}
+      _RandomAccessIterator __middle = __first + (__last - __first) / 2;
+      std::__inplace_stable_sort(__first, __middle);
+      std::__inplace_stable_sort(__middle, __last);
+      std::__merge_without_buffer(__first, __middle, __last,
+				  __middle - __first,
+				  __last - __middle);
+    }
+
+  /// This is a helper function for the stable sorting routines.
+  template<typename _RandomAccessIterator, typename _Compare>
+    void
+    __inplace_stable_sort(_RandomAccessIterator __first,
+			  _RandomAccessIterator __last, _Compare __comp)
+    {
+      if (__last - __first < 15)
+	{
+	  std::__insertion_sort(__first, __last, __comp);
+	  return;
+	}
+      _RandomAccessIterator __middle = __first + (__last - __first) / 2;
+      std::__inplace_stable_sort(__first, __middle, __comp);
+      std::__inplace_stable_sort(__middle, __last, __comp);
+      std::__merge_without_buffer(__first, __middle, __last,
+				  __middle - __first,
+				  __last - __middle,
+				  __comp);
+    }
+
+  // stable_sort
+
+  // Set algorithms: includes, set_union, set_intersection, set_difference,
+  // set_symmetric_difference.  All of these algorithms have the precondition
+  // that their input ranges are sorted and the postcondition that their output
+  // ranges are sorted.
+
+  /**
+   *  @brief Determines whether all elements of a sequence exists in a range.
+   *  @param  first1  Start of search range.
+   *  @param  last1   End of search range.
+   *  @param  first2  Start of sequence
+   *  @param  last2   End of sequence.
+   *  @return  True if each element in [first2,last2) is contained in order
+   *  within [first1,last1).  False otherwise.
+   *  @ingroup set_algorithms
+   *
+   *  This operation expects both [first1,last1) and [first2,last2) to be
+   *  sorted.  Searches for the presence of each element in [first2,last2)
+   *  within [first1,last1).  The iterators over each range only move forward,
+   *  so this is a linear algorithm.  If an element in [first2,last2) is not
+   *  found before the search iterator reaches @a last2, false is returned.
+  */
+  template<typename _InputIterator1, typename _InputIterator2>
+    bool
+    includes(_InputIterator1 __first1, _InputIterator1 __last1,
+	     _InputIterator2 __first2, _InputIterator2 __last2)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+      __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (*__first2 < *__first1)
+	  return false;
+	else if(*__first1 < *__first2)
+	  ++__first1;
+	else
+	  ++__first1, ++__first2;
+
+      return __first2 == __last2;
+    }
+
+  /**
+   *  @brief Determines whether all elements of a sequence exists in a range
+   *  using comparison.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of search range.
+   *  @param  last1   End of search range.
+   *  @param  first2  Start of sequence
+   *  @param  last2   End of sequence.
+   *  @param  comp    Comparison function to use.
+   *  @return  True if each element in [first2,last2) is contained in order
+   *  within [first1,last1) according to comp.  False otherwise.
+   *  @ingroup set_algorithms
+   *
+   *  This operation expects both [first1,last1) and [first2,last2) to be
+   *  sorted.  Searches for the presence of each element in [first2,last2)
+   *  within [first1,last1), using comp to decide.  The iterators over each
+   *  range only move forward, so this is a linear algorithm.  If an element
+   *  in [first2,last2) is not found before the search iterator reaches @a
+   *  last2, false is returned.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _Compare>
+    bool
+    includes(_InputIterator1 __first1, _InputIterator1 __last1,
+	     _InputIterator2 __first2, _InputIterator2 __last2,
+	     _Compare __comp)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+      __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (__comp(*__first2, *__first1))
+	  return false;
+	else if(__comp(*__first1, *__first2))
+	  ++__first1;
+	else
+	  ++__first1, ++__first2;
+
+      return __first2 == __last2;
+    }
+
+  // nth_element
+  // merge
+  // set_difference
+  // set_intersection
+  // set_union
+  // stable_sort
+  // set_symmetric_difference
+  // min_element
+  // max_element
+
+  /**
+   *  @brief  Permute range into the next @a dictionary ordering.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @return  False if wrapped to first permutation, true otherwise.
+   *
+   *  Treats all permutations of the range as a set of @a dictionary sorted
+   *  sequences.  Permutes the current sequence into the next one of this set.
+   *  Returns true if there are more sequences to generate.  If the sequence
+   *  is the largest of the set, the smallest is generated and false returned.
+  */
+  template<typename _BidirectionalIterator>
+    bool
+    next_permutation(_BidirectionalIterator __first,
+		     _BidirectionalIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_BidirectionalIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return false;
+      _BidirectionalIterator __i = __first;
+      ++__i;
+      if (__i == __last)
+	return false;
+      __i = __last;
+      --__i;
+
+      for(;;)
+	{
+	  _BidirectionalIterator __ii = __i;
+	  --__i;
+	  if (*__i < *__ii)
+	    {
+	      _BidirectionalIterator __j = __last;
+	      while (!(*__i < *--__j))
+		{}
+	      std::iter_swap(__i, __j);
+	      std::reverse(__ii, __last);
+	      return true;
+	    }
+	  if (__i == __first)
+	    {
+	      std::reverse(__first, __last);
+	      return false;
+	    }
+	}
+    }
+
+  /**
+   *  @brief  Permute range into the next @a dictionary ordering using
+   *          comparison functor.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @param  comp   A comparison functor.
+   *  @return  False if wrapped to first permutation, true otherwise.
+   *
+   *  Treats all permutations of the range [first,last) as a set of
+   *  @a dictionary sorted sequences ordered by @a comp.  Permutes the current
+   *  sequence into the next one of this set.  Returns true if there are more
+   *  sequences to generate.  If the sequence is the largest of the set, the
+   *  smallest is generated and false returned.
+  */
+  template<typename _BidirectionalIterator, typename _Compare>
+    bool
+    next_permutation(_BidirectionalIterator __first,
+		     _BidirectionalIterator __last, _Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_BidirectionalIterator>::value_type,
+	    typename iterator_traits<_BidirectionalIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return false;
+      _BidirectionalIterator __i = __first;
+      ++__i;
+      if (__i == __last)
+	return false;
+      __i = __last;
+      --__i;
+
+      for(;;)
+	{
+	  _BidirectionalIterator __ii = __i;
+	  --__i;
+	  if (__comp(*__i, *__ii))
+	    {
+	      _BidirectionalIterator __j = __last;
+	      while (!bool(__comp(*__i, *--__j)))
+		{}
+	      std::iter_swap(__i, __j);
+	      std::reverse(__ii, __last);
+	      return true;
+	    }
+	  if (__i == __first)
+	    {
+	      std::reverse(__first, __last);
+	      return false;
+	    }
+	}
+    }
+
+  /**
+   *  @brief  Permute range into the previous @a dictionary ordering.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @return  False if wrapped to last permutation, true otherwise.
+   *
+   *  Treats all permutations of the range as a set of @a dictionary sorted
+   *  sequences.  Permutes the current sequence into the previous one of this
+   *  set.  Returns true if there are more sequences to generate.  If the
+   *  sequence is the smallest of the set, the largest is generated and false
+   *  returned.
+  */
+  template<typename _BidirectionalIterator>
+    bool
+    prev_permutation(_BidirectionalIterator __first,
+		     _BidirectionalIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_BidirectionalIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return false;
+      _BidirectionalIterator __i = __first;
+      ++__i;
+      if (__i == __last)
+	return false;
+      __i = __last;
+      --__i;
+
+      for(;;)
+	{
+	  _BidirectionalIterator __ii = __i;
+	  --__i;
+	  if (*__ii < *__i)
+	    {
+	      _BidirectionalIterator __j = __last;
+	      while (!(*--__j < *__i))
+		{}
+	      std::iter_swap(__i, __j);
+	      std::reverse(__ii, __last);
+	      return true;
+	    }
+	  if (__i == __first)
+	    {
+	      std::reverse(__first, __last);
+	      return false;
+	    }
+	}
+    }
+
+  /**
+   *  @brief  Permute range into the previous @a dictionary ordering using
+   *          comparison functor.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @param  comp   A comparison functor.
+   *  @return  False if wrapped to last permutation, true otherwise.
+   *
+   *  Treats all permutations of the range [first,last) as a set of
+   *  @a dictionary sorted sequences ordered by @a comp.  Permutes the current
+   *  sequence into the previous one of this set.  Returns true if there are
+   *  more sequences to generate.  If the sequence is the smallest of the set,
+   *  the largest is generated and false returned.
+  */
+  template<typename _BidirectionalIterator, typename _Compare>
+    bool
+    prev_permutation(_BidirectionalIterator __first,
+		     _BidirectionalIterator __last, _Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_BidirectionalIterator>::value_type,
+	    typename iterator_traits<_BidirectionalIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return false;
+      _BidirectionalIterator __i = __first;
+      ++__i;
+      if (__i == __last)
+	return false;
+      __i = __last;
+      --__i;
+
+      for(;;)
+	{
+	  _BidirectionalIterator __ii = __i;
+	  --__i;
+	  if (__comp(*__ii, *__i))
+	    {
+	      _BidirectionalIterator __j = __last;
+	      while (!bool(__comp(*--__j, *__i)))
+		{}
+	      std::iter_swap(__i, __j);
+	      std::reverse(__ii, __last);
+	      return true;
+	    }
+	  if (__i == __first)
+	    {
+	      std::reverse(__first, __last);
+	      return false;
+	    }
+	}
+    }
+
+  // replace
+  // replace_if
+
+  /**
+   *  @brief Copy a sequence, replacing each element of one value with another
+   *         value.
+   *  @param  first      An input iterator.
+   *  @param  last       An input iterator.
+   *  @param  result     An output iterator.
+   *  @param  old_value  The value to be replaced.
+   *  @param  new_value  The replacement value.
+   *  @return   The end of the output sequence, @p result+(last-first).
+   *
+   *  Copies each element in the input range @p [first,last) to the
+   *  output range @p [result,result+(last-first)) replacing elements
+   *  equal to @p old_value with @p new_value.
+  */
+  template<typename _InputIterator, typename _OutputIterator, typename _Tp>
+    _OutputIterator
+    replace_copy(_InputIterator __first, _InputIterator __last,
+		 _OutputIterator __result,
+		 const _Tp& __old_value, const _Tp& __new_value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIterator>::value_type, _Tp>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first, ++__result)
+	if (*__first == __old_value)
+	  *__result = __new_value;
+	else
+	  *__result = *__first;
+      return __result;
+    }
+
+  /**
+   *  @brief Copy a sequence, replacing each value for which a predicate
+   *         returns true with another value.
+   *  @ingroup mutating_algorithms
+   *  @param  first      An input iterator.
+   *  @param  last       An input iterator.
+   *  @param  result     An output iterator.
+   *  @param  pred       A predicate.
+   *  @param  new_value  The replacement value.
+   *  @return   The end of the output sequence, @p result+(last-first).
+   *
+   *  Copies each element in the range @p [first,last) to the range
+   *  @p [result,result+(last-first)) replacing elements for which
+   *  @p pred returns true with @p new_value.
+  */
+  template<typename _InputIterator, typename _OutputIterator,
+	   typename _Predicate, typename _Tp>
+    _OutputIterator
+    replace_copy_if(_InputIterator __first, _InputIterator __last,
+		    _OutputIterator __result,
+		    _Predicate __pred, const _Tp& __new_value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first, ++__result)
+	if (__pred(*__first))
+	  *__result = __new_value;
+	else
+	  *__result = *__first;
+      return __result;
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /**
+   *  @brief  Determines whether the elements of a sequence are sorted.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @return  True if the elements are sorted, false otherwise.
+  */
+  template<typename _ForwardIterator>
+    inline bool
+    is_sorted(_ForwardIterator __first, _ForwardIterator __last)
+    { return std::is_sorted_until(__first, __last) == __last; }
+
+  /**
+   *  @brief  Determines whether the elements of a sequence are sorted
+   *          according to a comparison functor.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  True if the elements are sorted, false otherwise.
+  */
+  template<typename _ForwardIterator, typename _Compare>
+    inline bool
+    is_sorted(_ForwardIterator __first, _ForwardIterator __last,
+	      _Compare __comp)
+    { return std::is_sorted_until(__first, __last, __comp) == __last; }
+
+  /**
+   *  @brief  Determines the end of a sorted sequence.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @return  An iterator pointing to the last iterator i in [first, last)
+   *           for which the range [first, i) is sorted.
+  */
+  template<typename _ForwardIterator>
+    _ForwardIterator
+    is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __last;
+
+      _ForwardIterator __next = __first;
+      for (++__next; __next != __last; __first = __next, ++__next)
+	if (*__next < *__first)
+	  return __next;
+      return __next;
+    }
+
+  /**
+   *  @brief  Determines the end of a sorted sequence using comparison functor.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  An iterator pointing to the last iterator i in [first, last)
+   *           for which the range [first, i) is sorted.
+  */
+  template<typename _ForwardIterator, typename _Compare>
+    _ForwardIterator
+    is_sorted_until(_ForwardIterator __first, _ForwardIterator __last,
+		    _Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_ForwardIterator>::value_type,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __last;
+
+      _ForwardIterator __next = __first;
+      for (++__next; __next != __last; __first = __next, ++__next)
+	if (__comp(*__next, *__first))
+	  return __next;
+      return __next;
+    }
+
+  /**
+   *  @brief  Determines min and max at once as an ordered pair.
+   *  @ingroup sorting_algorithms
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @return  A pair(b, a) if b is smaller than a, pair(a, b) otherwise.
+  */
+  template<typename _Tp>
+    inline pair<const _Tp&, const _Tp&>
+    minmax(const _Tp& __a, const _Tp& __b)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+
+      return __b < __a ? pair<const _Tp&, const _Tp&>(__b, __a)
+	               : pair<const _Tp&, const _Tp&>(__a, __b);
+    }
+
+  /**
+   *  @brief  Determines min and max at once as an ordered pair.
+   *  @ingroup sorting_algorithms
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @param  comp  A @link comparison_functor comparison functor@endlink.
+   *  @return  A pair(b, a) if b is smaller than a, pair(a, b) otherwise.
+  */
+  template<typename _Tp, typename _Compare>
+    inline pair<const _Tp&, const _Tp&>
+    minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
+    {
+      return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a)
+	                      : pair<const _Tp&, const _Tp&>(__a, __b);
+    }
+
+  /**
+   *  @brief  Return a pair of iterators pointing to the minimum and maximum
+   *          elements in a range.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @return  make_pair(m, M), where m is the first iterator i in 
+   *           [first, last) such that no other element in the range is
+   *           smaller, and where M is the last iterator i in [first, last)
+   *           such that no other element in the range is larger.
+  */
+  template<typename _ForwardIterator>
+    pair<_ForwardIterator, _ForwardIterator>
+    minmax_element(_ForwardIterator __first, _ForwardIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      _ForwardIterator __next = __first;
+      if (__first == __last
+	  || ++__next == __last)
+	return std::make_pair(__first, __first);
+
+      _ForwardIterator __min, __max;
+      if (*__next < *__first)
+	{
+	  __min = __next;
+	  __max = __first;
+	}
+      else
+	{
+	  __min = __first;
+	  __max = __next;
+	}
+
+      __first = __next;
+      ++__first;
+
+      while (__first != __last)
+	{
+	  __next = __first;
+	  if (++__next == __last)
+	    {
+	      if (*__first < *__min)
+		__min = __first;
+	      else if (!(*__first < *__max))
+		__max = __first;
+	      break;
+	    }
+
+	  if (*__next < *__first)
+	    {
+	      if (*__next < *__min)
+		__min = __next;
+	      if (!(*__first < *__max))
+		__max = __first;
+	    }
+	  else
+	    {
+	      if (*__first < *__min)
+		__min = __first;
+	      if (!(*__next < *__max))
+		__max = __next;
+	    }
+
+	  __first = __next;
+	  ++__first;
+	}
+
+      return std::make_pair(__min, __max);
+    }
+
+  /**
+   *  @brief  Return a pair of iterators pointing to the minimum and maximum
+   *          elements in a range.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @param  comp   Comparison functor.
+   *  @return  make_pair(m, M), where m is the first iterator i in 
+   *           [first, last) such that no other element in the range is
+   *           smaller, and where M is the last iterator i in [first, last)
+   *           such that no other element in the range is larger.
+  */
+  template<typename _ForwardIterator, typename _Compare>
+    pair<_ForwardIterator, _ForwardIterator>
+    minmax_element(_ForwardIterator __first, _ForwardIterator __last,
+		   _Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_ForwardIterator>::value_type,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      _ForwardIterator __next = __first;
+      if (__first == __last
+	  || ++__next == __last)
+	return std::make_pair(__first, __first);
+
+      _ForwardIterator __min, __max;
+      if (__comp(*__next, *__first))
+	{
+	  __min = __next;
+	  __max = __first;
+	}
+      else
+	{
+	  __min = __first;
+	  __max = __next;
+	}
+
+      __first = __next;
+      ++__first;
+
+      while (__first != __last)
+	{
+	  __next = __first;
+	  if (++__next == __last)
+	    {
+	      if (__comp(*__first, *__min))
+		__min = __first;
+	      else if (!__comp(*__first, *__max))
+		__max = __first;
+	      break;
+	    }
+
+	  if (__comp(*__next, *__first))
+	    {
+	      if (__comp(*__next, *__min))
+		__min = __next;
+	      if (!__comp(*__first, *__max))
+		__max = __first;
+	    }
+	  else
+	    {
+	      if (__comp(*__first, *__min))
+		__min = __first;
+	      if (!__comp(*__next, *__max))
+		__max = __next;
+	    }
+
+	  __first = __next;
+	  ++__first;
+	}
+
+      return std::make_pair(__min, __max);
+    }
+
+  // N2722 + DR 915.
+  template<typename _Tp>
+    inline _Tp
+    min(initializer_list<_Tp> __l)
+    { return *std::min_element(__l.begin(), __l.end()); }
+
+  template<typename _Tp, typename _Compare>
+    inline _Tp
+    min(initializer_list<_Tp> __l, _Compare __comp)
+    { return *std::min_element(__l.begin(), __l.end(), __comp); }
+
+  template<typename _Tp>
+    inline _Tp
+    max(initializer_list<_Tp> __l)
+    { return *std::max_element(__l.begin(), __l.end()); }
+
+  template<typename _Tp, typename _Compare>
+    inline _Tp
+    max(initializer_list<_Tp> __l, _Compare __comp)
+    { return *std::max_element(__l.begin(), __l.end(), __comp); }
+
+  template<typename _Tp>
+    inline pair<_Tp, _Tp>
+    minmax(initializer_list<_Tp> __l)
+    {
+      pair<const _Tp*, const _Tp*> __p =
+	std::minmax_element(__l.begin(), __l.end());
+      return std::make_pair(*__p.first, *__p.second);
+    }
+
+  template<typename _Tp, typename _Compare>
+    inline pair<_Tp, _Tp>
+    minmax(initializer_list<_Tp> __l, _Compare __comp)
+    {
+      pair<const _Tp*, const _Tp*> __p =
+	std::minmax_element(__l.begin(), __l.end(), __comp);
+      return std::make_pair(*__p.first, *__p.second);
+    }
+
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
+  /**
+   *  @brief Shuffle the elements of a sequence using a uniform random
+   *         number generator.
+   *  @ingroup mutating_algorithms
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  g       A UniformRandomNumberGenerator (26.5.1.3).
+   *  @return  Nothing.
+   *
+   *  Reorders the elements in the range @p [first,last) using @p g to
+   *  provide random numbers.
+  */
+  template<typename _RandomAccessIterator,
+	   typename _UniformRandomNumberGenerator>
+    void
+    shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	    _UniformRandomNumberGenerator& __g)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return;
+
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_DistanceType;
+
+      typedef typename std::make_unsigned<_DistanceType>::type __ud_type;
+      typedef typename std::uniform_int_distribution<__ud_type> __distr_type;
+      typedef typename __distr_type::param_type __p_type;
+      __distr_type __d;
+
+      for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+	std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first)));
+    }
+#endif
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+  /**
+   *  @brief Apply a function to every element of a sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  f      A unary function object.
+   *  @return   @p f (std::move(@p f) in C++0x).
+   *
+   *  Applies the function object @p f to each element in the range
+   *  @p [first,last).  @p f must not modify the order of the sequence.
+   *  If @p f has a return value it is ignored.
+  */
+  template<typename _InputIterator, typename _Function>
+    _Function
+    for_each(_InputIterator __first, _InputIterator __last, _Function __f)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+      for (; __first != __last; ++__first)
+	__f(*__first);
+      return _GLIBCXX_MOVE(__f);
+    }
+
+  /**
+   *  @brief Find the first occurrence of a value in a sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  val    The value to find.
+   *  @return   The first iterator @c i in the range @p [first,last)
+   *  such that @c *i == @p val, or @p last if no such iterator exists.
+  */
+  template<typename _InputIterator, typename _Tp>
+    inline _InputIterator
+    find(_InputIterator __first, _InputIterator __last,
+	 const _Tp& __val)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_EqualOpConcept<
+		typename iterator_traits<_InputIterator>::value_type, _Tp>)
+      __glibcxx_requires_valid_range(__first, __last);
+      return std::__find(__first, __last, __val,
+		         std::__iterator_category(__first));
+    }
+
+  /**
+   *  @brief Find the first element in a sequence for which a
+   *         predicate is true.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  pred   A predicate.
+   *  @return   The first iterator @c i in the range @p [first,last)
+   *  such that @p pred(*i) is true, or @p last if no such iterator exists.
+  */
+  template<typename _InputIterator, typename _Predicate>
+    inline _InputIterator
+    find_if(_InputIterator __first, _InputIterator __last,
+	    _Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	      typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+      return std::__find_if(__first, __last, __pred,
+			    std::__iterator_category(__first));
+    }
+
+  /**
+   *  @brief  Find element from a set in a sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  Start of range to search.
+   *  @param  last1   End of range to search.
+   *  @param  first2  Start of match candidates.
+   *  @param  last2   End of match candidates.
+   *  @return   The first iterator @c i in the range
+   *  @p [first1,last1) such that @c *i == @p *(i2) such that i2 is an
+   *  iterator in [first2,last2), or @p last1 if no such iterator exists.
+   *
+   *  Searches the range @p [first1,last1) for an element that is equal to
+   *  some element in the range [first2,last2).  If found, returns an iterator
+   *  in the range [first1,last1), otherwise returns @p last1.
+  */
+  template<typename _InputIterator, typename _ForwardIterator>
+    _InputIterator
+    find_first_of(_InputIterator __first1, _InputIterator __last1,
+		  _ForwardIterator __first2, _ForwardIterator __last2)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIterator>::value_type,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+      __glibcxx_requires_valid_range(__first2, __last2);
+
+      for (; __first1 != __last1; ++__first1)
+	for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
+	  if (*__first1 == *__iter)
+	    return __first1;
+      return __last1;
+    }
+
+  /**
+   *  @brief  Find element from a set in a sequence using a predicate.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  Start of range to search.
+   *  @param  last1   End of range to search.
+   *  @param  first2  Start of match candidates.
+   *  @param  last2   End of match candidates.
+   *  @param  comp    Predicate to use.
+   *  @return   The first iterator @c i in the range
+   *  @p [first1,last1) such that @c comp(*i, @p *(i2)) is true and i2 is an
+   *  iterator in [first2,last2), or @p last1 if no such iterator exists.
+   *
+
+   *  Searches the range @p [first1,last1) for an element that is
+   *  equal to some element in the range [first2,last2).  If found,
+   *  returns an iterator in the range [first1,last1), otherwise
+   *  returns @p last1.
+  */
+  template<typename _InputIterator, typename _ForwardIterator,
+	   typename _BinaryPredicate>
+    _InputIterator
+    find_first_of(_InputIterator __first1, _InputIterator __last1,
+		  _ForwardIterator __first2, _ForwardIterator __last2,
+		  _BinaryPredicate __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_InputIterator>::value_type,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+      __glibcxx_requires_valid_range(__first2, __last2);
+
+      for (; __first1 != __last1; ++__first1)
+	for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
+	  if (__comp(*__first1, *__iter))
+	    return __first1;
+      return __last1;
+    }
+
+  /**
+   *  @brief Find two adjacent values in a sequence that are equal.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @return   The first iterator @c i such that @c i and @c i+1 are both
+   *  valid iterators in @p [first,last) and such that @c *i == @c *(i+1),
+   *  or @p last if no such iterator exists.
+  */
+  template<typename _ForwardIterator>
+    _ForwardIterator
+    adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+      if (__first == __last)
+	return __last;
+      _ForwardIterator __next = __first;
+      while(++__next != __last)
+	{
+	  if (*__first == *__next)
+	    return __first;
+	  __first = __next;
+	}
+      return __last;
+    }
+
+  /**
+   *  @brief Find two adjacent values in a sequence using a predicate.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first         A forward iterator.
+   *  @param  last          A forward iterator.
+   *  @param  binary_pred   A binary predicate.
+   *  @return   The first iterator @c i such that @c i and @c i+1 are both
+   *  valid iterators in @p [first,last) and such that
+   *  @p binary_pred(*i,*(i+1)) is true, or @p last if no such iterator
+   *  exists.
+  */
+  template<typename _ForwardIterator, typename _BinaryPredicate>
+    _ForwardIterator
+    adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
+		  _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_ForwardIterator>::value_type,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+      if (__first == __last)
+	return __last;
+      _ForwardIterator __next = __first;
+      while(++__next != __last)
+	{
+	  if (__binary_pred(*__first, *__next))
+	    return __first;
+	  __first = __next;
+	}
+      return __last;
+    }
+
+  /**
+   *  @brief Count the number of copies of a value in a sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  value  The value to be counted.
+   *  @return   The number of iterators @c i in the range @p [first,last)
+   *  for which @c *i == @p value
+  */
+  template<typename _InputIterator, typename _Tp>
+    typename iterator_traits<_InputIterator>::difference_type
+    count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	typename iterator_traits<_InputIterator>::value_type, _Tp>)
+      __glibcxx_requires_valid_range(__first, __last);
+      typename iterator_traits<_InputIterator>::difference_type __n = 0;
+      for (; __first != __last; ++__first)
+	if (*__first == __value)
+	  ++__n;
+      return __n;
+    }
+
+  /**
+   *  @brief Count the elements of a sequence for which a predicate is true.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  pred   A predicate.
+   *  @return   The number of iterators @c i in the range @p [first,last)
+   *  for which @p pred(*i) is true.
+  */
+  template<typename _InputIterator, typename _Predicate>
+    typename iterator_traits<_InputIterator>::difference_type
+    count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+      typename iterator_traits<_InputIterator>::difference_type __n = 0;
+      for (; __first != __last; ++__first)
+	if (__pred(*__first))
+	  ++__n;
+      return __n;
+    }
+
+  /**
+   *  @brief Search a sequence for a matching sub-sequence.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  A forward iterator.
+   *  @param  last1   A forward iterator.
+   *  @param  first2  A forward iterator.
+   *  @param  last2   A forward iterator.
+   *  @return   The first iterator @c i in the range
+   *  @p [first1,last1-(last2-first2)) such that @c *(i+N) == @p *(first2+N)
+   *  for each @c N in the range @p [0,last2-first2), or @p last1 if no
+   *  such iterator exists.
+   *
+   *  Searches the range @p [first1,last1) for a sub-sequence that compares
+   *  equal value-by-value with the sequence given by @p [first2,last2) and
+   *  returns an iterator to the first element of the sub-sequence, or
+   *  @p last1 if the sub-sequence is not found.
+   *
+   *  Because the sub-sequence must lie completely within the range
+   *  @p [first1,last1) it must start at a position less than
+   *  @p last1-(last2-first2) where @p last2-first2 is the length of the
+   *  sub-sequence.
+   *  This means that the returned iterator @c i will be in the range
+   *  @p [first1,last1-(last2-first2))
+  */
+  template<typename _ForwardIterator1, typename _ForwardIterator2>
+    _ForwardIterator1
+    search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+	   _ForwardIterator2 __first2, _ForwardIterator2 __last2)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_ForwardIterator1>::value_type,
+	    typename iterator_traits<_ForwardIterator2>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+      __glibcxx_requires_valid_range(__first2, __last2);
+
+      // Test for empty ranges
+      if (__first1 == __last1 || __first2 == __last2)
+	return __first1;
+
+      // Test for a pattern of length 1.
+      _ForwardIterator2 __p1(__first2);
+      if (++__p1 == __last2)
+	return _GLIBCXX_STD_P::find(__first1, __last1, *__first2);
+
+      // General case.
+      _ForwardIterator2 __p;
+      _ForwardIterator1 __current = __first1;
+
+      for (;;)
+	{
+	  __first1 = _GLIBCXX_STD_P::find(__first1, __last1, *__first2);
+	  if (__first1 == __last1)
+	    return __last1;
+
+	  __p = __p1;
+	  __current = __first1;
+	  if (++__current == __last1)
+	    return __last1;
+
+	  while (*__current == *__p)
+	    {
+	      if (++__p == __last2)
+		return __first1;
+	      if (++__current == __last1)
+		return __last1;
+	    }
+	  ++__first1;
+	}
+      return __first1;
+    }
+
+  /**
+   *  @brief Search a sequence for a matching sub-sequence using a predicate.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1     A forward iterator.
+   *  @param  last1      A forward iterator.
+   *  @param  first2     A forward iterator.
+   *  @param  last2      A forward iterator.
+   *  @param  predicate  A binary predicate.
+   *  @return   The first iterator @c i in the range
+   *  @p [first1,last1-(last2-first2)) such that
+   *  @p predicate(*(i+N),*(first2+N)) is true for each @c N in the range
+   *  @p [0,last2-first2), or @p last1 if no such iterator exists.
+   *
+   *  Searches the range @p [first1,last1) for a sub-sequence that compares
+   *  equal value-by-value with the sequence given by @p [first2,last2),
+   *  using @p predicate to determine equality, and returns an iterator
+   *  to the first element of the sub-sequence, or @p last1 if no such
+   *  iterator exists.
+   *
+   *  @see search(_ForwardIter1, _ForwardIter1, _ForwardIter2, _ForwardIter2)
+  */
+  template<typename _ForwardIterator1, typename _ForwardIterator2,
+	   typename _BinaryPredicate>
+    _ForwardIterator1
+    search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+	   _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+	   _BinaryPredicate  __predicate)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_ForwardIterator1>::value_type,
+	    typename iterator_traits<_ForwardIterator2>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+      __glibcxx_requires_valid_range(__first2, __last2);
+
+      // Test for empty ranges
+      if (__first1 == __last1 || __first2 == __last2)
+	return __first1;
+
+      // Test for a pattern of length 1.
+      _ForwardIterator2 __p1(__first2);
+      if (++__p1 == __last2)
+	{
+	  while (__first1 != __last1
+		 && !bool(__predicate(*__first1, *__first2)))
+	    ++__first1;
+	  return __first1;
+	}
+
+      // General case.
+      _ForwardIterator2 __p;
+      _ForwardIterator1 __current = __first1;
+
+      for (;;)
+	{
+	  while (__first1 != __last1
+		 && !bool(__predicate(*__first1, *__first2)))
+	    ++__first1;
+	  if (__first1 == __last1)
+	    return __last1;
+
+	  __p = __p1;
+	  __current = __first1;
+	  if (++__current == __last1)
+	    return __last1;
+
+	  while (__predicate(*__current, *__p))
+	    {
+	      if (++__p == __last2)
+		return __first1;
+	      if (++__current == __last1)
+		return __last1;
+	    }
+	  ++__first1;
+	}
+      return __first1;
+    }
+
+
+  /**
+   *  @brief Search a sequence for a number of consecutive values.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @param  count  The number of consecutive values.
+   *  @param  val    The value to find.
+   *  @return   The first iterator @c i in the range @p [first,last-count)
+   *  such that @c *(i+N) == @p val for each @c N in the range @p [0,count),
+   *  or @p last if no such iterator exists.
+   *
+   *  Searches the range @p [first,last) for @p count consecutive elements
+   *  equal to @p val.
+  */
+  template<typename _ForwardIterator, typename _Integer, typename _Tp>
+    _ForwardIterator
+    search_n(_ForwardIterator __first, _ForwardIterator __last,
+	     _Integer __count, const _Tp& __val)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__count <= 0)
+	return __first;
+      if (__count == 1)
+	return _GLIBCXX_STD_P::find(__first, __last, __val);
+      return std::__search_n(__first, __last, __count, __val,
+			     std::__iterator_category(__first));
+    }
+
+
+  /**
+   *  @brief Search a sequence for a number of consecutive values using a
+   *         predicate.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first        A forward iterator.
+   *  @param  last         A forward iterator.
+   *  @param  count        The number of consecutive values.
+   *  @param  val          The value to find.
+   *  @param  binary_pred  A binary predicate.
+   *  @return   The first iterator @c i in the range @p [first,last-count)
+   *  such that @p binary_pred(*(i+N),val) is true for each @c N in the
+   *  range @p [0,count), or @p last if no such iterator exists.
+   *
+   *  Searches the range @p [first,last) for @p count consecutive elements
+   *  for which the predicate returns true.
+  */
+  template<typename _ForwardIterator, typename _Integer, typename _Tp,
+           typename _BinaryPredicate>
+    _ForwardIterator
+    search_n(_ForwardIterator __first, _ForwardIterator __last,
+	     _Integer __count, const _Tp& __val,
+	     _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__count <= 0)
+	return __first;
+      if (__count == 1)
+	{
+	  while (__first != __last && !bool(__binary_pred(*__first, __val)))
+	    ++__first;
+	  return __first;
+	}
+      return std::__search_n(__first, __last, __count, __val, __binary_pred,
+			     std::__iterator_category(__first));
+    }
+
+
+  /**
+   *  @brief Perform an operation on a sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first     An input iterator.
+   *  @param  last      An input iterator.
+   *  @param  result    An output iterator.
+   *  @param  unary_op  A unary operator.
+   *  @return   An output iterator equal to @p result+(last-first).
+   *
+   *  Applies the operator to each element in the input range and assigns
+   *  the results to successive elements of the output sequence.
+   *  Evaluates @p *(result+N)=unary_op(*(first+N)) for each @c N in the
+   *  range @p [0,last-first).
+   *
+   *  @p unary_op must not alter its argument.
+  */
+  template<typename _InputIterator, typename _OutputIterator,
+	   typename _UnaryOperation>
+    _OutputIterator
+    transform(_InputIterator __first, _InputIterator __last,
+	      _OutputIterator __result, _UnaryOperation __unary_op)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+            // "the type returned by a _UnaryOperation"
+            __typeof__(__unary_op(*__first))>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first, ++__result)
+	*__result = __unary_op(*__first);
+      return __result;
+    }
+
+  /**
+   *  @brief Perform an operation on corresponding elements of two sequences.
+   *  @ingroup mutating_algorithms
+   *  @param  first1     An input iterator.
+   *  @param  last1      An input iterator.
+   *  @param  first2     An input iterator.
+   *  @param  result     An output iterator.
+   *  @param  binary_op  A binary operator.
+   *  @return   An output iterator equal to @p result+(last-first).
+   *
+   *  Applies the operator to the corresponding elements in the two
+   *  input ranges and assigns the results to successive elements of the
+   *  output sequence.
+   *  Evaluates @p *(result+N)=binary_op(*(first1+N),*(first2+N)) for each
+   *  @c N in the range @p [0,last1-first1).
+   *
+   *  @p binary_op must not alter either of its arguments.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator, typename _BinaryOperation>
+    _OutputIterator
+    transform(_InputIterator1 __first1, _InputIterator1 __last1,
+	      _InputIterator2 __first2, _OutputIterator __result,
+	      _BinaryOperation __binary_op)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+            // "the type returned by a _BinaryOperation"
+            __typeof__(__binary_op(*__first1,*__first2))>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      for (; __first1 != __last1; ++__first1, ++__first2, ++__result)
+	*__result = __binary_op(*__first1, *__first2);
+      return __result;
+    }
+
+  /**
+   *  @brief Replace each occurrence of one value in a sequence with another
+   *         value.
+   *  @ingroup mutating_algorithms
+   *  @param  first      A forward iterator.
+   *  @param  last       A forward iterator.
+   *  @param  old_value  The value to be replaced.
+   *  @param  new_value  The replacement value.
+   *  @return   replace() returns no value.
+   *
+   *  For each iterator @c i in the range @p [first,last) if @c *i ==
+   *  @p old_value then the assignment @c *i = @p new_value is performed.
+  */
+  template<typename _ForwardIterator, typename _Tp>
+    void
+    replace(_ForwardIterator __first, _ForwardIterator __last,
+	    const _Tp& __old_value, const _Tp& __new_value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+      __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	if (*__first == __old_value)
+	  *__first = __new_value;
+    }
+
+  /**
+   *  @brief Replace each value in a sequence for which a predicate returns
+   *         true with another value.
+   *  @ingroup mutating_algorithms
+   *  @param  first      A forward iterator.
+   *  @param  last       A forward iterator.
+   *  @param  pred       A predicate.
+   *  @param  new_value  The replacement value.
+   *  @return   replace_if() returns no value.
+   *
+   *  For each iterator @c i in the range @p [first,last) if @p pred(*i)
+   *  is true then the assignment @c *i = @p new_value is performed.
+  */
+  template<typename _ForwardIterator, typename _Predicate, typename _Tp>
+    void
+    replace_if(_ForwardIterator __first, _ForwardIterator __last,
+	       _Predicate __pred, const _Tp& __new_value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	if (__pred(*__first))
+	  *__first = __new_value;
+    }
+
+  /**
+   *  @brief Assign the result of a function object to each value in a
+   *         sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @param  gen    A function object taking no arguments and returning
+   *                 std::iterator_traits<_ForwardIterator>::value_type
+   *  @return   generate() returns no value.
+   *
+   *  Performs the assignment @c *i = @p gen() for each @c i in the range
+   *  @p [first,last).
+  */
+  template<typename _ForwardIterator, typename _Generator>
+    void
+    generate(_ForwardIterator __first, _ForwardIterator __last,
+	     _Generator __gen)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_GeneratorConcept<_Generator,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	*__first = __gen();
+    }
+
+  /**
+   *  @brief Assign the result of a function object to each value in a
+   *         sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first  A forward iterator.
+   *  @param  n      The length of the sequence.
+   *  @param  gen    A function object taking no arguments and returning
+   *                 std::iterator_traits<_ForwardIterator>::value_type
+   *  @return   The end of the sequence, @p first+n
+   *
+   *  Performs the assignment @c *i = @p gen() for each @c i in the range
+   *  @p [first,first+n).
+   *
+   *  _GLIBCXX_RESOLVE_LIB_DEFECTS
+   *  DR 865. More algorithms that throw away information
+  */
+  template<typename _OutputIterator, typename _Size, typename _Generator>
+    _OutputIterator
+    generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+            // "the type returned by a _Generator"
+            __typeof__(__gen())>)
+
+      for (; __n > 0; --__n, ++__first)
+	*__first = __gen();
+      return __first;
+    }
+
+
+  /**
+   *  @brief Copy a sequence, removing consecutive duplicate values.
+   *  @ingroup mutating_algorithms
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  result  An output iterator.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) to the range
+   *  beginning at @p result, except that only the first element is copied
+   *  from groups of consecutive elements that compare equal.
+   *  unique_copy() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+   *
+   *  _GLIBCXX_RESOLVE_LIB_DEFECTS
+   *  DR 241. Does unique_copy() require CopyConstructible and Assignable?
+   *  
+   *  _GLIBCXX_RESOLVE_LIB_DEFECTS
+   *  DR 538. 241 again: Does unique_copy() require CopyConstructible and 
+   *  Assignable?
+  */
+  template<typename _InputIterator, typename _OutputIterator>
+    inline _OutputIterator
+    unique_copy(_InputIterator __first, _InputIterator __last,
+		_OutputIterator __result)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __result;
+      return std::__unique_copy(__first, __last, __result,
+				std::__iterator_category(__first),
+				std::__iterator_category(__result));
+    }
+
+  /**
+   *  @brief Copy a sequence, removing consecutive values using a predicate.
+   *  @ingroup mutating_algorithms
+   *  @param  first        An input iterator.
+   *  @param  last         An input iterator.
+   *  @param  result       An output iterator.
+   *  @param  binary_pred  A binary predicate.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) to the range
+   *  beginning at @p result, except that only the first element is copied
+   *  from groups of consecutive elements for which @p binary_pred returns
+   *  true.
+   *  unique_copy() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+   *
+   *  _GLIBCXX_RESOLVE_LIB_DEFECTS
+   *  DR 241. Does unique_copy() require CopyConstructible and Assignable?
+  */
+  template<typename _InputIterator, typename _OutputIterator,
+	   typename _BinaryPredicate>
+    inline _OutputIterator
+    unique_copy(_InputIterator __first, _InputIterator __last,
+		_OutputIterator __result,
+		_BinaryPredicate __binary_pred)
+    {
+      // concept requirements -- predicates checked later
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+	    typename iterator_traits<_InputIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __result;
+      return std::__unique_copy(__first, __last, __result, __binary_pred,
+				std::__iterator_category(__first),
+				std::__iterator_category(__result));
+    }
+
+
+  /**
+   *  @brief Randomly shuffle the elements of a sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @return  Nothing.
+   *
+   *  Reorder the elements in the range @p [first,last) using a random
+   *  distribution, so that every possible ordering of the sequence is
+   *  equally likely.
+  */
+  template<typename _RandomAccessIterator>
+    inline void
+    random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first != __last)
+	for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+	  std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
+    }
+
+  /**
+   *  @brief Shuffle the elements of a sequence using a random number
+   *         generator.
+   *  @ingroup mutating_algorithms
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  rand    The RNG functor or function.
+   *  @return  Nothing.
+   *
+   *  Reorders the elements in the range @p [first,last) using @p rand to
+   *  provide a random distribution. Calling @p rand(N) for a positive
+   *  integer @p N should return a randomly chosen integer from the
+   *  range [0,N).
+  */
+  template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
+    void
+    random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+		   _RandomNumberGenerator&& __rand)
+#else
+		   _RandomNumberGenerator& __rand)
+#endif
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return;
+      for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+	std::iter_swap(__i, __first + __rand((__i - __first) + 1));
+    }
+
+
+  /**
+   *  @brief Move elements for which a predicate is true to the beginning
+   *         of a sequence.
+   *  @ingroup mutating_algorithms
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  pred    A predicate functor.
+   *  @return  An iterator @p middle such that @p pred(i) is true for each
+   *  iterator @p i in the range @p [first,middle) and false for each @p i
+   *  in the range @p [middle,last).
+   *
+   *  @p pred must not modify its operand. @p partition() does not preserve
+   *  the relative ordering of elements in each group, use
+   *  @p stable_partition() if this is needed.
+  */
+  template<typename _ForwardIterator, typename _Predicate>
+    inline _ForwardIterator
+    partition(_ForwardIterator __first, _ForwardIterator __last,
+	      _Predicate   __pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      return std::__partition(__first, __last, __pred,
+			      std::__iterator_category(__first));
+    }
+
+
+
+  /**
+   *  @brief Sort the smallest elements of a sequence.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  middle  Another iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Sorts the smallest @p (middle-first) elements in the range
+   *  @p [first,last) and moves them to the range @p [first,middle). The
+   *  order of the remaining elements in the range @p [middle,last) is
+   *  undefined.
+   *  After the sort if @p i and @j are iterators in the range
+   *  @p [first,middle) such that @i precedes @j and @k is an iterator in
+   *  the range @p [middle,last) then @p *j<*i and @p *k<*i are both false.
+  */
+  template<typename _RandomAccessIterator>
+    inline void
+    partial_sort(_RandomAccessIterator __first,
+		 _RandomAccessIterator __middle,
+		 _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+      __glibcxx_requires_valid_range(__first, __middle);
+      __glibcxx_requires_valid_range(__middle, __last);
+
+      std::__heap_select(__first, __middle, __last);
+      std::sort_heap(__first, __middle);
+    }
+
+  /**
+   *  @brief Sort the smallest elements of a sequence using a predicate
+   *         for comparison.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  middle  Another iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  Nothing.
+   *
+   *  Sorts the smallest @p (middle-first) elements in the range
+   *  @p [first,last) and moves them to the range @p [first,middle). The
+   *  order of the remaining elements in the range @p [middle,last) is
+   *  undefined.
+   *  After the sort if @p i and @j are iterators in the range
+   *  @p [first,middle) such that @i precedes @j and @k is an iterator in
+   *  the range @p [middle,last) then @p *comp(j,*i) and @p comp(*k,*i)
+   *  are both false.
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline void
+    partial_sort(_RandomAccessIterator __first,
+		 _RandomAccessIterator __middle,
+		 _RandomAccessIterator __last,
+		 _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType, _ValueType>)
+      __glibcxx_requires_valid_range(__first, __middle);
+      __glibcxx_requires_valid_range(__middle, __last);
+
+      std::__heap_select(__first, __middle, __last, __comp);
+      std::sort_heap(__first, __middle, __comp);
+    }
+
+  /**
+   *  @brief Sort a sequence just enough to find a particular position.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  nth     Another iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Rearranges the elements in the range @p [first,last) so that @p *nth
+   *  is the same element that would have been in that position had the
+   *  whole sequence been sorted.
+   *  whole sequence been sorted. The elements either side of @p *nth are
+   *  not completely sorted, but for any iterator @i in the range
+   *  @p [first,nth) and any iterator @j in the range @p [nth,last) it
+   *  holds that @p *j<*i is false.
+  */
+  template<typename _RandomAccessIterator>
+    inline void
+    nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+		_RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+				  _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+      __glibcxx_requires_valid_range(__first, __nth);
+      __glibcxx_requires_valid_range(__nth, __last);
+
+      if (__first == __last || __nth == __last)
+	return;
+
+      std::__introselect(__first, __nth, __last,
+			 std::__lg(__last - __first) * 2);
+    }
+
+  /**
+   *  @brief Sort a sequence just enough to find a particular position
+   *         using a predicate for comparison.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  nth     Another iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  Nothing.
+   *
+   *  Rearranges the elements in the range @p [first,last) so that @p *nth
+   *  is the same element that would have been in that position had the
+   *  whole sequence been sorted. The elements either side of @p *nth are
+   *  not completely sorted, but for any iterator @i in the range
+   *  @p [first,nth) and any iterator @j in the range @p [nth,last) it
+   *  holds that @p comp(*j,*i) is false.
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline void
+    nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+		_RandomAccessIterator __last, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+				  _RandomAccessIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType, _ValueType>)
+      __glibcxx_requires_valid_range(__first, __nth);
+      __glibcxx_requires_valid_range(__nth, __last);
+
+      if (__first == __last || __nth == __last)
+	return;
+
+      std::__introselect(__first, __nth, __last,
+			 std::__lg(__last - __first) * 2, __comp);
+    }
+
+
+  /**
+   *  @brief Sort the elements of a sequence.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Sorts the elements in the range @p [first,last) in ascending order,
+   *  such that @p *(i+1)<*i is false for each iterator @p i in the range
+   *  @p [first,last-1).
+   *
+   *  The relative ordering of equivalent elements is not preserved, use
+   *  @p stable_sort() if this is needed.
+  */
+  template<typename _RandomAccessIterator>
+    inline void
+    sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first != __last)
+	{
+	  std::__introsort_loop(__first, __last,
+				std::__lg(__last - __first) * 2);
+	  std::__final_insertion_sort(__first, __last);
+	}
+    }
+
+  /**
+   *  @brief Sort the elements of a sequence using a predicate for comparison.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  Nothing.
+   *
+   *  Sorts the elements in the range @p [first,last) in ascending order,
+   *  such that @p comp(*(i+1),*i) is false for every iterator @p i in the
+   *  range @p [first,last-1).
+   *
+   *  The relative ordering of equivalent elements is not preserved, use
+   *  @p stable_sort() if this is needed.
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline void
+    sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	 _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, _ValueType,
+				  _ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first != __last)
+	{
+	  std::__introsort_loop(__first, __last,
+				std::__lg(__last - __first) * 2, __comp);
+	  std::__final_insertion_sort(__first, __last, __comp);
+	}
+    }
+
+  /**
+   *  @brief Merges two sorted ranges.
+   *  @ingroup sorting_algorithms
+   *  @param  first1  An iterator.
+   *  @param  first2  Another iterator.
+   *  @param  last1   Another iterator.
+   *  @param  last2   Another iterator.
+   *  @param  result  An iterator pointing to the end of the merged range.
+   *  @return         An iterator pointing to the first element <em>not less
+   *                  than</em> @a val.
+   *
+   *  Merges the ranges [first1,last1) and [first2,last2) into the sorted range
+   *  [result, result + (last1-first1) + (last2-first2)).  Both input ranges
+   *  must be sorted, and the output range must not overlap with either of
+   *  the input ranges.  The sort is @e stable, that is, for equivalent
+   *  elements in the two ranges, elements from the first range will always
+   *  come before elements from the second.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator>
+    _OutputIterator
+    merge(_InputIterator1 __first1, _InputIterator1 __last1,
+	  _InputIterator2 __first2, _InputIterator2 __last2,
+	  _OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)	
+      __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+      __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	{
+	  if (*__first2 < *__first1)
+	    {
+	      *__result = *__first2;
+	      ++__first2;
+	    }
+	  else
+	    {
+	      *__result = *__first1;
+	      ++__first1;
+	    }
+	  ++__result;
+	}
+      return std::copy(__first2, __last2, std::copy(__first1, __last1,
+						    __result));
+    }
+
+  /**
+   *  @brief Merges two sorted ranges.
+   *  @ingroup sorting_algorithms
+   *  @param  first1  An iterator.
+   *  @param  first2  Another iterator.
+   *  @param  last1   Another iterator.
+   *  @param  last2   Another iterator.
+   *  @param  result  An iterator pointing to the end of the merged range.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return         An iterator pointing to the first element "not less
+   *                  than" @a val.
+   *
+   *  Merges the ranges [first1,last1) and [first2,last2) into the sorted range
+   *  [result, result + (last1-first1) + (last2-first2)).  Both input ranges
+   *  must be sorted, and the output range must not overlap with either of
+   *  the input ranges.  The sort is @e stable, that is, for equivalent
+   *  elements in the two ranges, elements from the first range will always
+   *  come before elements from the second.
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator, typename _Compare>
+    _OutputIterator
+    merge(_InputIterator1 __first1, _InputIterator1 __last1,
+	  _InputIterator2 __first2, _InputIterator2 __last2,
+	  _OutputIterator __result, _Compare __comp)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+      __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	{
+	  if (__comp(*__first2, *__first1))
+	    {
+	      *__result = *__first2;
+	      ++__first2;
+	    }
+	  else
+	    {
+	      *__result = *__first1;
+	      ++__first1;
+	    }
+	  ++__result;
+	}
+      return std::copy(__first2, __last2, std::copy(__first1, __last1,
+						    __result));
+    }
+
+
+  /**
+   *  @brief Sort the elements of a sequence, preserving the relative order
+   *         of equivalent elements.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Sorts the elements in the range @p [first,last) in ascending order,
+   *  such that @p *(i+1)<*i is false for each iterator @p i in the range
+   *  @p [first,last-1).
+   *
+   *  The relative ordering of equivalent elements is preserved, so any two
+   *  elements @p x and @p y in the range @p [first,last) such that
+   *  @p x<y is false and @p y<x is false will have the same relative
+   *  ordering after calling @p stable_sort().
+  */
+  template<typename _RandomAccessIterator>
+    inline void
+    stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
+								 __last);
+      if (__buf.begin() == 0)
+	std::__inplace_stable_sort(__first, __last);
+      else
+	std::__stable_sort_adaptive(__first, __last, __buf.begin(),
+				    _DistanceType(__buf.size()));
+    }
+
+  /**
+   *  @brief Sort the elements of a sequence using a predicate for comparison,
+   *         preserving the relative order of equivalent elements.
+   *  @ingroup sorting_algorithms
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  Nothing.
+   *
+   *  Sorts the elements in the range @p [first,last) in ascending order,
+   *  such that @p comp(*(i+1),*i) is false for each iterator @p i in the
+   *  range @p [first,last-1).
+   *
+   *  The relative ordering of equivalent elements is preserved, so any two
+   *  elements @p x and @p y in the range @p [first,last) such that
+   *  @p comp(x,y) is false and @p comp(y,x) is false will have the same
+   *  relative ordering after calling @p stable_sort().
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline void
+    stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
+		_Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType,
+				  _ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
+								 __last);
+      if (__buf.begin() == 0)
+	std::__inplace_stable_sort(__first, __last, __comp);
+      else
+	std::__stable_sort_adaptive(__first, __last, __buf.begin(),
+				    _DistanceType(__buf.size()), __comp);
+    }
+
+
+  /**
+   *  @brief Return the union of two sorted ranges.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of first range.
+   *  @param  last1   End of first range.
+   *  @param  first2  Start of second range.
+   *  @param  last2   End of second range.
+   *  @return  End of the output range.
+   *  @ingroup set_algorithms
+   *
+   *  This operation iterates over both ranges, copying elements present in
+   *  each range in order to the output range.  Iterators increment for each
+   *  range.  When the current element of one range is less than the other,
+   *  that element is copied and the iterator advanced.  If an element is
+   *  contained in both ranges, the element from the first range is copied and
+   *  both ranges advance.  The output range may not overlap either input
+   *  range.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator>
+    _OutputIterator
+    set_union(_InputIterator1 __first1, _InputIterator1 __last1,
+	      _InputIterator2 __first2, _InputIterator2 __last2,
+	      _OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+      __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	{
+	  if (*__first1 < *__first2)
+	    {
+	      *__result = *__first1;
+	      ++__first1;
+	    }
+	  else if (*__first2 < *__first1)
+	    {
+	      *__result = *__first2;
+	      ++__first2;
+	    }
+	  else
+	    {
+	      *__result = *__first1;
+	      ++__first1;
+	      ++__first2;
+	    }
+	  ++__result;
+	}
+      return std::copy(__first2, __last2, std::copy(__first1, __last1,
+						    __result));
+    }
+
+  /**
+   *  @brief Return the union of two sorted ranges using a comparison functor.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of first range.
+   *  @param  last1   End of first range.
+   *  @param  first2  Start of second range.
+   *  @param  last2   End of second range.
+   *  @param  comp    The comparison functor.
+   *  @return  End of the output range.
+   *  @ingroup set_algorithms
+   *
+   *  This operation iterates over both ranges, copying elements present in
+   *  each range in order to the output range.  Iterators increment for each
+   *  range.  When the current element of one range is less than the other
+   *  according to @a comp, that element is copied and the iterator advanced.
+   *  If an equivalent element according to @a comp is contained in both
+   *  ranges, the element from the first range is copied and both ranges
+   *  advance.  The output range may not overlap either input range.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator, typename _Compare>
+    _OutputIterator
+    set_union(_InputIterator1 __first1, _InputIterator1 __last1,
+	      _InputIterator2 __first2, _InputIterator2 __last2,
+	      _OutputIterator __result, _Compare __comp)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+      __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	{
+	  if (__comp(*__first1, *__first2))
+	    {
+	      *__result = *__first1;
+	      ++__first1;
+	    }
+	  else if (__comp(*__first2, *__first1))
+	    {
+	      *__result = *__first2;
+	      ++__first2;
+	    }
+	  else
+	    {
+	      *__result = *__first1;
+	      ++__first1;
+	      ++__first2;
+	    }
+	  ++__result;
+	}
+      return std::copy(__first2, __last2, std::copy(__first1, __last1,
+						    __result));
+    }
+
+  /**
+   *  @brief Return the intersection of two sorted ranges.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of first range.
+   *  @param  last1   End of first range.
+   *  @param  first2  Start of second range.
+   *  @param  last2   End of second range.
+   *  @return  End of the output range.
+   *  @ingroup set_algorithms
+   *
+   *  This operation iterates over both ranges, copying elements present in
+   *  both ranges in order to the output range.  Iterators increment for each
+   *  range.  When the current element of one range is less than the other,
+   *  that iterator advances.  If an element is contained in both ranges, the
+   *  element from the first range is copied and both ranges advance.  The
+   *  output range may not overlap either input range.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator>
+    _OutputIterator
+    set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
+		     _InputIterator2 __first2, _InputIterator2 __last2,
+		     _OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+      __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (*__first1 < *__first2)
+	  ++__first1;
+	else if (*__first2 < *__first1)
+	  ++__first2;
+	else
+	  {
+	    *__result = *__first1;
+	    ++__first1;
+	    ++__first2;
+	    ++__result;
+	  }
+      return __result;
+    }
+
+  /**
+   *  @brief Return the intersection of two sorted ranges using comparison
+   *  functor.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of first range.
+   *  @param  last1   End of first range.
+   *  @param  first2  Start of second range.
+   *  @param  last2   End of second range.
+   *  @param  comp    The comparison functor.
+   *  @return  End of the output range.
+   *  @ingroup set_algorithms
+   *
+   *  This operation iterates over both ranges, copying elements present in
+   *  both ranges in order to the output range.  Iterators increment for each
+   *  range.  When the current element of one range is less than the other
+   *  according to @a comp, that iterator advances.  If an element is
+   *  contained in both ranges according to @a comp, the element from the
+   *  first range is copied and both ranges advance.  The output range may not
+   *  overlap either input range.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator, typename _Compare>
+    _OutputIterator
+    set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
+		     _InputIterator2 __first2, _InputIterator2 __last2,
+		     _OutputIterator __result, _Compare __comp)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+      __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (__comp(*__first1, *__first2))
+	  ++__first1;
+	else if (__comp(*__first2, *__first1))
+	  ++__first2;
+	else
+	  {
+	    *__result = *__first1;
+	    ++__first1;
+	    ++__first2;
+	    ++__result;
+	  }
+      return __result;
+    }
+
+  /**
+   *  @brief Return the difference of two sorted ranges.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of first range.
+   *  @param  last1   End of first range.
+   *  @param  first2  Start of second range.
+   *  @param  last2   End of second range.
+   *  @return  End of the output range.
+   *  @ingroup set_algorithms
+   *
+   *  This operation iterates over both ranges, copying elements present in
+   *  the first range but not the second in order to the output range.
+   *  Iterators increment for each range.  When the current element of the
+   *  first range is less than the second, that element is copied and the
+   *  iterator advances.  If the current element of the second range is less,
+   *  the iterator advances, but no element is copied.  If an element is
+   *  contained in both ranges, no elements are copied and both ranges
+   *  advance.  The output range may not overlap either input range.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator>
+    _OutputIterator
+    set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+		   _InputIterator2 __first2, _InputIterator2 __last2,
+		   _OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)	
+      __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+      __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (*__first1 < *__first2)
+	  {
+	    *__result = *__first1;
+	    ++__first1;
+	    ++__result;
+	  }
+	else if (*__first2 < *__first1)
+	  ++__first2;
+	else
+	  {
+	    ++__first1;
+	    ++__first2;
+	  }
+      return std::copy(__first1, __last1, __result);
+    }
+
+  /**
+   *  @brief  Return the difference of two sorted ranges using comparison
+   *  functor.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of first range.
+   *  @param  last1   End of first range.
+   *  @param  first2  Start of second range.
+   *  @param  last2   End of second range.
+   *  @param  comp    The comparison functor.
+   *  @return  End of the output range.
+   *  @ingroup set_algorithms
+   *
+   *  This operation iterates over both ranges, copying elements present in
+   *  the first range but not the second in order to the output range.
+   *  Iterators increment for each range.  When the current element of the
+   *  first range is less than the second according to @a comp, that element
+   *  is copied and the iterator advances.  If the current element of the
+   *  second range is less, no element is copied and the iterator advances.
+   *  If an element is contained in both ranges according to @a comp, no
+   *  elements are copied and both ranges advance.  The output range may not
+   *  overlap either input range.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator, typename _Compare>
+    _OutputIterator
+    set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+		   _InputIterator2 __first2, _InputIterator2 __last2,
+		   _OutputIterator __result, _Compare __comp)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+      __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (__comp(*__first1, *__first2))
+	  {
+	    *__result = *__first1;
+	    ++__first1;
+	    ++__result;
+	  }
+	else if (__comp(*__first2, *__first1))
+	  ++__first2;
+	else
+	  {
+	    ++__first1;
+	    ++__first2;
+	  }
+      return std::copy(__first1, __last1, __result);
+    }
+
+  /**
+   *  @brief  Return the symmetric difference of two sorted ranges.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of first range.
+   *  @param  last1   End of first range.
+   *  @param  first2  Start of second range.
+   *  @param  last2   End of second range.
+   *  @return  End of the output range.
+   *  @ingroup set_algorithms
+   *
+   *  This operation iterates over both ranges, copying elements present in
+   *  one range but not the other in order to the output range.  Iterators
+   *  increment for each range.  When the current element of one range is less
+   *  than the other, that element is copied and the iterator advances.  If an
+   *  element is contained in both ranges, no elements are copied and both
+   *  ranges advance.  The output range may not overlap either input range.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator>
+    _OutputIterator
+    set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+			     _InputIterator2 __first2, _InputIterator2 __last2,
+			     _OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)	
+      __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+      __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (*__first1 < *__first2)
+	  {
+	    *__result = *__first1;
+	    ++__first1;
+	    ++__result;
+	  }
+	else if (*__first2 < *__first1)
+	  {
+	    *__result = *__first2;
+	    ++__first2;
+	    ++__result;
+	  }
+	else
+	  {
+	    ++__first1;
+	    ++__first2;
+	  }
+      return std::copy(__first2, __last2, std::copy(__first1,
+						    __last1, __result));
+    }
+
+  /**
+   *  @brief  Return the symmetric difference of two sorted ranges using
+   *  comparison functor.
+   *  @ingroup set_algorithms
+   *  @param  first1  Start of first range.
+   *  @param  last1   End of first range.
+   *  @param  first2  Start of second range.
+   *  @param  last2   End of second range.
+   *  @param  comp    The comparison functor.
+   *  @return  End of the output range.
+   *  @ingroup set_algorithms
+   *
+   *  This operation iterates over both ranges, copying elements present in
+   *  one range but not the other in order to the output range.  Iterators
+   *  increment for each range.  When the current element of one range is less
+   *  than the other according to @a comp, that element is copied and the
+   *  iterator advances.  If an element is contained in both ranges according
+   *  to @a comp, no elements are copied and both ranges advance.  The output
+   *  range may not overlap either input range.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _OutputIterator, typename _Compare>
+    _OutputIterator
+    set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+			     _InputIterator2 __first2, _InputIterator2 __last2,
+			     _OutputIterator __result,
+			     _Compare __comp)
+    {
+      typedef typename iterator_traits<_InputIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_InputIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType1>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				  _ValueType2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType2, _ValueType1>)
+      __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+      __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (__comp(*__first1, *__first2))
+	  {
+	    *__result = *__first1;
+	    ++__first1;
+	    ++__result;
+	  }
+	else if (__comp(*__first2, *__first1))
+	  {
+	    *__result = *__first2;
+	    ++__first2;
+	    ++__result;
+	  }
+	else
+	  {
+	    ++__first1;
+	    ++__first2;
+	  }
+      return std::copy(__first2, __last2, 
+		       std::copy(__first1, __last1, __result));
+    }
+
+
+  /**
+   *  @brief  Return the minimum element in a range.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @return  Iterator referencing the first instance of the smallest value.
+  */
+  template<typename _ForwardIterator>
+    _ForwardIterator
+    min_element(_ForwardIterator __first, _ForwardIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __first;
+      _ForwardIterator __result = __first;
+      while (++__first != __last)
+	if (*__first < *__result)
+	  __result = __first;
+      return __result;
+    }
+
+  /**
+   *  @brief  Return the minimum element in a range using comparison functor.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @param  comp   Comparison functor.
+   *  @return  Iterator referencing the first instance of the smallest value
+   *  according to comp.
+  */
+  template<typename _ForwardIterator, typename _Compare>
+    _ForwardIterator
+    min_element(_ForwardIterator __first, _ForwardIterator __last,
+		_Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_ForwardIterator>::value_type,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __first;
+      _ForwardIterator __result = __first;
+      while (++__first != __last)
+	if (__comp(*__first, *__result))
+	  __result = __first;
+      return __result;
+    }
+
+  /**
+   *  @brief  Return the maximum element in a range.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @return  Iterator referencing the first instance of the largest value.
+  */
+  template<typename _ForwardIterator>
+    _ForwardIterator
+    max_element(_ForwardIterator __first, _ForwardIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __first;
+      _ForwardIterator __result = __first;
+      while (++__first != __last)
+	if (*__result < *__first)
+	  __result = __first;
+      return __result;
+    }
+
+  /**
+   *  @brief  Return the maximum element in a range using comparison functor.
+   *  @ingroup sorting_algorithms
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @param  comp   Comparison functor.
+   *  @return  Iterator referencing the first instance of the largest value
+   *  according to comp.
+  */
+  template<typename _ForwardIterator, typename _Compare>
+    _ForwardIterator
+    max_element(_ForwardIterator __first, _ForwardIterator __last,
+		_Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_ForwardIterator>::value_type,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last) return __first;
+      _ForwardIterator __result = __first;
+      while (++__first != __last)
+	if (__comp(*__result, *__first))
+	  __result = __first;
+      return __result;
+    }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_ALGO_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_algobase.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_algobase.h
new file mode 100644
index 0000000..e925404
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_algobase.h
@@ -0,0 +1,1230 @@
+// Core algorithmic facilities -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_algobase.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_ALGOBASE_H
+#define _STL_ALGOBASE_H 1
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/functexcept.h>
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include <ext/numeric_traits.h>
+#include <bits/stl_pair.h>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <bits/stl_iterator.h>
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+#include <bits/move.h> // For std::swap and _GLIBCXX_MOVE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a
+  // nutshell, we are partially implementing the resolution of DR 187,
+  // when it's safe, i.e., the value_types are equal.
+  template<bool _BoolType>
+    struct __iter_swap
+    {
+      template<typename _ForwardIterator1, typename _ForwardIterator2>
+        static void
+        iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+        {
+          typedef typename iterator_traits<_ForwardIterator1>::value_type
+            _ValueType1;
+          _ValueType1 __tmp = _GLIBCXX_MOVE(*__a);
+          *__a = _GLIBCXX_MOVE(*__b);
+          *__b = _GLIBCXX_MOVE(__tmp);
+	}
+    };
+
+  template<>
+    struct __iter_swap<true>
+    {
+      template<typename _ForwardIterator1, typename _ForwardIterator2>
+        static void 
+        iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+        {
+          swap(*__a, *__b);
+        }
+    };
+
+  /**
+   *  @brief Swaps the contents of two iterators.
+   *  @ingroup mutating_algorithms
+   *  @param  a  An iterator.
+   *  @param  b  Another iterator.
+   *  @return   Nothing.
+   *
+   *  This function swaps the values pointed to by two iterators, not the
+   *  iterators themselves.
+  */
+  template<typename _ForwardIterator1, typename _ForwardIterator2>
+    inline void
+    iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+    {
+      typedef typename iterator_traits<_ForwardIterator1>::value_type
+	_ValueType1;
+      typedef typename iterator_traits<_ForwardIterator2>::value_type
+	_ValueType2;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator1>)
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator2>)
+      __glibcxx_function_requires(_ConvertibleConcept<_ValueType1,
+				  _ValueType2>)
+      __glibcxx_function_requires(_ConvertibleConcept<_ValueType2,
+				  _ValueType1>)
+
+      typedef typename iterator_traits<_ForwardIterator1>::reference
+	_ReferenceType1;
+      typedef typename iterator_traits<_ForwardIterator2>::reference
+	_ReferenceType2;
+      std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value
+	&& __are_same<_ValueType1&, _ReferenceType1>::__value
+	&& __are_same<_ValueType2&, _ReferenceType2>::__value>::
+	iter_swap(__a, __b);
+    }
+
+  /**
+   *  @brief Swap the elements of two sequences.
+   *  @ingroup mutating_algorithms
+   *  @param  first1  A forward iterator.
+   *  @param  last1   A forward iterator.
+   *  @param  first2  A forward iterator.
+   *  @return   An iterator equal to @p first2+(last1-first1).
+   *
+   *  Swaps each element in the range @p [first1,last1) with the
+   *  corresponding element in the range @p [first2,(last1-first1)).
+   *  The ranges must not overlap.
+  */
+  template<typename _ForwardIterator1, typename _ForwardIterator2>
+    _ForwardIterator2
+    swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+		_ForwardIterator2 __first2)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator1>)
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator2>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      for (; __first1 != __last1; ++__first1, ++__first2)
+	std::iter_swap(__first1, __first2);
+      return __first2;
+    }
+
+  /**
+   *  @brief This does what you think it does.
+   *  @ingroup sorting_algorithms
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @return   The lesser of the parameters.
+   *
+   *  This is the simple classic generic implementation.  It will work on
+   *  temporary expressions, since they are only evaluated once, unlike a
+   *  preprocessor macro.
+  */
+  template<typename _Tp>
+    inline const _Tp&
+    min(const _Tp& __a, const _Tp& __b)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+      //return __b < __a ? __b : __a;
+      if (__b < __a)
+	return __b;
+      return __a;
+    }
+
+  /**
+   *  @brief This does what you think it does.
+   *  @ingroup sorting_algorithms
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @return   The greater of the parameters.
+   *
+   *  This is the simple classic generic implementation.  It will work on
+   *  temporary expressions, since they are only evaluated once, unlike a
+   *  preprocessor macro.
+  */
+  template<typename _Tp>
+    inline const _Tp&
+    max(const _Tp& __a, const _Tp& __b)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+      //return  __a < __b ? __b : __a;
+      if (__a < __b)
+	return __b;
+      return __a;
+    }
+
+  /**
+   *  @brief This does what you think it does.
+   *  @ingroup sorting_algorithms
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @param  comp  A @link comparison_functors comparison functor@endlink.
+   *  @return   The lesser of the parameters.
+   *
+   *  This will work on temporary expressions, since they are only evaluated
+   *  once, unlike a preprocessor macro.
+  */
+  template<typename _Tp, typename _Compare>
+    inline const _Tp&
+    min(const _Tp& __a, const _Tp& __b, _Compare __comp)
+    {
+      //return __comp(__b, __a) ? __b : __a;
+      if (__comp(__b, __a))
+	return __b;
+      return __a;
+    }
+
+  /**
+   *  @brief This does what you think it does.
+   *  @ingroup sorting_algorithms
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @param  comp  A @link comparison_functors comparison functor@endlink.
+   *  @return   The greater of the parameters.
+   *
+   *  This will work on temporary expressions, since they are only evaluated
+   *  once, unlike a preprocessor macro.
+  */
+  template<typename _Tp, typename _Compare>
+    inline const _Tp&
+    max(const _Tp& __a, const _Tp& __b, _Compare __comp)
+    {
+      //return __comp(__a, __b) ? __b : __a;
+      if (__comp(__a, __b))
+	return __b;
+      return __a;
+    }
+
+
+  // If _Iterator has a base returns it otherwise _Iterator is returned
+  // untouched
+  template<typename _Iterator, bool _HasBase>
+    struct _Iter_base
+    {
+      typedef _Iterator iterator_type;
+      static iterator_type
+      _S_base(_Iterator __it)
+      { return __it; }
+    };
+
+  template<typename _Iterator>
+    struct _Iter_base<_Iterator, true>
+    {
+      typedef typename _Iterator::iterator_type iterator_type;
+      static iterator_type
+      _S_base(_Iterator __it)
+      { return __it.base(); }
+    };
+
+  // If _Iterator is a __normal_iterator return its base (a plain pointer,
+  // normally) otherwise return it untouched.  See copy, fill, ... 
+  template<typename _Iterator>
+    struct _Niter_base
+    : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value>
+    { };
+
+  template<typename _Iterator>
+    inline typename _Niter_base<_Iterator>::iterator_type
+    __niter_base(_Iterator __it)
+    { return std::_Niter_base<_Iterator>::_S_base(__it); }
+
+  // Likewise, for move_iterator.
+  template<typename _Iterator>
+    struct _Miter_base
+    : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value>
+    { };
+
+  template<typename _Iterator>
+    inline typename _Miter_base<_Iterator>::iterator_type
+    __miter_base(_Iterator __it)
+    { return std::_Miter_base<_Iterator>::_S_base(__it); }
+
+  // All of these auxiliary structs serve two purposes.  (1) Replace
+  // calls to copy with memmove whenever possible.  (Memmove, not memcpy,
+  // because the input and output ranges are permitted to overlap.)
+  // (2) If we're using random access iterators, then write the loop as
+  // a for loop with an explicit count.
+
+  template<bool, bool, typename>
+    struct __copy_move
+    {
+      template<typename _II, typename _OI>
+        static _OI
+        __copy_m(_II __first, _II __last, _OI __result)
+        {
+	  for (; __first != __last; ++__result, ++__first)
+	    *__result = *__first;
+	  return __result;
+	}
+    };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Category>
+    struct __copy_move<true, false, _Category>
+    {
+      template<typename _II, typename _OI>
+        static _OI
+        __copy_m(_II __first, _II __last, _OI __result)
+        {
+	  for (; __first != __last; ++__result, ++__first)
+	    *__result = std::move(*__first);
+	  return __result;
+	}
+    };
+#endif
+
+  template<>
+    struct __copy_move<false, false, random_access_iterator_tag>
+    {
+      template<typename _II, typename _OI>
+        static _OI
+        __copy_m(_II __first, _II __last, _OI __result)
+        { 
+	  typedef typename iterator_traits<_II>::difference_type _Distance;
+	  for(_Distance __n = __last - __first; __n > 0; --__n)
+	    {
+	      *__result = *__first;
+	      ++__first;
+	      ++__result;
+	    }
+	  return __result;
+	}
+    };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<>
+    struct __copy_move<true, false, random_access_iterator_tag>
+    {
+      template<typename _II, typename _OI>
+        static _OI
+        __copy_m(_II __first, _II __last, _OI __result)
+        { 
+	  typedef typename iterator_traits<_II>::difference_type _Distance;
+	  for(_Distance __n = __last - __first; __n > 0; --__n)
+	    {
+	      *__result = std::move(*__first);
+	      ++__first;
+	      ++__result;
+	    }
+	  return __result;
+	}
+    };
+#endif
+
+  template<bool _IsMove>
+    struct __copy_move<_IsMove, true, random_access_iterator_tag>
+    {
+      template<typename _Tp>
+        static _Tp*
+        __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
+        {
+	  const ptrdiff_t _Num = __last - __first;
+	  if (_Num)
+	    __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
+	  return __result + _Num;
+	}
+    };
+
+  template<bool _IsMove, typename _II, typename _OI>
+    inline _OI
+    __copy_move_a(_II __first, _II __last, _OI __result)
+    {
+      typedef typename iterator_traits<_II>::value_type _ValueTypeI;
+      typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
+      typedef typename iterator_traits<_II>::iterator_category _Category;
+      const bool __simple = (__is_pod(_ValueTypeI)
+	                     && __is_pointer<_II>::__value
+	                     && __is_pointer<_OI>::__value
+			     && __are_same<_ValueTypeI, _ValueTypeO>::__value);
+
+      return std::__copy_move<_IsMove, __simple,
+	                      _Category>::__copy_m(__first, __last, __result);
+    }
+
+  // Helpers for streambuf iterators (either istream or ostream).
+  // NB: avoid including <iosfwd>, relatively large.
+  template<typename _CharT>
+    struct char_traits;
+
+  template<typename _CharT, typename _Traits>
+    class istreambuf_iterator;
+
+  template<typename _CharT, typename _Traits>
+    class ostreambuf_iterator;
+
+  template<bool _IsMove, typename _CharT>
+    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 
+	     ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
+    __copy_move_a2(_CharT*, _CharT*,
+		   ostreambuf_iterator<_CharT, char_traits<_CharT> >);
+
+  template<bool _IsMove, typename _CharT>
+    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 
+	     ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
+    __copy_move_a2(const _CharT*, const _CharT*,
+		   ostreambuf_iterator<_CharT, char_traits<_CharT> >);
+
+  template<bool _IsMove, typename _CharT>
+    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+				    _CharT*>::__type
+    __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
+		   istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
+
+  template<bool _IsMove, typename _II, typename _OI>
+    inline _OI
+    __copy_move_a2(_II __first, _II __last, _OI __result)
+    {
+      return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first),
+					     std::__niter_base(__last),
+					     std::__niter_base(__result)));
+    }
+
+  /**
+   *  @brief Copies the range [first,last) into result.
+   *  @ingroup mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  result An output iterator.
+   *  @return   result + (first - last)
+   *
+   *  This inline function will boil down to a call to @c memmove whenever
+   *  possible.  Failing that, if random access iterators are passed, then the
+   *  loop count will be known (and therefore a candidate for compiler
+   *  optimizations such as unrolling).  Result may not be contained within
+   *  [first,last); the copy_backward function should be used instead.
+   *
+   *  Note that the end of the output range is permitted to be contained
+   *  within [first,last).
+  */
+  template<typename _II, typename _OI>
+    inline _OI
+    copy(_II __first, _II __last, _OI __result)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_II>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OI,
+	    typename iterator_traits<_II>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
+	      (std::__miter_base(__first), std::__miter_base(__last),
+	       __result));
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /**
+   *  @brief Moves the range [first,last) into result.
+   *  @ingroup mutating_algorithms
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  result An output iterator.
+   *  @return   result + (first - last)
+   *
+   *  This inline function will boil down to a call to @c memmove whenever
+   *  possible.  Failing that, if random access iterators are passed, then the
+   *  loop count will be known (and therefore a candidate for compiler
+   *  optimizations such as unrolling).  Result may not be contained within
+   *  [first,last); the move_backward function should be used instead.
+   *
+   *  Note that the end of the output range is permitted to be contained
+   *  within [first,last).
+  */
+  template<typename _II, typename _OI>
+    inline _OI
+    move(_II __first, _II __last, _OI __result)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_II>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OI,
+	    typename iterator_traits<_II>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      return std::__copy_move_a2<true>(std::__miter_base(__first),
+				       std::__miter_base(__last), __result);
+    }
+
+#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::move(_Tp, _Up, _Vp)
+#else
+#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::copy(_Tp, _Up, _Vp)
+#endif
+
+  template<bool, bool, typename>
+    struct __copy_move_backward
+    {
+      template<typename _BI1, typename _BI2>
+        static _BI2
+        __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+        {
+	  while (__first != __last)
+	    *--__result = *--__last;
+	  return __result;
+	}
+    };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Category>
+    struct __copy_move_backward<true, false, _Category>
+    {
+      template<typename _BI1, typename _BI2>
+        static _BI2
+        __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+        {
+	  while (__first != __last)
+	    *--__result = std::move(*--__last);
+	  return __result;
+	}
+    };
+#endif
+
+  template<>
+    struct __copy_move_backward<false, false, random_access_iterator_tag>
+    {
+      template<typename _BI1, typename _BI2>
+        static _BI2
+        __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+        {
+	  typename iterator_traits<_BI1>::difference_type __n;
+	  for (__n = __last - __first; __n > 0; --__n)
+	    *--__result = *--__last;
+	  return __result;
+	}
+    };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<>
+    struct __copy_move_backward<true, false, random_access_iterator_tag>
+    {
+      template<typename _BI1, typename _BI2>
+        static _BI2
+        __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+        {
+	  typename iterator_traits<_BI1>::difference_type __n;
+	  for (__n = __last - __first; __n > 0; --__n)
+	    *--__result = std::move(*--__last);
+	  return __result;
+	}
+    };
+#endif
+
+  template<bool _IsMove>
+    struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
+    {
+      template<typename _Tp>
+        static _Tp*
+        __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
+        {
+	  const ptrdiff_t _Num = __last - __first;
+	  if (_Num)
+	    __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
+	  return __result - _Num;
+	}
+    };
+
+  template<bool _IsMove, typename _BI1, typename _BI2>
+    inline _BI2
+    __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
+    {
+      typedef typename iterator_traits<_BI1>::value_type _ValueType1;
+      typedef typename iterator_traits<_BI2>::value_type _ValueType2;
+      typedef typename iterator_traits<_BI1>::iterator_category _Category;
+      const bool __simple = (__is_pod(_ValueType1)
+	                     && __is_pointer<_BI1>::__value
+	                     && __is_pointer<_BI2>::__value
+			     && __are_same<_ValueType1, _ValueType2>::__value);
+
+      return std::__copy_move_backward<_IsMove, __simple,
+	                               _Category>::__copy_move_b(__first,
+								 __last,
+								 __result);
+    }
+
+  template<bool _IsMove, typename _BI1, typename _BI2>
+    inline _BI2
+    __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
+    {
+      return _BI2(std::__copy_move_backward_a<_IsMove>
+		  (std::__niter_base(__first), std::__niter_base(__last),
+		   std::__niter_base(__result)));
+    }
+
+  /**
+   *  @brief Copies the range [first,last) into result.
+   *  @ingroup mutating_algorithms
+   *  @param  first  A bidirectional iterator.
+   *  @param  last   A bidirectional iterator.
+   *  @param  result A bidirectional iterator.
+   *  @return   result - (first - last)
+   *
+   *  The function has the same effect as copy, but starts at the end of the
+   *  range and works its way to the start, returning the start of the result.
+   *  This inline function will boil down to a call to @c memmove whenever
+   *  possible.  Failing that, if random access iterators are passed, then the
+   *  loop count will be known (and therefore a candidate for compiler
+   *  optimizations such as unrolling).
+   *
+   *  Result may not be in the range [first,last).  Use copy instead.  Note
+   *  that the start of the output range may overlap [first,last).
+  */
+  template<typename _BI1, typename _BI2>
+    inline _BI2
+    copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
+      __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
+      __glibcxx_function_requires(_ConvertibleConcept<
+	    typename iterator_traits<_BI1>::value_type,
+	    typename iterator_traits<_BI2>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
+	      (std::__miter_base(__first), std::__miter_base(__last),
+	       __result));
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /**
+   *  @brief Moves the range [first,last) into result.
+   *  @ingroup mutating_algorithms
+   *  @param  first  A bidirectional iterator.
+   *  @param  last   A bidirectional iterator.
+   *  @param  result A bidirectional iterator.
+   *  @return   result - (first - last)
+   *
+   *  The function has the same effect as move, but starts at the end of the
+   *  range and works its way to the start, returning the start of the result.
+   *  This inline function will boil down to a call to @c memmove whenever
+   *  possible.  Failing that, if random access iterators are passed, then the
+   *  loop count will be known (and therefore a candidate for compiler
+   *  optimizations such as unrolling).
+   *
+   *  Result may not be in the range [first,last).  Use move instead.  Note
+   *  that the start of the output range may overlap [first,last).
+  */
+  template<typename _BI1, typename _BI2>
+    inline _BI2
+    move_backward(_BI1 __first, _BI1 __last, _BI2 __result)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
+      __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
+      __glibcxx_function_requires(_ConvertibleConcept<
+	    typename iterator_traits<_BI1>::value_type,
+	    typename iterator_traits<_BI2>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      return std::__copy_move_backward_a2<true>(std::__miter_base(__first),
+						std::__miter_base(__last),
+						__result);
+    }
+
+#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::move_backward(_Tp, _Up, _Vp)
+#else
+#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::copy_backward(_Tp, _Up, _Vp)
+#endif
+
+  template<typename _ForwardIterator, typename _Tp>
+    inline typename
+    __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type
+    __fill_a(_ForwardIterator __first, _ForwardIterator __last,
+ 	     const _Tp& __value)
+    {
+      for (; __first != __last; ++__first)
+	*__first = __value;
+    }
+    
+  template<typename _ForwardIterator, typename _Tp>
+    inline typename
+    __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
+    __fill_a(_ForwardIterator __first, _ForwardIterator __last,
+	     const _Tp& __value)
+    {
+      const _Tp __tmp = __value;
+      for (; __first != __last; ++__first)
+	*__first = __tmp;
+    }
+
+  // Specialization: for char types we can use memset.
+  template<typename _Tp>
+    inline typename
+    __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type
+    __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c)
+    {
+      const _Tp __tmp = __c;
+      __builtin_memset(__first, static_cast<unsigned char>(__tmp),
+		       __last - __first);
+    }
+
+  /**
+   *  @brief Fills the range [first,last) with copies of value.
+   *  @ingroup mutating_algorithms
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @param  value  A reference-to-const of arbitrary type.
+   *  @return   Nothing.
+   *
+   *  This function fills a range with copies of the same value.  For char
+   *  types filling contiguous areas of memory, this becomes an inline call
+   *  to @c memset or @c wmemset.
+  */
+  template<typename _ForwardIterator, typename _Tp>
+    inline void
+    fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      std::__fill_a(std::__niter_base(__first), std::__niter_base(__last),
+		    __value);
+    }
+
+  template<typename _OutputIterator, typename _Size, typename _Tp>
+    inline typename
+    __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
+    __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
+    {
+      for (; __n > 0; --__n, ++__first)
+	*__first = __value;
+      return __first;
+    }
+
+  template<typename _OutputIterator, typename _Size, typename _Tp>
+    inline typename
+    __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
+    __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
+    {
+      const _Tp __tmp = __value;
+      for (; __n > 0; --__n, ++__first)
+	*__first = __tmp;
+      return __first;
+    }
+
+  template<typename _Size, typename _Tp>
+    inline typename
+    __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
+    __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c)
+    {
+      std::__fill_a(__first, __first + __n, __c);
+      return __first + __n;
+    }
+
+  /**
+   *  @brief Fills the range [first,first+n) with copies of value.
+   *  @ingroup mutating_algorithms
+   *  @param  first  An output iterator.
+   *  @param  n      The count of copies to perform.
+   *  @param  value  A reference-to-const of arbitrary type.
+   *  @return   The iterator at first+n.
+   *
+   *  This function fills a range with copies of the same value.  For char
+   *  types filling contiguous areas of memory, this becomes an inline call
+   *  to @c memset or @ wmemset.
+   *
+   *  _GLIBCXX_RESOLVE_LIB_DEFECTS
+   *  DR 865. More algorithms that throw away information
+  */
+  template<typename _OI, typename _Size, typename _Tp>
+    inline _OI
+    fill_n(_OI __first, _Size __n, const _Tp& __value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_OutputIteratorConcept<_OI, _Tp>)
+
+      return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value));
+    }
+
+  template<bool _BoolType>
+    struct __equal
+    {
+      template<typename _II1, typename _II2>
+        static bool
+        equal(_II1 __first1, _II1 __last1, _II2 __first2)
+        {
+	  for (; __first1 != __last1; ++__first1, ++__first2)
+	    if (!(*__first1 == *__first2))
+	      return false;
+	  return true;
+	}
+    };
+
+  template<>
+    struct __equal<true>
+    {
+      template<typename _Tp>
+        static bool
+        equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2)
+        {
+	  return !__builtin_memcmp(__first1, __first2, sizeof(_Tp)
+				   * (__last1 - __first1));
+	}
+    };
+
+  template<typename _II1, typename _II2>
+    inline bool
+    __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)
+    {
+      typedef typename iterator_traits<_II1>::value_type _ValueType1;
+      typedef typename iterator_traits<_II2>::value_type _ValueType2;
+      const bool __simple = (__is_integer<_ValueType1>::__value
+	                     && __is_pointer<_II1>::__value
+	                     && __is_pointer<_II2>::__value
+			     && __are_same<_ValueType1, _ValueType2>::__value);
+
+      return std::__equal<__simple>::equal(__first1, __last1, __first2);
+    }
+
+
+  template<typename, typename>
+    struct __lc_rai
+    {
+      template<typename _II1, typename _II2>
+        static _II1
+        __newlast1(_II1, _II1 __last1, _II2, _II2)
+        { return __last1; }
+
+      template<typename _II>
+        static bool
+        __cnd2(_II __first, _II __last)
+        { return __first != __last; }
+    };
+
+  template<>
+    struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
+    {
+      template<typename _RAI1, typename _RAI2>
+        static _RAI1
+        __newlast1(_RAI1 __first1, _RAI1 __last1,
+		   _RAI2 __first2, _RAI2 __last2)
+        {
+	  const typename iterator_traits<_RAI1>::difference_type
+	    __diff1 = __last1 - __first1;
+	  const typename iterator_traits<_RAI2>::difference_type
+	    __diff2 = __last2 - __first2;
+	  return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
+	}
+
+      template<typename _RAI>
+        static bool
+        __cnd2(_RAI, _RAI)
+        { return true; }
+    };
+
+  template<bool _BoolType>
+    struct __lexicographical_compare
+    {
+      template<typename _II1, typename _II2>
+        static bool __lc(_II1, _II1, _II2, _II2);
+    };
+
+  template<bool _BoolType>
+    template<typename _II1, typename _II2>
+      bool
+      __lexicographical_compare<_BoolType>::
+      __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
+      {
+	typedef typename iterator_traits<_II1>::iterator_category _Category1;
+	typedef typename iterator_traits<_II2>::iterator_category _Category2;
+	typedef std::__lc_rai<_Category1, _Category2> 	__rai_type;
+	
+	__last1 = __rai_type::__newlast1(__first1, __last1,
+					 __first2, __last2);
+	for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
+	     ++__first1, ++__first2)
+	  {
+	    if (*__first1 < *__first2)
+	      return true;
+	    if (*__first2 < *__first1)
+	      return false;
+	  }
+	return __first1 == __last1 && __first2 != __last2;
+      }
+
+  template<>
+    struct __lexicographical_compare<true>
+    {
+      template<typename _Tp, typename _Up>
+        static bool
+        __lc(const _Tp* __first1, const _Tp* __last1,
+	     const _Up* __first2, const _Up* __last2)
+	{
+	  const size_t __len1 = __last1 - __first1;
+	  const size_t __len2 = __last2 - __first2;
+	  const int __result = __builtin_memcmp(__first1, __first2,
+						std::min(__len1, __len2));
+	  return __result != 0 ? __result < 0 : __len1 < __len2;
+	}
+    };
+
+  template<typename _II1, typename _II2>
+    inline bool
+    __lexicographical_compare_aux(_II1 __first1, _II1 __last1,
+				  _II2 __first2, _II2 __last2)
+    {
+      typedef typename iterator_traits<_II1>::value_type _ValueType1;
+      typedef typename iterator_traits<_II2>::value_type _ValueType2;
+      const bool __simple =
+	(__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
+	 && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
+	 && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
+	 && __is_pointer<_II1>::__value
+	 && __is_pointer<_II2>::__value);
+
+      return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
+							    __first2, __last2);
+    }
+
+  /**
+   *  @brief Finds the first position in which @a val could be inserted
+   *         without changing the ordering.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @return         An iterator pointing to the first element <em>not less
+   *                  than</em> @a val, or end() if every element is less than 
+   *                  @a val.
+   *  @ingroup binary_search_algorithms
+  */
+  template<typename _ForwardIterator, typename _Tp>
+    _ForwardIterator
+    lower_bound(_ForwardIterator __first, _ForwardIterator __last,
+		const _Tp& __val)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_ForwardIterator>::difference_type
+	_DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>)
+      __glibcxx_requires_partitioned_lower(__first, __last, __val);
+
+      _DistanceType __len = std::distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIterator __middle;
+
+      while (__len > 0)
+	{
+	  __half = __len >> 1;
+	  __middle = __first;
+	  std::advance(__middle, __half);
+	  if (*__middle < __val)
+	    {
+	      __first = __middle;
+	      ++__first;
+	      __len = __len - __half - 1;
+	    }
+	  else
+	    __len = __half;
+	}
+      return __first;
+    }
+
+  /// This is a helper function for the sort routines and for random.tcc.
+  //  Precondition: __n > 0.
+  template<typename _Size>
+    inline _Size
+    __lg(_Size __n)
+    {
+      _Size __k;
+      for (__k = 0; __n != 0; __n >>= 1)
+	++__k;
+      return __k - 1;
+    }
+
+  inline int
+  __lg(int __n)
+  { return sizeof(int) * __CHAR_BIT__  - 1 - __builtin_clz(__n); }
+
+  inline long
+  __lg(long __n)
+  { return sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); }
+
+  inline long long
+  __lg(long long __n)
+  { return sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+  /**
+   *  @brief Tests a range for element-wise equality.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @return   A boolean true or false.
+   *
+   *  This compares the elements of two ranges using @c == and returns true or
+   *  false depending on whether all of the corresponding elements of the
+   *  ranges are equal.
+  */
+  template<typename _II1, typename _II2>
+    inline bool
+    equal(_II1 __first1, _II1 __last1, _II2 __first2)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_II1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_II2>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_II1>::value_type,
+	    typename iterator_traits<_II2>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      return std::__equal_aux(std::__niter_base(__first1),
+			      std::__niter_base(__last1),
+			      std::__niter_base(__first2));
+    }
+
+  /**
+   *  @brief Tests a range for element-wise equality.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param binary_pred A binary predicate @link functors
+   *                  functor@endlink.
+   *  @return         A boolean true or false.
+   *
+   *  This compares the elements of two ranges using the binary_pred
+   *  parameter, and returns true or
+   *  false depending on whether all of the corresponding elements of the
+   *  ranges are equal.
+  */
+  template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+    inline bool
+    equal(_IIter1 __first1, _IIter1 __last1,
+	  _IIter2 __first2, _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_IIter1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_IIter2>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      for (; __first1 != __last1; ++__first1, ++__first2)
+	if (!bool(__binary_pred(*__first1, *__first2)))
+	  return false;
+      return true;
+    }
+
+  /**
+   *  @brief Performs @b dictionary comparison on ranges.
+   *  @ingroup sorting_algorithms
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param  last2   An input iterator.
+   *  @return   A boolean true or false.
+   *
+   *  <em>Returns true if the sequence of elements defined by the range
+   *  [first1,last1) is lexicographically less than the sequence of elements
+   *  defined by the range [first2,last2).  Returns false otherwise.</em>
+   *  (Quoted from [25.3.8]/1.)  If the iterators are all character pointers,
+   *  then this is an inline call to @c memcmp.
+  */
+  template<typename _II1, typename _II2>
+    inline bool
+    lexicographical_compare(_II1 __first1, _II1 __last1,
+			    _II2 __first2, _II2 __last2)
+    {
+      // concept requirements
+      typedef typename iterator_traits<_II1>::value_type _ValueType1;
+      typedef typename iterator_traits<_II2>::value_type _ValueType2;
+      __glibcxx_function_requires(_InputIteratorConcept<_II1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_II2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+      __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+      __glibcxx_requires_valid_range(__first2, __last2);
+
+      return std::__lexicographical_compare_aux(std::__niter_base(__first1),
+						std::__niter_base(__last1),
+						std::__niter_base(__first2),
+						std::__niter_base(__last2));
+    }
+
+  /**
+   *  @brief Performs @b dictionary comparison on ranges.
+   *  @ingroup sorting_algorithms
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param  last2   An input iterator.
+   *  @param  comp  A @link comparison_functors comparison functor@endlink.
+   *  @return   A boolean true or false.
+   *
+   *  The same as the four-parameter @c lexicographical_compare, but uses the
+   *  comp parameter instead of @c <.
+  */
+  template<typename _II1, typename _II2, typename _Compare>
+    bool
+    lexicographical_compare(_II1 __first1, _II1 __last1,
+			    _II2 __first2, _II2 __last2, _Compare __comp)
+    {
+      typedef typename iterator_traits<_II1>::iterator_category _Category1;
+      typedef typename iterator_traits<_II2>::iterator_category _Category2;
+      typedef std::__lc_rai<_Category1, _Category2> 	__rai_type;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_II1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_II2>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+      __glibcxx_requires_valid_range(__first2, __last2);
+
+      __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
+      for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
+	   ++__first1, ++__first2)
+	{
+	  if (__comp(*__first1, *__first2))
+	    return true;
+	  if (__comp(*__first2, *__first1))
+	    return false;
+	}
+      return __first1 == __last1 && __first2 != __last2;
+    }
+
+  /**
+   *  @brief Finds the places in ranges which don't match.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @return   A pair of iterators pointing to the first mismatch.
+   *
+   *  This compares the elements of two ranges using @c == and returns a pair
+   *  of iterators.  The first iterator points into the first range, the
+   *  second iterator points into the second range, and the elements pointed
+   *  to by the iterators are not equal.
+  */
+  template<typename _InputIterator1, typename _InputIterator2>
+    pair<_InputIterator1, _InputIterator2>
+    mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+	     _InputIterator2 __first2)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIterator1>::value_type,
+	    typename iterator_traits<_InputIterator2>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      while (__first1 != __last1 && *__first1 == *__first2)
+        {
+	  ++__first1;
+	  ++__first2;
+        }
+      return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
+    }
+
+  /**
+   *  @brief Finds the places in ranges which don't match.
+   *  @ingroup non_mutating_algorithms
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param binary_pred A binary predicate @link functors
+   *         functor@endlink.
+   *  @return   A pair of iterators pointing to the first mismatch.
+   *
+   *  This compares the elements of two ranges using the binary_pred
+   *  parameter, and returns a pair
+   *  of iterators.  The first iterator points into the first range, the
+   *  second iterator points into the second range, and the elements pointed
+   *  to by the iterators are not equal.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+	   typename _BinaryPredicate>
+    pair<_InputIterator1, _InputIterator2>
+    mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+	     _InputIterator2 __first2, _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
+        {
+	  ++__first1;
+	  ++__first2;
+        }
+      return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
+    }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+// NB: This file is included within many other C++ includes, as a way
+// of getting the base algorithms. So, make sure that parallel bits
+// come in too if requested. 
+#ifdef _GLIBCXX_PARALLEL
+# include <parallel/algobase.h>
+#endif
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_bvector.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_bvector.h
new file mode 100644
index 0000000..db81761
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_bvector.h
@@ -0,0 +1,1051 @@
+// vector<bool> specialization -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_bvector.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_BVECTOR_H
+#define _STL_BVECTOR_H 1
+
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  typedef unsigned long _Bit_type;
+  enum { _S_word_bit = int(__CHAR_BIT__ * sizeof(_Bit_type)) };
+
+  struct _Bit_reference
+  {
+    _Bit_type * _M_p;
+    _Bit_type _M_mask;
+
+    _Bit_reference(_Bit_type * __x, _Bit_type __y)
+    : _M_p(__x), _M_mask(__y) { }
+
+    _Bit_reference() : _M_p(0), _M_mask(0) { }
+
+    operator bool() const
+    { return !!(*_M_p & _M_mask); }
+
+    _Bit_reference&
+    operator=(bool __x)
+    {
+      if (__x)
+	*_M_p |= _M_mask;
+      else
+	*_M_p &= ~_M_mask;
+      return *this;
+    }
+
+    _Bit_reference&
+    operator=(const _Bit_reference& __x)
+    { return *this = bool(__x); }
+
+    bool
+    operator==(const _Bit_reference& __x) const
+    { return bool(*this) == bool(__x); }
+
+    bool
+    operator<(const _Bit_reference& __x) const
+    { return !bool(*this) && bool(__x); }
+
+    void
+    flip()
+    { *_M_p ^= _M_mask; }
+  };
+
+  struct _Bit_iterator_base
+  : public std::iterator<std::random_access_iterator_tag, bool>
+  {
+    _Bit_type * _M_p;
+    unsigned int _M_offset;
+
+    _Bit_iterator_base(_Bit_type * __x, unsigned int __y)
+    : _M_p(__x), _M_offset(__y) { }
+
+    void
+    _M_bump_up()
+    {
+      if (_M_offset++ == int(_S_word_bit) - 1)
+	{
+	  _M_offset = 0;
+	  ++_M_p;
+	}
+    }
+
+    void
+    _M_bump_down()
+    {
+      if (_M_offset-- == 0)
+	{
+	  _M_offset = int(_S_word_bit) - 1;
+	  --_M_p;
+	}
+    }
+
+    void
+    _M_incr(ptrdiff_t __i)
+    {
+      difference_type __n = __i + _M_offset;
+      _M_p += __n / int(_S_word_bit);
+      __n = __n % int(_S_word_bit);
+      if (__n < 0)
+	{
+	  __n += int(_S_word_bit);
+	  --_M_p;
+	}
+      _M_offset = static_cast<unsigned int>(__n);
+    }
+
+    bool
+    operator==(const _Bit_iterator_base& __i) const
+    { return _M_p == __i._M_p && _M_offset == __i._M_offset; }
+
+    bool
+    operator<(const _Bit_iterator_base& __i) const
+    {
+      return _M_p < __i._M_p
+	     || (_M_p == __i._M_p && _M_offset < __i._M_offset);
+    }
+
+    bool
+    operator!=(const _Bit_iterator_base& __i) const
+    { return !(*this == __i); }
+
+    bool
+    operator>(const _Bit_iterator_base& __i) const
+    { return __i < *this; }
+
+    bool
+    operator<=(const _Bit_iterator_base& __i) const
+    { return !(__i < *this); }
+
+    bool
+    operator>=(const _Bit_iterator_base& __i) const
+    { return !(*this < __i); }
+  };
+
+  inline ptrdiff_t
+  operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
+  {
+    return (int(_S_word_bit) * (__x._M_p - __y._M_p)
+	    + __x._M_offset - __y._M_offset);
+  }
+
+  struct _Bit_iterator : public _Bit_iterator_base
+  {
+    typedef _Bit_reference  reference;
+    typedef _Bit_reference* pointer;
+    typedef _Bit_iterator   iterator;
+
+    _Bit_iterator() : _Bit_iterator_base(0, 0) { }
+
+    _Bit_iterator(_Bit_type * __x, unsigned int __y)
+    : _Bit_iterator_base(__x, __y) { }
+
+    reference
+    operator*() const
+    { return reference(_M_p, 1UL << _M_offset); }
+
+    iterator&
+    operator++()
+    {
+      _M_bump_up();
+      return *this;
+    }
+
+    iterator
+    operator++(int)
+    {
+      iterator __tmp = *this;
+      _M_bump_up();
+      return __tmp;
+    }
+
+    iterator&
+    operator--()
+    {
+      _M_bump_down();
+      return *this;
+    }
+
+    iterator
+    operator--(int)
+    {
+      iterator __tmp = *this;
+      _M_bump_down();
+      return __tmp;
+    }
+
+    iterator&
+    operator+=(difference_type __i)
+    {
+      _M_incr(__i);
+      return *this;
+    }
+
+    iterator&
+    operator-=(difference_type __i)
+    {
+      *this += -__i;
+      return *this;
+    }
+
+    iterator
+    operator+(difference_type __i) const
+    {
+      iterator __tmp = *this;
+      return __tmp += __i;
+    }
+
+    iterator
+    operator-(difference_type __i) const
+    {
+      iterator __tmp = *this;
+      return __tmp -= __i;
+    }
+
+    reference
+    operator[](difference_type __i) const
+    { return *(*this + __i); }
+  };
+
+  inline _Bit_iterator
+  operator+(ptrdiff_t __n, const _Bit_iterator& __x)
+  { return __x + __n; }
+
+  struct _Bit_const_iterator : public _Bit_iterator_base
+  {
+    typedef bool                 reference;
+    typedef bool                 const_reference;
+    typedef const bool*          pointer;
+    typedef _Bit_const_iterator  const_iterator;
+
+    _Bit_const_iterator() : _Bit_iterator_base(0, 0) { }
+
+    _Bit_const_iterator(_Bit_type * __x, unsigned int __y)
+    : _Bit_iterator_base(__x, __y) { }
+
+    _Bit_const_iterator(const _Bit_iterator& __x)
+    : _Bit_iterator_base(__x._M_p, __x._M_offset) { }
+
+    const_reference
+    operator*() const
+    { return _Bit_reference(_M_p, 1UL << _M_offset); }
+
+    const_iterator&
+    operator++()
+    {
+      _M_bump_up();
+      return *this;
+    }
+
+    const_iterator
+    operator++(int)
+    {
+      const_iterator __tmp = *this;
+      _M_bump_up();
+      return __tmp;
+    }
+
+    const_iterator&
+    operator--()
+    {
+      _M_bump_down();
+      return *this;
+    }
+
+    const_iterator
+    operator--(int)
+    {
+      const_iterator __tmp = *this;
+      _M_bump_down();
+      return __tmp;
+    }
+
+    const_iterator&
+    operator+=(difference_type __i)
+    {
+      _M_incr(__i);
+      return *this;
+    }
+
+    const_iterator&
+    operator-=(difference_type __i)
+    {
+      *this += -__i;
+      return *this;
+    }
+
+    const_iterator 
+    operator+(difference_type __i) const
+    {
+      const_iterator __tmp = *this;
+      return __tmp += __i;
+    }
+
+    const_iterator
+    operator-(difference_type __i) const
+    {
+      const_iterator __tmp = *this;
+      return __tmp -= __i;
+    }
+
+    const_reference
+    operator[](difference_type __i) const
+    { return *(*this + __i); }
+  };
+
+  inline _Bit_const_iterator
+  operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
+  { return __x + __n; }
+
+  inline void
+  __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x)
+  {
+    for (; __first != __last; ++__first)
+      *__first = __x;
+  }
+
+  inline void
+  fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x)
+  {
+    if (__first._M_p != __last._M_p)
+      {
+	std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0);
+	__fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x);
+	__fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x);
+      }
+    else
+      __fill_bvector(__first, __last, __x);
+  }
+
+  template<typename _Alloc>
+    struct _Bvector_base
+    {
+      typedef typename _Alloc::template rebind<_Bit_type>::other
+        _Bit_alloc_type;
+      
+      struct _Bvector_impl
+      : public _Bit_alloc_type
+      {
+	_Bit_iterator 	_M_start;
+	_Bit_iterator 	_M_finish;
+	_Bit_type* 	_M_end_of_storage;
+
+	_Bvector_impl()
+	: _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0)
+	{ }
+ 
+	_Bvector_impl(const _Bit_alloc_type& __a)
+	: _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
+	{ }
+      };
+
+    public:
+      typedef _Alloc allocator_type;
+
+      _Bit_alloc_type&
+      _M_get_Bit_allocator()
+      { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); }
+
+      const _Bit_alloc_type&
+      _M_get_Bit_allocator() const
+      { return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); }
+
+      allocator_type
+      get_allocator() const
+      { return allocator_type(_M_get_Bit_allocator()); }
+
+      _Bvector_base()
+      : _M_impl() { }
+      
+      _Bvector_base(const allocator_type& __a)
+      : _M_impl(__a) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      _Bvector_base(_Bvector_base&& __x)
+      : _M_impl(__x._M_get_Bit_allocator())
+      {
+	this->_M_impl._M_start = __x._M_impl._M_start;
+	this->_M_impl._M_finish = __x._M_impl._M_finish;
+	this->_M_impl._M_end_of_storage = __x._M_impl._M_end_of_storage;
+	__x._M_impl._M_start = _Bit_iterator();
+	__x._M_impl._M_finish = _Bit_iterator();
+	__x._M_impl._M_end_of_storage = 0;
+      }
+#endif
+
+      ~_Bvector_base()
+      { this->_M_deallocate(); }
+
+    protected:
+      _Bvector_impl _M_impl;
+
+      _Bit_type*
+      _M_allocate(size_t __n)
+      { return _M_impl.allocate((__n + int(_S_word_bit) - 1)
+				/ int(_S_word_bit)); }
+
+      void
+      _M_deallocate()
+      {
+	if (_M_impl._M_start._M_p)
+	  _M_impl.deallocate(_M_impl._M_start._M_p,
+			     _M_impl._M_end_of_storage - _M_impl._M_start._M_p);
+      }
+    };
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+// Declare a partial specialization of vector<T, Alloc>.
+#include <bits/stl_vector.h>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  /**
+   *  @brief  A specialization of vector for booleans which offers fixed time
+   *  access to individual elements in any order.
+   *
+   *  Note that vector<bool> does not actually meet the requirements for being
+   *  a container.  This is because the reference and pointer types are not
+   *  really references and pointers to bool.  See DR96 for details.  @see
+   *  vector for function documentation.
+   *
+   *  @ingroup sequences
+   *
+   *  In some terminology a %vector can be described as a dynamic
+   *  C-style array, it offers fast and efficient access to individual
+   *  elements in any order and saves the user from worrying about
+   *  memory and size allocation.  Subscripting ( @c [] ) access is
+   *  also provided as with C-style arrays.
+  */
+template<typename _Alloc>
+  class vector<bool, _Alloc> : protected _Bvector_base<_Alloc>
+  {
+    typedef _Bvector_base<_Alloc>			 _Base;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    template<typename> friend class hash;
+#endif
+
+  public:
+    typedef bool                                         value_type;
+    typedef size_t                                       size_type;
+    typedef ptrdiff_t                                    difference_type;
+    typedef _Bit_reference                               reference;
+    typedef bool                                         const_reference;
+    typedef _Bit_reference*                              pointer;
+    typedef const bool*                                  const_pointer;
+    typedef _Bit_iterator                                iterator;
+    typedef _Bit_const_iterator                          const_iterator;
+    typedef std::reverse_iterator<const_iterator>        const_reverse_iterator;
+    typedef std::reverse_iterator<iterator>              reverse_iterator;
+    typedef _Alloc                        		 allocator_type;
+
+    allocator_type get_allocator() const
+    { return _Base::get_allocator(); }
+
+  protected:
+    using _Base::_M_allocate;
+    using _Base::_M_deallocate;
+    using _Base::_M_get_Bit_allocator;
+
+  public:
+    vector()
+    : _Base() { }
+
+    explicit
+    vector(const allocator_type& __a)
+    : _Base(__a) { }
+
+    explicit
+    vector(size_type __n, const bool& __value = bool(), 
+	   const allocator_type& __a = allocator_type())
+    : _Base(__a)
+    {
+      _M_initialize(__n);
+      std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, 
+		__value ? ~0 : 0);
+    }
+
+    vector(const vector& __x)
+    : _Base(__x._M_get_Bit_allocator())
+    {
+      _M_initialize(__x.size());
+      _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start);
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    vector(vector&& __x)
+    : _Base(std::forward<_Base>(__x)) { }
+
+    vector(initializer_list<bool> __l,
+	   const allocator_type& __a = allocator_type())
+    : _Base(__a)
+    {
+      _M_initialize_range(__l.begin(), __l.end(),
+			  random_access_iterator_tag());
+    }
+#endif
+
+    template<typename _InputIterator>
+      vector(_InputIterator __first, _InputIterator __last,
+	     const allocator_type& __a = allocator_type())
+      : _Base(__a)
+      {
+	typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	_M_initialize_dispatch(__first, __last, _Integral());
+      }
+
+    ~vector() { }
+
+    vector&
+    operator=(const vector& __x)
+    {
+      if (&__x == this)
+	return *this;
+      if (__x.size() > capacity())
+	{
+	  this->_M_deallocate();
+	  _M_initialize(__x.size());
+	}
+      this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(),
+						begin());
+      return *this;
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    vector&
+    operator=(vector&& __x)
+    {
+      // NB: DR 1204.
+      // NB: DR 675.
+      this->clear();
+      this->swap(__x); 
+      return *this;
+    }
+
+    vector&
+    operator=(initializer_list<bool> __l)
+    {
+      this->assign (__l.begin(), __l.end());
+      return *this;
+    }
+#endif
+
+    // assign(), a generalized assignment member function.  Two
+    // versions: one that takes a count, and one that takes a range.
+    // The range version is a member template, so we dispatch on whether
+    // or not the type is an integer.
+    void
+    assign(size_type __n, const bool& __x)
+    { _M_fill_assign(__n, __x); }
+
+    template<typename _InputIterator>
+      void
+      assign(_InputIterator __first, _InputIterator __last)
+      {
+	typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	_M_assign_dispatch(__first, __last, _Integral());
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    void
+    assign(initializer_list<bool> __l)
+    { this->assign(__l.begin(), __l.end()); }
+#endif
+
+    iterator
+    begin()
+    { return this->_M_impl._M_start; }
+
+    const_iterator
+    begin() const
+    { return this->_M_impl._M_start; }
+
+    iterator
+    end()
+    { return this->_M_impl._M_finish; }
+
+    const_iterator
+    end() const
+    { return this->_M_impl._M_finish; }
+
+    reverse_iterator
+    rbegin()
+    { return reverse_iterator(end()); }
+
+    const_reverse_iterator
+    rbegin() const
+    { return const_reverse_iterator(end()); }
+
+    reverse_iterator
+    rend()
+    { return reverse_iterator(begin()); }
+
+    const_reverse_iterator
+    rend() const
+    { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    const_iterator
+    cbegin() const
+    { return this->_M_impl._M_start; }
+
+    const_iterator
+    cend() const
+    { return this->_M_impl._M_finish; }
+
+    const_reverse_iterator
+    crbegin() const
+    { return const_reverse_iterator(end()); }
+
+    const_reverse_iterator
+    crend() const
+    { return const_reverse_iterator(begin()); }
+#endif
+
+    size_type
+    size() const
+    { return size_type(end() - begin()); }
+
+    size_type
+    max_size() const
+    {
+      const size_type __isize =
+	__gnu_cxx::__numeric_traits<difference_type>::__max
+	- int(_S_word_bit) + 1;
+      const size_type __asize = _M_get_Bit_allocator().max_size();
+      return (__asize <= __isize / int(_S_word_bit)
+	      ? __asize * int(_S_word_bit) : __isize);
+    }
+
+    size_type
+    capacity() const
+    { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0)
+		       - begin()); }
+
+    bool
+    empty() const
+    { return begin() == end(); }
+
+    reference
+    operator[](size_type __n)
+    {
+      return *iterator(this->_M_impl._M_start._M_p
+		       + __n / int(_S_word_bit), __n % int(_S_word_bit));
+    }
+
+    const_reference
+    operator[](size_type __n) const
+    {
+      return *const_iterator(this->_M_impl._M_start._M_p
+			     + __n / int(_S_word_bit), __n % int(_S_word_bit));
+    }
+
+  protected:
+    void
+    _M_range_check(size_type __n) const
+    {
+      if (__n >= this->size())
+        __throw_out_of_range(__N("vector<bool>::_M_range_check"));
+    }
+
+  public:
+    reference
+    at(size_type __n)
+    { _M_range_check(__n); return (*this)[__n]; }
+
+    const_reference
+    at(size_type __n) const
+    { _M_range_check(__n); return (*this)[__n]; }
+
+    void
+    reserve(size_type __n);
+
+    reference
+    front()
+    { return *begin(); }
+
+    const_reference
+    front() const
+    { return *begin(); }
+
+    reference
+    back()
+    { return *(end() - 1); }
+
+    const_reference
+    back() const
+    { return *(end() - 1); }
+
+    // _GLIBCXX_RESOLVE_LIB_DEFECTS
+    // DR 464. Suggestion for new member functions in standard containers.
+    // N.B. DR 464 says nothing about vector<bool> but we need something
+    // here due to the way we are implementing DR 464 in the debug-mode
+    // vector class.
+    void
+    data() { }
+
+    void
+    push_back(bool __x)
+    {
+      if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
+        *this->_M_impl._M_finish++ = __x;
+      else
+        _M_insert_aux(end(), __x);
+    }
+
+    void
+    swap(vector& __x)
+    {
+      std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+      std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+      std::swap(this->_M_impl._M_end_of_storage, 
+		__x._M_impl._M_end_of_storage);
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 431. Swapping containers with unequal allocators.
+      std::__alloc_swap<typename _Base::_Bit_alloc_type>::
+	_S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator());
+    }
+
+    // [23.2.5]/1, third-to-last entry in synopsis listing
+    static void
+    swap(reference __x, reference __y)
+    {
+      bool __tmp = __x;
+      __x = __y;
+      __y = __tmp;
+    }
+
+    iterator
+    insert(iterator __position, const bool& __x = bool())
+    {
+      const difference_type __n = __position - begin();
+      if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage
+	  && __position == end())
+        *this->_M_impl._M_finish++ = __x;
+      else
+        _M_insert_aux(__position, __x);
+      return begin() + __n;
+    }
+
+    template<typename _InputIterator>
+      void
+      insert(iterator __position,
+	     _InputIterator __first, _InputIterator __last)
+      {
+	typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	_M_insert_dispatch(__position, __first, __last, _Integral());
+      }
+
+    void
+    insert(iterator __position, size_type __n, const bool& __x)
+    { _M_fill_insert(__position, __n, __x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    void insert(iterator __p, initializer_list<bool> __l)
+    { this->insert(__p, __l.begin(), __l.end()); }
+#endif
+
+    void
+    pop_back()
+    { --this->_M_impl._M_finish; }
+
+    iterator
+    erase(iterator __position)
+    {
+      if (__position + 1 != end())
+        std::copy(__position + 1, end(), __position);
+      --this->_M_impl._M_finish;
+      return __position;
+    }
+
+    iterator
+    erase(iterator __first, iterator __last)
+    {
+      _M_erase_at_end(std::copy(__last, end(), __first));
+      return __first;
+    }
+
+    void
+    resize(size_type __new_size, bool __x = bool())
+    {
+      if (__new_size < size())
+        _M_erase_at_end(begin() + difference_type(__new_size));
+      else
+        insert(end(), __new_size - size(), __x);
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    void
+    shrink_to_fit()
+    { std::__shrink_to_fit<vector>::_S_do_it(*this); }
+#endif
+
+    void
+    flip()
+    {
+      for (_Bit_type * __p = this->_M_impl._M_start._M_p;
+	   __p != this->_M_impl._M_end_of_storage; ++__p)
+        *__p = ~*__p;
+    }
+
+    void
+    clear()
+    { _M_erase_at_end(begin()); }
+
+   
+  protected:
+    // Precondition: __first._M_offset == 0 && __result._M_offset == 0.
+    iterator
+    _M_copy_aligned(const_iterator __first, const_iterator __last,
+		    iterator __result)
+    {
+      _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p);
+      return std::copy(const_iterator(__last._M_p, 0), __last,
+		       iterator(__q, 0));
+    }
+
+    void
+    _M_initialize(size_type __n)
+    {
+      _Bit_type* __q = this->_M_allocate(__n);
+      this->_M_impl._M_end_of_storage = (__q
+					 + ((__n + int(_S_word_bit) - 1)
+					    / int(_S_word_bit)));
+      this->_M_impl._M_start = iterator(__q, 0);
+      this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n);
+    }
+
+    // Check whether it's an integral type.  If so, it's not an iterator.
+
+    // _GLIBCXX_RESOLVE_LIB_DEFECTS
+    // 438. Ambiguity in the "do the right thing" clause
+    template<typename _Integer>
+      void
+      _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+      {
+	_M_initialize(static_cast<size_type>(__n));
+	std::fill(this->_M_impl._M_start._M_p, 
+		  this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
+      }
+
+    template<typename _InputIterator>
+      void 
+      _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+			     __false_type)
+      { _M_initialize_range(__first, __last, 
+			    std::__iterator_category(__first)); }
+
+    template<typename _InputIterator>
+      void
+      _M_initialize_range(_InputIterator __first, _InputIterator __last,
+			  std::input_iterator_tag)
+      {
+	for (; __first != __last; ++__first)
+	  push_back(*__first);
+      }
+
+    template<typename _ForwardIterator>
+      void
+      _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
+			  std::forward_iterator_tag)
+      {
+	const size_type __n = std::distance(__first, __last);
+	_M_initialize(__n);
+	std::copy(__first, __last, this->_M_impl._M_start);
+      }
+
+    // _GLIBCXX_RESOLVE_LIB_DEFECTS
+    // 438. Ambiguity in the "do the right thing" clause
+    template<typename _Integer>
+      void
+      _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+      { _M_fill_assign(__n, __val); }
+
+    template<class _InputIterator>
+      void
+      _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+			 __false_type)
+      { _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
+
+    void
+    _M_fill_assign(size_t __n, bool __x)
+    {
+      if (__n > size())
+	{
+	  std::fill(this->_M_impl._M_start._M_p, 
+		    this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
+	  insert(end(), __n - size(), __x);
+	}
+      else
+	{
+	  _M_erase_at_end(begin() + __n);
+	  std::fill(this->_M_impl._M_start._M_p, 
+		    this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
+	}
+    }
+
+    template<typename _InputIterator>
+      void
+      _M_assign_aux(_InputIterator __first, _InputIterator __last,
+		    std::input_iterator_tag)
+      {
+	iterator __cur = begin();
+	for (; __first != __last && __cur != end(); ++__cur, ++__first)
+	  *__cur = *__first;
+	if (__first == __last)
+	  _M_erase_at_end(__cur);
+	else
+	  insert(end(), __first, __last);
+      }
+    
+    template<typename _ForwardIterator>
+      void
+      _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+		    std::forward_iterator_tag)
+      {
+	const size_type __len = std::distance(__first, __last);
+	if (__len < size())
+	  _M_erase_at_end(std::copy(__first, __last, begin()));
+	else
+	  {
+	    _ForwardIterator __mid = __first;
+	    std::advance(__mid, size());
+	    std::copy(__first, __mid, begin());
+	    insert(end(), __mid, __last);
+	  }
+      }
+
+    // Check whether it's an integral type.  If so, it's not an iterator.
+
+    // _GLIBCXX_RESOLVE_LIB_DEFECTS
+    // 438. Ambiguity in the "do the right thing" clause
+    template<typename _Integer>
+      void
+      _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
+			 __true_type)
+      { _M_fill_insert(__pos, __n, __x); }
+
+    template<typename _InputIterator>
+      void
+      _M_insert_dispatch(iterator __pos,
+			 _InputIterator __first, _InputIterator __last,
+			 __false_type)
+      { _M_insert_range(__pos, __first, __last,
+			std::__iterator_category(__first)); }
+
+    void
+    _M_fill_insert(iterator __position, size_type __n, bool __x);
+
+    template<typename _InputIterator>
+      void
+      _M_insert_range(iterator __pos, _InputIterator __first, 
+		      _InputIterator __last, std::input_iterator_tag)
+      {
+	for (; __first != __last; ++__first)
+	  {
+	    __pos = insert(__pos, *__first);
+	    ++__pos;
+	  }
+      }
+
+    template<typename _ForwardIterator>
+      void
+      _M_insert_range(iterator __position, _ForwardIterator __first, 
+		      _ForwardIterator __last, std::forward_iterator_tag);
+
+    void
+    _M_insert_aux(iterator __position, bool __x);
+
+    size_type
+    _M_check_len(size_type __n, const char* __s) const
+    {
+      if (max_size() - size() < __n)
+	__throw_length_error(__N(__s));
+
+      const size_type __len = size() + std::max(size(), __n);
+      return (__len < size() || __len > max_size()) ? max_size() : __len;
+    }
+
+    void
+    _M_erase_at_end(iterator __pos)
+    { this->_M_impl._M_finish = __pos; }
+  };
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+#include <bits/functional_hash.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // DR 1182.
+  /// std::hash specialization for vector<bool>.
+  template<typename _Alloc>
+    struct hash<_GLIBCXX_STD_D::vector<bool, _Alloc>>
+    : public std::unary_function<_GLIBCXX_STD_D::vector<bool, _Alloc>, size_t>
+    {
+      size_t
+      operator()(const _GLIBCXX_STD_D::vector<bool, _Alloc>& __b) const;
+    };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_construct.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_construct.h
new file mode 100644
index 0000000..3c30b9a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_construct.h
@@ -0,0 +1,154 @@
+// nonstandard construct and destroy functions -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_construct.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_CONSTRUCT_H
+#define _STL_CONSTRUCT_H 1
+
+#include <new>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * Constructs an object in existing memory by invoking an allocated
+   * object's constructor with an initializer.
+   */
+  template<typename _T1, typename _T2>
+    inline void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    // Allow perfect forwarding
+    _Construct(_T1* __p, _T2&& __value)
+#else
+    _Construct(_T1* __p, const _T2& __value)
+#endif
+    {
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 402. wrong new expression in [some_]allocator::construct
+      ::new(static_cast<void*>(__p)) _T1(_GLIBCXX_FORWARD(_T2, __value));
+    }
+
+  /**
+   * Destroy the object pointed to by a pointer type.
+   */
+  template<typename _Tp>
+    inline void
+    _Destroy(_Tp* __pointer)
+    { __pointer->~_Tp(); }
+
+  template<bool>
+    struct _Destroy_aux
+    {
+      template<typename _ForwardIterator>
+        static void
+        __destroy(_ForwardIterator __first, _ForwardIterator __last)
+	{
+	  for (; __first != __last; ++__first)
+	    std::_Destroy(&*__first);
+	}
+    };
+
+  template<>
+    struct _Destroy_aux<true>
+    {
+      template<typename _ForwardIterator>
+        static void
+        __destroy(_ForwardIterator, _ForwardIterator) { }
+    };
+
+  /**
+   * Destroy a range of objects.  If the value_type of the object has
+   * a trivial destructor, the compiler should optimize all of this
+   * away, otherwise the objects' destructors must be invoked.
+   */
+  template<typename _ForwardIterator>
+    inline void
+    _Destroy(_ForwardIterator __first, _ForwardIterator __last)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+                       _Value_type;
+      std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
+	__destroy(__first, __last);
+    }
+
+  /**
+   * Destroy a range of objects using the supplied allocator.  For
+   * nondefault allocators we do not optimize away invocation of 
+   * destroy() even if _Tp has a trivial destructor.
+   */
+
+  template <typename _Tp> class allocator;
+
+  template<typename _ForwardIterator, typename _Allocator>
+    void
+    _Destroy(_ForwardIterator __first, _ForwardIterator __last,
+	     _Allocator& __alloc)
+    {
+      for (; __first != __last; ++__first)
+	__alloc.destroy(&*__first);
+    }
+
+  template<typename _ForwardIterator, typename _Tp>
+    inline void
+    _Destroy(_ForwardIterator __first, _ForwardIterator __last,
+	     allocator<_Tp>&)
+    {
+      _Destroy(__first, __last);
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_CONSTRUCT_H */
+
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_deque.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_deque.h
new file mode 100644
index 0000000..19022b0
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_deque.h
@@ -0,0 +1,1888 @@
+// Deque implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_deque.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_DEQUE_H
+#define _STL_DEQUE_H 1
+
+#include <bits/concept_check.h>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  /**
+   *  @brief This function controls the size of memory nodes.
+   *  @param  size  The size of an element.
+   *  @return   The number (not byte size) of elements per node.
+   *
+   *  This function started off as a compiler kludge from SGI, but
+   *  seems to be a useful wrapper around a repeated constant
+   *  expression.  The @b 512 is tunable (and no other code needs to
+   *  change), but no investigation has been done since inheriting the
+   *  SGI code.  Touch _GLIBCXX_DEQUE_BUF_SIZE only if you know what
+   *  you are doing, however: changing it breaks the binary
+   *  compatibility!!
+  */
+
+#ifndef _GLIBCXX_DEQUE_BUF_SIZE
+#define _GLIBCXX_DEQUE_BUF_SIZE 512
+#endif
+
+  inline size_t
+  __deque_buf_size(size_t __size)
+  { return (__size < _GLIBCXX_DEQUE_BUF_SIZE
+	    ? size_t(_GLIBCXX_DEQUE_BUF_SIZE / __size) : size_t(1)); }
+
+
+  /**
+   *  @brief A deque::iterator.
+   *
+   *  Quite a bit of intelligence here.  Much of the functionality of
+   *  deque is actually passed off to this class.  A deque holds two
+   *  of these internally, marking its valid range.  Access to
+   *  elements is done as offsets of either of those two, relying on
+   *  operator overloading in this class.
+   *
+   *  All the functions are op overloads except for _M_set_node.
+  */
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    struct _Deque_iterator
+    {
+      typedef _Deque_iterator<_Tp, _Tp&, _Tp*>             iterator;
+      typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+
+      static size_t _S_buffer_size()
+      { return __deque_buf_size(sizeof(_Tp)); }
+
+      typedef std::random_access_iterator_tag iterator_category;
+      typedef _Tp                             value_type;
+      typedef _Ptr                            pointer;
+      typedef _Ref                            reference;
+      typedef size_t                          size_type;
+      typedef ptrdiff_t                       difference_type;
+      typedef _Tp**                           _Map_pointer;
+      typedef _Deque_iterator                 _Self;
+
+      _Tp* _M_cur;
+      _Tp* _M_first;
+      _Tp* _M_last;
+      _Map_pointer _M_node;
+
+      _Deque_iterator(_Tp* __x, _Map_pointer __y)
+      : _M_cur(__x), _M_first(*__y),
+        _M_last(*__y + _S_buffer_size()), _M_node(__y) { }
+
+      _Deque_iterator()
+      : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) { }
+
+      _Deque_iterator(const iterator& __x)
+      : _M_cur(__x._M_cur), _M_first(__x._M_first),
+        _M_last(__x._M_last), _M_node(__x._M_node) { }
+
+      reference
+      operator*() const
+      { return *_M_cur; }
+
+      pointer
+      operator->() const
+      { return _M_cur; }
+
+      _Self&
+      operator++()
+      {
+	++_M_cur;
+	if (_M_cur == _M_last)
+	  {
+	    _M_set_node(_M_node + 1);
+	    _M_cur = _M_first;
+	  }
+	return *this;
+      }
+
+      _Self
+      operator++(int)
+      {
+	_Self __tmp = *this;
+	++*this;
+	return __tmp;
+      }
+
+      _Self&
+      operator--()
+      {
+	if (_M_cur == _M_first)
+	  {
+	    _M_set_node(_M_node - 1);
+	    _M_cur = _M_last;
+	  }
+	--_M_cur;
+	return *this;
+      }
+
+      _Self
+      operator--(int)
+      {
+	_Self __tmp = *this;
+	--*this;
+	return __tmp;
+      }
+
+      _Self&
+      operator+=(difference_type __n)
+      {
+	const difference_type __offset = __n + (_M_cur - _M_first);
+	if (__offset >= 0 && __offset < difference_type(_S_buffer_size()))
+	  _M_cur += __n;
+	else
+	  {
+	    const difference_type __node_offset =
+	      __offset > 0 ? __offset / difference_type(_S_buffer_size())
+	                   : -difference_type((-__offset - 1)
+					      / _S_buffer_size()) - 1;
+	    _M_set_node(_M_node + __node_offset);
+	    _M_cur = _M_first + (__offset - __node_offset
+				 * difference_type(_S_buffer_size()));
+	  }
+	return *this;
+      }
+
+      _Self
+      operator+(difference_type __n) const
+      {
+	_Self __tmp = *this;
+	return __tmp += __n;
+      }
+
+      _Self&
+      operator-=(difference_type __n)
+      { return *this += -__n; }
+
+      _Self
+      operator-(difference_type __n) const
+      {
+	_Self __tmp = *this;
+	return __tmp -= __n;
+      }
+
+      reference
+      operator[](difference_type __n) const
+      { return *(*this + __n); }
+
+      /** 
+       *  Prepares to traverse new_node.  Sets everything except
+       *  _M_cur, which should therefore be set by the caller
+       *  immediately afterwards, based on _M_first and _M_last.
+       */
+      void
+      _M_set_node(_Map_pointer __new_node)
+      {
+	_M_node = __new_node;
+	_M_first = *__new_node;
+	_M_last = _M_first + difference_type(_S_buffer_size());
+      }
+    };
+
+  // Note: we also provide overloads whose operands are of the same type in
+  // order to avoid ambiguous overload resolution when std::rel_ops operators
+  // are in scope (for additional details, see libstdc++/3628)
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    inline bool
+    operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+	       const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+    { return __x._M_cur == __y._M_cur; }
+
+  template<typename _Tp, typename _RefL, typename _PtrL,
+	   typename _RefR, typename _PtrR>
+    inline bool
+    operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+	       const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+    { return __x._M_cur == __y._M_cur; }
+
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    inline bool
+    operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+	       const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+    { return !(__x == __y); }
+
+  template<typename _Tp, typename _RefL, typename _PtrL,
+	   typename _RefR, typename _PtrR>
+    inline bool
+    operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+	       const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+    { return !(__x == __y); }
+
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    inline bool
+    operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+	      const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+    { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
+                                          : (__x._M_node < __y._M_node); }
+
+  template<typename _Tp, typename _RefL, typename _PtrL,
+	   typename _RefR, typename _PtrR>
+    inline bool
+    operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+	      const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+    { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
+	                                  : (__x._M_node < __y._M_node); }
+
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    inline bool
+    operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+	      const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+    { return __y < __x; }
+
+  template<typename _Tp, typename _RefL, typename _PtrL,
+	   typename _RefR, typename _PtrR>
+    inline bool
+    operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+	      const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+    { return __y < __x; }
+
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    inline bool
+    operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+	       const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+    { return !(__y < __x); }
+
+  template<typename _Tp, typename _RefL, typename _PtrL,
+	   typename _RefR, typename _PtrR>
+    inline bool
+    operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+	       const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+    { return !(__y < __x); }
+
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    inline bool
+    operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+	       const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+    { return !(__x < __y); }
+
+  template<typename _Tp, typename _RefL, typename _PtrL,
+	   typename _RefR, typename _PtrR>
+    inline bool
+    operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+	       const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+    { return !(__x < __y); }
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // According to the resolution of DR179 not only the various comparison
+  // operators but also operator- must accept mixed iterator/const_iterator
+  // parameters.
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type
+    operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+	      const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+    {
+      return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type
+	(_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size())
+	* (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
+	+ (__y._M_last - __y._M_cur);
+    }
+
+  template<typename _Tp, typename _RefL, typename _PtrL,
+	   typename _RefR, typename _PtrR>
+    inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
+    operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+	      const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+    {
+      return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
+	(_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size())
+	* (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
+	+ (__y._M_last - __y._M_cur);
+    }
+
+  template<typename _Tp, typename _Ref, typename _Ptr>
+    inline _Deque_iterator<_Tp, _Ref, _Ptr>
+    operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x)
+    { return __x + __n; }
+
+  template<typename _Tp>
+    void
+    fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&,
+	 const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&);
+
+  template<typename _Tp>
+    _Deque_iterator<_Tp, _Tp&, _Tp*>
+    copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
+	 _Deque_iterator<_Tp, const _Tp&, const _Tp*>,
+	 _Deque_iterator<_Tp, _Tp&, _Tp*>);
+
+  template<typename _Tp>
+    inline _Deque_iterator<_Tp, _Tp&, _Tp*>
+    copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
+	 _Deque_iterator<_Tp, _Tp&, _Tp*> __last,
+	 _Deque_iterator<_Tp, _Tp&, _Tp*> __result)
+    { return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first),
+		       _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last),
+		       __result); }
+
+  template<typename _Tp>
+    _Deque_iterator<_Tp, _Tp&, _Tp*>
+    copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
+		  _Deque_iterator<_Tp, const _Tp&, const _Tp*>,
+		  _Deque_iterator<_Tp, _Tp&, _Tp*>);
+
+  template<typename _Tp>
+    inline _Deque_iterator<_Tp, _Tp&, _Tp*>
+    copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
+		  _Deque_iterator<_Tp, _Tp&, _Tp*> __last,
+		  _Deque_iterator<_Tp, _Tp&, _Tp*> __result)
+    { return std::copy_backward(_Deque_iterator<_Tp,
+				const _Tp&, const _Tp*>(__first),
+				_Deque_iterator<_Tp,
+				const _Tp&, const _Tp*>(__last),
+				__result); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp>
+    _Deque_iterator<_Tp, _Tp&, _Tp*>
+    move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
+	 _Deque_iterator<_Tp, const _Tp&, const _Tp*>,
+	 _Deque_iterator<_Tp, _Tp&, _Tp*>);
+
+  template<typename _Tp>
+    inline _Deque_iterator<_Tp, _Tp&, _Tp*>
+    move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
+	 _Deque_iterator<_Tp, _Tp&, _Tp*> __last,
+	 _Deque_iterator<_Tp, _Tp&, _Tp*> __result)
+    { return std::move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first),
+		       _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last),
+		       __result); }
+
+  template<typename _Tp>
+    _Deque_iterator<_Tp, _Tp&, _Tp*>
+    move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
+		  _Deque_iterator<_Tp, const _Tp&, const _Tp*>,
+		  _Deque_iterator<_Tp, _Tp&, _Tp*>);
+
+  template<typename _Tp>
+    inline _Deque_iterator<_Tp, _Tp&, _Tp*>
+    move_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
+		  _Deque_iterator<_Tp, _Tp&, _Tp*> __last,
+		  _Deque_iterator<_Tp, _Tp&, _Tp*> __result)
+    { return std::move_backward(_Deque_iterator<_Tp,
+				const _Tp&, const _Tp*>(__first),
+				_Deque_iterator<_Tp,
+				const _Tp&, const _Tp*>(__last),
+				__result); }
+#endif
+
+  /**
+   *  Deque base class.  This class provides the unified face for %deque's
+   *  allocation.  This class's constructor and destructor allocate and
+   *  deallocate (but do not initialize) storage.  This makes %exception
+   *  safety easier.
+   *
+   *  Nothing in this class ever constructs or destroys an actual Tp element.
+   *  (Deque handles that itself.)  Only/All memory management is performed
+   *  here.
+  */
+  template<typename _Tp, typename _Alloc>
+    class _Deque_base
+    {
+    public:
+      typedef _Alloc                  allocator_type;
+
+      allocator_type
+      get_allocator() const
+      { return allocator_type(_M_get_Tp_allocator()); }
+
+      typedef _Deque_iterator<_Tp, _Tp&, _Tp*>             iterator;
+      typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+
+      _Deque_base()
+      : _M_impl()
+      { _M_initialize_map(0); }
+
+      _Deque_base(const allocator_type& __a, size_t __num_elements)
+      : _M_impl(__a)
+      { _M_initialize_map(__num_elements); }
+
+      _Deque_base(const allocator_type& __a)
+      : _M_impl(__a)
+      { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      _Deque_base(_Deque_base&& __x)
+      : _M_impl(__x._M_get_Tp_allocator())
+      {
+	_M_initialize_map(0);
+	if (__x._M_impl._M_map)
+	  {
+	    std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+	    std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+	    std::swap(this->_M_impl._M_map, __x._M_impl._M_map);
+	    std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size);
+	  }
+      }
+#endif
+
+      ~_Deque_base();
+
+    protected:
+      //This struct encapsulates the implementation of the std::deque
+      //standard container and at the same time makes use of the EBO
+      //for empty allocators.
+      typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type;
+
+      typedef typename _Alloc::template rebind<_Tp>::other  _Tp_alloc_type;
+
+      struct _Deque_impl
+      : public _Tp_alloc_type
+      {
+	_Tp** _M_map;
+	size_t _M_map_size;
+	iterator _M_start;
+	iterator _M_finish;
+
+	_Deque_impl()
+	: _Tp_alloc_type(), _M_map(0), _M_map_size(0),
+	  _M_start(), _M_finish()
+	{ }
+
+	_Deque_impl(const _Tp_alloc_type& __a)
+	: _Tp_alloc_type(__a), _M_map(0), _M_map_size(0),
+	  _M_start(), _M_finish()
+	{ }
+      };
+
+      _Tp_alloc_type&
+      _M_get_Tp_allocator()
+      { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
+
+      const _Tp_alloc_type&
+      _M_get_Tp_allocator() const
+      { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
+
+      _Map_alloc_type
+      _M_get_map_allocator() const
+      { return _Map_alloc_type(_M_get_Tp_allocator()); }
+
+      _Tp*
+      _M_allocate_node()
+      { 
+	return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp)));
+      }
+
+      void
+      _M_deallocate_node(_Tp* __p)
+      {
+	_M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp)));
+      }
+
+      _Tp**
+      _M_allocate_map(size_t __n)
+      { return _M_get_map_allocator().allocate(__n); }
+
+      void
+      _M_deallocate_map(_Tp** __p, size_t __n)
+      { _M_get_map_allocator().deallocate(__p, __n); }
+
+    protected:
+      void _M_initialize_map(size_t);
+      void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
+      void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
+      enum { _S_initial_map_size = 8 };
+
+      _Deque_impl _M_impl;
+    };
+
+  template<typename _Tp, typename _Alloc>
+    _Deque_base<_Tp, _Alloc>::
+    ~_Deque_base()
+    {
+      if (this->_M_impl._M_map)
+	{
+	  _M_destroy_nodes(this->_M_impl._M_start._M_node,
+			   this->_M_impl._M_finish._M_node + 1);
+	  _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
+	}
+    }
+
+  /**
+   *  @brief Layout storage.
+   *  @param  num_elements  The count of T's for which to allocate space
+   *                        at first.
+   *  @return   Nothing.
+   *
+   *  The initial underlying memory layout is a bit complicated...
+  */
+  template<typename _Tp, typename _Alloc>
+    void
+    _Deque_base<_Tp, _Alloc>::
+    _M_initialize_map(size_t __num_elements)
+    {
+      const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp))
+				  + 1);
+
+      this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size,
+					   size_t(__num_nodes + 2));
+      this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size);
+
+      // For "small" maps (needing less than _M_map_size nodes), allocation
+      // starts in the middle elements and grows outwards.  So nstart may be
+      // the beginning of _M_map, but for small maps it may be as far in as
+      // _M_map+3.
+
+      _Tp** __nstart = (this->_M_impl._M_map
+			+ (this->_M_impl._M_map_size - __num_nodes) / 2);
+      _Tp** __nfinish = __nstart + __num_nodes;
+
+      __try
+	{ _M_create_nodes(__nstart, __nfinish); }
+      __catch(...)
+	{
+	  _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
+	  this->_M_impl._M_map = 0;
+	  this->_M_impl._M_map_size = 0;
+	  __throw_exception_again;
+	}
+
+      this->_M_impl._M_start._M_set_node(__nstart);
+      this->_M_impl._M_finish._M_set_node(__nfinish - 1);
+      this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first;
+      this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first
+					+ __num_elements
+					% __deque_buf_size(sizeof(_Tp)));
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    _Deque_base<_Tp, _Alloc>::
+    _M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
+    {
+      _Tp** __cur;
+      __try
+	{
+	  for (__cur = __nstart; __cur < __nfinish; ++__cur)
+	    *__cur = this->_M_allocate_node();
+	}
+      __catch(...)
+	{
+	  _M_destroy_nodes(__nstart, __cur);
+	  __throw_exception_again;
+	}
+    }
+
+  template<typename _Tp, typename _Alloc>
+    void
+    _Deque_base<_Tp, _Alloc>::
+    _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
+    {
+      for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
+	_M_deallocate_node(*__n);
+    }
+
+  /**
+   *  @brief  A standard container using fixed-size memory allocation and
+   *  constant-time manipulation of elements at either end.
+   *
+   *  @ingroup sequences
+   *
+   *  Meets the requirements of a <a href="tables.html#65">container</a>, a
+   *  <a href="tables.html#66">reversible container</a>, and a
+   *  <a href="tables.html#67">sequence</a>, including the
+   *  <a href="tables.html#68">optional sequence requirements</a>.
+   *
+   *  In previous HP/SGI versions of deque, there was an extra template
+   *  parameter so users could control the node size.  This extension turned
+   *  out to violate the C++ standard (it can be detected using template
+   *  template parameters), and it was removed.
+   *
+   *  Here's how a deque<Tp> manages memory.  Each deque has 4 members:
+   *
+   *  - Tp**        _M_map
+   *  - size_t      _M_map_size
+   *  - iterator    _M_start, _M_finish
+   *
+   *  map_size is at least 8.  %map is an array of map_size
+   *  pointers-to-@anodes.  (The name %map has nothing to do with the
+   *  std::map class, and @b nodes should not be confused with
+   *  std::list's usage of @a node.)
+   *
+   *  A @a node has no specific type name as such, but it is referred
+   *  to as @a node in this file.  It is a simple array-of-Tp.  If Tp
+   *  is very large, there will be one Tp element per node (i.e., an
+   *  @a array of one).  For non-huge Tp's, node size is inversely
+   *  related to Tp size: the larger the Tp, the fewer Tp's will fit
+   *  in a node.  The goal here is to keep the total size of a node
+   *  relatively small and constant over different Tp's, to improve
+   *  allocator efficiency.
+   *
+   *  Not every pointer in the %map array will point to a node.  If
+   *  the initial number of elements in the deque is small, the
+   *  /middle/ %map pointers will be valid, and the ones at the edges
+   *  will be unused.  This same situation will arise as the %map
+   *  grows: available %map pointers, if any, will be on the ends.  As
+   *  new nodes are created, only a subset of the %map's pointers need
+   *  to be copied @a outward.
+   *
+   *  Class invariants:
+   * - For any nonsingular iterator i:
+   *    - i.node points to a member of the %map array.  (Yes, you read that
+   *      correctly:  i.node does not actually point to a node.)  The member of
+   *      the %map array is what actually points to the node.
+   *    - i.first == *(i.node)    (This points to the node (first Tp element).)
+   *    - i.last  == i.first + node_size
+   *    - i.cur is a pointer in the range [i.first, i.last).  NOTE:
+   *      the implication of this is that i.cur is always a dereferenceable
+   *      pointer, even if i is a past-the-end iterator.
+   * - Start and Finish are always nonsingular iterators.  NOTE: this
+   * means that an empty deque must have one node, a deque with <N
+   * elements (where N is the node buffer size) must have one node, a
+   * deque with N through (2N-1) elements must have two nodes, etc.
+   * - For every node other than start.node and finish.node, every
+   * element in the node is an initialized object.  If start.node ==
+   * finish.node, then [start.cur, finish.cur) are initialized
+   * objects, and the elements outside that range are uninitialized
+   * storage.  Otherwise, [start.cur, start.last) and [finish.first,
+   * finish.cur) are initialized objects, and [start.first, start.cur)
+   * and [finish.cur, finish.last) are uninitialized storage.
+   * - [%map, %map + map_size) is a valid, non-empty range.
+   * - [start.node, finish.node] is a valid range contained within
+   *   [%map, %map + map_size).
+   * - A pointer in the range [%map, %map + map_size) points to an allocated
+   *   node if and only if the pointer is in the range
+   *   [start.node, finish.node].
+   *
+   *  Here's the magic:  nothing in deque is @b aware of the discontiguous
+   *  storage!
+   *
+   *  The memory setup and layout occurs in the parent, _Base, and the iterator
+   *  class is entirely responsible for @a leaping from one node to the next.
+   *  All the implementation routines for deque itself work only through the
+   *  start and finish iterators.  This keeps the routines simple and sane,
+   *  and we can use other standard algorithms as well.
+  */
+  template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+    class deque : protected _Deque_base<_Tp, _Alloc>
+    {
+      // concept requirements
+      typedef typename _Alloc::value_type        _Alloc_value_type;
+      __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+      __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
+
+      typedef _Deque_base<_Tp, _Alloc>           _Base;
+      typedef typename _Base::_Tp_alloc_type	 _Tp_alloc_type;
+
+    public:
+      typedef _Tp                                        value_type;
+      typedef typename _Tp_alloc_type::pointer           pointer;
+      typedef typename _Tp_alloc_type::const_pointer     const_pointer;
+      typedef typename _Tp_alloc_type::reference         reference;
+      typedef typename _Tp_alloc_type::const_reference   const_reference;
+      typedef typename _Base::iterator                   iterator;
+      typedef typename _Base::const_iterator             const_iterator;
+      typedef std::reverse_iterator<const_iterator>      const_reverse_iterator;
+      typedef std::reverse_iterator<iterator>            reverse_iterator;
+      typedef size_t                             size_type;
+      typedef ptrdiff_t                          difference_type;
+      typedef _Alloc                             allocator_type;
+
+    protected:
+      typedef pointer*                           _Map_pointer;
+
+      static size_t _S_buffer_size()
+      { return __deque_buf_size(sizeof(_Tp)); }
+
+      // Functions controlling memory layout, and nothing else.
+      using _Base::_M_initialize_map;
+      using _Base::_M_create_nodes;
+      using _Base::_M_destroy_nodes;
+      using _Base::_M_allocate_node;
+      using _Base::_M_deallocate_node;
+      using _Base::_M_allocate_map;
+      using _Base::_M_deallocate_map;
+      using _Base::_M_get_Tp_allocator;
+
+      /** 
+       *  A total of four data members accumulated down the hierarchy.
+       *  May be accessed via _M_impl.*
+       */
+      using _Base::_M_impl;
+
+    public:
+      // [23.2.1.1] construct/copy/destroy
+      // (assign() and get_allocator() are also listed in this section)
+      /**
+       *  @brief  Default constructor creates no elements.
+       */
+      deque()
+      : _Base() { }
+
+      /**
+       *  @brief  Creates a %deque with no elements.
+       *  @param  a  An allocator object.
+       */
+      explicit
+      deque(const allocator_type& __a)
+      : _Base(__a, 0) { }
+
+      /**
+       *  @brief  Creates a %deque with copies of an exemplar element.
+       *  @param  n  The number of elements to initially create.
+       *  @param  value  An element to copy.
+       *  @param  a  An allocator.
+       *
+       *  This constructor fills the %deque with @a n copies of @a value.
+       */
+      explicit
+      deque(size_type __n, const value_type& __value = value_type(),
+	    const allocator_type& __a = allocator_type())
+      : _Base(__a, __n)
+      { _M_fill_initialize(__value); }
+
+      /**
+       *  @brief  %Deque copy constructor.
+       *  @param  x  A %deque of identical element and allocator types.
+       *
+       *  The newly-created %deque uses a copy of the allocation object used
+       *  by @a x.
+       */
+      deque(const deque& __x)
+      : _Base(__x._M_get_Tp_allocator(), __x.size())
+      { std::__uninitialized_copy_a(__x.begin(), __x.end(), 
+				    this->_M_impl._M_start,
+				    _M_get_Tp_allocator()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %Deque move constructor.
+       *  @param  x  A %deque of identical element and allocator types.
+       *
+       *  The newly-created %deque contains the exact contents of @a x.
+       *  The contents of @a x are a valid, but unspecified %deque.
+       */
+      deque(deque&&  __x)
+      : _Base(std::forward<_Base>(__x)) { }
+
+      /**
+       *  @brief  Builds a %deque from an initializer list.
+       *  @param  l  An initializer_list.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %deque consisting of copies of the elements in the
+       *  initializer_list @a l.
+       *
+       *  This will call the element type's copy constructor N times
+       *  (where N is l.size()) and do no memory reallocation.
+       */
+      deque(initializer_list<value_type> __l,
+	    const allocator_type& __a = allocator_type())
+	: _Base(__a)
+        {
+	  _M_range_initialize(__l.begin(), __l.end(),
+			      random_access_iterator_tag());
+	}
+#endif
+
+      /**
+       *  @brief  Builds a %deque from a range.
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %deque consisting of copies of the elements from [first,
+       *  last).
+       *
+       *  If the iterators are forward, bidirectional, or random-access, then
+       *  this will call the elements' copy constructor N times (where N is
+       *  distance(first,last)) and do no memory reallocation.  But if only
+       *  input iterators are used, then this will do at most 2N calls to the
+       *  copy constructor, and logN memory reallocations.
+       */
+      template<typename _InputIterator>
+        deque(_InputIterator __first, _InputIterator __last,
+	      const allocator_type& __a = allocator_type())
+	: _Base(__a)
+        {
+	  // Check whether it's an integral type.  If so, it's not an iterator.
+	  typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	  _M_initialize_dispatch(__first, __last, _Integral());
+	}
+
+      /**
+       *  The dtor only erases the elements, and note that if the elements
+       *  themselves are pointers, the pointed-to memory is not touched in any
+       *  way.  Managing the pointer is the user's responsibility.
+       */
+      ~deque()
+      { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); }
+
+      /**
+       *  @brief  %Deque assignment operator.
+       *  @param  x  A %deque of identical element and allocator types.
+       *
+       *  All the elements of @a x are copied, but unlike the copy constructor,
+       *  the allocator object is not copied.
+       */
+      deque&
+      operator=(const deque& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %Deque move assignment operator.
+       *  @param  x  A %deque of identical element and allocator types.
+       *
+       *  The contents of @a x are moved into this deque (without copying).
+       *  @a x is a valid, but unspecified %deque.
+       */
+      deque&
+      operator=(deque&& __x)
+      {
+	// NB: DR 1204.
+	// NB: DR 675.
+	this->clear();
+	this->swap(__x);
+	return *this;
+      }
+
+      /**
+       *  @brief  Assigns an initializer list to a %deque.
+       *  @param  l  An initializer_list.
+       *
+       *  This function fills a %deque with copies of the elements in the
+       *  initializer_list @a l.
+       *
+       *  Note that the assignment completely changes the %deque and that the
+       *  resulting %deque's size is the same as the number of elements
+       *  assigned.  Old data may be lost.
+       */
+      deque&
+      operator=(initializer_list<value_type> __l)
+      {
+	this->assign(__l.begin(), __l.end());
+	return *this;
+      }
+#endif
+
+      /**
+       *  @brief  Assigns a given value to a %deque.
+       *  @param  n  Number of elements to be assigned.
+       *  @param  val  Value to be assigned.
+       *
+       *  This function fills a %deque with @a n copies of the given
+       *  value.  Note that the assignment completely changes the
+       *  %deque and that the resulting %deque's size is the same as
+       *  the number of elements assigned.  Old data may be lost.
+       */
+      void
+      assign(size_type __n, const value_type& __val)
+      { _M_fill_assign(__n, __val); }
+
+      /**
+       *  @brief  Assigns a range to a %deque.
+       *  @param  first  An input iterator.
+       *  @param  last   An input iterator.
+       *
+       *  This function fills a %deque with copies of the elements in the
+       *  range [first,last).
+       *
+       *  Note that the assignment completely changes the %deque and that the
+       *  resulting %deque's size is the same as the number of elements
+       *  assigned.  Old data may be lost.
+       */
+      template<typename _InputIterator>
+        void
+        assign(_InputIterator __first, _InputIterator __last)
+        {
+	  typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	  _M_assign_dispatch(__first, __last, _Integral());
+	}
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Assigns an initializer list to a %deque.
+       *  @param  l  An initializer_list.
+       *
+       *  This function fills a %deque with copies of the elements in the
+       *  initializer_list @a l.
+       *
+       *  Note that the assignment completely changes the %deque and that the
+       *  resulting %deque's size is the same as the number of elements
+       *  assigned.  Old data may be lost.
+       */
+      void
+      assign(initializer_list<value_type> __l)
+      { this->assign(__l.begin(), __l.end()); }
+#endif
+
+      /// Get a copy of the memory allocation object.
+      allocator_type
+      get_allocator() const
+      { return _Base::get_allocator(); }
+
+      // iterators
+      /**
+       *  Returns a read/write iterator that points to the first element in the
+       *  %deque.  Iteration is done in ordinary element order.
+       */
+      iterator
+      begin()
+      { return this->_M_impl._M_start; }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %deque.  Iteration is done in ordinary element order.
+       */
+      const_iterator
+      begin() const
+      { return this->_M_impl._M_start; }
+
+      /**
+       *  Returns a read/write iterator that points one past the last
+       *  element in the %deque.  Iteration is done in ordinary
+       *  element order.
+       */
+      iterator
+      end()
+      { return this->_M_impl._M_finish; }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past
+       *  the last element in the %deque.  Iteration is done in
+       *  ordinary element order.
+       */
+      const_iterator
+      end() const
+      { return this->_M_impl._M_finish; }
+
+      /**
+       *  Returns a read/write reverse iterator that points to the
+       *  last element in the %deque.  Iteration is done in reverse
+       *  element order.
+       */
+      reverse_iterator
+      rbegin()
+      { return reverse_iterator(this->_M_impl._M_finish); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to the last element in the %deque.  Iteration is done in
+       *  reverse element order.
+       */
+      const_reverse_iterator
+      rbegin() const
+      { return const_reverse_iterator(this->_M_impl._M_finish); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to one
+       *  before the first element in the %deque.  Iteration is done
+       *  in reverse element order.
+       */
+      reverse_iterator
+      rend()
+      { return reverse_iterator(this->_M_impl._M_start); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to one before the first element in the %deque.  Iteration is
+       *  done in reverse element order.
+       */
+      const_reverse_iterator
+      rend() const
+      { return const_reverse_iterator(this->_M_impl._M_start); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %deque.  Iteration is done in ordinary element order.
+       */
+      const_iterator
+      cbegin() const
+      { return this->_M_impl._M_start; }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past
+       *  the last element in the %deque.  Iteration is done in
+       *  ordinary element order.
+       */
+      const_iterator
+      cend() const
+      { return this->_M_impl._M_finish; }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to the last element in the %deque.  Iteration is done in
+       *  reverse element order.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(this->_M_impl._M_finish); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to one before the first element in the %deque.  Iteration is
+       *  done in reverse element order.
+       */
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(this->_M_impl._M_start); }
+#endif
+
+      // [23.2.1.2] capacity
+      /**  Returns the number of elements in the %deque.  */
+      size_type
+      size() const
+      { return this->_M_impl._M_finish - this->_M_impl._M_start; }
+
+      /**  Returns the size() of the largest possible %deque.  */
+      size_type
+      max_size() const
+      { return _M_get_Tp_allocator().max_size(); }
+
+      /**
+       *  @brief  Resizes the %deque to the specified number of elements.
+       *  @param  new_size  Number of elements the %deque should contain.
+       *  @param  x  Data with which new elements should be populated.
+       *
+       *  This function will %resize the %deque to the specified
+       *  number of elements.  If the number is smaller than the
+       *  %deque's current size the %deque is truncated, otherwise the
+       *  %deque is extended and new elements are populated with given
+       *  data.
+       */
+      void
+      resize(size_type __new_size, value_type __x = value_type())
+      {
+	const size_type __len = size();
+	if (__new_size < __len)
+	  _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size));
+	else
+	  insert(this->_M_impl._M_finish, __new_size - __len, __x);
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**  A non-binding request to reduce memory use.  */
+      void
+      shrink_to_fit()
+      { std::__shrink_to_fit<deque>::_S_do_it(*this); }
+#endif
+
+      /**
+       *  Returns true if the %deque is empty.  (Thus begin() would
+       *  equal end().)
+       */
+      bool
+      empty() const
+      { return this->_M_impl._M_finish == this->_M_impl._M_start; }
+
+      // element access
+      /**
+       *  @brief Subscript access to the data contained in the %deque.
+       *  @param n The index of the element for which data should be
+       *  accessed.
+       *  @return  Read/write reference to data.
+       *
+       *  This operator allows for easy, array-style, data access.
+       *  Note that data access with this operator is unchecked and
+       *  out_of_range lookups are not defined. (For checked lookups
+       *  see at().)
+       */
+      reference
+      operator[](size_type __n)
+      { return this->_M_impl._M_start[difference_type(__n)]; }
+
+      /**
+       *  @brief Subscript access to the data contained in the %deque.
+       *  @param n The index of the element for which data should be
+       *  accessed.
+       *  @return  Read-only (constant) reference to data.
+       *
+       *  This operator allows for easy, array-style, data access.
+       *  Note that data access with this operator is unchecked and
+       *  out_of_range lookups are not defined. (For checked lookups
+       *  see at().)
+       */
+      const_reference
+      operator[](size_type __n) const
+      { return this->_M_impl._M_start[difference_type(__n)]; }
+
+    protected:
+      /// Safety check used only from at().
+      void
+      _M_range_check(size_type __n) const
+      {
+	if (__n >= this->size())
+	  __throw_out_of_range(__N("deque::_M_range_check"));
+      }
+
+    public:
+      /**
+       *  @brief  Provides access to the data contained in the %deque.
+       *  @param n The index of the element for which data should be
+       *  accessed.
+       *  @return  Read/write reference to data.
+       *  @throw  std::out_of_range  If @a n is an invalid index.
+       *
+       *  This function provides for safer data access.  The parameter
+       *  is first checked that it is in the range of the deque.  The
+       *  function throws out_of_range if the check fails.
+       */
+      reference
+      at(size_type __n)
+      {
+	_M_range_check(__n);
+	return (*this)[__n];
+      }
+
+      /**
+       *  @brief  Provides access to the data contained in the %deque.
+       *  @param n The index of the element for which data should be
+       *  accessed.
+       *  @return  Read-only (constant) reference to data.
+       *  @throw  std::out_of_range  If @a n is an invalid index.
+       *
+       *  This function provides for safer data access.  The parameter is first
+       *  checked that it is in the range of the deque.  The function throws
+       *  out_of_range if the check fails.
+       */
+      const_reference
+      at(size_type __n) const
+      {
+	_M_range_check(__n);
+	return (*this)[__n];
+      }
+
+      /**
+       *  Returns a read/write reference to the data at the first
+       *  element of the %deque.
+       */
+      reference
+      front()
+      { return *begin(); }
+
+      /**
+       *  Returns a read-only (constant) reference to the data at the first
+       *  element of the %deque.
+       */
+      const_reference
+      front() const
+      { return *begin(); }
+
+      /**
+       *  Returns a read/write reference to the data at the last element of the
+       *  %deque.
+       */
+      reference
+      back()
+      {
+	iterator __tmp = end();
+	--__tmp;
+	return *__tmp;
+      }
+
+      /**
+       *  Returns a read-only (constant) reference to the data at the last
+       *  element of the %deque.
+       */
+      const_reference
+      back() const
+      {
+	const_iterator __tmp = end();
+	--__tmp;
+	return *__tmp;
+      }
+
+      // [23.2.1.2] modifiers
+      /**
+       *  @brief  Add data to the front of the %deque.
+       *  @param  x  Data to be added.
+       *
+       *  This is a typical stack operation.  The function creates an
+       *  element at the front of the %deque and assigns the given
+       *  data to it.  Due to the nature of a %deque this operation
+       *  can be done in constant time.
+       */
+      void
+      push_front(const value_type& __x)
+      {
+	if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
+	  {
+	    this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, __x);
+	    --this->_M_impl._M_start._M_cur;
+	  }
+	else
+	  _M_push_front_aux(__x);
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_front(value_type&& __x)
+      { emplace_front(std::move(__x)); }
+
+      template<typename... _Args>
+        void
+        emplace_front(_Args&&... __args);
+#endif
+
+      /**
+       *  @brief  Add data to the end of the %deque.
+       *  @param  x  Data to be added.
+       *
+       *  This is a typical stack operation.  The function creates an
+       *  element at the end of the %deque and assigns the given data
+       *  to it.  Due to the nature of a %deque this operation can be
+       *  done in constant time.
+       */
+      void
+      push_back(const value_type& __x)
+      {
+	if (this->_M_impl._M_finish._M_cur
+	    != this->_M_impl._M_finish._M_last - 1)
+	  {
+	    this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __x);
+	    ++this->_M_impl._M_finish._M_cur;
+	  }
+	else
+	  _M_push_back_aux(__x);
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_back(value_type&& __x)
+      { emplace_back(std::move(__x)); }
+
+      template<typename... _Args>
+        void
+        emplace_back(_Args&&... __args);
+#endif
+
+      /**
+       *  @brief  Removes first element.
+       *
+       *  This is a typical stack operation.  It shrinks the %deque by one.
+       *
+       *  Note that no data is returned, and if the first element's data is
+       *  needed, it should be retrieved before pop_front() is called.
+       */
+      void
+      pop_front()
+      {
+	if (this->_M_impl._M_start._M_cur
+	    != this->_M_impl._M_start._M_last - 1)
+	  {
+	    this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
+	    ++this->_M_impl._M_start._M_cur;
+	  }
+	else
+	  _M_pop_front_aux();
+      }
+
+      /**
+       *  @brief  Removes last element.
+       *
+       *  This is a typical stack operation.  It shrinks the %deque by one.
+       *
+       *  Note that no data is returned, and if the last element's data is
+       *  needed, it should be retrieved before pop_back() is called.
+       */
+      void
+      pop_back()
+      {
+	if (this->_M_impl._M_finish._M_cur
+	    != this->_M_impl._M_finish._M_first)
+	  {
+	    --this->_M_impl._M_finish._M_cur;
+	    this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
+	  }
+	else
+	  _M_pop_back_aux();
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Inserts an object in %deque before specified iterator.
+       *  @param  position  An iterator into the %deque.
+       *  @param  args  Arguments.
+       *  @return  An iterator that points to the inserted data.
+       *
+       *  This function will insert an object of type T constructed
+       *  with T(std::forward<Args>(args)...) before the specified location.
+       */
+      template<typename... _Args>
+        iterator
+        emplace(iterator __position, _Args&&... __args);
+#endif
+
+      /**
+       *  @brief  Inserts given value into %deque before specified iterator.
+       *  @param  position  An iterator into the %deque.
+       *  @param  x  Data to be inserted.
+       *  @return  An iterator that points to the inserted data.
+       *
+       *  This function will insert a copy of the given value before the
+       *  specified location.
+       */
+      iterator
+      insert(iterator __position, const value_type& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Inserts given rvalue into %deque before specified iterator.
+       *  @param  position  An iterator into the %deque.
+       *  @param  x  Data to be inserted.
+       *  @return  An iterator that points to the inserted data.
+       *
+       *  This function will insert a copy of the given rvalue before the
+       *  specified location.
+       */
+      iterator
+      insert(iterator __position, value_type&& __x)
+      { return emplace(__position, std::move(__x)); }
+
+      /**
+       *  @brief  Inserts an initializer list into the %deque.
+       *  @param  p  An iterator into the %deque.
+       *  @param  l  An initializer_list.
+       *
+       *  This function will insert copies of the data in the
+       *  initializer_list @a l into the %deque before the location
+       *  specified by @a p.  This is known as <em>list insert</em>.
+       */
+      void
+      insert(iterator __p, initializer_list<value_type> __l)
+      { this->insert(__p, __l.begin(), __l.end()); }
+#endif
+
+      /**
+       *  @brief  Inserts a number of copies of given data into the %deque.
+       *  @param  position  An iterator into the %deque.
+       *  @param  n  Number of elements to be inserted.
+       *  @param  x  Data to be inserted.
+       *
+       *  This function will insert a specified number of copies of the given
+       *  data before the location specified by @a position.
+       */
+      void
+      insert(iterator __position, size_type __n, const value_type& __x)
+      { _M_fill_insert(__position, __n, __x); }
+
+      /**
+       *  @brief  Inserts a range into the %deque.
+       *  @param  position  An iterator into the %deque.
+       *  @param  first  An input iterator.
+       *  @param  last   An input iterator.
+       *
+       *  This function will insert copies of the data in the range
+       *  [first,last) into the %deque before the location specified
+       *  by @a pos.  This is known as <em>range insert</em>.
+       */
+      template<typename _InputIterator>
+        void
+        insert(iterator __position, _InputIterator __first,
+	       _InputIterator __last)
+        {
+	  // Check whether it's an integral type.  If so, it's not an iterator.
+	  typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	  _M_insert_dispatch(__position, __first, __last, _Integral());
+	}
+
+      /**
+       *  @brief  Remove element at given position.
+       *  @param  position  Iterator pointing to element to be erased.
+       *  @return  An iterator pointing to the next element (or end()).
+       *
+       *  This function will erase the element at the given position and thus
+       *  shorten the %deque by one.
+       *
+       *  The user is cautioned that
+       *  this function only erases the element, and that if the element is
+       *  itself a pointer, the pointed-to memory is not touched in any way.
+       *  Managing the pointer is the user's responsibility.
+       */
+      iterator
+      erase(iterator __position);
+
+      /**
+       *  @brief  Remove a range of elements.
+       *  @param  first  Iterator pointing to the first element to be erased.
+       *  @param  last  Iterator pointing to one past the last element to be
+       *                erased.
+       *  @return  An iterator pointing to the element pointed to by @a last
+       *           prior to erasing (or end()).
+       *
+       *  This function will erase the elements in the range [first,last) and
+       *  shorten the %deque accordingly.
+       *
+       *  The user is cautioned that
+       *  this function only erases the elements, and that if the elements
+       *  themselves are pointers, the pointed-to memory is not touched in any
+       *  way.  Managing the pointer is the user's responsibility.
+       */
+      iterator
+      erase(iterator __first, iterator __last);
+
+      /**
+       *  @brief  Swaps data with another %deque.
+       *  @param  x  A %deque of the same element and allocator types.
+       *
+       *  This exchanges the elements between two deques in constant time.
+       *  (Four pointers, so it should be quite fast.)
+       *  Note that the global std::swap() function is specialized such that
+       *  std::swap(d1,d2) will feed to this function.
+       */
+      void
+      swap(deque& __x)
+      {
+	std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+	std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+	std::swap(this->_M_impl._M_map, __x._M_impl._M_map);
+	std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size);
+
+	// _GLIBCXX_RESOLVE_LIB_DEFECTS
+	// 431. Swapping containers with unequal allocators.
+	std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
+						    __x._M_get_Tp_allocator());
+      }
+
+      /**
+       *  Erases all the elements.  Note that this function only erases the
+       *  elements, and that if the elements themselves are pointers, the
+       *  pointed-to memory is not touched in any way.  Managing the pointer is
+       *  the user's responsibility.
+       */
+      void
+      clear()
+      { _M_erase_at_end(begin()); }
+
+    protected:
+      // Internal constructor functions follow.
+
+      // called by the range constructor to implement [23.1.1]/9
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 438. Ambiguity in the "do the right thing" clause
+      template<typename _Integer>
+        void
+        _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+        {
+	  _M_initialize_map(static_cast<size_type>(__n));
+	  _M_fill_initialize(__x);
+	}
+
+      // called by the range constructor to implement [23.1.1]/9
+      template<typename _InputIterator>
+        void
+        _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+			       __false_type)
+        {
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
+	  _M_range_initialize(__first, __last, _IterCategory());
+	}
+
+      // called by the second initialize_dispatch above
+      //@{
+      /**
+       *  @brief Fills the deque with whatever is in [first,last).
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *  @return   Nothing.
+       *
+       *  If the iterators are actually forward iterators (or better), then the
+       *  memory layout can be done all at once.  Else we move forward using
+       *  push_back on each value from the iterator.
+       */
+      template<typename _InputIterator>
+        void
+        _M_range_initialize(_InputIterator __first, _InputIterator __last,
+			    std::input_iterator_tag);
+
+      // called by the second initialize_dispatch above
+      template<typename _ForwardIterator>
+        void
+        _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+			    std::forward_iterator_tag);
+      //@}
+
+      /**
+       *  @brief Fills the %deque with copies of value.
+       *  @param  value  Initial value.
+       *  @return   Nothing.
+       *  @pre _M_start and _M_finish have already been initialized,
+       *  but none of the %deque's elements have yet been constructed.
+       *
+       *  This function is called only when the user provides an explicit size
+       *  (with or without an explicit exemplar value).
+       */
+      void
+      _M_fill_initialize(const value_type& __value);
+
+      // Internal assign functions follow.  The *_aux functions do the actual
+      // assignment work for the range versions.
+
+      // called by the range assign to implement [23.1.1]/9
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 438. Ambiguity in the "do the right thing" clause
+      template<typename _Integer>
+        void
+        _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+        { _M_fill_assign(__n, __val); }
+
+      // called by the range assign to implement [23.1.1]/9
+      template<typename _InputIterator>
+        void
+        _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+			   __false_type)
+        {
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
+	  _M_assign_aux(__first, __last, _IterCategory());
+	}
+
+      // called by the second assign_dispatch above
+      template<typename _InputIterator>
+        void
+        _M_assign_aux(_InputIterator __first, _InputIterator __last,
+		      std::input_iterator_tag);
+
+      // called by the second assign_dispatch above
+      template<typename _ForwardIterator>
+        void
+        _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+		      std::forward_iterator_tag)
+        {
+	  const size_type __len = std::distance(__first, __last);
+	  if (__len > size())
+	    {
+	      _ForwardIterator __mid = __first;
+	      std::advance(__mid, size());
+	      std::copy(__first, __mid, begin());
+	      insert(end(), __mid, __last);
+	    }
+	  else
+	    _M_erase_at_end(std::copy(__first, __last, begin()));
+	}
+
+      // Called by assign(n,t), and the range assign when it turns out
+      // to be the same thing.
+      void
+      _M_fill_assign(size_type __n, const value_type& __val)
+      {
+	if (__n > size())
+	  {
+	    std::fill(begin(), end(), __val);
+	    insert(end(), __n - size(), __val);
+	  }
+	else
+	  {
+	    _M_erase_at_end(begin() + difference_type(__n));
+	    std::fill(begin(), end(), __val);
+	  }
+      }
+
+      //@{
+      /// Helper functions for push_* and pop_*.
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+      void _M_push_back_aux(const value_type&);
+
+      void _M_push_front_aux(const value_type&);
+#else
+      template<typename... _Args>
+        void _M_push_back_aux(_Args&&... __args);
+
+      template<typename... _Args>
+        void _M_push_front_aux(_Args&&... __args);
+#endif
+
+      void _M_pop_back_aux();
+
+      void _M_pop_front_aux();
+      //@}
+
+      // Internal insert functions follow.  The *_aux functions do the actual
+      // insertion work when all shortcuts fail.
+
+      // called by the range insert to implement [23.1.1]/9
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 438. Ambiguity in the "do the right thing" clause
+      template<typename _Integer>
+        void
+        _M_insert_dispatch(iterator __pos,
+			   _Integer __n, _Integer __x, __true_type)
+        { _M_fill_insert(__pos, __n, __x); }
+
+      // called by the range insert to implement [23.1.1]/9
+      template<typename _InputIterator>
+        void
+        _M_insert_dispatch(iterator __pos,
+			   _InputIterator __first, _InputIterator __last,
+			   __false_type)
+        {
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
+          _M_range_insert_aux(__pos, __first, __last, _IterCategory());
+	}
+
+      // called by the second insert_dispatch above
+      template<typename _InputIterator>
+        void
+        _M_range_insert_aux(iterator __pos, _InputIterator __first,
+			    _InputIterator __last, std::input_iterator_tag);
+
+      // called by the second insert_dispatch above
+      template<typename _ForwardIterator>
+        void
+        _M_range_insert_aux(iterator __pos, _ForwardIterator __first,
+			    _ForwardIterator __last, std::forward_iterator_tag);
+
+      // Called by insert(p,n,x), and the range insert when it turns out to be
+      // the same thing.  Can use fill functions in optimal situations,
+      // otherwise passes off to insert_aux(p,n,x).
+      void
+      _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
+
+      // called by insert(p,x)
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+      iterator
+      _M_insert_aux(iterator __pos, const value_type& __x);
+#else
+      template<typename... _Args>
+        iterator
+        _M_insert_aux(iterator __pos, _Args&&... __args);
+#endif
+
+      // called by insert(p,n,x) via fill_insert
+      void
+      _M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
+
+      // called by range_insert_aux for forward iterators
+      template<typename _ForwardIterator>
+        void
+        _M_insert_aux(iterator __pos,
+		      _ForwardIterator __first, _ForwardIterator __last,
+		      size_type __n);
+
+
+      // Internal erase functions follow.
+
+      void
+      _M_destroy_data_aux(iterator __first, iterator __last);
+
+      // Called by ~deque().
+      // NB: Doesn't deallocate the nodes.
+      template<typename _Alloc1>
+        void
+        _M_destroy_data(iterator __first, iterator __last, const _Alloc1&)
+        { _M_destroy_data_aux(__first, __last); }
+
+      void
+      _M_destroy_data(iterator __first, iterator __last,
+		      const std::allocator<_Tp>&)
+      {
+	if (!__has_trivial_destructor(value_type))
+	  _M_destroy_data_aux(__first, __last);
+      }
+
+      // Called by erase(q1, q2).
+      void
+      _M_erase_at_begin(iterator __pos)
+      {
+	_M_destroy_data(begin(), __pos, _M_get_Tp_allocator());
+	_M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node);
+	this->_M_impl._M_start = __pos;
+      }
+
+      // Called by erase(q1, q2), resize(), clear(), _M_assign_aux,
+      // _M_fill_assign, operator=.
+      void
+      _M_erase_at_end(iterator __pos)
+      {
+	_M_destroy_data(__pos, end(), _M_get_Tp_allocator());
+	_M_destroy_nodes(__pos._M_node + 1,
+			 this->_M_impl._M_finish._M_node + 1);
+	this->_M_impl._M_finish = __pos;
+      }
+
+      //@{
+      /// Memory-handling helpers for the previous internal insert functions.
+      iterator
+      _M_reserve_elements_at_front(size_type __n)
+      {
+	const size_type __vacancies = this->_M_impl._M_start._M_cur
+	                              - this->_M_impl._M_start._M_first;
+	if (__n > __vacancies)
+	  _M_new_elements_at_front(__n - __vacancies);
+	return this->_M_impl._M_start - difference_type(__n);
+      }
+
+      iterator
+      _M_reserve_elements_at_back(size_type __n)
+      {
+	const size_type __vacancies = (this->_M_impl._M_finish._M_last
+				       - this->_M_impl._M_finish._M_cur) - 1;
+	if (__n > __vacancies)
+	  _M_new_elements_at_back(__n - __vacancies);
+	return this->_M_impl._M_finish + difference_type(__n);
+      }
+
+      void
+      _M_new_elements_at_front(size_type __new_elements);
+
+      void
+      _M_new_elements_at_back(size_type __new_elements);
+      //@}
+
+
+      //@{
+      /**
+       *  @brief Memory-handling helpers for the major %map.
+       *
+       *  Makes sure the _M_map has space for new nodes.  Does not
+       *  actually add the nodes.  Can invalidate _M_map pointers.
+       *  (And consequently, %deque iterators.)
+       */
+      void
+      _M_reserve_map_at_back(size_type __nodes_to_add = 1)
+      {
+	if (__nodes_to_add + 1 > this->_M_impl._M_map_size
+	    - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map))
+	  _M_reallocate_map(__nodes_to_add, false);
+      }
+
+      void
+      _M_reserve_map_at_front(size_type __nodes_to_add = 1)
+      {
+	if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node
+				       - this->_M_impl._M_map))
+	  _M_reallocate_map(__nodes_to_add, true);
+      }
+
+      void
+      _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
+      //@}
+    };
+
+
+  /**
+   *  @brief  Deque equality comparison.
+   *  @param  x  A %deque.
+   *  @param  y  A %deque of the same type as @a x.
+   *  @return  True iff the size and elements of the deques are equal.
+   *
+   *  This is an equivalence relation.  It is linear in the size of the
+   *  deques.  Deques are considered equivalent if their sizes are equal,
+   *  and if corresponding elements compare equal.
+  */
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator==(const deque<_Tp, _Alloc>& __x,
+                         const deque<_Tp, _Alloc>& __y)
+    { return __x.size() == __y.size()
+             && std::equal(__x.begin(), __x.end(), __y.begin()); }
+
+  /**
+   *  @brief  Deque ordering relation.
+   *  @param  x  A %deque.
+   *  @param  y  A %deque of the same type as @a x.
+   *  @return  True iff @a x is lexicographically less than @a y.
+   *
+   *  This is a total ordering relation.  It is linear in the size of the
+   *  deques.  The elements must be comparable with @c <.
+   *
+   *  See std::lexicographical_compare() for how the determination is made.
+  */
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator<(const deque<_Tp, _Alloc>& __x,
+	      const deque<_Tp, _Alloc>& __y)
+    { return std::lexicographical_compare(__x.begin(), __x.end(),
+					  __y.begin(), __y.end()); }
+
+  /// Based on operator==
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator!=(const deque<_Tp, _Alloc>& __x,
+	       const deque<_Tp, _Alloc>& __y)
+    { return !(__x == __y); }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator>(const deque<_Tp, _Alloc>& __x,
+	      const deque<_Tp, _Alloc>& __y)
+    { return __y < __x; }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator<=(const deque<_Tp, _Alloc>& __x,
+	       const deque<_Tp, _Alloc>& __y)
+    { return !(__y < __x); }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator>=(const deque<_Tp, _Alloc>& __x,
+	       const deque<_Tp, _Alloc>& __y)
+    { return !(__x < __y); }
+
+  /// See std::deque::swap().
+  template<typename _Tp, typename _Alloc>
+    inline void
+    swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
+    { __x.swap(__y); }
+
+#undef _GLIBCXX_DEQUE_BUF_SIZE
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_DEQUE_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_function.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_function.h
new file mode 100644
index 0000000..fd9c358
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_function.h
@@ -0,0 +1,715 @@
+// Functor implementations -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_function.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_FUNCTION_H
+#define _STL_FUNCTION_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  // 20.3.1 base classes
+  /** @defgroup functors Function Objects
+   * @ingroup utilities
+   *
+   *  Function objects, or @e functors, are objects with an @c operator()
+   *  defined and accessible.  They can be passed as arguments to algorithm
+   *  templates and used in place of a function pointer.  Not only is the
+   *  resulting expressiveness of the library increased, but the generated
+   *  code can be more efficient than what you might write by hand.  When we
+   *  refer to @a functors, then, generally we include function pointers in
+   *  the description as well.
+   *
+   *  Often, functors are only created as temporaries passed to algorithm
+   *  calls, rather than being created as named variables.
+   *
+   *  Two examples taken from the standard itself follow.  To perform a
+   *  by-element addition of two vectors @c a and @c b containing @c double,
+   *  and put the result in @c a, use
+   *  \code
+   *  transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>());
+   *  \endcode
+   *  To negate every element in @c a, use
+   *  \code
+   *  transform(a.begin(), a.end(), a.begin(), negate<double>());
+   *  \endcode
+   *  The addition and negation functions will be inlined directly.
+   *
+   *  The standard functors are derived from structs named @c unary_function
+   *  and @c binary_function.  These two classes contain nothing but typedefs,
+   *  to aid in generic (template) programming.  If you write your own
+   *  functors, you might consider doing the same.
+   *
+   *  @{
+   */
+  /**
+   *  This is one of the @link functors functor base classes@endlink.
+   */
+  template<typename _Arg, typename _Result>
+    struct unary_function
+    {
+      typedef _Arg argument_type;   ///< @c argument_type is the type of the
+                                    ///     argument (no surprises here)
+
+      typedef _Result result_type;  ///< @c result_type is the return type
+    };
+
+  /**
+   *  This is one of the @link functors functor base classes@endlink.
+   */
+  template<typename _Arg1, typename _Arg2, typename _Result>
+    struct binary_function
+    {
+      typedef _Arg1 first_argument_type;   ///< the type of the first argument
+                                           ///  (no surprises here)
+
+      typedef _Arg2 second_argument_type;  ///< the type of the second argument
+      typedef _Result result_type;         ///< type of the return type
+    };
+  /** @}  */
+
+  // 20.3.2 arithmetic
+  /** @defgroup arithmetic_functors Arithmetic Classes
+   * @ingroup functors
+   *
+   *  Because basic math often needs to be done during an algorithm,
+   *  the library provides functors for those operations.  See the
+   *  documentation for @link functors the base classes@endlink
+   *  for examples of their use.
+   *
+   *  @{
+   */
+  /// One of the @link arithmetic_functors math functors@endlink.
+  template<typename _Tp>
+    struct plus : public binary_function<_Tp, _Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x + __y; }
+    };
+
+  /// One of the @link arithmetic_functors math functors@endlink.
+  template<typename _Tp>
+    struct minus : public binary_function<_Tp, _Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x - __y; }
+    };
+
+  /// One of the @link arithmetic_functors math functors@endlink.
+  template<typename _Tp>
+    struct multiplies : public binary_function<_Tp, _Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x * __y; }
+    };
+
+  /// One of the @link arithmetic_functors math functors@endlink.
+  template<typename _Tp>
+    struct divides : public binary_function<_Tp, _Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x / __y; }
+    };
+
+  /// One of the @link arithmetic_functors math functors@endlink.
+  template<typename _Tp>
+    struct modulus : public binary_function<_Tp, _Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x % __y; }
+    };
+
+  /// One of the @link arithmetic_functors math functors@endlink.
+  template<typename _Tp>
+    struct negate : public unary_function<_Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x) const
+      { return -__x; }
+    };
+  /** @}  */
+
+  // 20.3.3 comparisons
+  /** @defgroup comparison_functors Comparison Classes
+   * @ingroup functors
+   *
+   *  The library provides six wrapper functors for all the basic comparisons
+   *  in C++, like @c <.
+   *
+   *  @{
+   */
+  /// One of the @link comparison_functors comparison functors@endlink.
+  template<typename _Tp>
+    struct equal_to : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x == __y; }
+    };
+
+  /// One of the @link comparison_functors comparison functors@endlink.
+  template<typename _Tp>
+    struct not_equal_to : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x != __y; }
+    };
+
+  /// One of the @link comparison_functors comparison functors@endlink.
+  template<typename _Tp>
+    struct greater : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x > __y; }
+    };
+
+  /// One of the @link comparison_functors comparison functors@endlink.
+  template<typename _Tp>
+    struct less : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x < __y; }
+    };
+
+  /// One of the @link comparison_functors comparison functors@endlink.
+  template<typename _Tp>
+    struct greater_equal : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x >= __y; }
+    };
+
+  /// One of the @link comparison_functors comparison functors@endlink.
+  template<typename _Tp>
+    struct less_equal : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x <= __y; }
+    };
+  /** @}  */
+
+  // 20.3.4 logical operations
+  /** @defgroup logical_functors Boolean Operations Classes
+   * @ingroup functors
+   *
+   *  Here are wrapper functors for Boolean operations: @c &&, @c ||,
+   *  and @c !.
+   *
+   *  @{
+   */
+  /// One of the @link logical_functors Boolean operations functors@endlink.
+  template<typename _Tp>
+    struct logical_and : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x && __y; }
+    };
+
+  /// One of the @link logical_functors Boolean operations functors@endlink.
+  template<typename _Tp>
+    struct logical_or : public binary_function<_Tp, _Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x || __y; }
+    };
+
+  /// One of the @link logical_functors Boolean operations functors@endlink.
+  template<typename _Tp>
+    struct logical_not : public unary_function<_Tp, bool>
+    {
+      bool
+      operator()(const _Tp& __x) const
+      { return !__x; }
+    };
+  /** @}  */
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // DR 660. Missing Bitwise Operations.
+  template<typename _Tp>
+    struct bit_and : public binary_function<_Tp, _Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x & __y; }
+    };
+
+  template<typename _Tp>
+    struct bit_or : public binary_function<_Tp, _Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x | __y; }
+    };
+
+  template<typename _Tp>
+    struct bit_xor : public binary_function<_Tp, _Tp, _Tp>
+    {
+      _Tp
+      operator()(const _Tp& __x, const _Tp& __y) const
+      { return __x ^ __y; }
+    };
+
+  // 20.3.5 negators
+  /** @defgroup negators Negators
+   * @ingroup functors
+   *
+   *  The functions @c not1 and @c not2 each take a predicate functor
+   *  and return an instance of @c unary_negate or
+   *  @c binary_negate, respectively.  These classes are functors whose
+   *  @c operator() performs the stored predicate function and then returns
+   *  the negation of the result.
+   *
+   *  For example, given a vector of integers and a trivial predicate,
+   *  \code
+   *  struct IntGreaterThanThree
+   *    : public std::unary_function<int, bool>
+   *  {
+   *      bool operator() (int x) { return x > 3; }
+   *  };
+   *
+   *  std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
+   *  \endcode
+   *  The call to @c find_if will locate the first index (i) of @c v for which
+   *  <code>!(v[i] > 3)</code> is true.
+   *
+   *  The not1/unary_negate combination works on predicates taking a single
+   *  argument.  The not2/binary_negate combination works on predicates which
+   *  take two arguments.
+   *
+   *  @{
+   */
+  /// One of the @link negators negation functors@endlink.
+  template<typename _Predicate>
+    class unary_negate
+    : public unary_function<typename _Predicate::argument_type, bool>
+    {
+    protected:
+      _Predicate _M_pred;
+
+    public:
+      explicit
+      unary_negate(const _Predicate& __x) : _M_pred(__x) { }
+
+      bool
+      operator()(const typename _Predicate::argument_type& __x) const
+      { return !_M_pred(__x); }
+    };
+
+  /// One of the @link negators negation functors@endlink.
+  template<typename _Predicate>
+    inline unary_negate<_Predicate>
+    not1(const _Predicate& __pred)
+    { return unary_negate<_Predicate>(__pred); }
+
+  /// One of the @link negators negation functors@endlink.
+  template<typename _Predicate>
+    class binary_negate
+    : public binary_function<typename _Predicate::first_argument_type,
+			     typename _Predicate::second_argument_type, bool>
+    {
+    protected:
+      _Predicate _M_pred;
+
+    public:
+      explicit
+      binary_negate(const _Predicate& __x) : _M_pred(__x) { }
+
+      bool
+      operator()(const typename _Predicate::first_argument_type& __x,
+		 const typename _Predicate::second_argument_type& __y) const
+      { return !_M_pred(__x, __y); }
+    };
+
+  /// One of the @link negators negation functors@endlink.
+  template<typename _Predicate>
+    inline binary_negate<_Predicate>
+    not2(const _Predicate& __pred)
+    { return binary_negate<_Predicate>(__pred); }
+  /** @}  */
+
+  // 20.3.7 adaptors pointers functions
+  /** @defgroup pointer_adaptors Adaptors for pointers to functions
+   * @ingroup functors
+   *
+   *  The advantage of function objects over pointers to functions is that
+   *  the objects in the standard library declare nested typedefs describing
+   *  their argument and result types with uniform names (e.g., @c result_type
+   *  from the base classes @c unary_function and @c binary_function).
+   *  Sometimes those typedefs are required, not just optional.
+   *
+   *  Adaptors are provided to turn pointers to unary (single-argument) and
+   *  binary (double-argument) functions into function objects.  The
+   *  long-winded functor @c pointer_to_unary_function is constructed with a
+   *  function pointer @c f, and its @c operator() called with argument @c x
+   *  returns @c f(x).  The functor @c pointer_to_binary_function does the same
+   *  thing, but with a double-argument @c f and @c operator().
+   *
+   *  The function @c ptr_fun takes a pointer-to-function @c f and constructs
+   *  an instance of the appropriate functor.
+   *
+   *  @{
+   */
+  /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
+  template<typename _Arg, typename _Result>
+    class pointer_to_unary_function : public unary_function<_Arg, _Result>
+    {
+    protected:
+      _Result (*_M_ptr)(_Arg);
+
+    public:
+      pointer_to_unary_function() { }
+
+      explicit
+      pointer_to_unary_function(_Result (*__x)(_Arg))
+      : _M_ptr(__x) { }
+
+      _Result
+      operator()(_Arg __x) const
+      { return _M_ptr(__x); }
+    };
+
+  /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
+  template<typename _Arg, typename _Result>
+    inline pointer_to_unary_function<_Arg, _Result>
+    ptr_fun(_Result (*__x)(_Arg))
+    { return pointer_to_unary_function<_Arg, _Result>(__x); }
+
+  /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
+  template<typename _Arg1, typename _Arg2, typename _Result>
+    class pointer_to_binary_function
+    : public binary_function<_Arg1, _Arg2, _Result>
+    {
+    protected:
+      _Result (*_M_ptr)(_Arg1, _Arg2);
+
+    public:
+      pointer_to_binary_function() { }
+
+      explicit
+      pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
+      : _M_ptr(__x) { }
+
+      _Result
+      operator()(_Arg1 __x, _Arg2 __y) const
+      { return _M_ptr(__x, __y); }
+    };
+
+  /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
+  template<typename _Arg1, typename _Arg2, typename _Result>
+    inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
+    ptr_fun(_Result (*__x)(_Arg1, _Arg2))
+    { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
+  /** @}  */
+
+  template<typename _Tp>
+    struct _Identity : public unary_function<_Tp,_Tp>
+    {
+      _Tp&
+      operator()(_Tp& __x) const
+      { return __x; }
+
+      const _Tp&
+      operator()(const _Tp& __x) const
+      { return __x; }
+    };
+
+  template<typename _Pair>
+    struct _Select1st : public unary_function<_Pair,
+					      typename _Pair::first_type>
+    {
+      typename _Pair::first_type&
+      operator()(_Pair& __x) const
+      { return __x.first; }
+
+      const typename _Pair::first_type&
+      operator()(const _Pair& __x) const
+      { return __x.first; }
+    };
+
+  template<typename _Pair>
+    struct _Select2nd : public unary_function<_Pair,
+					      typename _Pair::second_type>
+    {
+      typename _Pair::second_type&
+      operator()(_Pair& __x) const
+      { return __x.second; }
+
+      const typename _Pair::second_type&
+      operator()(const _Pair& __x) const
+      { return __x.second; }
+    };
+
+  // 20.3.8 adaptors pointers members
+  /** @defgroup memory_adaptors Adaptors for pointers to members
+   * @ingroup functors
+   *
+   *  There are a total of 8 = 2^3 function objects in this family.
+   *   (1) Member functions taking no arguments vs member functions taking
+   *        one argument.
+   *   (2) Call through pointer vs call through reference.
+   *   (3) Const vs non-const member function.
+   *
+   *  All of this complexity is in the function objects themselves.  You can
+   *   ignore it by using the helper function mem_fun and mem_fun_ref,
+   *   which create whichever type of adaptor is appropriate.
+   *
+   *  @{
+   */
+  /// One of the @link memory_adaptors adaptors for member
+  /// pointers@endlink.
+  template<typename _Ret, typename _Tp>
+    class mem_fun_t : public unary_function<_Tp*, _Ret>
+    {
+    public:
+      explicit
+      mem_fun_t(_Ret (_Tp::*__pf)())
+      : _M_f(__pf) { }
+
+      _Ret
+      operator()(_Tp* __p) const
+      { return (__p->*_M_f)(); }
+
+    private:
+      _Ret (_Tp::*_M_f)();
+    };
+
+  /// One of the @link memory_adaptors adaptors for member
+  /// pointers@endlink.
+  template<typename _Ret, typename _Tp>
+    class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
+    {
+    public:
+      explicit
+      const_mem_fun_t(_Ret (_Tp::*__pf)() const)
+      : _M_f(__pf) { }
+
+      _Ret
+      operator()(const _Tp* __p) const
+      { return (__p->*_M_f)(); }
+
+    private:
+      _Ret (_Tp::*_M_f)() const;
+    };
+
+  /// One of the @link memory_adaptors adaptors for member
+  /// pointers@endlink.
+  template<typename _Ret, typename _Tp>
+    class mem_fun_ref_t : public unary_function<_Tp, _Ret>
+    {
+    public:
+      explicit
+      mem_fun_ref_t(_Ret (_Tp::*__pf)())
+      : _M_f(__pf) { }
+
+      _Ret
+      operator()(_Tp& __r) const
+      { return (__r.*_M_f)(); }
+
+    private:
+      _Ret (_Tp::*_M_f)();
+  };
+
+  /// One of the @link memory_adaptors adaptors for member
+  /// pointers@endlink.
+  template<typename _Ret, typename _Tp>
+    class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
+    {
+    public:
+      explicit
+      const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
+      : _M_f(__pf) { }
+
+      _Ret
+      operator()(const _Tp& __r) const
+      { return (__r.*_M_f)(); }
+
+    private:
+      _Ret (_Tp::*_M_f)() const;
+    };
+
+  /// One of the @link memory_adaptors adaptors for member
+  /// pointers@endlink.
+  template<typename _Ret, typename _Tp, typename _Arg>
+    class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
+    {
+    public:
+      explicit
+      mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
+      : _M_f(__pf) { }
+
+      _Ret
+      operator()(_Tp* __p, _Arg __x) const
+      { return (__p->*_M_f)(__x); }
+
+    private:
+      _Ret (_Tp::*_M_f)(_Arg);
+    };
+
+  /// One of the @link memory_adaptors adaptors for member
+  /// pointers@endlink.
+  template<typename _Ret, typename _Tp, typename _Arg>
+    class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
+    {
+    public:
+      explicit
+      const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
+      : _M_f(__pf) { }
+
+      _Ret
+      operator()(const _Tp* __p, _Arg __x) const
+      { return (__p->*_M_f)(__x); }
+
+    private:
+      _Ret (_Tp::*_M_f)(_Arg) const;
+    };
+
+  /// One of the @link memory_adaptors adaptors for member
+  /// pointers@endlink.
+  template<typename _Ret, typename _Tp, typename _Arg>
+    class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
+    {
+    public:
+      explicit
+      mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
+      : _M_f(__pf) { }
+
+      _Ret
+      operator()(_Tp& __r, _Arg __x) const
+      { return (__r.*_M_f)(__x); }
+
+    private:
+      _Ret (_Tp::*_M_f)(_Arg);
+    };
+
+  /// One of the @link memory_adaptors adaptors for member
+  /// pointers@endlink.
+  template<typename _Ret, typename _Tp, typename _Arg>
+    class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
+    {
+    public:
+      explicit
+      const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
+      : _M_f(__pf) { }
+
+      _Ret
+      operator()(const _Tp& __r, _Arg __x) const
+      { return (__r.*_M_f)(__x); }
+
+    private:
+      _Ret (_Tp::*_M_f)(_Arg) const;
+    };
+
+  // Mem_fun adaptor helper functions.  There are only two:
+  // mem_fun and mem_fun_ref.
+  template<typename _Ret, typename _Tp>
+    inline mem_fun_t<_Ret, _Tp>
+    mem_fun(_Ret (_Tp::*__f)())
+    { return mem_fun_t<_Ret, _Tp>(__f); }
+
+  template<typename _Ret, typename _Tp>
+    inline const_mem_fun_t<_Ret, _Tp>
+    mem_fun(_Ret (_Tp::*__f)() const)
+    { return const_mem_fun_t<_Ret, _Tp>(__f); }
+
+  template<typename _Ret, typename _Tp>
+    inline mem_fun_ref_t<_Ret, _Tp>
+    mem_fun_ref(_Ret (_Tp::*__f)())
+    { return mem_fun_ref_t<_Ret, _Tp>(__f); }
+
+  template<typename _Ret, typename _Tp>
+    inline const_mem_fun_ref_t<_Ret, _Tp>
+    mem_fun_ref(_Ret (_Tp::*__f)() const)
+    { return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
+
+  template<typename _Ret, typename _Tp, typename _Arg>
+    inline mem_fun1_t<_Ret, _Tp, _Arg>
+    mem_fun(_Ret (_Tp::*__f)(_Arg))
+    { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
+
+  template<typename _Ret, typename _Tp, typename _Arg>
+    inline const_mem_fun1_t<_Ret, _Tp, _Arg>
+    mem_fun(_Ret (_Tp::*__f)(_Arg) const)
+    { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
+
+  template<typename _Ret, typename _Tp, typename _Arg>
+    inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
+    mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
+    { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
+
+  template<typename _Ret, typename _Tp, typename _Arg>
+    inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
+    mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
+    { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
+
+  /** @}  */
+
+_GLIBCXX_END_NAMESPACE
+
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
+# include <backward/binders.h>
+#endif
+
+#endif /* _STL_FUNCTION_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_heap.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_heap.h
new file mode 100644
index 0000000..b52fa7a
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_heap.h
@@ -0,0 +1,578 @@
+// Heap implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_heap.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_HEAP_H
+#define _STL_HEAP_H 1
+
+#include <debug/debug.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @defgroup heap_algorithms Heap
+   * @ingroup sorting_algorithms
+   */
+
+  template<typename _RandomAccessIterator, typename _Distance>
+    _Distance
+    __is_heap_until(_RandomAccessIterator __first, _Distance __n)
+    {
+      _Distance __parent = 0;
+      for (_Distance __child = 1; __child < __n; ++__child)
+	{
+	  if (__first[__parent] < __first[__child])
+	    return __child;
+	  if ((__child & 1) == 0)
+	    ++__parent;
+	}
+      return __n;
+    }
+
+  template<typename _RandomAccessIterator, typename _Distance,
+	   typename _Compare>
+    _Distance
+    __is_heap_until(_RandomAccessIterator __first, _Distance __n,
+		    _Compare __comp)
+    {
+      _Distance __parent = 0;
+      for (_Distance __child = 1; __child < __n; ++__child)
+	{
+	  if (__comp(__first[__parent], __first[__child]))
+	    return __child;
+	  if ((__child & 1) == 0)
+	    ++__parent;
+	}
+      return __n;
+    }
+
+  // __is_heap, a predicate testing whether or not a range is a heap.
+  // This function is an extension, not part of the C++ standard.
+  template<typename _RandomAccessIterator, typename _Distance>
+    inline bool
+    __is_heap(_RandomAccessIterator __first, _Distance __n)
+    { return std::__is_heap_until(__first, __n) == __n; }
+
+  template<typename _RandomAccessIterator, typename _Compare,
+	   typename _Distance>
+    inline bool
+    __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n)
+    { return std::__is_heap_until(__first, __n, __comp) == __n; }
+
+  template<typename _RandomAccessIterator>
+    inline bool
+    __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    { return std::__is_heap(__first, std::distance(__first, __last)); }
+
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline bool
+    __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      _Compare __comp)
+    { return std::__is_heap(__first, __comp, std::distance(__first, __last)); }
+
+  // Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap,
+  // + is_heap and is_heap_until in C++0x.
+
+  template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
+    void
+    __push_heap(_RandomAccessIterator __first,
+		_Distance __holeIndex, _Distance __topIndex, _Tp __value)
+    {
+      _Distance __parent = (__holeIndex - 1) / 2;
+      while (__holeIndex > __topIndex && *(__first + __parent) < __value)
+	{
+	  *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __parent));
+	  __holeIndex = __parent;
+	  __parent = (__holeIndex - 1) / 2;
+	}
+      *(__first + __holeIndex) = _GLIBCXX_MOVE(__value);
+    }
+
+  /**
+   *  @brief  Push an element onto a heap.
+   *  @param  first  Start of heap.
+   *  @param  last   End of heap + element.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation pushes the element at last-1 onto the valid heap over the
+   *  range [first,last-1).  After completion, [first,last) is a valid heap.
+  */
+  template<typename _RandomAccessIterator>
+    inline void
+    push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	  _ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	  _DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+      __glibcxx_requires_heap(__first, __last - 1);
+
+      _ValueType __value = _GLIBCXX_MOVE(*(__last - 1));
+      std::__push_heap(__first, _DistanceType((__last - __first) - 1),
+		       _DistanceType(0), _GLIBCXX_MOVE(__value));
+    }
+
+  template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
+	   typename _Compare>
+    void
+    __push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+		_Distance __topIndex, _Tp __value, _Compare __comp)
+    {
+      _Distance __parent = (__holeIndex - 1) / 2;
+      while (__holeIndex > __topIndex
+	     && __comp(*(__first + __parent), __value))
+	{
+	  *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __parent));
+	  __holeIndex = __parent;
+	  __parent = (__holeIndex - 1) / 2;
+	}
+      *(__first + __holeIndex) = _GLIBCXX_MOVE(__value);
+    }
+
+  /**
+   *  @brief  Push an element onto a heap using comparison functor.
+   *  @param  first  Start of heap.
+   *  @param  last   End of heap + element.
+   *  @param  comp   Comparison functor.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation pushes the element at last-1 onto the valid heap over the
+   *  range [first,last-1).  After completion, [first,last) is a valid heap.
+   *  Compare operations are performed using comp.
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline void
+    push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	  _ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	  _DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+      __glibcxx_requires_heap_pred(__first, __last - 1, __comp);
+
+      _ValueType __value = _GLIBCXX_MOVE(*(__last - 1));
+      std::__push_heap(__first, _DistanceType((__last - __first) - 1),
+		       _DistanceType(0), _GLIBCXX_MOVE(__value), __comp);
+    }
+
+  template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
+    void
+    __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+		  _Distance __len, _Tp __value)
+    {
+      const _Distance __topIndex = __holeIndex;
+      _Distance __secondChild = __holeIndex;
+      while (__secondChild < (__len - 1) / 2)
+	{
+	  __secondChild = 2 * (__secondChild + 1);
+	  if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
+	    __secondChild--;
+	  *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __secondChild));
+	  __holeIndex = __secondChild;
+	}
+      if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
+	{
+	  __secondChild = 2 * (__secondChild + 1);
+	  *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first
+						     + (__secondChild - 1)));
+	  __holeIndex = __secondChild - 1;
+	}
+      std::__push_heap(__first, __holeIndex, __topIndex,
+		       _GLIBCXX_MOVE(__value));
+    }
+
+  template<typename _RandomAccessIterator>
+    inline void
+    __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	       _RandomAccessIterator __result)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_DistanceType;
+
+      _ValueType __value = _GLIBCXX_MOVE(*__result);
+      *__result = _GLIBCXX_MOVE(*__first);
+      std::__adjust_heap(__first, _DistanceType(0),
+			 _DistanceType(__last - __first),
+			 _GLIBCXX_MOVE(__value));
+    }
+
+  /**
+   *  @brief  Pop an element off a heap.
+   *  @param  first  Start of heap.
+   *  @param  last   End of heap.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation pops the top of the heap.  The elements first and last-1
+   *  are swapped and [first,last-1) is made into a heap.
+  */
+  template<typename _RandomAccessIterator>
+    inline void
+    pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+      __glibcxx_requires_heap(__first, __last);
+
+      --__last;
+      std::__pop_heap(__first, __last, __last);
+    }
+
+  template<typename _RandomAccessIterator, typename _Distance,
+	   typename _Tp, typename _Compare>
+    void
+    __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+		  _Distance __len, _Tp __value, _Compare __comp)
+    {
+      const _Distance __topIndex = __holeIndex;
+      _Distance __secondChild = __holeIndex;
+      while (__secondChild < (__len - 1) / 2)
+	{
+	  __secondChild = 2 * (__secondChild + 1);
+	  if (__comp(*(__first + __secondChild),
+		     *(__first + (__secondChild - 1))))
+	    __secondChild--;
+	  *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __secondChild));
+	  __holeIndex = __secondChild;
+	}
+      if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
+	{
+	  __secondChild = 2 * (__secondChild + 1);
+	  *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first
+						     + (__secondChild - 1)));
+	  __holeIndex = __secondChild - 1;
+	}
+      std::__push_heap(__first, __holeIndex, __topIndex, 
+		       _GLIBCXX_MOVE(__value), __comp);      
+    }
+
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline void
+    __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	       _RandomAccessIterator __result, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	_ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	_DistanceType;
+
+      _ValueType __value = _GLIBCXX_MOVE(*__result);
+      *__result = _GLIBCXX_MOVE(*__first);
+      std::__adjust_heap(__first, _DistanceType(0),
+			 _DistanceType(__last - __first),
+			 _GLIBCXX_MOVE(__value), __comp);
+    }
+
+  /**
+   *  @brief  Pop an element off a heap using comparison functor.
+   *  @param  first  Start of heap.
+   *  @param  last   End of heap.
+   *  @param  comp   Comparison functor to use.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation pops the top of the heap.  The elements first and last-1
+   *  are swapped and [first,last-1) is made into a heap.  Comparisons are
+   *  made using comp.
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline void
+    pop_heap(_RandomAccessIterator __first,
+	     _RandomAccessIterator __last, _Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+      __glibcxx_requires_heap_pred(__first, __last, __comp);
+
+      --__last;
+      std::__pop_heap(__first, __last, __last, __comp);
+    }
+
+  /**
+   *  @brief  Construct a heap over a range.
+   *  @param  first  Start of heap.
+   *  @param  last   End of heap.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation makes the elements in [first,last) into a heap.
+  */
+  template<typename _RandomAccessIterator>
+    void
+    make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	  _ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	  _DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__last - __first < 2)
+	return;
+
+      const _DistanceType __len = __last - __first;
+      _DistanceType __parent = (__len - 2) / 2;
+      while (true)
+	{
+	  _ValueType __value = _GLIBCXX_MOVE(*(__first + __parent));
+	  std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value));
+	  if (__parent == 0)
+	    return;
+	  __parent--;
+	}
+    }
+
+  /**
+   *  @brief  Construct a heap over a range using comparison functor.
+   *  @param  first  Start of heap.
+   *  @param  last   End of heap.
+   *  @param  comp   Comparison functor to use.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation makes the elements in [first,last) into a heap.
+   *  Comparisons are made using comp.
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    void
+    make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	  _ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	  _DistanceType;
+
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__last - __first < 2)
+	return;
+
+      const _DistanceType __len = __last - __first;
+      _DistanceType __parent = (__len - 2) / 2;
+      while (true)
+	{
+	  _ValueType __value = _GLIBCXX_MOVE(*(__first + __parent));
+	  std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value),
+			     __comp);
+	  if (__parent == 0)
+	    return;
+	  __parent--;
+	}
+    }
+
+  /**
+   *  @brief  Sort a heap.
+   *  @param  first  Start of heap.
+   *  @param  last   End of heap.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation sorts the valid heap in the range [first,last).
+  */
+  template<typename _RandomAccessIterator>
+    void
+    sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_RandomAccessIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+      __glibcxx_requires_heap(__first, __last);
+
+      while (__last - __first > 1)
+	{
+	  --__last;
+	  std::__pop_heap(__first, __last, __last);
+	}
+    }
+
+  /**
+   *  @brief  Sort a heap using comparison functor.
+   *  @param  first  Start of heap.
+   *  @param  last   End of heap.
+   *  @param  comp   Comparison functor to use.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation sorts the valid heap in the range [first,last).
+   *  Comparisons are made using comp.
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    void
+    sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      _Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+      __glibcxx_requires_heap_pred(__first, __last, __comp);
+
+      while (__last - __first > 1)
+	{
+	  --__last;
+	  std::__pop_heap(__first, __last, __last, __comp);
+	}
+    }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /**
+   *  @brief  Search the end of a heap.
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @return  An iterator pointing to the first element not in the heap.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation returns the last iterator i in [first, last) for which
+   *  the range [first, i) is a heap.
+  */
+  template<typename _RandomAccessIterator>
+    inline _RandomAccessIterator
+    is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_RandomAccessIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      return __first + std::__is_heap_until(__first, std::distance(__first,
+								   __last));
+    }
+
+  /**
+   *  @brief  Search the end of a heap using comparison functor.
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @param  comp   Comparison functor to use.
+   *  @return  An iterator pointing to the first element not in the heap.
+   *  @ingroup heap_algorithms
+   *
+   *  This operation returns the last iterator i in [first, last) for which
+   *  the range [first, i) is a heap.  Comparisons are made using comp.
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline _RandomAccessIterator
+    is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last,
+		  _Compare __comp)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      return __first + std::__is_heap_until(__first, std::distance(__first,
+								   __last),
+					    __comp);
+    }
+
+  /**
+   *  @brief  Determines whether a range is a heap.
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @return  True if range is a heap, false otherwise.
+   *  @ingroup heap_algorithms
+  */
+  template<typename _RandomAccessIterator>
+    inline bool
+    is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    { return std::is_heap_until(__first, __last) == __last; }
+
+  /**
+   *  @brief  Determines whether a range is a heap using comparison functor.
+   *  @param  first  Start of range.
+   *  @param  last   End of range.
+   *  @param  comp   Comparison functor to use.
+   *  @return  True if range is a heap, false otherwise.
+   *  @ingroup heap_algorithms
+  */
+  template<typename _RandomAccessIterator, typename _Compare>
+    inline bool
+    is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	    _Compare __comp)
+    { return std::is_heap_until(__first, __last, __comp) == __last; }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_HEAP_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator.h
new file mode 100644
index 0000000..83a390d
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator.h
@@ -0,0 +1,1076 @@
+// Iterators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_iterator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ *
+ *  This file implements reverse_iterator, back_insert_iterator,
+ *  front_insert_iterator, insert_iterator, __normal_iterator, and their
+ *  supporting functions and overloaded operators.
+ */
+
+#ifndef _STL_ITERATOR_H
+#define _STL_ITERATOR_H 1
+
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup iterators
+   * @{
+   */
+
+  // 24.4.1 Reverse iterators
+  /**
+   *  Bidirectional and random access iterators have corresponding reverse
+   *  %iterator adaptors that iterate through the data structure in the
+   *  opposite direction.  They have the same signatures as the corresponding
+   *  iterators.  The fundamental relation between a reverse %iterator and its
+   *  corresponding %iterator @c i is established by the identity:
+   *  @code
+   *      &*(reverse_iterator(i)) == &*(i - 1)
+   *  @endcode
+   *
+   *  <em>This mapping is dictated by the fact that while there is always a
+   *  pointer past the end of an array, there might not be a valid pointer
+   *  before the beginning of an array.</em> [24.4.1]/1,2
+   *
+   *  Reverse iterators can be tricky and surprising at first.  Their
+   *  semantics make sense, however, and the trickiness is a side effect of
+   *  the requirement that the iterators must be safe.
+  */
+  template<typename _Iterator>
+    class reverse_iterator
+    : public iterator<typename iterator_traits<_Iterator>::iterator_category,
+		      typename iterator_traits<_Iterator>::value_type,
+		      typename iterator_traits<_Iterator>::difference_type,
+		      typename iterator_traits<_Iterator>::pointer,
+                      typename iterator_traits<_Iterator>::reference>
+    {
+    protected:
+      _Iterator current;
+
+      typedef iterator_traits<_Iterator>		__traits_type;
+
+    public:
+      typedef _Iterator					iterator_type;
+      typedef typename __traits_type::difference_type	difference_type;
+      typedef typename __traits_type::pointer		pointer;
+      typedef typename __traits_type::reference		reference;
+
+      /**
+       *  The default constructor default-initializes member @p current.
+       *  If it is a pointer, that means it is zero-initialized.
+      */
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 235 No specification of default ctor for reverse_iterator
+      reverse_iterator() : current() { }
+
+      /**
+       *  This %iterator will move in the opposite direction that @p x does.
+      */
+      explicit
+      reverse_iterator(iterator_type __x) : current(__x) { }
+
+      /**
+       *  The copy constructor is normal.
+      */
+      reverse_iterator(const reverse_iterator& __x)
+      : current(__x.current) { }
+
+      /**
+       *  A reverse_iterator across other types can be copied in the normal
+       *  fashion.
+      */
+      template<typename _Iter>
+        reverse_iterator(const reverse_iterator<_Iter>& __x)
+	: current(__x.base()) { }
+
+      /**
+       *  @return  @c current, the %iterator used for underlying work.
+      */
+      iterator_type
+      base() const
+      { return current; }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reference
+      operator*() const
+      {
+	_Iterator __tmp = current;
+	return *--__tmp;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      pointer
+      operator->() const
+      { return &(operator*()); }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator&
+      operator++()
+      {
+	--current;
+	return *this;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator
+      operator++(int)
+      {
+	reverse_iterator __tmp = *this;
+	--current;
+	return __tmp;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator&
+      operator--()
+      {
+	++current;
+	return *this;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator
+      operator--(int)
+      {
+	reverse_iterator __tmp = *this;
+	++current;
+	return __tmp;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator
+      operator+(difference_type __n) const
+      { return reverse_iterator(current - __n); }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator&
+      operator+=(difference_type __n)
+      {
+	current -= __n;
+	return *this;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator
+      operator-(difference_type __n) const
+      { return reverse_iterator(current + __n); }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator&
+      operator-=(difference_type __n)
+      {
+	current += __n;
+	return *this;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reference
+      operator[](difference_type __n) const
+      { return *(*this + __n); }
+    };
+
+  //@{
+  /**
+   *  @param  x  A %reverse_iterator.
+   *  @param  y  A %reverse_iterator.
+   *  @return  A simple bool.
+   *
+   *  Reverse iterators forward many operations to their underlying base()
+   *  iterators.  Others are implemented in terms of one another.
+   *
+  */
+  template<typename _Iterator>
+    inline bool
+    operator==(const reverse_iterator<_Iterator>& __x,
+	       const reverse_iterator<_Iterator>& __y)
+    { return __x.base() == __y.base(); }
+
+  template<typename _Iterator>
+    inline bool
+    operator<(const reverse_iterator<_Iterator>& __x,
+	      const reverse_iterator<_Iterator>& __y)
+    { return __y.base() < __x.base(); }
+
+  template<typename _Iterator>
+    inline bool
+    operator!=(const reverse_iterator<_Iterator>& __x,
+	       const reverse_iterator<_Iterator>& __y)
+    { return !(__x == __y); }
+
+  template<typename _Iterator>
+    inline bool
+    operator>(const reverse_iterator<_Iterator>& __x,
+	      const reverse_iterator<_Iterator>& __y)
+    { return __y < __x; }
+
+  template<typename _Iterator>
+    inline bool
+    operator<=(const reverse_iterator<_Iterator>& __x,
+	       const reverse_iterator<_Iterator>& __y)
+    { return !(__y < __x); }
+
+  template<typename _Iterator>
+    inline bool
+    operator>=(const reverse_iterator<_Iterator>& __x,
+	       const reverse_iterator<_Iterator>& __y)
+    { return !(__x < __y); }
+
+  template<typename _Iterator>
+    inline typename reverse_iterator<_Iterator>::difference_type
+    operator-(const reverse_iterator<_Iterator>& __x,
+	      const reverse_iterator<_Iterator>& __y)
+    { return __y.base() - __x.base(); }
+
+  template<typename _Iterator>
+    inline reverse_iterator<_Iterator>
+    operator+(typename reverse_iterator<_Iterator>::difference_type __n,
+	      const reverse_iterator<_Iterator>& __x)
+    { return reverse_iterator<_Iterator>(__x.base() - __n); }
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // DR 280. Comparison of reverse_iterator to const reverse_iterator.
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator==(const reverse_iterator<_IteratorL>& __x,
+	       const reverse_iterator<_IteratorR>& __y)
+    { return __x.base() == __y.base(); }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator<(const reverse_iterator<_IteratorL>& __x,
+	      const reverse_iterator<_IteratorR>& __y)
+    { return __y.base() < __x.base(); }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator!=(const reverse_iterator<_IteratorL>& __x,
+	       const reverse_iterator<_IteratorR>& __y)
+    { return !(__x == __y); }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator>(const reverse_iterator<_IteratorL>& __x,
+	      const reverse_iterator<_IteratorR>& __y)
+    { return __y < __x; }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator<=(const reverse_iterator<_IteratorL>& __x,
+	       const reverse_iterator<_IteratorR>& __y)
+    { return !(__y < __x); }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator>=(const reverse_iterator<_IteratorL>& __x,
+	       const reverse_iterator<_IteratorR>& __y)
+    { return !(__x < __y); }
+
+  template<typename _IteratorL, typename _IteratorR>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    // DR 685.
+    inline auto
+    operator-(const reverse_iterator<_IteratorL>& __x,
+	      const reverse_iterator<_IteratorR>& __y)
+    -> decltype(__y.base() - __x.base())
+#else
+    inline typename reverse_iterator<_IteratorL>::difference_type
+    operator-(const reverse_iterator<_IteratorL>& __x,
+	      const reverse_iterator<_IteratorR>& __y)
+#endif
+    { return __y.base() - __x.base(); }
+  //@}
+
+  // 24.4.2.2.1 back_insert_iterator
+  /**
+   *  @brief  Turns assignment into insertion.
+   *
+   *  These are output iterators, constructed from a container-of-T.
+   *  Assigning a T to the iterator appends it to the container using
+   *  push_back.
+   *
+   *  Tip:  Using the back_inserter function to create these iterators can
+   *  save typing.
+  */
+  template<typename _Container>
+    class back_insert_iterator
+    : public iterator<output_iterator_tag, void, void, void, void>
+    {
+    protected:
+      _Container* container;
+
+    public:
+      /// A nested typedef for the type of whatever container you used.
+      typedef _Container          container_type;
+
+      /// The only way to create this %iterator is with a container.
+      explicit
+      back_insert_iterator(_Container& __x) : container(&__x) { }
+
+      /**
+       *  @param  value  An instance of whatever type
+       *                 container_type::const_reference is; presumably a
+       *                 reference-to-const T for container<T>.
+       *  @return  This %iterator, for chained operations.
+       *
+       *  This kind of %iterator doesn't really have a @a position in the
+       *  container (you can think of the position as being permanently at
+       *  the end, if you like).  Assigning a value to the %iterator will
+       *  always append the value to the end of the container.
+      */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+      back_insert_iterator&
+      operator=(typename _Container::const_reference __value)
+      {
+	container->push_back(__value);
+	return *this;
+      }
+#else
+      back_insert_iterator&
+      operator=(const typename _Container::value_type& __value)
+      {
+	container->push_back(__value);
+	return *this;
+      }
+
+      back_insert_iterator&
+      operator=(typename _Container::value_type&& __value)
+      {
+	container->push_back(std::move(__value));
+	return *this;
+      }
+#endif
+
+      /// Simply returns *this.
+      back_insert_iterator&
+      operator*()
+      { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not @a move.)
+      back_insert_iterator&
+      operator++()
+      { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not @a move.)
+      back_insert_iterator
+      operator++(int)
+      { return *this; }
+    };
+
+  /**
+   *  @param  x  A container of arbitrary type.
+   *  @return  An instance of back_insert_iterator working on @p x.
+   *
+   *  This wrapper function helps in creating back_insert_iterator instances.
+   *  Typing the name of the %iterator requires knowing the precise full
+   *  type of the container, which can be tedious and impedes generic
+   *  programming.  Using this function lets you take advantage of automatic
+   *  template parameter deduction, making the compiler match the correct
+   *  types for you.
+  */
+  template<typename _Container>
+    inline back_insert_iterator<_Container>
+    back_inserter(_Container& __x)
+    { return back_insert_iterator<_Container>(__x); }
+
+  /**
+   *  @brief  Turns assignment into insertion.
+   *
+   *  These are output iterators, constructed from a container-of-T.
+   *  Assigning a T to the iterator prepends it to the container using
+   *  push_front.
+   *
+   *  Tip:  Using the front_inserter function to create these iterators can
+   *  save typing.
+  */
+  template<typename _Container>
+    class front_insert_iterator
+    : public iterator<output_iterator_tag, void, void, void, void>
+    {
+    protected:
+      _Container* container;
+
+    public:
+      /// A nested typedef for the type of whatever container you used.
+      typedef _Container          container_type;
+
+      /// The only way to create this %iterator is with a container.
+      explicit front_insert_iterator(_Container& __x) : container(&__x) { }
+
+      /**
+       *  @param  value  An instance of whatever type
+       *                 container_type::const_reference is; presumably a
+       *                 reference-to-const T for container<T>.
+       *  @return  This %iterator, for chained operations.
+       *
+       *  This kind of %iterator doesn't really have a @a position in the
+       *  container (you can think of the position as being permanently at
+       *  the front, if you like).  Assigning a value to the %iterator will
+       *  always prepend the value to the front of the container.
+      */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+      front_insert_iterator&
+      operator=(typename _Container::const_reference __value)
+      {
+	container->push_front(__value);
+	return *this;
+      }
+#else
+      front_insert_iterator&
+      operator=(const typename _Container::value_type& __value)
+      {
+	container->push_front(__value);
+	return *this;
+      }
+
+      front_insert_iterator&
+      operator=(typename _Container::value_type&& __value)
+      {
+	container->push_front(std::move(__value));
+	return *this;
+      }
+#endif
+
+      /// Simply returns *this.
+      front_insert_iterator&
+      operator*()
+      { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not @a move.)
+      front_insert_iterator&
+      operator++()
+      { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not @a move.)
+      front_insert_iterator
+      operator++(int)
+      { return *this; }
+    };
+
+  /**
+   *  @param  x  A container of arbitrary type.
+   *  @return  An instance of front_insert_iterator working on @p x.
+   *
+   *  This wrapper function helps in creating front_insert_iterator instances.
+   *  Typing the name of the %iterator requires knowing the precise full
+   *  type of the container, which can be tedious and impedes generic
+   *  programming.  Using this function lets you take advantage of automatic
+   *  template parameter deduction, making the compiler match the correct
+   *  types for you.
+  */
+  template<typename _Container>
+    inline front_insert_iterator<_Container>
+    front_inserter(_Container& __x)
+    { return front_insert_iterator<_Container>(__x); }
+
+  /**
+   *  @brief  Turns assignment into insertion.
+   *
+   *  These are output iterators, constructed from a container-of-T.
+   *  Assigning a T to the iterator inserts it in the container at the
+   *  %iterator's position, rather than overwriting the value at that
+   *  position.
+   *
+   *  (Sequences will actually insert a @e copy of the value before the
+   *  %iterator's position.)
+   *
+   *  Tip:  Using the inserter function to create these iterators can
+   *  save typing.
+  */
+  template<typename _Container>
+    class insert_iterator
+    : public iterator<output_iterator_tag, void, void, void, void>
+    {
+    protected:
+      _Container* container;
+      typename _Container::iterator iter;
+
+    public:
+      /// A nested typedef for the type of whatever container you used.
+      typedef _Container          container_type;
+
+      /**
+       *  The only way to create this %iterator is with a container and an
+       *  initial position (a normal %iterator into the container).
+      */
+      insert_iterator(_Container& __x, typename _Container::iterator __i)
+      : container(&__x), iter(__i) {}
+
+      /**
+       *  @param  value  An instance of whatever type
+       *                 container_type::const_reference is; presumably a
+       *                 reference-to-const T for container<T>.
+       *  @return  This %iterator, for chained operations.
+       *
+       *  This kind of %iterator maintains its own position in the
+       *  container.  Assigning a value to the %iterator will insert the
+       *  value into the container at the place before the %iterator.
+       *
+       *  The position is maintained such that subsequent assignments will
+       *  insert values immediately after one another.  For example,
+       *  @code
+       *     // vector v contains A and Z
+       *
+       *     insert_iterator i (v, ++v.begin());
+       *     i = 1;
+       *     i = 2;
+       *     i = 3;
+       *
+       *     // vector v contains A, 1, 2, 3, and Z
+       *  @endcode
+      */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+      insert_iterator&
+      operator=(typename _Container::const_reference __value)
+      {
+	iter = container->insert(iter, __value);
+	++iter;
+	return *this;
+      }
+#else
+      insert_iterator&
+      operator=(const typename _Container::value_type& __value)
+      {
+	iter = container->insert(iter, __value);
+	++iter;
+	return *this;
+      }
+
+      insert_iterator&
+      operator=(typename _Container::value_type&& __value)
+      {
+	iter = container->insert(iter, std::move(__value));
+	++iter;
+	return *this;
+      }
+#endif
+
+      /// Simply returns *this.
+      insert_iterator&
+      operator*()
+      { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not @a move.)
+      insert_iterator&
+      operator++()
+      { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not @a move.)
+      insert_iterator&
+      operator++(int)
+      { return *this; }
+    };
+
+  /**
+   *  @param  x  A container of arbitrary type.
+   *  @return  An instance of insert_iterator working on @p x.
+   *
+   *  This wrapper function helps in creating insert_iterator instances.
+   *  Typing the name of the %iterator requires knowing the precise full
+   *  type of the container, which can be tedious and impedes generic
+   *  programming.  Using this function lets you take advantage of automatic
+   *  template parameter deduction, making the compiler match the correct
+   *  types for you.
+  */
+  template<typename _Container, typename _Iterator>
+    inline insert_iterator<_Container>
+    inserter(_Container& __x, _Iterator __i)
+    {
+      return insert_iterator<_Container>(__x,
+					 typename _Container::iterator(__i));
+    }
+
+  // @} group iterators
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  // This iterator adapter is @a normal in the sense that it does not
+  // change the semantics of any of the operators of its iterator
+  // parameter.  Its primary purpose is to convert an iterator that is
+  // not a class, e.g. a pointer, into an iterator that is a class.
+  // The _Container parameter exists solely so that different containers
+  // using this template can instantiate different types, even if the
+  // _Iterator parameter is the same.
+  using std::iterator_traits;
+  using std::iterator;
+  template<typename _Iterator, typename _Container>
+    class __normal_iterator
+    {
+    protected:
+      _Iterator _M_current;
+
+      typedef iterator_traits<_Iterator>		__traits_type;
+
+    public:
+      typedef _Iterator					iterator_type;
+      typedef typename __traits_type::iterator_category iterator_category;
+      typedef typename __traits_type::value_type  	value_type;
+      typedef typename __traits_type::difference_type 	difference_type;
+      typedef typename __traits_type::reference 	reference;
+      typedef typename __traits_type::pointer   	pointer;
+
+      __normal_iterator() : _M_current(_Iterator()) { }
+
+      explicit
+      __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
+
+      // Allow iterator to const_iterator conversion
+      template<typename _Iter>
+        __normal_iterator(const __normal_iterator<_Iter,
+			  typename __enable_if<
+      	       (std::__are_same<_Iter, typename _Container::pointer>::__value),
+		      _Container>::__type>& __i)
+        : _M_current(__i.base()) { }
+
+      // Forward iterator requirements
+      reference
+      operator*() const
+      { return *_M_current; }
+
+      pointer
+      operator->() const
+      { return _M_current; }
+
+      __normal_iterator&
+      operator++()
+      {
+	++_M_current;
+	return *this;
+      }
+
+      __normal_iterator
+      operator++(int)
+      { return __normal_iterator(_M_current++); }
+
+      // Bidirectional iterator requirements
+      __normal_iterator&
+      operator--()
+      {
+	--_M_current;
+	return *this;
+      }
+
+      __normal_iterator
+      operator--(int)
+      { return __normal_iterator(_M_current--); }
+
+      // Random access iterator requirements
+      reference
+      operator[](const difference_type& __n) const
+      { return _M_current[__n]; }
+
+      __normal_iterator&
+      operator+=(const difference_type& __n)
+      { _M_current += __n; return *this; }
+
+      __normal_iterator
+      operator+(const difference_type& __n) const
+      { return __normal_iterator(_M_current + __n); }
+
+      __normal_iterator&
+      operator-=(const difference_type& __n)
+      { _M_current -= __n; return *this; }
+
+      __normal_iterator
+      operator-(const difference_type& __n) const
+      { return __normal_iterator(_M_current - __n); }
+
+      const _Iterator&
+      base() const
+      { return _M_current; }
+    };
+
+  // Note: In what follows, the left- and right-hand-side iterators are
+  // allowed to vary in types (conceptually in cv-qualification) so that
+  // comparison between cv-qualified and non-cv-qualified iterators be
+  // valid.  However, the greedy and unfriendly operators in std::rel_ops
+  // will make overload resolution ambiguous (when in scope) if we don't
+  // provide overloads whose operands are of the same type.  Can someone
+  // remind me what generic programming is about? -- Gaby
+
+  // Forward iterator requirements
+  template<typename _IteratorL, typename _IteratorR, typename _Container>
+    inline bool
+    operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	       const __normal_iterator<_IteratorR, _Container>& __rhs)
+    { return __lhs.base() == __rhs.base(); }
+
+  template<typename _Iterator, typename _Container>
+    inline bool
+    operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
+	       const __normal_iterator<_Iterator, _Container>& __rhs)
+    { return __lhs.base() == __rhs.base(); }
+
+  template<typename _IteratorL, typename _IteratorR, typename _Container>
+    inline bool
+    operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	       const __normal_iterator<_IteratorR, _Container>& __rhs)
+    { return __lhs.base() != __rhs.base(); }
+
+  template<typename _Iterator, typename _Container>
+    inline bool
+    operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
+	       const __normal_iterator<_Iterator, _Container>& __rhs)
+    { return __lhs.base() != __rhs.base(); }
+
+  // Random access iterator requirements
+  template<typename _IteratorL, typename _IteratorR, typename _Container>
+    inline bool
+    operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	      const __normal_iterator<_IteratorR, _Container>& __rhs)
+    { return __lhs.base() < __rhs.base(); }
+
+  template<typename _Iterator, typename _Container>
+    inline bool
+    operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
+	      const __normal_iterator<_Iterator, _Container>& __rhs)
+    { return __lhs.base() < __rhs.base(); }
+
+  template<typename _IteratorL, typename _IteratorR, typename _Container>
+    inline bool
+    operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	      const __normal_iterator<_IteratorR, _Container>& __rhs)
+    { return __lhs.base() > __rhs.base(); }
+
+  template<typename _Iterator, typename _Container>
+    inline bool
+    operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
+	      const __normal_iterator<_Iterator, _Container>& __rhs)
+    { return __lhs.base() > __rhs.base(); }
+
+  template<typename _IteratorL, typename _IteratorR, typename _Container>
+    inline bool
+    operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	       const __normal_iterator<_IteratorR, _Container>& __rhs)
+    { return __lhs.base() <= __rhs.base(); }
+
+  template<typename _Iterator, typename _Container>
+    inline bool
+    operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
+	       const __normal_iterator<_Iterator, _Container>& __rhs)
+    { return __lhs.base() <= __rhs.base(); }
+
+  template<typename _IteratorL, typename _IteratorR, typename _Container>
+    inline bool
+    operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	       const __normal_iterator<_IteratorR, _Container>& __rhs)
+    { return __lhs.base() >= __rhs.base(); }
+
+  template<typename _Iterator, typename _Container>
+    inline bool
+    operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
+	       const __normal_iterator<_Iterator, _Container>& __rhs)
+    { return __lhs.base() >= __rhs.base(); }
+
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // According to the resolution of DR179 not only the various comparison
+  // operators but also operator- must accept mixed iterator/const_iterator
+  // parameters.
+  template<typename _IteratorL, typename _IteratorR, typename _Container>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    // DR 685.
+    inline auto
+    operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	      const __normal_iterator<_IteratorR, _Container>& __rhs)
+    -> decltype(__lhs.base() - __rhs.base())
+#else
+    inline typename __normal_iterator<_IteratorL, _Container>::difference_type
+    operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	      const __normal_iterator<_IteratorR, _Container>& __rhs)
+#endif
+    { return __lhs.base() - __rhs.base(); }
+
+  template<typename _Iterator, typename _Container>
+    inline typename __normal_iterator<_Iterator, _Container>::difference_type
+    operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
+	      const __normal_iterator<_Iterator, _Container>& __rhs)
+    { return __lhs.base() - __rhs.base(); }
+
+  template<typename _Iterator, typename _Container>
+    inline __normal_iterator<_Iterator, _Container>
+    operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
+	      __n, const __normal_iterator<_Iterator, _Container>& __i)
+    { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
+
+_GLIBCXX_END_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   * @addtogroup iterators
+   * @{
+   */
+
+  // 24.4.3  Move iterators
+  /**
+   *  Class template move_iterator is an iterator adapter with the same
+   *  behavior as the underlying iterator except that its dereference
+   *  operator implicitly converts the value returned by the underlying
+   *  iterator's dereference operator to an rvalue reference.  Some
+   *  generic algorithms can be called with move iterators to replace
+   *  copying with moving.
+   */
+  template<typename _Iterator>
+    class move_iterator
+    {
+    protected:
+      _Iterator _M_current;
+
+      typedef iterator_traits<_Iterator>		__traits_type;
+
+    public:
+      typedef _Iterator					iterator_type;
+      typedef typename __traits_type::iterator_category iterator_category;
+      typedef typename __traits_type::value_type  	value_type;
+      typedef typename __traits_type::difference_type	difference_type;
+      // NB: DR 680.
+      typedef _Iterator					pointer;
+      typedef value_type&&				reference;
+
+      move_iterator()
+      : _M_current() { }
+
+      explicit
+      move_iterator(iterator_type __i)
+      : _M_current(__i) { }
+
+      template<typename _Iter>
+	move_iterator(const move_iterator<_Iter>& __i)
+	: _M_current(__i.base()) { }
+
+      iterator_type
+      base() const
+      { return _M_current; }
+
+      reference
+      operator*() const
+      { return std::move(*_M_current); }
+
+      pointer
+      operator->() const
+      { return _M_current; }
+
+      move_iterator&
+      operator++()
+      {
+	++_M_current;
+	return *this;
+      }
+
+      move_iterator
+      operator++(int)
+      {
+	move_iterator __tmp = *this;
+	++_M_current;
+	return __tmp;
+      }
+
+      move_iterator&
+      operator--()
+      {
+	--_M_current;
+	return *this;
+      }
+
+      move_iterator
+      operator--(int)
+      {
+	move_iterator __tmp = *this;
+	--_M_current;
+	return __tmp;
+      }
+
+      move_iterator
+      operator+(difference_type __n) const
+      { return move_iterator(_M_current + __n); }
+
+      move_iterator&
+      operator+=(difference_type __n)
+      {
+	_M_current += __n;
+	return *this;
+      }
+
+      move_iterator
+      operator-(difference_type __n) const
+      { return move_iterator(_M_current - __n); }
+    
+      move_iterator&
+      operator-=(difference_type __n)
+      { 
+	_M_current -= __n;
+	return *this;
+      }
+
+      reference
+      operator[](difference_type __n) const
+      { return std::move(_M_current[__n]); }
+    };
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator==(const move_iterator<_IteratorL>& __x,
+	       const move_iterator<_IteratorR>& __y)
+    { return __x.base() == __y.base(); }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator!=(const move_iterator<_IteratorL>& __x,
+	       const move_iterator<_IteratorR>& __y)
+    { return !(__x == __y); }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator<(const move_iterator<_IteratorL>& __x,
+	      const move_iterator<_IteratorR>& __y)
+    { return __x.base() < __y.base(); }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator<=(const move_iterator<_IteratorL>& __x,
+	       const move_iterator<_IteratorR>& __y)
+    { return !(__y < __x); }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator>(const move_iterator<_IteratorL>& __x,
+	      const move_iterator<_IteratorR>& __y)
+    { return __y < __x; }
+
+  template<typename _IteratorL, typename _IteratorR>
+    inline bool
+    operator>=(const move_iterator<_IteratorL>& __x,
+	       const move_iterator<_IteratorR>& __y)
+    { return !(__x < __y); }
+
+  // DR 685.
+  template<typename _IteratorL, typename _IteratorR>
+    inline auto
+    operator-(const move_iterator<_IteratorL>& __x,
+	      const move_iterator<_IteratorR>& __y)
+    -> decltype(__x.base() - __y.base())
+    { return __x.base() - __y.base(); }
+
+  template<typename _Iterator>
+    inline move_iterator<_Iterator>
+    operator+(typename move_iterator<_Iterator>::difference_type __n,
+	      const move_iterator<_Iterator>& __x)
+    { return __x + __n; }
+
+  template<typename _Iterator>
+    inline move_iterator<_Iterator>
+    make_move_iterator(const _Iterator& __i)
+    { return move_iterator<_Iterator>(__i); }
+
+  // @} group iterators
+
+_GLIBCXX_END_NAMESPACE
+
+#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter)
+#else
+#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter)
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator_base_funcs.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator_base_funcs.h
new file mode 100644
index 0000000..50e0bca
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator_base_funcs.h
@@ -0,0 +1,210 @@
+// Functions used by iterators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_iterator_base_funcs.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ *
+ *  This file contains all of the general iterator-related utility
+ *  functions, such as distance() and advance().
+ */
+
+#ifndef _STL_ITERATOR_BASE_FUNCS_H
+#define _STL_ITERATOR_BASE_FUNCS_H 1
+
+#pragma GCC system_header
+
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _InputIterator>
+    inline typename iterator_traits<_InputIterator>::difference_type
+    __distance(_InputIterator __first, _InputIterator __last,
+               input_iterator_tag)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+
+      typename iterator_traits<_InputIterator>::difference_type __n = 0;
+      while (__first != __last)
+	{
+	  ++__first;
+	  ++__n;
+	}
+      return __n;
+    }
+
+  template<typename _RandomAccessIterator>
+    inline typename iterator_traits<_RandomAccessIterator>::difference_type
+    __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
+               random_access_iterator_tag)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_RandomAccessIteratorConcept<
+				  _RandomAccessIterator>)
+      return __last - __first;
+    }
+
+  /**
+   *  @brief A generalization of pointer arithmetic.
+   *  @param  first  An input iterator.
+   *  @param  last  An input iterator.
+   *  @return  The distance between them.
+   *
+   *  Returns @c n such that first + n == last.  This requires that @p last
+   *  must be reachable from @p first.  Note that @c n may be negative.
+   *
+   *  For random access iterators, this uses their @c + and @c - operations
+   *  and are constant time.  For other %iterator classes they are linear time.
+  */
+  template<typename _InputIterator>
+    inline typename iterator_traits<_InputIterator>::difference_type
+    distance(_InputIterator __first, _InputIterator __last)
+    {
+      // concept requirements -- taken care of in __distance
+      return std::__distance(__first, __last,
+			     std::__iterator_category(__first));
+    }
+
+  template<typename _InputIterator, typename _Distance>
+    inline void
+    __advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      while (__n--)
+	++__i;
+    }
+
+  template<typename _BidirectionalIterator, typename _Distance>
+    inline void
+    __advance(_BidirectionalIterator& __i, _Distance __n,
+	      bidirectional_iterator_tag)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_BidirectionalIteratorConcept<
+				  _BidirectionalIterator>)
+      if (__n > 0)
+        while (__n--)
+	  ++__i;
+      else
+        while (__n++)
+	  --__i;
+    }
+
+  template<typename _RandomAccessIterator, typename _Distance>
+    inline void
+    __advance(_RandomAccessIterator& __i, _Distance __n,
+              random_access_iterator_tag)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_RandomAccessIteratorConcept<
+				  _RandomAccessIterator>)
+      __i += __n;
+    }
+
+  /**
+   *  @brief A generalization of pointer arithmetic.
+   *  @param  i  An input iterator.
+   *  @param  n  The @a delta by which to change @p i.
+   *  @return  Nothing.
+   *
+   *  This increments @p i by @p n.  For bidirectional and random access
+   *  iterators, @p n may be negative, in which case @p i is decremented.
+   *
+   *  For random access iterators, this uses their @c + and @c - operations
+   *  and are constant time.  For other %iterator classes they are linear time.
+  */
+  template<typename _InputIterator, typename _Distance>
+    inline void
+    advance(_InputIterator& __i, _Distance __n)
+    {
+      // concept requirements -- taken care of in __advance
+      typename iterator_traits<_InputIterator>::difference_type __d = __n;
+      std::__advance(__i, __d, std::__iterator_category(__i));
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+#include <ext/type_traits.h> // For __enable_if and __is_iterator
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  template<typename _ForwardIterator>
+    inline typename
+    __gnu_cxx::__enable_if<__is_iterator<_ForwardIterator>::__value,
+			   _ForwardIterator>::__type
+    next(_ForwardIterator __x, typename
+	 iterator_traits<_ForwardIterator>::difference_type __n = 1)
+    {
+      std::advance(__x, __n);
+      return __x;
+    }
+
+  template<typename _BidirectionalIterator>
+    inline typename
+    __gnu_cxx::__enable_if<__is_iterator<_BidirectionalIterator>::__value,
+			   _BidirectionalIterator>::__type
+    prev(_BidirectionalIterator __x, typename
+	 iterator_traits<_BidirectionalIterator>::difference_type __n = 1) 
+    {
+      std::advance(__x, -__n);
+      return __x;
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif /* _STL_ITERATOR_BASE_FUNCS_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator_base_types.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator_base_types.h
new file mode 100644
index 0000000..cea7819
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_iterator_base_types.h
@@ -0,0 +1,182 @@
+// Types used in iterator implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_iterator_base_types.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ *
+ *  This file contains all of the general iterator-related utility types,
+ *  such as iterator_traits and struct iterator.
+ */
+
+#ifndef _STL_ITERATOR_BASE_TYPES_H
+#define _STL_ITERATOR_BASE_TYPES_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  @defgroup iterators Iterators
+   *  Abstractions for uniform iterating through various underlying types.
+  */
+  //@{ 
+
+  /**
+   *  @defgroup iterator_tags Iterator Tags
+   *  These are empty types, used to distinguish different iterators.  The
+   *  distinction is not made by what they contain, but simply by what they
+   *  are.  Different underlying algorithms can then be used based on the
+   *  different operations supported by different iterator types.
+  */
+  //@{ 
+  ///  Marking input iterators.
+  struct input_iterator_tag { };
+
+  ///  Marking output iterators.
+  struct output_iterator_tag { };
+
+  /// Forward iterators support a superset of input iterator operations.
+  struct forward_iterator_tag : public input_iterator_tag { };
+
+  /// Bidirectional iterators support a superset of forward iterator
+  /// operations.
+  struct bidirectional_iterator_tag : public forward_iterator_tag { };
+
+  /// Random-access iterators support a superset of bidirectional
+  /// iterator operations.
+  struct random_access_iterator_tag : public bidirectional_iterator_tag { };
+  //@}
+
+  /**
+   *  @brief  Common %iterator class.
+   *
+   *  This class does nothing but define nested typedefs.  %Iterator classes
+   *  can inherit from this class to save some work.  The typedefs are then
+   *  used in specializations and overloading.
+   *
+   *  In particular, there are no default implementations of requirements
+   *  such as @c operator++ and the like.  (How could there be?)
+  */
+  template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
+           typename _Pointer = _Tp*, typename _Reference = _Tp&>
+    struct iterator
+    {
+      /// One of the @link iterator_tags tag types@endlink.
+      typedef _Category  iterator_category;
+      /// The type "pointed to" by the iterator.
+      typedef _Tp        value_type;
+      /// Distance between iterators is represented as this type.
+      typedef _Distance  difference_type;
+      /// This type represents a pointer-to-value_type.
+      typedef _Pointer   pointer;
+      /// This type represents a reference-to-value_type.
+      typedef _Reference reference;
+    };
+
+  /**
+   *  @brief  Traits class for iterators.
+   *
+   *  This class does nothing but define nested typedefs.  The general
+   *  version simply @a forwards the nested typedefs from the Iterator
+   *  argument.  Specialized versions for pointers and pointers-to-const
+   *  provide tighter, more correct semantics.
+  */
+  template<typename _Iterator>
+    struct iterator_traits
+    {
+      typedef typename _Iterator::iterator_category iterator_category;
+      typedef typename _Iterator::value_type        value_type;
+      typedef typename _Iterator::difference_type   difference_type;
+      typedef typename _Iterator::pointer           pointer;
+      typedef typename _Iterator::reference         reference;
+    };
+
+  /// Partial specialization for pointer types.
+  template<typename _Tp>
+    struct iterator_traits<_Tp*>
+    {
+      typedef random_access_iterator_tag iterator_category;
+      typedef _Tp                         value_type;
+      typedef ptrdiff_t                   difference_type;
+      typedef _Tp*                        pointer;
+      typedef _Tp&                        reference;
+    };
+
+  /// Partial specialization for const pointer types.
+  template<typename _Tp>
+    struct iterator_traits<const _Tp*>
+    {
+      typedef random_access_iterator_tag iterator_category;
+      typedef _Tp                         value_type;
+      typedef ptrdiff_t                   difference_type;
+      typedef const _Tp*                  pointer;
+      typedef const _Tp&                  reference;
+    };
+
+  /**
+   *  This function is not a part of the C++ standard but is syntactic
+   *  sugar for internal library use only.
+  */
+  template<typename _Iter>
+    inline typename iterator_traits<_Iter>::iterator_category
+    __iterator_category(const _Iter&)
+    { return typename iterator_traits<_Iter>::iterator_category(); }
+
+  //@}
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_ITERATOR_BASE_TYPES_H */
+
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_list.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_list.h
new file mode 100644
index 0000000..5fcbc4f
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_list.h
@@ -0,0 +1,1548 @@
+// List implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_list.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_LIST_H
+#define _STL_LIST_H 1
+
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  // Supporting structures are split into common and templated types; the
+  // latter publicly inherits from the former in an effort to reduce code
+  // duplication.  This results in some "needless" static_cast'ing later on,
+  // but it's all safe downcasting.
+
+  /// Common part of a node in the %list. 
+  struct _List_node_base
+  {
+    _List_node_base* _M_next;
+    _List_node_base* _M_prev;
+
+    static void
+    swap(_List_node_base& __x, _List_node_base& __y) throw ();
+
+    void
+    _M_transfer(_List_node_base * const __first,
+		_List_node_base * const __last) throw ();
+
+    void
+    _M_reverse() throw ();
+
+    void
+    _M_hook(_List_node_base * const __position) throw ();
+
+    void
+    _M_unhook() throw ();
+  };
+
+  /// An actual node in the %list.
+  template<typename _Tp>
+    struct _List_node : public _List_node_base
+    {
+      ///< User's data.
+      _Tp _M_data;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      template<typename... _Args>
+        _List_node(_Args&&... __args)
+	: _List_node_base(), _M_data(std::forward<_Args>(__args)...) { }
+#endif
+    };
+
+  /**
+   *  @brief A list::iterator.
+   *
+   *  All the functions are op overloads.
+  */
+  template<typename _Tp>
+    struct _List_iterator
+    {
+      typedef _List_iterator<_Tp>                _Self;
+      typedef _List_node<_Tp>                    _Node;
+
+      typedef ptrdiff_t                          difference_type;
+      typedef std::bidirectional_iterator_tag    iterator_category;
+      typedef _Tp                                value_type;
+      typedef _Tp*                               pointer;
+      typedef _Tp&                               reference;
+
+      _List_iterator()
+      : _M_node() { }
+
+      explicit
+      _List_iterator(_List_node_base* __x)
+      : _M_node(__x) { }
+
+      // Must downcast from List_node_base to _List_node to get to _M_data.
+      reference
+      operator*() const
+      { return static_cast<_Node*>(_M_node)->_M_data; }
+
+      pointer
+      operator->() const
+      { return &static_cast<_Node*>(_M_node)->_M_data; }
+
+      _Self&
+      operator++()
+      {
+	_M_node = _M_node->_M_next;
+	return *this;
+      }
+
+      _Self
+      operator++(int)
+      {
+	_Self __tmp = *this;
+	_M_node = _M_node->_M_next;
+	return __tmp;
+      }
+
+      _Self&
+      operator--()
+      {
+	_M_node = _M_node->_M_prev;
+	return *this;
+      }
+
+      _Self
+      operator--(int)
+      {
+	_Self __tmp = *this;
+	_M_node = _M_node->_M_prev;
+	return __tmp;
+      }
+
+      bool
+      operator==(const _Self& __x) const
+      { return _M_node == __x._M_node; }
+
+      bool
+      operator!=(const _Self& __x) const
+      { return _M_node != __x._M_node; }
+
+      // The only member points to the %list element.
+      _List_node_base* _M_node;
+    };
+
+  /**
+   *  @brief A list::const_iterator.
+   *
+   *  All the functions are op overloads.
+  */
+  template<typename _Tp>
+    struct _List_const_iterator
+    {
+      typedef _List_const_iterator<_Tp>          _Self;
+      typedef const _List_node<_Tp>              _Node;
+      typedef _List_iterator<_Tp>                iterator;
+
+      typedef ptrdiff_t                          difference_type;
+      typedef std::bidirectional_iterator_tag    iterator_category;
+      typedef _Tp                                value_type;
+      typedef const _Tp*                         pointer;
+      typedef const _Tp&                         reference;
+
+      _List_const_iterator()
+      : _M_node() { }
+
+      explicit
+      _List_const_iterator(const _List_node_base* __x)
+      : _M_node(__x) { }
+
+      _List_const_iterator(const iterator& __x)
+      : _M_node(__x._M_node) { }
+
+      // Must downcast from List_node_base to _List_node to get to
+      // _M_data.
+      reference
+      operator*() const
+      { return static_cast<_Node*>(_M_node)->_M_data; }
+
+      pointer
+      operator->() const
+      { return &static_cast<_Node*>(_M_node)->_M_data; }
+
+      _Self&
+      operator++()
+      {
+	_M_node = _M_node->_M_next;
+	return *this;
+      }
+
+      _Self
+      operator++(int)
+      {
+	_Self __tmp = *this;
+	_M_node = _M_node->_M_next;
+	return __tmp;
+      }
+
+      _Self&
+      operator--()
+      {
+	_M_node = _M_node->_M_prev;
+	return *this;
+      }
+
+      _Self
+      operator--(int)
+      {
+	_Self __tmp = *this;
+	_M_node = _M_node->_M_prev;
+	return __tmp;
+      }
+
+      bool
+      operator==(const _Self& __x) const
+      { return _M_node == __x._M_node; }
+
+      bool
+      operator!=(const _Self& __x) const
+      { return _M_node != __x._M_node; }
+
+      // The only member points to the %list element.
+      const _List_node_base* _M_node;
+    };
+
+  template<typename _Val>
+    inline bool
+    operator==(const _List_iterator<_Val>& __x,
+	       const _List_const_iterator<_Val>& __y)
+    { return __x._M_node == __y._M_node; }
+
+  template<typename _Val>
+    inline bool
+    operator!=(const _List_iterator<_Val>& __x,
+               const _List_const_iterator<_Val>& __y)
+    { return __x._M_node != __y._M_node; }
+
+
+  /// See bits/stl_deque.h's _Deque_base for an explanation.
+  template<typename _Tp, typename _Alloc>
+    class _List_base
+    {
+    protected:
+      // NOTA BENE
+      // The stored instance is not actually of "allocator_type"'s
+      // type.  Instead we rebind the type to
+      // Allocator<List_node<Tp>>, which according to [20.1.5]/4
+      // should probably be the same.  List_node<Tp> is not the same
+      // size as Tp (it's two pointers larger), and specializations on
+      // Tp may go unused because List_node<Tp> is being bound
+      // instead.
+      //
+      // We put this to the test in the constructors and in
+      // get_allocator, where we use conversions between
+      // allocator_type and _Node_alloc_type. The conversion is
+      // required by table 32 in [20.1.5].
+      typedef typename _Alloc::template rebind<_List_node<_Tp> >::other
+        _Node_alloc_type;
+
+      typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+
+      struct _List_impl 
+      : public _Node_alloc_type
+      {
+	_List_node_base _M_node;
+
+	_List_impl()
+	: _Node_alloc_type(), _M_node()
+	{ }
+
+	_List_impl(const _Node_alloc_type& __a)
+	: _Node_alloc_type(__a), _M_node()
+	{ }
+      };
+
+      _List_impl _M_impl;
+
+      _List_node<_Tp>*
+      _M_get_node()
+      { return _M_impl._Node_alloc_type::allocate(1); }
+      
+      void
+      _M_put_node(_List_node<_Tp>* __p)
+      { _M_impl._Node_alloc_type::deallocate(__p, 1); }
+      
+  public:
+      typedef _Alloc allocator_type;
+
+      _Node_alloc_type&
+      _M_get_Node_allocator()
+      { return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
+
+      const _Node_alloc_type&
+      _M_get_Node_allocator() const
+      { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
+
+      _Tp_alloc_type
+      _M_get_Tp_allocator() const
+      { return _Tp_alloc_type(_M_get_Node_allocator()); }
+
+      allocator_type
+      get_allocator() const
+      { return allocator_type(_M_get_Node_allocator()); }
+
+      _List_base()
+      : _M_impl()
+      { _M_init(); }
+
+      _List_base(const allocator_type& __a)
+      : _M_impl(__a)
+      { _M_init(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      _List_base(_List_base&& __x)
+      : _M_impl(__x._M_get_Node_allocator())
+      {
+	_M_init();
+	_List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);	
+      }
+#endif
+
+      // This is what actually destroys the list.
+      ~_List_base()
+      { _M_clear(); }
+
+      void
+      _M_clear();
+
+      void
+      _M_init()
+      {
+        this->_M_impl._M_node._M_next = &this->_M_impl._M_node;
+        this->_M_impl._M_node._M_prev = &this->_M_impl._M_node;
+      }
+    };
+
+  /**
+   *  @brief A standard container with linear time access to elements,
+   *  and fixed time insertion/deletion at any point in the sequence.
+   *
+   *  @ingroup sequences
+   *
+   *  Meets the requirements of a <a href="tables.html#65">container</a>, a
+   *  <a href="tables.html#66">reversible container</a>, and a
+   *  <a href="tables.html#67">sequence</a>, including the
+   *  <a href="tables.html#68">optional sequence requirements</a> with the
+   *  %exception of @c at and @c operator[].
+   *
+   *  This is a @e doubly @e linked %list.  Traversal up and down the
+   *  %list requires linear time, but adding and removing elements (or
+   *  @e nodes) is done in constant time, regardless of where the
+   *  change takes place.  Unlike std::vector and std::deque,
+   *  random-access iterators are not provided, so subscripting ( @c
+   *  [] ) access is not allowed.  For algorithms which only need
+   *  sequential access, this lack makes no difference.
+   *
+   *  Also unlike the other standard containers, std::list provides
+   *  specialized algorithms %unique to linked lists, such as
+   *  splicing, sorting, and in-place reversal.
+   *
+   *  A couple points on memory allocation for list<Tp>:
+   *
+   *  First, we never actually allocate a Tp, we allocate
+   *  List_node<Tp>'s and trust [20.1.5]/4 to DTRT.  This is to ensure
+   *  that after elements from %list<X,Alloc1> are spliced into
+   *  %list<X,Alloc2>, destroying the memory of the second %list is a
+   *  valid operation, i.e., Alloc1 giveth and Alloc2 taketh away.
+   *
+   *  Second, a %list conceptually represented as
+   *  @code
+   *    A <---> B <---> C <---> D
+   *  @endcode
+   *  is actually circular; a link exists between A and D.  The %list
+   *  class holds (as its only data member) a private list::iterator
+   *  pointing to @e D, not to @e A!  To get to the head of the %list,
+   *  we start at the tail and move forward by one.  When this member
+   *  iterator's next/previous pointers refer to itself, the %list is
+   *  %empty. 
+  */
+  template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+    class list : protected _List_base<_Tp, _Alloc>
+    {
+      // concept requirements
+      typedef typename _Alloc::value_type                _Alloc_value_type;
+      __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+      __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
+
+      typedef _List_base<_Tp, _Alloc>                    _Base;
+      typedef typename _Base::_Tp_alloc_type		 _Tp_alloc_type;
+
+    public:
+      typedef _Tp                                        value_type;
+      typedef typename _Tp_alloc_type::pointer           pointer;
+      typedef typename _Tp_alloc_type::const_pointer     const_pointer;
+      typedef typename _Tp_alloc_type::reference         reference;
+      typedef typename _Tp_alloc_type::const_reference   const_reference;
+      typedef _List_iterator<_Tp>                        iterator;
+      typedef _List_const_iterator<_Tp>                  const_iterator;
+      typedef std::reverse_iterator<const_iterator>      const_reverse_iterator;
+      typedef std::reverse_iterator<iterator>            reverse_iterator;
+      typedef size_t                                     size_type;
+      typedef ptrdiff_t                                  difference_type;
+      typedef _Alloc                                     allocator_type;
+
+    protected:
+      // Note that pointers-to-_Node's can be ctor-converted to
+      // iterator types.
+      typedef _List_node<_Tp>				 _Node;
+
+      using _Base::_M_impl;
+      using _Base::_M_put_node;
+      using _Base::_M_get_node;
+      using _Base::_M_get_Tp_allocator;
+      using _Base::_M_get_Node_allocator;
+
+      /**
+       *  @param  x  An instance of user data.
+       *
+       *  Allocates space for a new node and constructs a copy of @a x in it.
+       */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+      _Node*
+      _M_create_node(const value_type& __x)
+      {
+	_Node* __p = this->_M_get_node();
+	__try
+	  {
+	    _M_get_Tp_allocator().construct(&__p->_M_data, __x);
+	  }
+	__catch(...)
+	  {
+	    _M_put_node(__p);
+	    __throw_exception_again;
+	  }
+	return __p;
+      }
+#else
+      template<typename... _Args>
+        _Node*
+        _M_create_node(_Args&&... __args)
+	{
+	  _Node* __p = this->_M_get_node();
+	  __try
+	    {
+	      _M_get_Node_allocator().construct(__p,
+						std::forward<_Args>(__args)...);
+	    }
+	  __catch(...)
+	    {
+	      _M_put_node(__p);
+	      __throw_exception_again;
+	    }
+	  return __p;
+	}
+#endif
+
+    public:
+      // [23.2.2.1] construct/copy/destroy
+      // (assign() and get_allocator() are also listed in this section)
+      /**
+       *  @brief  Default constructor creates no elements.
+       */
+      list()
+      : _Base() { }
+
+      /**
+       *  @brief  Creates a %list with no elements.
+       *  @param  a  An allocator object.
+       */
+      explicit
+      list(const allocator_type& __a)
+      : _Base(__a) { }
+
+      /**
+       *  @brief  Creates a %list with copies of an exemplar element.
+       *  @param  n  The number of elements to initially create.
+       *  @param  value  An element to copy.
+       *  @param  a  An allocator object.
+       *
+       *  This constructor fills the %list with @a n copies of @a value.
+       */
+      explicit
+      list(size_type __n, const value_type& __value = value_type(),
+	   const allocator_type& __a = allocator_type())
+      : _Base(__a)
+      { _M_fill_initialize(__n, __value); }
+
+      /**
+       *  @brief  %List copy constructor.
+       *  @param  x  A %list of identical element and allocator types.
+       *
+       *  The newly-created %list uses a copy of the allocation object used
+       *  by @a x.
+       */
+      list(const list& __x)
+      : _Base(__x._M_get_Node_allocator())
+      { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %List move constructor.
+       *  @param  x  A %list of identical element and allocator types.
+       *
+       *  The newly-created %list contains the exact contents of @a x.
+       *  The contents of @a x are a valid, but unspecified %list.
+       */
+      list(list&& __x)
+      : _Base(std::forward<_Base>(__x)) { }
+
+      /**
+       *  @brief  Builds a %list from an initializer_list
+       *  @param  l  An initializer_list of value_type.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %list consisting of copies of the elements in the
+       *  initializer_list @a l.  This is linear in l.size().
+       */
+      list(initializer_list<value_type> __l,
+           const allocator_type& __a = allocator_type())
+      : _Base(__a)
+      { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); }
+#endif
+
+      /**
+       *  @brief  Builds a %list from a range.
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %list consisting of copies of the elements from
+       *  [@a first,@a last).  This is linear in N (where N is
+       *  distance(@a first,@a last)).
+       */
+      template<typename _InputIterator>
+        list(_InputIterator __first, _InputIterator __last,
+	     const allocator_type& __a = allocator_type())
+        : _Base(__a)
+        { 
+	  // Check whether it's an integral type.  If so, it's not an iterator.
+	  typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	  _M_initialize_dispatch(__first, __last, _Integral());
+	}
+
+      /**
+       *  No explicit dtor needed as the _Base dtor takes care of
+       *  things.  The _Base dtor only erases the elements, and note
+       *  that if the elements themselves are pointers, the pointed-to
+       *  memory is not touched in any way.  Managing the pointer is
+       *  the user's responsibility.
+       */
+
+      /**
+       *  @brief  %List assignment operator.
+       *  @param  x  A %list of identical element and allocator types.
+       *
+       *  All the elements of @a x are copied, but unlike the copy
+       *  constructor, the allocator object is not copied.
+       */
+      list&
+      operator=(const list& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %List move assignment operator.
+       *  @param  x  A %list of identical element and allocator types.
+       *
+       *  The contents of @a x are moved into this %list (without copying).
+       *  @a x is a valid, but unspecified %list
+       */
+      list&
+      operator=(list&& __x)
+      {
+	// NB: DR 1204.
+	// NB: DR 675.
+	this->clear();
+	this->swap(__x);
+	return *this;
+      }
+
+      /**
+       *  @brief  %List initializer list assignment operator.
+       *  @param  l  An initializer_list of value_type.
+       *
+       *  Replace the contents of the %list with copies of the elements
+       *  in the initializer_list @a l.  This is linear in l.size().
+       */
+      list&
+      operator=(initializer_list<value_type> __l)
+      {
+	this->assign(__l.begin(), __l.end());
+	return *this;
+      }
+#endif
+
+      /**
+       *  @brief  Assigns a given value to a %list.
+       *  @param  n  Number of elements to be assigned.
+       *  @param  val  Value to be assigned.
+       *
+       *  This function fills a %list with @a n copies of the given
+       *  value.  Note that the assignment completely changes the %list
+       *  and that the resulting %list's size is the same as the number
+       *  of elements assigned.  Old data may be lost.
+       */
+      void
+      assign(size_type __n, const value_type& __val)
+      { _M_fill_assign(__n, __val); }
+
+      /**
+       *  @brief  Assigns a range to a %list.
+       *  @param  first  An input iterator.
+       *  @param  last   An input iterator.
+       *
+       *  This function fills a %list with copies of the elements in the
+       *  range [@a first,@a last).
+       *
+       *  Note that the assignment completely changes the %list and
+       *  that the resulting %list's size is the same as the number of
+       *  elements assigned.  Old data may be lost.
+       */
+      template<typename _InputIterator>
+        void
+        assign(_InputIterator __first, _InputIterator __last)
+        {
+	  // Check whether it's an integral type.  If so, it's not an iterator.
+	  typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+	  _M_assign_dispatch(__first, __last, _Integral());
+	}
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Assigns an initializer_list to a %list.
+       *  @param  l  An initializer_list of value_type.
+       *
+       *  Replace the contents of the %list with copies of the elements
+       *  in the initializer_list @a l.  This is linear in l.size().
+       */
+      void
+      assign(initializer_list<value_type> __l)
+      { this->assign(__l.begin(), __l.end()); }
+#endif
+
+      /// Get a copy of the memory allocation object.
+      allocator_type
+      get_allocator() const
+      { return _Base::get_allocator(); }
+
+      // iterators
+      /**
+       *  Returns a read/write iterator that points to the first element in the
+       *  %list.  Iteration is done in ordinary element order.
+       */
+      iterator
+      begin()
+      { return iterator(this->_M_impl._M_node._M_next); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the
+       *  first element in the %list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      begin() const
+      { return const_iterator(this->_M_impl._M_node._M_next); }
+
+      /**
+       *  Returns a read/write iterator that points one past the last
+       *  element in the %list.  Iteration is done in ordinary element
+       *  order.
+       */
+      iterator
+      end()
+      { return iterator(&this->_M_impl._M_node); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past
+       *  the last element in the %list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      end() const
+      { return const_iterator(&this->_M_impl._M_node); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to the last
+       *  element in the %list.  Iteration is done in reverse element
+       *  order.
+       */
+      reverse_iterator
+      rbegin()
+      { return reverse_iterator(end()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to
+       *  the last element in the %list.  Iteration is done in reverse
+       *  element order.
+       */
+      const_reverse_iterator
+      rbegin() const
+      { return const_reverse_iterator(end()); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to one
+       *  before the first element in the %list.  Iteration is done in
+       *  reverse element order.
+       */
+      reverse_iterator
+      rend()
+      { return reverse_iterator(begin()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first element in the %list.  Iteration is done in reverse
+       *  element order.
+       */
+      const_reverse_iterator
+      rend() const
+      { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the
+       *  first element in the %list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      cbegin() const
+      { return const_iterator(this->_M_impl._M_node._M_next); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past
+       *  the last element in the %list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      cend() const
+      { return const_iterator(&this->_M_impl._M_node); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to
+       *  the last element in the %list.  Iteration is done in reverse
+       *  element order.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first element in the %list.  Iteration is done in reverse
+       *  element order.
+       */
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
+      // [23.2.2.2] capacity
+      /**
+       *  Returns true if the %list is empty.  (Thus begin() would equal
+       *  end().)
+       */
+      bool
+      empty() const
+      { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
+
+      /**  Returns the number of elements in the %list.  */
+      size_type
+      size() const
+      { return std::distance(begin(), end()); }
+
+      /**  Returns the size() of the largest possible %list.  */
+      size_type
+      max_size() const
+      { return _M_get_Node_allocator().max_size(); }
+
+      /**
+       *  @brief Resizes the %list to the specified number of elements.
+       *  @param new_size Number of elements the %list should contain.
+       *  @param x Data with which new elements should be populated.
+       *
+       *  This function will %resize the %list to the specified number
+       *  of elements.  If the number is smaller than the %list's
+       *  current size the %list is truncated, otherwise the %list is
+       *  extended and new elements are populated with given data.
+       */
+      void
+      resize(size_type __new_size, value_type __x = value_type());
+
+      // element access
+      /**
+       *  Returns a read/write reference to the data at the first
+       *  element of the %list.
+       */
+      reference
+      front()
+      { return *begin(); }
+
+      /**
+       *  Returns a read-only (constant) reference to the data at the first
+       *  element of the %list.
+       */
+      const_reference
+      front() const
+      { return *begin(); }
+
+      /**
+       *  Returns a read/write reference to the data at the last element
+       *  of the %list.
+       */
+      reference
+      back()
+      { 
+	iterator __tmp = end();
+	--__tmp;
+	return *__tmp;
+      }
+
+      /**
+       *  Returns a read-only (constant) reference to the data at the last
+       *  element of the %list.
+       */
+      const_reference
+      back() const
+      { 
+	const_iterator __tmp = end();
+	--__tmp;
+	return *__tmp;
+      }
+
+      // [23.2.2.3] modifiers
+      /**
+       *  @brief  Add data to the front of the %list.
+       *  @param  x  Data to be added.
+       *
+       *  This is a typical stack operation.  The function creates an
+       *  element at the front of the %list and assigns the given data
+       *  to it.  Due to the nature of a %list this operation can be
+       *  done in constant time, and does not invalidate iterators and
+       *  references.
+       */
+      void
+      push_front(const value_type& __x)
+      { this->_M_insert(begin(), __x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_front(value_type&& __x)
+      { this->_M_insert(begin(), std::move(__x)); }
+
+      template<typename... _Args>
+        void
+        emplace_front(_Args&&... __args)
+        { this->_M_insert(begin(), std::forward<_Args>(__args)...); }
+#endif
+
+      /**
+       *  @brief  Removes first element.
+       *
+       *  This is a typical stack operation.  It shrinks the %list by
+       *  one.  Due to the nature of a %list this operation can be done
+       *  in constant time, and only invalidates iterators/references to
+       *  the element being removed.
+       *
+       *  Note that no data is returned, and if the first element's data
+       *  is needed, it should be retrieved before pop_front() is
+       *  called.
+       */
+      void
+      pop_front()
+      { this->_M_erase(begin()); }
+
+      /**
+       *  @brief  Add data to the end of the %list.
+       *  @param  x  Data to be added.
+       *
+       *  This is a typical stack operation.  The function creates an
+       *  element at the end of the %list and assigns the given data to
+       *  it.  Due to the nature of a %list this operation can be done
+       *  in constant time, and does not invalidate iterators and
+       *  references.
+       */
+      void
+      push_back(const value_type& __x)
+      { this->_M_insert(end(), __x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_back(value_type&& __x)
+      { this->_M_insert(end(), std::move(__x)); }
+
+      template<typename... _Args>
+        void
+        emplace_back(_Args&&... __args)
+        { this->_M_insert(end(), std::forward<_Args>(__args)...); }
+#endif
+
+      /**
+       *  @brief  Removes last element.
+       *
+       *  This is a typical stack operation.  It shrinks the %list by
+       *  one.  Due to the nature of a %list this operation can be done
+       *  in constant time, and only invalidates iterators/references to
+       *  the element being removed.
+       *
+       *  Note that no data is returned, and if the last element's data
+       *  is needed, it should be retrieved before pop_back() is called.
+       */
+      void
+      pop_back()
+      { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Constructs object in %list before specified iterator.
+       *  @param  position  A const_iterator into the %list.
+       *  @param  args  Arguments.
+       *  @return  An iterator that points to the inserted data.
+       *
+       *  This function will insert an object of type T constructed
+       *  with T(std::forward<Args>(args)...) before the specified
+       *  location.  Due to the nature of a %list this operation can
+       *  be done in constant time, and does not invalidate iterators
+       *  and references.
+       */
+      template<typename... _Args>
+        iterator
+        emplace(iterator __position, _Args&&... __args);
+#endif
+
+      /**
+       *  @brief  Inserts given value into %list before specified iterator.
+       *  @param  position  An iterator into the %list.
+       *  @param  x  Data to be inserted.
+       *  @return  An iterator that points to the inserted data.
+       *
+       *  This function will insert a copy of the given value before
+       *  the specified location.  Due to the nature of a %list this
+       *  operation can be done in constant time, and does not
+       *  invalidate iterators and references.
+       */
+      iterator
+      insert(iterator __position, const value_type& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Inserts given rvalue into %list before specified iterator.
+       *  @param  position  An iterator into the %list.
+       *  @param  x  Data to be inserted.
+       *  @return  An iterator that points to the inserted data.
+       *
+       *  This function will insert a copy of the given rvalue before
+       *  the specified location.  Due to the nature of a %list this
+       *  operation can be done in constant time, and does not
+       *  invalidate iterators and references.
+        */
+      iterator
+      insert(iterator __position, value_type&& __x)
+      { return emplace(__position, std::move(__x)); }
+
+      /**
+       *  @brief  Inserts the contents of an initializer_list into %list
+       *          before specified iterator.
+       *  @param  p  An iterator into the %list.
+       *  @param  l  An initializer_list of value_type.
+       *
+       *  This function will insert copies of the data in the
+       *  initializer_list @a l into the %list before the location
+       *  specified by @a p.
+       *
+       *  This operation is linear in the number of elements inserted and
+       *  does not invalidate iterators and references.
+       */
+      void
+      insert(iterator __p, initializer_list<value_type> __l)
+      { this->insert(__p, __l.begin(), __l.end()); }
+#endif
+
+      /**
+       *  @brief  Inserts a number of copies of given data into the %list.
+       *  @param  position  An iterator into the %list.
+       *  @param  n  Number of elements to be inserted.
+       *  @param  x  Data to be inserted.
+       *
+       *  This function will insert a specified number of copies of the
+       *  given data before the location specified by @a position.
+       *
+       *  This operation is linear in the number of elements inserted and
+       *  does not invalidate iterators and references.
+       */
+      void
+      insert(iterator __position, size_type __n, const value_type& __x)
+      {  
+	list __tmp(__n, __x, _M_get_Node_allocator());
+	splice(__position, __tmp);
+      }
+
+      /**
+       *  @brief  Inserts a range into the %list.
+       *  @param  position  An iterator into the %list.
+       *  @param  first  An input iterator.
+       *  @param  last   An input iterator.
+       *
+       *  This function will insert copies of the data in the range [@a
+       *  first,@a last) into the %list before the location specified by
+       *  @a position.
+       *
+       *  This operation is linear in the number of elements inserted and
+       *  does not invalidate iterators and references.
+       */
+      template<typename _InputIterator>
+        void
+        insert(iterator __position, _InputIterator __first,
+	       _InputIterator __last)
+        {
+	  list __tmp(__first, __last, _M_get_Node_allocator());
+	  splice(__position, __tmp);
+	}
+
+      /**
+       *  @brief  Remove element at given position.
+       *  @param  position  Iterator pointing to element to be erased.
+       *  @return  An iterator pointing to the next element (or end()).
+       *
+       *  This function will erase the element at the given position and thus
+       *  shorten the %list by one.
+       *
+       *  Due to the nature of a %list this operation can be done in
+       *  constant time, and only invalidates iterators/references to
+       *  the element being removed.  The user is also cautioned that
+       *  this function only erases the element, and that if the element
+       *  is itself a pointer, the pointed-to memory is not touched in
+       *  any way.  Managing the pointer is the user's responsibility.
+       */
+      iterator
+      erase(iterator __position);
+
+      /**
+       *  @brief  Remove a range of elements.
+       *  @param  first  Iterator pointing to the first element to be erased.
+       *  @param  last  Iterator pointing to one past the last element to be
+       *                erased.
+       *  @return  An iterator pointing to the element pointed to by @a last
+       *           prior to erasing (or end()).
+       *
+       *  This function will erase the elements in the range @a
+       *  [first,last) and shorten the %list accordingly.
+       *
+       *  This operation is linear time in the size of the range and only
+       *  invalidates iterators/references to the element being removed.
+       *  The user is also cautioned that this function only erases the
+       *  elements, and that if the elements themselves are pointers, the
+       *  pointed-to memory is not touched in any way.  Managing the pointer
+       *  is the user's responsibility.
+       */
+      iterator
+      erase(iterator __first, iterator __last)
+      {
+	while (__first != __last)
+	  __first = erase(__first);
+	return __last;
+      }
+
+      /**
+       *  @brief  Swaps data with another %list.
+       *  @param  x  A %list of the same element and allocator types.
+       *
+       *  This exchanges the elements between two lists in constant
+       *  time.  Note that the global std::swap() function is
+       *  specialized such that std::swap(l1,l2) will feed to this
+       *  function.
+       */
+      void
+      swap(list& __x)
+      {
+	_List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
+
+	// _GLIBCXX_RESOLVE_LIB_DEFECTS
+	// 431. Swapping containers with unequal allocators.
+	std::__alloc_swap<typename _Base::_Node_alloc_type>::
+	  _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator());
+      }
+
+      /**
+       *  Erases all the elements.  Note that this function only erases
+       *  the elements, and that if the elements themselves are
+       *  pointers, the pointed-to memory is not touched in any way.
+       *  Managing the pointer is the user's responsibility.
+       */
+      void
+      clear()
+      {
+        _Base::_M_clear();
+        _Base::_M_init();
+      }
+
+      // [23.2.2.4] list operations
+      /**
+       *  @brief  Insert contents of another %list.
+       *  @param  position  Iterator referencing the element to insert before.
+       *  @param  x  Source list.
+       *
+       *  The elements of @a x are inserted in constant time in front of
+       *  the element referenced by @a position.  @a x becomes an empty
+       *  list.
+       *
+       *  Requires this != @a x.
+       */
+      void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      splice(iterator __position, list&& __x)
+#else
+      splice(iterator __position, list& __x)
+#endif
+      {
+	if (!__x.empty())
+	  {
+	    _M_check_equal_allocators(__x);
+
+	    this->_M_transfer(__position, __x.begin(), __x.end());
+	  }
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      splice(iterator __position, list& __x)
+      { splice(__position, std::move(__x)); }
+#endif
+
+      /**
+       *  @brief  Insert element from another %list.
+       *  @param  position  Iterator referencing the element to insert before.
+       *  @param  x  Source list.
+       *  @param  i  Iterator referencing the element to move.
+       *
+       *  Removes the element in list @a x referenced by @a i and
+       *  inserts it into the current list before @a position.
+       */
+      void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      splice(iterator __position, list&& __x, iterator __i)
+#else
+      splice(iterator __position, list& __x, iterator __i)
+#endif
+      {
+	iterator __j = __i;
+	++__j;
+	if (__position == __i || __position == __j)
+	  return;
+
+	if (this != &__x)
+	  _M_check_equal_allocators(__x);
+
+	this->_M_transfer(__position, __i, __j);
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      splice(iterator __position, list& __x, iterator __i)
+      { splice(__position, std::move(__x), __i); }
+#endif
+
+      /**
+       *  @brief  Insert range from another %list.
+       *  @param  position  Iterator referencing the element to insert before.
+       *  @param  x  Source list.
+       *  @param  first  Iterator referencing the start of range in x.
+       *  @param  last  Iterator referencing the end of range in x.
+       *
+       *  Removes elements in the range [first,last) and inserts them
+       *  before @a position in constant time.
+       *
+       *  Undefined if @a position is in [first,last).
+       */
+      void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      splice(iterator __position, list&& __x, iterator __first,
+	     iterator __last)
+#else
+      splice(iterator __position, list& __x, iterator __first,
+	     iterator __last)
+#endif
+      {
+	if (__first != __last)
+	  {
+	    if (this != &__x)
+	      _M_check_equal_allocators(__x);
+
+	    this->_M_transfer(__position, __first, __last);
+	  }
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      splice(iterator __position, list& __x, iterator __first, iterator __last)
+      { splice(__position, std::move(__x), __first, __last); }
+#endif
+
+      /**
+       *  @brief  Remove all elements equal to value.
+       *  @param  value  The value to remove.
+       *
+       *  Removes every element in the list equal to @a value.
+       *  Remaining elements stay in list order.  Note that this
+       *  function only erases the elements, and that if the elements
+       *  themselves are pointers, the pointed-to memory is not
+       *  touched in any way.  Managing the pointer is the user's
+       *  responsibility.
+       */
+      void
+      remove(const _Tp& __value);
+
+      /**
+       *  @brief  Remove all elements satisfying a predicate.
+       *  @param  Predicate  Unary predicate function or object.
+       *
+       *  Removes every element in the list for which the predicate
+       *  returns true.  Remaining elements stay in list order.  Note
+       *  that this function only erases the elements, and that if the
+       *  elements themselves are pointers, the pointed-to memory is
+       *  not touched in any way.  Managing the pointer is the user's
+       *  responsibility.
+       */
+      template<typename _Predicate>
+        void
+        remove_if(_Predicate);
+
+      /**
+       *  @brief  Remove consecutive duplicate elements.
+       *
+       *  For each consecutive set of elements with the same value,
+       *  remove all but the first one.  Remaining elements stay in
+       *  list order.  Note that this function only erases the
+       *  elements, and that if the elements themselves are pointers,
+       *  the pointed-to memory is not touched in any way.  Managing
+       *  the pointer is the user's responsibility.
+       */
+      void
+      unique();
+
+      /**
+       *  @brief  Remove consecutive elements satisfying a predicate.
+       *  @param  BinaryPredicate  Binary predicate function or object.
+       *
+       *  For each consecutive set of elements [first,last) that
+       *  satisfy predicate(first,i) where i is an iterator in
+       *  [first,last), remove all but the first one.  Remaining
+       *  elements stay in list order.  Note that this function only
+       *  erases the elements, and that if the elements themselves are
+       *  pointers, the pointed-to memory is not touched in any way.
+       *  Managing the pointer is the user's responsibility.
+       */
+      template<typename _BinaryPredicate>
+        void
+        unique(_BinaryPredicate);
+
+      /**
+       *  @brief  Merge sorted lists.
+       *  @param  x  Sorted list to merge.
+       *
+       *  Assumes that both @a x and this list are sorted according to
+       *  operator<().  Merges elements of @a x into this list in
+       *  sorted order, leaving @a x empty when complete.  Elements in
+       *  this list precede elements in @a x that are equal.
+       */
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      merge(list&& __x);
+
+      void
+      merge(list& __x)
+      { merge(std::move(__x)); }
+#else
+      void
+      merge(list& __x);
+#endif
+
+      /**
+       *  @brief  Merge sorted lists according to comparison function.
+       *  @param  x  Sorted list to merge.
+       *  @param StrictWeakOrdering Comparison function defining
+       *  sort order.
+       *
+       *  Assumes that both @a x and this list are sorted according to
+       *  StrictWeakOrdering.  Merges elements of @a x into this list
+       *  in sorted order, leaving @a x empty when complete.  Elements
+       *  in this list precede elements in @a x that are equivalent
+       *  according to StrictWeakOrdering().
+       */
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      template<typename _StrictWeakOrdering>
+        void
+        merge(list&&, _StrictWeakOrdering);
+
+      template<typename _StrictWeakOrdering>
+        void
+        merge(list& __x, _StrictWeakOrdering __comp)
+        { merge(std::move(__x), __comp); }
+#else
+      template<typename _StrictWeakOrdering>
+        void
+        merge(list&, _StrictWeakOrdering);
+#endif
+
+      /**
+       *  @brief  Reverse the elements in list.
+       *
+       *  Reverse the order of elements in the list in linear time.
+       */
+      void
+      reverse()
+      { this->_M_impl._M_node._M_reverse(); }
+
+      /**
+       *  @brief  Sort the elements.
+       *
+       *  Sorts the elements of this list in NlogN time.  Equivalent
+       *  elements remain in list order.
+       */
+      void
+      sort();
+
+      /**
+       *  @brief  Sort the elements according to comparison function.
+       *
+       *  Sorts the elements of this list in NlogN time.  Equivalent
+       *  elements remain in list order.
+       */
+      template<typename _StrictWeakOrdering>
+        void
+        sort(_StrictWeakOrdering);
+
+    protected:
+      // Internal constructor functions follow.
+
+      // Called by the range constructor to implement [23.1.1]/9
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 438. Ambiguity in the "do the right thing" clause
+      template<typename _Integer>
+        void
+        _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+        { _M_fill_initialize(static_cast<size_type>(__n), __x); }
+
+      // Called by the range constructor to implement [23.1.1]/9
+      template<typename _InputIterator>
+        void
+        _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+			       __false_type)
+        {
+	  for (; __first != __last; ++__first)
+	    push_back(*__first);
+	}
+
+      // Called by list(n,v,a), and the range constructor when it turns out
+      // to be the same thing.
+      void
+      _M_fill_initialize(size_type __n, const value_type& __x)
+      {
+	for (; __n > 0; --__n)
+	  push_back(__x);
+      }
+
+
+      // Internal assign functions follow.
+
+      // Called by the range assign to implement [23.1.1]/9
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 438. Ambiguity in the "do the right thing" clause
+      template<typename _Integer>
+        void
+        _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+        { _M_fill_assign(__n, __val); }
+
+      // Called by the range assign to implement [23.1.1]/9
+      template<typename _InputIterator>
+        void
+        _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+			   __false_type);
+
+      // Called by assign(n,t), and the range assign when it turns out
+      // to be the same thing.
+      void
+      _M_fill_assign(size_type __n, const value_type& __val);
+
+
+      // Moves the elements from [first,last) before position.
+      void
+      _M_transfer(iterator __position, iterator __first, iterator __last)
+      { __position._M_node->_M_transfer(__first._M_node, __last._M_node); }
+
+      // Inserts new element at position given and with value given.
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      _M_insert(iterator __position, const value_type& __x)
+      {
+        _Node* __tmp = _M_create_node(__x);
+        __tmp->_M_hook(__position._M_node);
+      }
+#else
+     template<typename... _Args>
+       void
+       _M_insert(iterator __position, _Args&&... __args)
+       {
+	 _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
+	 __tmp->_M_hook(__position._M_node);
+       }
+#endif
+
+      // Erases element at position given.
+      void
+      _M_erase(iterator __position)
+      {
+        __position._M_node->_M_unhook();
+        _Node* __n = static_cast<_Node*>(__position._M_node);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+        _M_get_Node_allocator().destroy(__n);
+#else
+	_M_get_Tp_allocator().destroy(&__n->_M_data);
+#endif
+        _M_put_node(__n);
+      }
+
+      // To implement the splice (and merge) bits of N1599.
+      void
+      _M_check_equal_allocators(list& __x)
+      {
+	if (std::__alloc_neq<typename _Base::_Node_alloc_type>::
+	    _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()))
+	  __throw_runtime_error(__N("list::_M_check_equal_allocators"));
+      }
+    };
+
+  /**
+   *  @brief  List equality comparison.
+   *  @param  x  A %list.
+   *  @param  y  A %list of the same type as @a x.
+   *  @return  True iff the size and elements of the lists are equal.
+   *
+   *  This is an equivalence relation.  It is linear in the size of
+   *  the lists.  Lists are considered equivalent if their sizes are
+   *  equal, and if corresponding elements compare equal.
+  */
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+    {
+      typedef typename list<_Tp, _Alloc>::const_iterator const_iterator;
+      const_iterator __end1 = __x.end();
+      const_iterator __end2 = __y.end();
+
+      const_iterator __i1 = __x.begin();
+      const_iterator __i2 = __y.begin();
+      while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
+	{
+	  ++__i1;
+	  ++__i2;
+	}
+      return __i1 == __end1 && __i2 == __end2;
+    }
+
+  /**
+   *  @brief  List ordering relation.
+   *  @param  x  A %list.
+   *  @param  y  A %list of the same type as @a x.
+   *  @return  True iff @a x is lexicographically less than @a y.
+   *
+   *  This is a total ordering relation.  It is linear in the size of the
+   *  lists.  The elements must be comparable with @c <.
+   *
+   *  See std::lexicographical_compare() for how the determination is made.
+  */
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+    { return std::lexicographical_compare(__x.begin(), __x.end(),
+					  __y.begin(), __y.end()); }
+
+  /// Based on operator==
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+    { return !(__x == __y); }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+    { return __y < __x; }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+    { return !(__y < __x); }
+
+  /// Based on operator<
+  template<typename _Tp, typename _Alloc>
+    inline bool
+    operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+    { return !(__x < __y); }
+
+  /// See std::list::swap().
+  template<typename _Tp, typename _Alloc>
+    inline void
+    swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
+    { __x.swap(__y); }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_LIST_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_map.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_map.h
new file mode 100644
index 0000000..7f81fab
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_map.h
@@ -0,0 +1,895 @@
+// Map implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_map.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_MAP_H
+#define _STL_MAP_H 1
+
+#include <bits/functexcept.h>
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  /**
+   *  @brief A standard container made up of (key,value) pairs, which can be
+   *  retrieved based on a key, in logarithmic time.
+   *
+   *  @ingroup associative_containers
+   *
+   *  Meets the requirements of a <a href="tables.html#65">container</a>, a
+   *  <a href="tables.html#66">reversible container</a>, and an
+   *  <a href="tables.html#69">associative container</a> (using unique keys).
+   *  For a @c map<Key,T> the key_type is Key, the mapped_type is T, and the
+   *  value_type is std::pair<const Key,T>.
+   *
+   *  Maps support bidirectional iterators.
+   *
+   *  The private tree data is declared exactly the same way for map and
+   *  multimap; the distinction is made entirely in how the tree functions are
+   *  called (*_unique versus *_equal, same as the standard).
+  */
+  template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+            typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
+    class map
+    {
+    public:
+      typedef _Key                                          key_type;
+      typedef _Tp                                           mapped_type;
+      typedef std::pair<const _Key, _Tp>                    value_type;
+      typedef _Compare                                      key_compare;
+      typedef _Alloc                                        allocator_type;
+
+    private:
+      // concept requirements
+      typedef typename _Alloc::value_type                   _Alloc_value_type;
+      __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+      __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+				_BinaryFunctionConcept)
+      __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
+
+    public:
+      class value_compare
+      : public std::binary_function<value_type, value_type, bool>
+      {
+	friend class map<_Key, _Tp, _Compare, _Alloc>;
+      protected:
+	_Compare comp;
+
+	value_compare(_Compare __c)
+	: comp(__c) { }
+
+      public:
+	bool operator()(const value_type& __x, const value_type& __y) const
+	{ return comp(__x.first, __y.first); }
+      };
+
+    private:
+      /// This turns a red-black tree into a [multi]map. 
+      typedef typename _Alloc::template rebind<value_type>::other 
+        _Pair_alloc_type;
+
+      typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
+		       key_compare, _Pair_alloc_type> _Rep_type;
+
+      /// The actual tree structure.
+      _Rep_type _M_t;
+
+    public:
+      // many of these are specified differently in ISO, but the following are
+      // "functionally equivalent"
+      typedef typename _Pair_alloc_type::pointer         pointer;
+      typedef typename _Pair_alloc_type::const_pointer   const_pointer;
+      typedef typename _Pair_alloc_type::reference       reference;
+      typedef typename _Pair_alloc_type::const_reference const_reference;
+      typedef typename _Rep_type::iterator               iterator;
+      typedef typename _Rep_type::const_iterator         const_iterator;
+      typedef typename _Rep_type::size_type              size_type;
+      typedef typename _Rep_type::difference_type        difference_type;
+      typedef typename _Rep_type::reverse_iterator       reverse_iterator;
+      typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+
+      // [23.3.1.1] construct/copy/destroy
+      // (get_allocator() is normally listed in this section, but seems to have
+      // been accidentally omitted in the printed standard)
+      /**
+       *  @brief  Default constructor creates no elements.
+       */
+      map()
+      : _M_t() { }
+
+      /**
+       *  @brief  Creates a %map with no elements.
+       *  @param  comp  A comparison object.
+       *  @param  a  An allocator object.
+       */
+      explicit
+      map(const _Compare& __comp,
+	  const allocator_type& __a = allocator_type())
+      : _M_t(__comp, __a) { }
+
+      /**
+       *  @brief  %Map copy constructor.
+       *  @param  x  A %map of identical element and allocator types.
+       *
+       *  The newly-created %map uses a copy of the allocation object
+       *  used by @a x.
+       */
+      map(const map& __x)
+      : _M_t(__x._M_t) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %Map move constructor.
+       *  @param  x  A %map of identical element and allocator types.
+       *
+       *  The newly-created %map contains the exact contents of @a x.
+       *  The contents of @a x are a valid, but unspecified %map.
+       */
+      map(map&& __x)
+      : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+
+      /**
+       *  @brief  Builds a %map from an initializer_list.
+       *  @param  l  An initializer_list.
+       *  @param  comp  A comparison object.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %map consisting of copies of the elements in the
+       *  initializer_list @a l.
+       *  This is linear in N if the range is already sorted, and NlogN
+       *  otherwise (where N is @a l.size()).
+       */
+      map(initializer_list<value_type> __l,
+	  const _Compare& __c = _Compare(),
+	  const allocator_type& __a = allocator_type())
+      : _M_t(__c, __a)
+      { _M_t._M_insert_unique(__l.begin(), __l.end()); }
+#endif
+
+      /**
+       *  @brief  Builds a %map from a range.
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *
+       *  Create a %map consisting of copies of the elements from [first,last).
+       *  This is linear in N if the range is already sorted, and NlogN
+       *  otherwise (where N is distance(first,last)).
+       */
+      template<typename _InputIterator>
+        map(_InputIterator __first, _InputIterator __last)
+	: _M_t()
+        { _M_t._M_insert_unique(__first, __last); }
+
+      /**
+       *  @brief  Builds a %map from a range.
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *  @param  comp  A comparison functor.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %map consisting of copies of the elements from [first,last).
+       *  This is linear in N if the range is already sorted, and NlogN
+       *  otherwise (where N is distance(first,last)).
+       */
+      template<typename _InputIterator>
+        map(_InputIterator __first, _InputIterator __last,
+	    const _Compare& __comp,
+	    const allocator_type& __a = allocator_type())
+	: _M_t(__comp, __a)
+        { _M_t._M_insert_unique(__first, __last); }
+
+      // FIXME There is no dtor declared, but we should have something
+      // generated by Doxygen.  I don't know what tags to add to this
+      // paragraph to make that happen:
+      /**
+       *  The dtor only erases the elements, and note that if the elements
+       *  themselves are pointers, the pointed-to memory is not touched in any
+       *  way.  Managing the pointer is the user's responsibility.
+       */
+
+      /**
+       *  @brief  %Map assignment operator.
+       *  @param  x  A %map of identical element and allocator types.
+       *
+       *  All the elements of @a x are copied, but unlike the copy constructor,
+       *  the allocator object is not copied.
+       */
+      map&
+      operator=(const map& __x)
+      {
+	_M_t = __x._M_t;
+	return *this;
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %Map move assignment operator.
+       *  @param  x  A %map of identical element and allocator types.
+       *
+       *  The contents of @a x are moved into this map (without copying).
+       *  @a x is a valid, but unspecified %map.
+       */
+      map&
+      operator=(map&& __x)
+      {
+	// NB: DR 1204.
+	// NB: DR 675.
+	this->clear();
+	this->swap(__x);
+	return *this;
+      }
+
+      /**
+       *  @brief  %Map list assignment operator.
+       *  @param  l  An initializer_list.
+       *
+       *  This function fills a %map with copies of the elements in the
+       *  initializer list @a l.
+       *
+       *  Note that the assignment completely changes the %map and
+       *  that the resulting %map's size is the same as the number
+       *  of elements assigned.  Old data may be lost.
+       */
+      map&
+      operator=(initializer_list<value_type> __l)
+      {
+	this->clear();
+	this->insert(__l.begin(), __l.end());
+	return *this;
+      }
+#endif
+
+      /// Get a copy of the memory allocation object.
+      allocator_type
+      get_allocator() const
+      { return _M_t.get_allocator(); }
+
+      // iterators
+      /**
+       *  Returns a read/write iterator that points to the first pair in the
+       *  %map.
+       *  Iteration is done in ascending order according to the keys.
+       */
+      iterator
+      begin()
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the first pair
+       *  in the %map.  Iteration is done in ascending order according to the
+       *  keys.
+       */
+      const_iterator
+      begin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read/write iterator that points one past the last
+       *  pair in the %map.  Iteration is done in ascending order
+       *  according to the keys.
+       */
+      iterator
+      end()
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  pair in the %map.  Iteration is done in ascending order according to
+       *  the keys.
+       */
+      const_iterator
+      end() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to the last pair in
+       *  the %map.  Iteration is done in descending order according to the
+       *  keys.
+       */
+      reverse_iterator
+      rbegin()
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last pair in the %map.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      const_reverse_iterator
+      rbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to one before the
+       *  first pair in the %map.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      rend()
+      { return _M_t.rend(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first pair in the %map.  Iteration is done in descending
+       *  order according to the keys.
+       */
+      const_reverse_iterator
+      rend() const
+      { return _M_t.rend(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first pair
+       *  in the %map.  Iteration is done in ascending order according to the
+       *  keys.
+       */
+      const_iterator
+      cbegin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  pair in the %map.  Iteration is done in ascending order according to
+       *  the keys.
+       */
+      const_iterator
+      cend() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last pair in the %map.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first pair in the %map.  Iteration is done in descending
+       *  order according to the keys.
+       */
+      const_reverse_iterator
+      crend() const
+      { return _M_t.rend(); }
+#endif
+
+      // capacity
+      /** Returns true if the %map is empty.  (Thus begin() would equal
+       *  end().)
+      */
+      bool
+      empty() const
+      { return _M_t.empty(); }
+
+      /** Returns the size of the %map.  */
+      size_type
+      size() const
+      { return _M_t.size(); }
+
+      /** Returns the maximum size of the %map.  */
+      size_type
+      max_size() const
+      { return _M_t.max_size(); }
+
+      // [23.3.1.2] element access
+      /**
+       *  @brief  Subscript ( @c [] ) access to %map data.
+       *  @param  k  The key for which data should be retrieved.
+       *  @return  A reference to the data of the (key,data) %pair.
+       *
+       *  Allows for easy lookup with the subscript ( @c [] )
+       *  operator.  Returns data associated with the key specified in
+       *  subscript.  If the key does not exist, a pair with that key
+       *  is created using default values, which is then returned.
+       *
+       *  Lookup requires logarithmic time.
+       */
+      mapped_type&
+      operator[](const key_type& __k)
+      {
+	// concept requirements
+	__glibcxx_function_requires(_DefaultConstructibleConcept<mapped_type>)
+
+	iterator __i = lower_bound(__k);
+	// __i->first is greater than or equivalent to __k.
+	if (__i == end() || key_comp()(__k, (*__i).first))
+          __i = insert(__i, value_type(__k, mapped_type()));
+	return (*__i).second;
+      }
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 464. Suggestion for new member functions in standard containers.
+      /**
+       *  @brief  Access to %map data.
+       *  @param  k  The key for which data should be retrieved.
+       *  @return  A reference to the data whose key is equivalent to @a k, if
+       *           such a data is present in the %map.
+       *  @throw  std::out_of_range  If no such data is present.
+       */
+      mapped_type&
+      at(const key_type& __k)
+      {
+	iterator __i = lower_bound(__k);
+	if (__i == end() || key_comp()(__k, (*__i).first))
+	  __throw_out_of_range(__N("map::at"));
+	return (*__i).second;
+      }
+
+      const mapped_type&
+      at(const key_type& __k) const
+      {
+	const_iterator __i = lower_bound(__k);
+	if (__i == end() || key_comp()(__k, (*__i).first))
+	  __throw_out_of_range(__N("map::at"));
+	return (*__i).second;
+      }
+
+      // modifiers
+      /**
+       *  @brief Attempts to insert a std::pair into the %map.
+
+       *  @param  x  Pair to be inserted (see std::make_pair for easy creation 
+       *	     of pairs).
+
+       *  @return  A pair, of which the first element is an iterator that 
+       *           points to the possibly inserted pair, and the second is 
+       *           a bool that is true if the pair was actually inserted.
+       *
+       *  This function attempts to insert a (key, value) %pair into the %map.
+       *  A %map relies on unique keys and thus a %pair is only inserted if its
+       *  first element (the key) is not already present in the %map.
+       *
+       *  Insertion requires logarithmic time.
+       */
+      std::pair<iterator, bool>
+      insert(const value_type& __x)
+      { return _M_t._M_insert_unique(__x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief Attempts to insert a list of std::pairs into the %map.
+       *  @param  list  A std::initializer_list<value_type> of pairs to be
+       *                inserted.
+       *
+       *  Complexity similar to that of the range constructor.
+       */
+      void
+      insert(std::initializer_list<value_type> __list)
+      { insert (__list.begin(), __list.end()); }
+#endif
+
+      /**
+       *  @brief Attempts to insert a std::pair into the %map.
+       *  @param  position  An iterator that serves as a hint as to where the
+       *                    pair should be inserted.
+       *  @param  x  Pair to be inserted (see std::make_pair for easy creation
+       *             of pairs).
+       *  @return  An iterator that points to the element with key of @a x (may
+       *           or may not be the %pair passed in).
+       *
+
+       *  This function is not concerned about whether the insertion
+       *  took place, and thus does not return a boolean like the
+       *  single-argument insert() does.  Note that the first
+       *  parameter is only a hint and can potentially improve the
+       *  performance of the insertion process.  A bad hint would
+       *  cause no gains in efficiency.
+       *
+       *  See
+       *  http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
+       *  for more on @a hinting.
+       *
+       *  Insertion requires logarithmic time (if the hint is not taken).
+       */
+      iterator
+      insert(iterator __position, const value_type& __x)
+      { return _M_t._M_insert_unique_(__position, __x); }
+
+      /**
+       *  @brief Template function that attempts to insert a range of elements.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 inserted.
+       *  @param  last  Iterator pointing to the end of the range.
+       *
+       *  Complexity similar to that of the range constructor.
+       */
+      template<typename _InputIterator>
+        void
+        insert(_InputIterator __first, _InputIterator __last)
+        { _M_t._M_insert_unique(__first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 130. Associative erase should return an iterator.
+      /**
+       *  @brief Erases an element from a %map.
+       *  @param  position  An iterator pointing to the element to be erased.
+       *  @return An iterator pointing to the element immediately following
+       *          @a position prior to the element being erased. If no such 
+       *          element exists, end() is returned.
+       *
+       *  This function erases an element, pointed to by the given
+       *  iterator, from a %map.  Note that this function only erases
+       *  the element, and that if the element is itself a pointer,
+       *  the pointed-to memory is not touched in any way.  Managing
+       *  the pointer is the user's responsibility.
+       */
+      iterator
+      erase(iterator __position)
+      { return _M_t.erase(__position); }
+#else
+      /**
+       *  @brief Erases an element from a %map.
+       *  @param  position  An iterator pointing to the element to be erased.
+       *
+       *  This function erases an element, pointed to by the given
+       *  iterator, from a %map.  Note that this function only erases
+       *  the element, and that if the element is itself a pointer,
+       *  the pointed-to memory is not touched in any way.  Managing
+       *  the pointer is the user's responsibility.
+       */
+      void
+      erase(iterator __position)
+      { _M_t.erase(__position); }
+#endif
+
+      /**
+       *  @brief Erases elements according to the provided key.
+       *  @param  x  Key of element to be erased.
+       *  @return  The number of elements erased.
+       *
+       *  This function erases all the elements located by the given key from
+       *  a %map.
+       *  Note that this function only erases the element, and that if
+       *  the element is itself a pointer, the pointed-to memory is not touched
+       *  in any way.  Managing the pointer is the user's responsibility.
+       */
+      size_type
+      erase(const key_type& __x)
+      { return _M_t.erase(__x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 130. Associative erase should return an iterator.
+      /**
+       *  @brief Erases a [first,last) range of elements from a %map.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 erased.
+       *  @param  last  Iterator pointing to the end of the range to be erased.
+       *  @return The iterator @a last.
+       *
+       *  This function erases a sequence of elements from a %map.
+       *  Note that this function only erases the element, and that if
+       *  the element is itself a pointer, the pointed-to memory is not touched
+       *  in any way.  Managing the pointer is the user's responsibility.
+       */
+      iterator
+      erase(iterator __first, iterator __last)
+      { return _M_t.erase(__first, __last); }
+#else
+      /**
+       *  @brief Erases a [first,last) range of elements from a %map.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 erased.
+       *  @param  last  Iterator pointing to the end of the range to be erased.
+       *
+       *  This function erases a sequence of elements from a %map.
+       *  Note that this function only erases the element, and that if
+       *  the element is itself a pointer, the pointed-to memory is not touched
+       *  in any way.  Managing the pointer is the user's responsibility.
+       */
+      void
+      erase(iterator __first, iterator __last)
+      { _M_t.erase(__first, __last); }
+#endif
+
+      /**
+       *  @brief  Swaps data with another %map.
+       *  @param  x  A %map of the same element and allocator types.
+       *
+       *  This exchanges the elements between two maps in constant
+       *  time.  (It is only swapping a pointer, an integer, and an
+       *  instance of the @c Compare type (which itself is often
+       *  stateless and empty), so it should be quite fast.)  Note
+       *  that the global std::swap() function is specialized such
+       *  that std::swap(m1,m2) will feed to this function.
+       */
+      void
+      swap(map& __x)
+      { _M_t.swap(__x._M_t); }
+
+      /**
+       *  Erases all elements in a %map.  Note that this function only
+       *  erases the elements, and that if the elements themselves are
+       *  pointers, the pointed-to memory is not touched in any way.
+       *  Managing the pointer is the user's responsibility.
+       */
+      void
+      clear()
+      { _M_t.clear(); }
+
+      // observers
+      /**
+       *  Returns the key comparison object out of which the %map was
+       *  constructed.
+       */
+      key_compare
+      key_comp() const
+      { return _M_t.key_comp(); }
+
+      /**
+       *  Returns a value comparison object, built from the key comparison
+       *  object out of which the %map was constructed.
+       */
+      value_compare
+      value_comp() const
+      { return value_compare(_M_t.key_comp()); }
+
+      // [23.3.1.3] map operations
+      /**
+       *  @brief Tries to locate an element in a %map.
+       *  @param  x  Key of (key, value) %pair to be located.
+       *  @return  Iterator pointing to sought-after element, or end() if not
+       *           found.
+       *
+       *  This function takes a key and tries to locate the element with which
+       *  the key matches.  If successful the function returns an iterator
+       *  pointing to the sought after %pair.  If unsuccessful it returns the
+       *  past-the-end ( @c end() ) iterator.
+       */
+      iterator
+      find(const key_type& __x)
+      { return _M_t.find(__x); }
+
+      /**
+       *  @brief Tries to locate an element in a %map.
+       *  @param  x  Key of (key, value) %pair to be located.
+       *  @return  Read-only (constant) iterator pointing to sought-after
+       *           element, or end() if not found.
+       *
+       *  This function takes a key and tries to locate the element with which
+       *  the key matches.  If successful the function returns a constant
+       *  iterator pointing to the sought after %pair. If unsuccessful it
+       *  returns the past-the-end ( @c end() ) iterator.
+       */
+      const_iterator
+      find(const key_type& __x) const
+      { return _M_t.find(__x); }
+
+      /**
+       *  @brief  Finds the number of elements with given key.
+       *  @param  x  Key of (key, value) pairs to be located.
+       *  @return  Number of elements with specified key.
+       *
+       *  This function only makes sense for multimaps; for map the result will
+       *  either be 0 (not present) or 1 (present).
+       */
+      size_type
+      count(const key_type& __x) const
+      { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
+
+      /**
+       *  @brief Finds the beginning of a subsequence matching given key.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return  Iterator pointing to first element equal to or greater
+       *           than key, or end().
+       *
+       *  This function returns the first element of a subsequence of elements
+       *  that matches the given key.  If unsuccessful it returns an iterator
+       *  pointing to the first element that has a greater value than given key
+       *  or end() if no such element exists.
+       */
+      iterator
+      lower_bound(const key_type& __x)
+      { return _M_t.lower_bound(__x); }
+
+      /**
+       *  @brief Finds the beginning of a subsequence matching given key.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return  Read-only (constant) iterator pointing to first element
+       *           equal to or greater than key, or end().
+       *
+       *  This function returns the first element of a subsequence of elements
+       *  that matches the given key.  If unsuccessful it returns an iterator
+       *  pointing to the first element that has a greater value than given key
+       *  or end() if no such element exists.
+       */
+      const_iterator
+      lower_bound(const key_type& __x) const
+      { return _M_t.lower_bound(__x); }
+
+      /**
+       *  @brief Finds the end of a subsequence matching given key.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return Iterator pointing to the first element
+       *          greater than key, or end().
+       */
+      iterator
+      upper_bound(const key_type& __x)
+      { return _M_t.upper_bound(__x); }
+
+      /**
+       *  @brief Finds the end of a subsequence matching given key.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return  Read-only (constant) iterator pointing to first iterator
+       *           greater than key, or end().
+       */
+      const_iterator
+      upper_bound(const key_type& __x) const
+      { return _M_t.upper_bound(__x); }
+
+      /**
+       *  @brief Finds a subsequence matching given key.
+       *  @param  x  Key of (key, value) pairs to be located.
+       *  @return  Pair of iterators that possibly points to the subsequence
+       *           matching given key.
+       *
+       *  This function is equivalent to
+       *  @code
+       *    std::make_pair(c.lower_bound(val),
+       *                   c.upper_bound(val))
+       *  @endcode
+       *  (but is faster than making the calls separately).
+       *
+       *  This function probably only makes sense for multimaps.
+       */
+      std::pair<iterator, iterator>
+      equal_range(const key_type& __x)
+      { return _M_t.equal_range(__x); }
+
+      /**
+       *  @brief Finds a subsequence matching given key.
+       *  @param  x  Key of (key, value) pairs to be located.
+       *  @return  Pair of read-only (constant) iterators that possibly points
+       *           to the subsequence matching given key.
+       *
+       *  This function is equivalent to
+       *  @code
+       *    std::make_pair(c.lower_bound(val),
+       *                   c.upper_bound(val))
+       *  @endcode
+       *  (but is faster than making the calls separately).
+       *
+       *  This function probably only makes sense for multimaps.
+       */
+      std::pair<const_iterator, const_iterator>
+      equal_range(const key_type& __x) const
+      { return _M_t.equal_range(__x); }
+
+      template<typename _K1, typename _T1, typename _C1, typename _A1>
+        friend bool
+        operator==(const map<_K1, _T1, _C1, _A1>&,
+		   const map<_K1, _T1, _C1, _A1>&);
+
+      template<typename _K1, typename _T1, typename _C1, typename _A1>
+        friend bool
+        operator<(const map<_K1, _T1, _C1, _A1>&,
+		  const map<_K1, _T1, _C1, _A1>&);
+    };
+
+  /**
+   *  @brief  Map equality comparison.
+   *  @param  x  A %map.
+   *  @param  y  A %map of the same type as @a x.
+   *  @return  True iff the size and elements of the maps are equal.
+   *
+   *  This is an equivalence relation.  It is linear in the size of the
+   *  maps.  Maps are considered equivalent if their sizes are equal,
+   *  and if corresponding elements compare equal.
+  */
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+               const map<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return __x._M_t == __y._M_t; }
+
+  /**
+   *  @brief  Map ordering relation.
+   *  @param  x  A %map.
+   *  @param  y  A %map of the same type as @a x.
+   *  @return  True iff @a x is lexicographically less than @a y.
+   *
+   *  This is a total ordering relation.  It is linear in the size of the
+   *  maps.  The elements must be comparable with @c <.
+   *
+   *  See std::lexicographical_compare() for how the determination is made.
+  */
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+              const map<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return __x._M_t < __y._M_t; }
+
+  /// Based on operator==
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+               const map<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return !(__x == __y); }
+
+  /// Based on operator<
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+              const map<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return __y < __x; }
+
+  /// Based on operator<
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+               const map<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return !(__y < __x); }
+
+  /// Based on operator<
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+               const map<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return !(__x < __y); }
+
+  /// See std::map::swap().
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline void
+    swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
+	 map<_Key, _Tp, _Compare, _Alloc>& __y)
+    { __x.swap(__y); }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_MAP_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_multimap.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_multimap.h
new file mode 100644
index 0000000..e5575bc
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_multimap.h
@@ -0,0 +1,826 @@
+// Multimap implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_multimap.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_MULTIMAP_H
+#define _STL_MULTIMAP_H 1
+
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  /**
+   *  @brief A standard container made up of (key,value) pairs, which can be
+   *  retrieved based on a key, in logarithmic time.
+   *
+   *  @ingroup associative_containers
+   *
+   *  Meets the requirements of a <a href="tables.html#65">container</a>, a
+   *  <a href="tables.html#66">reversible container</a>, and an
+   *  <a href="tables.html#69">associative container</a> (using equivalent
+   *  keys).  For a @c multimap<Key,T> the key_type is Key, the mapped_type
+   *  is T, and the value_type is std::pair<const Key,T>.
+   *
+   *  Multimaps support bidirectional iterators.
+   *
+   *  The private tree data is declared exactly the same way for map and
+   *  multimap; the distinction is made entirely in how the tree functions are
+   *  called (*_unique versus *_equal, same as the standard).
+  */
+  template <typename _Key, typename _Tp,
+	    typename _Compare = std::less<_Key>,
+	    typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
+    class multimap
+    {
+    public:
+      typedef _Key                                          key_type;
+      typedef _Tp                                           mapped_type;
+      typedef std::pair<const _Key, _Tp>                    value_type;
+      typedef _Compare                                      key_compare;
+      typedef _Alloc                                        allocator_type;
+
+    private:
+      // concept requirements
+      typedef typename _Alloc::value_type                   _Alloc_value_type;
+      __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+      __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+				_BinaryFunctionConcept)
+      __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)	
+
+    public:
+      class value_compare
+      : public std::binary_function<value_type, value_type, bool>
+      {
+	friend class multimap<_Key, _Tp, _Compare, _Alloc>;
+      protected:
+	_Compare comp;
+
+	value_compare(_Compare __c)
+	: comp(__c) { }
+
+      public:
+	bool operator()(const value_type& __x, const value_type& __y) const
+	{ return comp(__x.first, __y.first); }
+      };
+
+    private:
+      /// This turns a red-black tree into a [multi]map.
+      typedef typename _Alloc::template rebind<value_type>::other 
+        _Pair_alloc_type;
+
+      typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
+		       key_compare, _Pair_alloc_type> _Rep_type;
+      /// The actual tree structure.
+      _Rep_type _M_t;
+
+    public:
+      // many of these are specified differently in ISO, but the following are
+      // "functionally equivalent"
+      typedef typename _Pair_alloc_type::pointer         pointer;
+      typedef typename _Pair_alloc_type::const_pointer   const_pointer;
+      typedef typename _Pair_alloc_type::reference       reference;
+      typedef typename _Pair_alloc_type::const_reference const_reference;
+      typedef typename _Rep_type::iterator               iterator;
+      typedef typename _Rep_type::const_iterator         const_iterator;
+      typedef typename _Rep_type::size_type              size_type;
+      typedef typename _Rep_type::difference_type        difference_type;
+      typedef typename _Rep_type::reverse_iterator       reverse_iterator;
+      typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+
+      // [23.3.2] construct/copy/destroy
+      // (get_allocator() is also listed in this section)
+      /**
+       *  @brief  Default constructor creates no elements.
+       */
+      multimap()
+      : _M_t() { }
+
+      /**
+       *  @brief  Creates a %multimap with no elements.
+       *  @param  comp  A comparison object.
+       *  @param  a  An allocator object.
+       */
+      explicit
+      multimap(const _Compare& __comp,
+	       const allocator_type& __a = allocator_type())
+      : _M_t(__comp, __a) { }
+
+      /**
+       *  @brief  %Multimap copy constructor.
+       *  @param  x  A %multimap of identical element and allocator types.
+       *
+       *  The newly-created %multimap uses a copy of the allocation object
+       *  used by @a x.
+       */
+      multimap(const multimap& __x)
+      : _M_t(__x._M_t) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %Multimap move constructor.
+       *  @param   x  A %multimap of identical element and allocator types.
+       *
+       *  The newly-created %multimap contains the exact contents of @a x.
+       *  The contents of @a x are a valid, but unspecified %multimap.
+       */
+      multimap(multimap&& __x)
+      : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+
+      /**
+       *  @brief  Builds a %multimap from an initializer_list.
+       *  @param  l  An initializer_list.
+       *  @param  comp  A comparison functor.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %multimap consisting of copies of the elements from
+       *  the initializer_list.  This is linear in N if the list is already
+       *  sorted, and NlogN otherwise (where N is @a __l.size()).
+       */
+      multimap(initializer_list<value_type> __l,
+	       const _Compare& __comp = _Compare(),
+	       const allocator_type& __a = allocator_type())
+      : _M_t(__comp, __a)
+      { _M_t._M_insert_equal(__l.begin(), __l.end()); }
+#endif
+
+      /**
+       *  @brief  Builds a %multimap from a range.
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *
+       *  Create a %multimap consisting of copies of the elements from
+       *  [first,last).  This is linear in N if the range is already sorted,
+       *  and NlogN otherwise (where N is distance(first,last)).
+       */
+      template<typename _InputIterator>
+        multimap(_InputIterator __first, _InputIterator __last)
+	: _M_t()
+        { _M_t._M_insert_equal(__first, __last); }
+
+      /**
+       *  @brief  Builds a %multimap from a range.
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *  @param  comp  A comparison functor.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %multimap consisting of copies of the elements from
+       *  [first,last).  This is linear in N if the range is already sorted,
+       *  and NlogN otherwise (where N is distance(first,last)).
+       */
+      template<typename _InputIterator>
+        multimap(_InputIterator __first, _InputIterator __last,
+		 const _Compare& __comp,
+		 const allocator_type& __a = allocator_type())
+        : _M_t(__comp, __a)
+        { _M_t._M_insert_equal(__first, __last); }
+
+      // FIXME There is no dtor declared, but we should have something generated
+      // by Doxygen.  I don't know what tags to add to this paragraph to make
+      // that happen:
+      /**
+       *  The dtor only erases the elements, and note that if the elements
+       *  themselves are pointers, the pointed-to memory is not touched in any
+       *  way.  Managing the pointer is the user's responsibility.
+       */
+
+      /**
+       *  @brief  %Multimap assignment operator.
+       *  @param  x  A %multimap of identical element and allocator types.
+       *
+       *  All the elements of @a x are copied, but unlike the copy constructor,
+       *  the allocator object is not copied.
+       */
+      multimap&
+      operator=(const multimap& __x)
+      {
+	_M_t = __x._M_t;
+	return *this;
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %Multimap move assignment operator.
+       *  @param  x  A %multimap of identical element and allocator types.
+       *
+       *  The contents of @a x are moved into this multimap (without copying).
+       *  @a x is a valid, but unspecified multimap.
+       */
+      multimap&
+      operator=(multimap&& __x)
+      {
+	// NB: DR 1204.
+	// NB: DR 675.
+	this->clear();
+	this->swap(__x);
+	return *this;
+      }
+
+      /**
+       *  @brief  %Multimap list assignment operator.
+       *  @param  l  An initializer_list.
+       *
+       *  This function fills a %multimap with copies of the elements
+       *  in the initializer list @a l.
+       *
+       *  Note that the assignment completely changes the %multimap and
+       *  that the resulting %multimap's size is the same as the number
+       *  of elements assigned.  Old data may be lost.
+       */
+      multimap&
+      operator=(initializer_list<value_type> __l)
+      {
+	this->clear();
+	this->insert(__l.begin(), __l.end());
+	return *this;
+      }
+#endif
+
+      /// Get a copy of the memory allocation object.
+      allocator_type
+      get_allocator() const
+      { return _M_t.get_allocator(); }
+
+      // iterators
+      /**
+       *  Returns a read/write iterator that points to the first pair in the
+       *  %multimap.  Iteration is done in ascending order according to the
+       *  keys.
+       */
+      iterator
+      begin()
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the first pair
+       *  in the %multimap.  Iteration is done in ascending order according to
+       *  the keys.
+       */
+      const_iterator
+      begin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read/write iterator that points one past the last pair in
+       *  the %multimap.  Iteration is done in ascending order according to the
+       *  keys.
+       */
+      iterator
+      end()
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  pair in the %multimap.  Iteration is done in ascending order according
+       *  to the keys.
+       */
+      const_iterator
+      end() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to the last pair in
+       *  the %multimap.  Iteration is done in descending order according to the
+       *  keys.
+       */
+      reverse_iterator
+      rbegin()
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last pair in the %multimap.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      const_reverse_iterator
+      rbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read/write reverse iterator that points to one before the
+       *  first pair in the %multimap.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      rend()
+      { return _M_t.rend(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first pair in the %multimap.  Iteration is done in
+       *  descending order according to the keys.
+       */
+      const_reverse_iterator
+      rend() const
+      { return _M_t.rend(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first pair
+       *  in the %multimap.  Iteration is done in ascending order according to
+       *  the keys.
+       */
+      const_iterator
+      cbegin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  pair in the %multimap.  Iteration is done in ascending order according
+       *  to the keys.
+       */
+      const_iterator
+      cend() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last pair in the %multimap.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first pair in the %multimap.  Iteration is done in
+       *  descending order according to the keys.
+       */
+      const_reverse_iterator
+      crend() const
+      { return _M_t.rend(); }
+#endif
+
+      // capacity
+      /** Returns true if the %multimap is empty.  */
+      bool
+      empty() const
+      { return _M_t.empty(); }
+
+      /** Returns the size of the %multimap.  */
+      size_type
+      size() const
+      { return _M_t.size(); }
+
+      /** Returns the maximum size of the %multimap.  */
+      size_type
+      max_size() const
+      { return _M_t.max_size(); }
+
+      // modifiers
+      /**
+       *  @brief Inserts a std::pair into the %multimap.
+       *  @param  x  Pair to be inserted (see std::make_pair for easy creation
+       *             of pairs).
+       *  @return An iterator that points to the inserted (key,value) pair.
+       *
+       *  This function inserts a (key, value) pair into the %multimap.
+       *  Contrary to a std::map the %multimap does not rely on unique keys and
+       *  thus multiple pairs with the same key can be inserted.
+       *
+       *  Insertion requires logarithmic time.
+       */
+      iterator
+      insert(const value_type& __x)
+      { return _M_t._M_insert_equal(__x); }
+
+      /**
+       *  @brief Inserts a std::pair into the %multimap.
+       *  @param  position  An iterator that serves as a hint as to where the
+       *                    pair should be inserted.
+       *  @param  x  Pair to be inserted (see std::make_pair for easy creation
+       *             of pairs).
+       *  @return An iterator that points to the inserted (key,value) pair.
+       *
+       *  This function inserts a (key, value) pair into the %multimap.
+       *  Contrary to a std::map the %multimap does not rely on unique keys and
+       *  thus multiple pairs with the same key can be inserted.
+       *  Note that the first parameter is only a hint and can potentially
+       *  improve the performance of the insertion process.  A bad hint would
+       *  cause no gains in efficiency.
+       *
+       *  For more on @a hinting, see:
+       *  http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
+       *
+       *  Insertion requires logarithmic time (if the hint is not taken).
+       */
+      iterator
+      insert(iterator __position, const value_type& __x)
+      { return _M_t._M_insert_equal_(__position, __x); }
+
+      /**
+       *  @brief A template function that attempts to insert a range
+       *  of elements.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 inserted.
+       *  @param  last  Iterator pointing to the end of the range.
+       *
+       *  Complexity similar to that of the range constructor.
+       */
+      template<typename _InputIterator>
+        void
+        insert(_InputIterator __first, _InputIterator __last)
+        { _M_t._M_insert_equal(__first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief Attempts to insert a list of std::pairs into the %multimap.
+       *  @param  list  A std::initializer_list<value_type> of pairs to be
+       *                inserted.
+       *
+       *  Complexity similar to that of the range constructor.
+       */
+      void
+      insert(initializer_list<value_type> __l)
+      { this->insert(__l.begin(), __l.end()); }
+#endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 130. Associative erase should return an iterator.
+      /**
+       *  @brief Erases an element from a %multimap.
+       *  @param  position  An iterator pointing to the element to be erased.
+       *  @return An iterator pointing to the element immediately following
+       *          @a position prior to the element being erased. If no such 
+       *          element exists, end() is returned.
+       *
+       *  This function erases an element, pointed to by the given iterator,
+       *  from a %multimap.  Note that this function only erases the element,
+       *  and that if the element is itself a pointer, the pointed-to memory is
+       *  not touched in any way.  Managing the pointer is the user's
+       *  responsibility.
+       */
+      iterator
+      erase(iterator __position)
+      { return _M_t.erase(__position); }
+#else
+      /**
+       *  @brief Erases an element from a %multimap.
+       *  @param  position  An iterator pointing to the element to be erased.
+       *
+       *  This function erases an element, pointed to by the given iterator,
+       *  from a %multimap.  Note that this function only erases the element,
+       *  and that if the element is itself a pointer, the pointed-to memory is
+       *  not touched in any way.  Managing the pointer is the user's
+       *  responsibility.
+       */
+      void
+      erase(iterator __position)
+      { _M_t.erase(__position); }
+#endif
+
+      /**
+       *  @brief Erases elements according to the provided key.
+       *  @param  x  Key of element to be erased.
+       *  @return  The number of elements erased.
+       *
+       *  This function erases all elements located by the given key from a
+       *  %multimap.
+       *  Note that this function only erases the element, and that if
+       *  the element is itself a pointer, the pointed-to memory is not touched
+       *  in any way.  Managing the pointer is the user's responsibility.
+       */
+      size_type
+      erase(const key_type& __x)
+      { return _M_t.erase(__x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 130. Associative erase should return an iterator.
+      /**
+       *  @brief Erases a [first,last) range of elements from a %multimap.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 erased.
+       *  @param  last  Iterator pointing to the end of the range to be erased.
+       *  @return The iterator @a last.
+       *
+       *  This function erases a sequence of elements from a %multimap.
+       *  Note that this function only erases the elements, and that if
+       *  the elements themselves are pointers, the pointed-to memory is not
+       *  touched in any way.  Managing the pointer is the user's responsibility.
+       */
+      iterator
+      erase(iterator __first, iterator __last)
+      { return _M_t.erase(__first, __last); }
+#else
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 130. Associative erase should return an iterator.
+      /**
+       *  @brief Erases a [first,last) range of elements from a %multimap.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 erased.
+       *  @param  last  Iterator pointing to the end of the range to be erased.
+       *
+       *  This function erases a sequence of elements from a %multimap.
+       *  Note that this function only erases the elements, and that if
+       *  the elements themselves are pointers, the pointed-to memory is not
+       *  touched in any way.  Managing the pointer is the user's responsibility.
+       */
+      void
+      erase(iterator __first, iterator __last)
+      { _M_t.erase(__first, __last); }
+#endif
+
+      /**
+       *  @brief  Swaps data with another %multimap.
+       *  @param  x  A %multimap of the same element and allocator types.
+       *
+       *  This exchanges the elements between two multimaps in constant time.
+       *  (It is only swapping a pointer, an integer, and an instance of
+       *  the @c Compare type (which itself is often stateless and empty), so it
+       *  should be quite fast.)
+       *  Note that the global std::swap() function is specialized such that
+       *  std::swap(m1,m2) will feed to this function.
+       */
+      void
+      swap(multimap& __x)
+      { _M_t.swap(__x._M_t); }
+
+      /**
+       *  Erases all elements in a %multimap.  Note that this function only
+       *  erases the elements, and that if the elements themselves are pointers,
+       *  the pointed-to memory is not touched in any way.  Managing the pointer
+       *  is the user's responsibility.
+       */
+      void
+      clear()
+      { _M_t.clear(); }
+
+      // observers
+      /**
+       *  Returns the key comparison object out of which the %multimap
+       *  was constructed.
+       */
+      key_compare
+      key_comp() const
+      { return _M_t.key_comp(); }
+
+      /**
+       *  Returns a value comparison object, built from the key comparison
+       *  object out of which the %multimap was constructed.
+       */
+      value_compare
+      value_comp() const
+      { return value_compare(_M_t.key_comp()); }
+
+      // multimap operations
+      /**
+       *  @brief Tries to locate an element in a %multimap.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return  Iterator pointing to sought-after element,
+       *           or end() if not found.
+       *
+       *  This function takes a key and tries to locate the element with which
+       *  the key matches.  If successful the function returns an iterator
+       *  pointing to the sought after %pair.  If unsuccessful it returns the
+       *  past-the-end ( @c end() ) iterator.
+       */
+      iterator
+      find(const key_type& __x)
+      { return _M_t.find(__x); }
+
+      /**
+       *  @brief Tries to locate an element in a %multimap.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return  Read-only (constant) iterator pointing to sought-after
+       *           element, or end() if not found.
+       *
+       *  This function takes a key and tries to locate the element with which
+       *  the key matches.  If successful the function returns a constant
+       *  iterator pointing to the sought after %pair.  If unsuccessful it
+       *  returns the past-the-end ( @c end() ) iterator.
+       */
+      const_iterator
+      find(const key_type& __x) const
+      { return _M_t.find(__x); }
+
+      /**
+       *  @brief Finds the number of elements with given key.
+       *  @param  x  Key of (key, value) pairs to be located.
+       *  @return Number of elements with specified key.
+       */
+      size_type
+      count(const key_type& __x) const
+      { return _M_t.count(__x); }
+
+      /**
+       *  @brief Finds the beginning of a subsequence matching given key.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return  Iterator pointing to first element equal to or greater
+       *           than key, or end().
+       *
+       *  This function returns the first element of a subsequence of elements
+       *  that matches the given key.  If unsuccessful it returns an iterator
+       *  pointing to the first element that has a greater value than given key
+       *  or end() if no such element exists.
+       */
+      iterator
+      lower_bound(const key_type& __x)
+      { return _M_t.lower_bound(__x); }
+
+      /**
+       *  @brief Finds the beginning of a subsequence matching given key.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return  Read-only (constant) iterator pointing to first element
+       *           equal to or greater than key, or end().
+       *
+       *  This function returns the first element of a subsequence of elements
+       *  that matches the given key.  If unsuccessful the iterator will point
+       *  to the next greatest element or, if no such greater element exists, to
+       *  end().
+       */
+      const_iterator
+      lower_bound(const key_type& __x) const
+      { return _M_t.lower_bound(__x); }
+
+      /**
+       *  @brief Finds the end of a subsequence matching given key.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return Iterator pointing to the first element
+       *          greater than key, or end().
+       */
+      iterator
+      upper_bound(const key_type& __x)
+      { return _M_t.upper_bound(__x); }
+
+      /**
+       *  @brief Finds the end of a subsequence matching given key.
+       *  @param  x  Key of (key, value) pair to be located.
+       *  @return  Read-only (constant) iterator pointing to first iterator
+       *           greater than key, or end().
+       */
+      const_iterator
+      upper_bound(const key_type& __x) const
+      { return _M_t.upper_bound(__x); }
+
+      /**
+       *  @brief Finds a subsequence matching given key.
+       *  @param  x  Key of (key, value) pairs to be located.
+       *  @return  Pair of iterators that possibly points to the subsequence
+       *           matching given key.
+       *
+       *  This function is equivalent to
+       *  @code
+       *    std::make_pair(c.lower_bound(val),
+       *                   c.upper_bound(val))
+       *  @endcode
+       *  (but is faster than making the calls separately).
+       */
+      std::pair<iterator, iterator>
+      equal_range(const key_type& __x)
+      { return _M_t.equal_range(__x); }
+
+      /**
+       *  @brief Finds a subsequence matching given key.
+       *  @param  x  Key of (key, value) pairs to be located.
+       *  @return  Pair of read-only (constant) iterators that possibly points
+       *           to the subsequence matching given key.
+       *
+       *  This function is equivalent to
+       *  @code
+       *    std::make_pair(c.lower_bound(val),
+       *                   c.upper_bound(val))
+       *  @endcode
+       *  (but is faster than making the calls separately).
+       */
+      std::pair<const_iterator, const_iterator>
+      equal_range(const key_type& __x) const
+      { return _M_t.equal_range(__x); }
+
+      template<typename _K1, typename _T1, typename _C1, typename _A1>
+        friend bool
+        operator==(const multimap<_K1, _T1, _C1, _A1>&,
+		   const multimap<_K1, _T1, _C1, _A1>&);
+
+      template<typename _K1, typename _T1, typename _C1, typename _A1>
+        friend bool
+        operator<(const multimap<_K1, _T1, _C1, _A1>&,
+		  const multimap<_K1, _T1, _C1, _A1>&);
+  };
+
+  /**
+   *  @brief  Multimap equality comparison.
+   *  @param  x  A %multimap.
+   *  @param  y  A %multimap of the same type as @a x.
+   *  @return  True iff the size and elements of the maps are equal.
+   *
+   *  This is an equivalence relation.  It is linear in the size of the
+   *  multimaps.  Multimaps are considered equivalent if their sizes are equal,
+   *  and if corresponding elements compare equal.
+  */
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+               const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return __x._M_t == __y._M_t; }
+
+  /**
+   *  @brief  Multimap ordering relation.
+   *  @param  x  A %multimap.
+   *  @param  y  A %multimap of the same type as @a x.
+   *  @return  True iff @a x is lexicographically less than @a y.
+   *
+   *  This is a total ordering relation.  It is linear in the size of the
+   *  multimaps.  The elements must be comparable with @c <.
+   *
+   *  See std::lexicographical_compare() for how the determination is made.
+  */
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+              const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return __x._M_t < __y._M_t; }
+
+  /// Based on operator==
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+               const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return !(__x == __y); }
+
+  /// Based on operator<
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+              const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return __y < __x; }
+
+  /// Based on operator<
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+               const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return !(__y < __x); }
+
+  /// Based on operator<
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline bool
+    operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+               const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+    { return !(__x < __y); }
+
+  /// See std::multimap::swap().
+  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+    inline void
+    swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+         multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+    { __x.swap(__y); }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_MULTIMAP_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_multiset.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_multiset.h
new file mode 100644
index 0000000..209e58e
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_multiset.h
@@ -0,0 +1,721 @@
+// Multiset implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_multiset.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_MULTISET_H
+#define _STL_MULTISET_H 1
+
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+  /**
+   *  @brief A standard container made up of elements, which can be retrieved
+   *  in logarithmic time.
+   *
+   *  @ingroup associative_containers
+   *
+   *  Meets the requirements of a <a href="tables.html#65">container</a>, a
+   *  <a href="tables.html#66">reversible container</a>, and an
+   *  <a href="tables.html#69">associative container</a> (using equivalent
+   *  keys).  For a @c multiset<Key> the key_type and value_type are Key.
+   *
+   *  Multisets support bidirectional iterators.
+   *
+   *  The private tree data is declared exactly the same way for set and
+   *  multiset; the distinction is made entirely in how the tree functions are
+   *  called (*_unique versus *_equal, same as the standard).
+  */
+  template <typename _Key, typename _Compare = std::less<_Key>,
+	    typename _Alloc = std::allocator<_Key> >
+    class multiset
+    {
+      // concept requirements
+      typedef typename _Alloc::value_type                   _Alloc_value_type;
+      __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+      __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+				_BinaryFunctionConcept)
+      __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept)	
+
+    public:
+      // typedefs:
+      typedef _Key     key_type;
+      typedef _Key     value_type;
+      typedef _Compare key_compare;
+      typedef _Compare value_compare;
+      typedef _Alloc   allocator_type;
+
+    private:
+      /// This turns a red-black tree into a [multi]set.
+      typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
+
+      typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
+		       key_compare, _Key_alloc_type> _Rep_type;
+      /// The actual tree structure.
+      _Rep_type _M_t;
+
+    public:
+      typedef typename _Key_alloc_type::pointer             pointer;
+      typedef typename _Key_alloc_type::const_pointer       const_pointer;
+      typedef typename _Key_alloc_type::reference           reference;
+      typedef typename _Key_alloc_type::const_reference     const_reference;
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 103. set::iterator is required to be modifiable,
+      // but this allows modification of keys.
+      typedef typename _Rep_type::const_iterator            iterator;
+      typedef typename _Rep_type::const_iterator            const_iterator;
+      typedef typename _Rep_type::const_reverse_iterator    reverse_iterator;
+      typedef typename _Rep_type::const_reverse_iterator    const_reverse_iterator;
+      typedef typename _Rep_type::size_type                 size_type;
+      typedef typename _Rep_type::difference_type           difference_type;
+
+      // allocation/deallocation
+      /**
+       *  @brief  Default constructor creates no elements.
+       */
+      multiset()
+      : _M_t() { }
+
+      /**
+       *  @brief  Creates a %multiset with no elements.
+       *  @param  comp  Comparator to use.
+       *  @param  a  An allocator object.
+       */
+      explicit
+      multiset(const _Compare& __comp,
+	       const allocator_type& __a = allocator_type())
+      : _M_t(__comp, __a) { }
+
+      /**
+       *  @brief  Builds a %multiset from a range.
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *
+       *  Create a %multiset consisting of copies of the elements from
+       *  [first,last).  This is linear in N if the range is already sorted,
+       *  and NlogN otherwise (where N is distance(first,last)).
+       */
+      template<typename _InputIterator>
+        multiset(_InputIterator __first, _InputIterator __last)
+	: _M_t()
+        { _M_t._M_insert_equal(__first, __last); }
+
+      /**
+       *  @brief  Builds a %multiset from a range.
+       *  @param  first  An input iterator.
+       *  @param  last  An input iterator.
+       *  @param  comp  A comparison functor.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %multiset consisting of copies of the elements from
+       *  [first,last).  This is linear in N if the range is already sorted,
+       *  and NlogN otherwise (where N is distance(first,last)).
+       */
+      template<typename _InputIterator>
+        multiset(_InputIterator __first, _InputIterator __last,
+		 const _Compare& __comp,
+		 const allocator_type& __a = allocator_type())
+	: _M_t(__comp, __a)
+        { _M_t._M_insert_equal(__first, __last); }
+
+      /**
+       *  @brief  %Multiset copy constructor.
+       *  @param  x  A %multiset of identical element and allocator types.
+       *
+       *  The newly-created %multiset uses a copy of the allocation object used
+       *  by @a x.
+       */
+      multiset(const multiset& __x)
+      : _M_t(__x._M_t) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+     /**
+       *  @brief  %Multiset move constructor.
+       *  @param  x  A %multiset of identical element and allocator types.
+       *
+       *  The newly-created %multiset contains the exact contents of @a x.
+       *  The contents of @a x are a valid, but unspecified %multiset.
+       */
+      multiset(multiset&& __x)
+      : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+
+      /**
+       *  @brief  Builds a %multiset from an initializer_list.
+       *  @param  l  An initializer_list.
+       *  @param  comp  A comparison functor.
+       *  @param  a  An allocator object.
+       *
+       *  Create a %multiset consisting of copies of the elements from
+       *  the list.  This is linear in N if the list is already sorted,
+       *  and NlogN otherwise (where N is @a l.size()).
+       */
+      multiset(initializer_list<value_type> __l,
+	       const _Compare& __comp = _Compare(),
+	       const allocator_type& __a = allocator_type())
+      : _M_t(__comp, __a)
+      { _M_t._M_insert_equal(__l.begin(), __l.end()); }
+#endif
+
+      /**
+       *  @brief  %Multiset assignment operator.
+       *  @param  x  A %multiset of identical element and allocator types.
+       *
+       *  All the elements of @a x are copied, but unlike the copy constructor,
+       *  the allocator object is not copied.
+       */
+      multiset&
+      operator=(const multiset& __x)
+      {
+	_M_t = __x._M_t;
+	return *this;
+      }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  %Multiset move assignment operator.
+       *  @param  x  A %multiset of identical element and allocator types.
+       *
+       *  The contents of @a x are moved into this %multiset (without copying).
+       *  @a x is a valid, but unspecified %multiset.
+       */
+      multiset&
+      operator=(multiset&& __x)
+      {
+	// NB: DR 1204.
+	// NB: DR 675.
+	this->clear();
+	this->swap(__x);
+	return *this;
+      }
+
+      /**
+       *  @brief  %Multiset list assignment operator.
+       *  @param  l  An initializer_list.
+       *
+       *  This function fills a %multiset with copies of the elements in the
+       *  initializer list @a l.
+       *
+       *  Note that the assignment completely changes the %multiset and
+       *  that the resulting %multiset's size is the same as the number
+       *  of elements assigned.  Old data may be lost.
+       */
+      multiset&
+      operator=(initializer_list<value_type> __l)
+      {
+	this->clear();
+	this->insert(__l.begin(), __l.end());
+	return *this;
+      }
+#endif
+
+      // accessors:
+
+      ///  Returns the comparison object.
+      key_compare
+      key_comp() const
+      { return _M_t.key_comp(); }
+      ///  Returns the comparison object.
+      value_compare
+      value_comp() const
+      { return _M_t.key_comp(); }
+      ///  Returns the memory allocation object.
+      allocator_type
+      get_allocator() const
+      { return _M_t.get_allocator(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %multiset.  Iteration is done in ascending order
+       *  according to the keys.
+       */
+      iterator
+      begin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  element in the %multiset.  Iteration is done in ascending order
+       *  according to the keys.
+       */
+      iterator
+      end() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last element in the %multiset.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      rbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last element in the %multiset.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      rend() const
+      { return _M_t.rend(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %multiset.  Iteration is done in ascending order
+       *  according to the keys.
+       */
+      iterator
+      cbegin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  element in the %multiset.  Iteration is done in ascending order
+       *  according to the keys.
+       */
+      iterator
+      cend() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last element in the %multiset.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      crbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last element in the %multiset.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      crend() const
+      { return _M_t.rend(); }
+#endif
+
+      ///  Returns true if the %set is empty.
+      bool
+      empty() const
+      { return _M_t.empty(); }
+
+      ///  Returns the size of the %set.
+      size_type
+      size() const
+      { return _M_t.size(); }
+
+      ///  Returns the maximum size of the %set.
+      size_type
+      max_size() const
+      { return _M_t.max_size(); }
+
+      /**
+       *  @brief  Swaps data with another %multiset.
+       *  @param  x  A %multiset of the same element and allocator types.
+       *
+       *  This exchanges the elements between two multisets in constant time.
+       *  (It is only swapping a pointer, an integer, and an instance of the @c
+       *  Compare type (which itself is often stateless and empty), so it should
+       *  be quite fast.)
+       *  Note that the global std::swap() function is specialized such that
+       *  std::swap(s1,s2) will feed to this function.
+       */
+      void
+      swap(multiset& __x)
+      { _M_t.swap(__x._M_t); }
+
+      // insert/erase
+      /**
+       *  @brief Inserts an element into the %multiset.
+       *  @param  x  Element to be inserted.
+       *  @return An iterator that points to the inserted element.
+       *
+       *  This function inserts an element into the %multiset.  Contrary
+       *  to a std::set the %multiset does not rely on unique keys and thus
+       *  multiple copies of the same element can be inserted.
+       *
+       *  Insertion requires logarithmic time.
+       */
+      iterator
+      insert(const value_type& __x)
+      { return _M_t._M_insert_equal(__x); }
+
+      /**
+       *  @brief Inserts an element into the %multiset.
+       *  @param  position  An iterator that serves as a hint as to where the
+       *                    element should be inserted.
+       *  @param  x  Element to be inserted.
+       *  @return An iterator that points to the inserted element.
+       *
+       *  This function inserts an element into the %multiset.  Contrary
+       *  to a std::set the %multiset does not rely on unique keys and thus
+       *  multiple copies of the same element can be inserted.
+       *
+       *  Note that the first parameter is only a hint and can potentially
+       *  improve the performance of the insertion process.  A bad hint would
+       *  cause no gains in efficiency.
+       *
+       *  See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
+       *  for more on @a hinting.
+       *
+       *  Insertion requires logarithmic time (if the hint is not taken).
+       */
+      iterator
+      insert(iterator __position, const value_type& __x)
+      { return _M_t._M_insert_equal_(__position, __x); }
+
+      /**
+       *  @brief A template function that tries to insert a range of elements.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 inserted.
+       *  @param  last  Iterator pointing to the end of the range.
+       *
+       *  Complexity similar to that of the range constructor.
+       */
+      template<typename _InputIterator>
+        void
+        insert(_InputIterator __first, _InputIterator __last)
+        { _M_t._M_insert_equal(__first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief Attempts to insert a list of elements into the %multiset.
+       *  @param  list  A std::initializer_list<value_type> of elements
+       *                to be inserted.
+       *
+       *  Complexity similar to that of the range constructor.
+       */
+      void
+      insert(initializer_list<value_type> __l)
+      { this->insert(__l.begin(), __l.end()); }
+#endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 130. Associative erase should return an iterator.
+      /**
+       *  @brief Erases an element from a %multiset.
+       *  @param  position  An iterator pointing to the element to be erased.
+       *  @return An iterator pointing to the element immediately following
+       *          @a position prior to the element being erased. If no such 
+       *          element exists, end() is returned.
+       *
+       *  This function erases an element, pointed to by the given iterator,
+       *  from a %multiset.  Note that this function only erases the element,
+       *  and that if the element is itself a pointer, the pointed-to memory is
+       *  not touched in any way.  Managing the pointer is the user's
+       *  responsibility.
+       */
+      iterator
+      erase(iterator __position)
+      { return _M_t.erase(__position); }
+#else
+      /**
+       *  @brief Erases an element from a %multiset.
+       *  @param  position  An iterator pointing to the element to be erased.
+       *
+       *  This function erases an element, pointed to by the given iterator,
+       *  from a %multiset.  Note that this function only erases the element,
+       *  and that if the element is itself a pointer, the pointed-to memory is
+       *  not touched in any way.  Managing the pointer is the user's
+       *  responsibility.
+       */
+      void
+      erase(iterator __position)
+      { _M_t.erase(__position); }
+#endif
+
+      /**
+       *  @brief Erases elements according to the provided key.
+       *  @param  x  Key of element to be erased.
+       *  @return  The number of elements erased.
+       *
+       *  This function erases all elements located by the given key from a
+       *  %multiset.
+       *  Note that this function only erases the element, and that if
+       *  the element is itself a pointer, the pointed-to memory is not touched
+       *  in any way.  Managing the pointer is the user's responsibility.
+       */
+      size_type
+      erase(const key_type& __x)
+      { return _M_t.erase(__x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // DR 130. Associative erase should return an iterator.
+      /**
+       *  @brief Erases a [first,last) range of elements from a %multiset.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 erased.
+       *  @param  last  Iterator pointing to the end of the range to be erased.
+       *  @return The iterator @a last.
+       *
+       *  This function erases a sequence of elements from a %multiset.
+       *  Note that this function only erases the elements, and that if
+       *  the elements themselves are pointers, the pointed-to memory is not
+       *  touched in any way.  Managing the pointer is the user's responsibility.
+       */
+      iterator
+      erase(iterator __first, iterator __last)
+      { return _M_t.erase(__first, __last); }
+#else
+      /**
+       *  @brief Erases a [first,last) range of elements from a %multiset.
+       *  @param  first  Iterator pointing to the start of the range to be
+       *                 erased.
+       *  @param  last  Iterator pointing to the end of the range to be erased.
+       *
+       *  This function erases a sequence of elements from a %multiset.
+       *  Note that this function only erases the elements, and that if
+       *  the elements themselves are pointers, the pointed-to memory is not
+       *  touched in any way.  Managing the pointer is the user's responsibility.
+       */
+      void
+      erase(iterator __first, iterator __last)
+      { _M_t.erase(__first, __last); }
+#endif
+
+      /**
+       *  Erases all elements in a %multiset.  Note that this function only
+       *  erases the elements, and that if the elements themselves are pointers,
+       *  the pointed-to memory is not touched in any way.  Managing the pointer
+       *  is the user's responsibility.
+       */
+      void
+      clear()
+      { _M_t.clear(); }
+
+      // multiset operations:
+
+      /**
+       *  @brief Finds the number of elements with given key.
+       *  @param  x  Key of elements to be located.
+       *  @return Number of elements with specified key.
+       */
+      size_type
+      count(const key_type& __x) const
+      { return _M_t.count(__x); }
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 214.  set::find() missing const overload
+      //@{
+      /**
+       *  @brief Tries to locate an element in a %set.
+       *  @param  x  Element to be located.
+       *  @return  Iterator pointing to sought-after element, or end() if not
+       *           found.
+       *
+       *  This function takes a key and tries to locate the element with which
+       *  the key matches.  If successful the function returns an iterator
+       *  pointing to the sought after element.  If unsuccessful it returns the
+       *  past-the-end ( @c end() ) iterator.
+       */
+      iterator
+      find(const key_type& __x)
+      { return _M_t.find(__x); }
+
+      const_iterator
+      find(const key_type& __x) const
+      { return _M_t.find(__x); }
+      //@}
+
+      //@{
+      /**
+       *  @brief Finds the beginning of a subsequence matching given key.
+       *  @param  x  Key to be located.
+       *  @return  Iterator pointing to first element equal to or greater
+       *           than key, or end().
+       *
+       *  This function returns the first element of a subsequence of elements
+       *  that matches the given key.  If unsuccessful it returns an iterator
+       *  pointing to the first element that has a greater value than given key
+       *  or end() if no such element exists.
+       */
+      iterator
+      lower_bound(const key_type& __x)
+      { return _M_t.lower_bound(__x); }
+
+      const_iterator
+      lower_bound(const key_type& __x) const
+      { return _M_t.lower_bound(__x); }
+      //@}
+
+      //@{
+      /**
+       *  @brief Finds the end of a subsequence matching given key.
+       *  @param  x  Key to be located.
+       *  @return Iterator pointing to the first element
+       *          greater than key, or end().
+       */
+      iterator
+      upper_bound(const key_type& __x)
+      { return _M_t.upper_bound(__x); }
+
+      const_iterator
+      upper_bound(const key_type& __x) const
+      { return _M_t.upper_bound(__x); }
+      //@}
+
+      //@{
+      /**
+       *  @brief Finds a subsequence matching given key.
+       *  @param  x  Key to be located.
+       *  @return  Pair of iterators that possibly points to the subsequence
+       *           matching given key.
+       *
+       *  This function is equivalent to
+       *  @code
+       *    std::make_pair(c.lower_bound(val),
+       *                   c.upper_bound(val))
+       *  @endcode
+       *  (but is faster than making the calls separately).
+       *
+       *  This function probably only makes sense for multisets.
+       */
+      std::pair<iterator, iterator>
+      equal_range(const key_type& __x)
+      { return _M_t.equal_range(__x); }
+
+      std::pair<const_iterator, const_iterator>
+      equal_range(const key_type& __x) const
+      { return _M_t.equal_range(__x); }
+
+      template<typename _K1, typename _C1, typename _A1>
+        friend bool
+        operator==(const multiset<_K1, _C1, _A1>&,
+		   const multiset<_K1, _C1, _A1>&);
+
+      template<typename _K1, typename _C1, typename _A1>
+        friend bool
+        operator< (const multiset<_K1, _C1, _A1>&,
+		   const multiset<_K1, _C1, _A1>&);
+    };
+
+  /**
+   *  @brief  Multiset equality comparison.
+   *  @param  x  A %multiset.
+   *  @param  y  A %multiset of the same type as @a x.
+   *  @return  True iff the size and elements of the multisets are equal.
+   *
+   *  This is an equivalence relation.  It is linear in the size of the
+   *  multisets.
+   *  Multisets are considered equivalent if their sizes are equal, and if
+   *  corresponding elements compare equal.
+  */
+  template<typename _Key, typename _Compare, typename _Alloc>
+    inline bool
+    operator==(const multiset<_Key, _Compare, _Alloc>& __x,
+	       const multiset<_Key, _Compare, _Alloc>& __y)
+    { return __x._M_t == __y._M_t; }
+
+  /**
+   *  @brief  Multiset ordering relation.
+   *  @param  x  A %multiset.
+   *  @param  y  A %multiset of the same type as @a x.
+   *  @return  True iff @a x is lexicographically less than @a y.
+   *
+   *  This is a total ordering relation.  It is linear in the size of the
+   *  maps.  The elements must be comparable with @c <.
+   *
+   *  See std::lexicographical_compare() for how the determination is made.
+  */
+  template<typename _Key, typename _Compare, typename _Alloc>
+    inline bool
+    operator<(const multiset<_Key, _Compare, _Alloc>& __x,
+	      const multiset<_Key, _Compare, _Alloc>& __y)
+    { return __x._M_t < __y._M_t; }
+
+  ///  Returns !(x == y).
+  template<typename _Key, typename _Compare, typename _Alloc>
+    inline bool
+    operator!=(const multiset<_Key, _Compare, _Alloc>& __x,
+	       const multiset<_Key, _Compare, _Alloc>& __y)
+    { return !(__x == __y); }
+
+  ///  Returns y < x.
+  template<typename _Key, typename _Compare, typename _Alloc>
+    inline bool
+    operator>(const multiset<_Key,_Compare,_Alloc>& __x,
+	      const multiset<_Key,_Compare,_Alloc>& __y)
+    { return __y < __x; }
+
+  ///  Returns !(y < x)
+  template<typename _Key, typename _Compare, typename _Alloc>
+    inline bool
+    operator<=(const multiset<_Key, _Compare, _Alloc>& __x,
+	       const multiset<_Key, _Compare, _Alloc>& __y)
+    { return !(__y < __x); }
+
+  ///  Returns !(x < y)
+  template<typename _Key, typename _Compare, typename _Alloc>
+    inline bool
+    operator>=(const multiset<_Key, _Compare, _Alloc>& __x,
+	       const multiset<_Key, _Compare, _Alloc>& __y)
+    { return !(__x < __y); }
+
+  /// See std::multiset::swap().
+  template<typename _Key, typename _Compare, typename _Alloc>
+    inline void
+    swap(multiset<_Key, _Compare, _Alloc>& __x,
+	 multiset<_Key, _Compare, _Alloc>& __y)
+    { __x.swap(__y); }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_MULTISET_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_numeric.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_numeric.h
new file mode 100644
index 0000000..1adddf6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_numeric.h
@@ -0,0 +1,380 @@
+// Numeric functions implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_numeric.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_NUMERIC_H
+#define _STL_NUMERIC_H 1
+
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+#include <bits/move.h> // For _GLIBCXX_MOVE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  @brief  Create a range of sequentially increasing values.
+   *
+   *  For each element in the range @p [first,last) assigns @p value and
+   *  increments @p value as if by @p ++value.
+   *
+   *  @param  first  Start of range.
+   *  @param  last  End of range.
+   *  @param  value  Starting value.
+   *  @return  Nothing.
+   */
+  template<typename _ForwardIterator, typename _Tp>
+    void
+    iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+				  _ForwardIterator>)
+      __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+	    typename iterator_traits<_ForwardIterator>::value_type>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	{
+	  *__first = __value;
+	  ++__value;
+	}
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+  /**
+   *  @brief  Accumulate values in a range.
+   *
+   *  Accumulates the values in the range [first,last) using operator+().  The
+   *  initial value is @a init.  The values are processed in order.
+   *
+   *  @param  first  Start of range.
+   *  @param  last  End of range.
+   *  @param  init  Starting value to add other values to.
+   *  @return  The final sum.
+   */
+  template<typename _InputIterator, typename _Tp>
+    inline _Tp
+    accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	__init = __init + *__first;
+      return __init;
+    }
+
+  /**
+   *  @brief  Accumulate values in a range with operation.
+   *
+   *  Accumulates the values in the range [first,last) using the function
+   *  object @a binary_op.  The initial value is @a init.  The values are
+   *  processed in order.
+   *
+   *  @param  first  Start of range.
+   *  @param  last  End of range.
+   *  @param  init  Starting value to add other values to.
+   *  @param  binary_op  Function object to accumulate with.
+   *  @return  The final sum.
+   */
+  template<typename _InputIterator, typename _Tp, typename _BinaryOperation>
+    inline _Tp
+    accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
+	       _BinaryOperation __binary_op)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      for (; __first != __last; ++__first)
+	__init = __binary_op(__init, *__first);
+      return __init;
+    }
+
+  /**
+   *  @brief  Compute inner product of two ranges.
+   *
+   *  Starting with an initial value of @a init, multiplies successive
+   *  elements from the two ranges and adds each product into the accumulated
+   *  value using operator+().  The values in the ranges are processed in
+   *  order.
+   *
+   *  @param  first1  Start of range 1.
+   *  @param  last1  End of range 1.
+   *  @param  first2  Start of range 2.
+   *  @param  init  Starting value to add other values to.
+   *  @return  The final inner product.
+   */
+  template<typename _InputIterator1, typename _InputIterator2, typename _Tp>
+    inline _Tp
+    inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
+		  _InputIterator2 __first2, _Tp __init)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      for (; __first1 != __last1; ++__first1, ++__first2)
+	__init = __init + (*__first1 * *__first2);
+      return __init;
+    }
+
+  /**
+   *  @brief  Compute inner product of two ranges.
+   *
+   *  Starting with an initial value of @a init, applies @a binary_op2 to
+   *  successive elements from the two ranges and accumulates each result into
+   *  the accumulated value using @a binary_op1.  The values in the ranges are
+   *  processed in order.
+   *
+   *  @param  first1  Start of range 1.
+   *  @param  last1  End of range 1.
+   *  @param  first2  Start of range 2.
+   *  @param  init  Starting value to add other values to.
+   *  @param  binary_op1  Function object to accumulate with.
+   *  @param  binary_op2  Function object to apply to pairs of input values.
+   *  @return  The final inner product.
+   */
+  template<typename _InputIterator1, typename _InputIterator2, typename _Tp,
+	   typename _BinaryOperation1, typename _BinaryOperation2>
+    inline _Tp
+    inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
+		  _InputIterator2 __first2, _Tp __init,
+		  _BinaryOperation1 __binary_op1,
+		  _BinaryOperation2 __binary_op2)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      for (; __first1 != __last1; ++__first1, ++__first2)
+	__init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
+      return __init;
+    }
+
+  /**
+   *  @brief  Return list of partial sums
+   *
+   *  Accumulates the values in the range [first,last) using operator+().
+   *  As each successive input value is added into the total, that partial sum
+   *  is written to @a result.  Therefore, the first value in result is the
+   *  first value of the input, the second value in result is the sum of the
+   *  first and second input values, and so on.
+   *
+   *  @param  first  Start of input range.
+   *  @param  last  End of input range.
+   *  @param  result  Output to write sums to.
+   *  @return  Iterator pointing just beyond the values written to result.
+   */
+  template<typename _InputIterator, typename _OutputIterator>
+    _OutputIterator
+    partial_sum(_InputIterator __first, _InputIterator __last,
+		_OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				                         _ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __result;
+      _ValueType __value = *__first;
+      *__result = __value;
+      while (++__first != __last)
+	{
+	  __value = __value + *__first;
+	  *++__result = __value;
+	}
+      return ++__result;
+    }
+
+  /**
+   *  @brief  Return list of partial sums
+   *
+   *  Accumulates the values in the range [first,last) using operator+().
+   *  As each successive input value is added into the total, that partial sum
+   *  is written to @a result.  Therefore, the first value in result is the
+   *  first value of the input, the second value in result is the sum of the
+   *  first and second input values, and so on.
+   *
+   *  @param  first  Start of input range.
+   *  @param  last  End of input range.
+   *  @param  result  Output to write sums to.
+   *  @return  Iterator pointing just beyond the values written to result.
+   */
+  template<typename _InputIterator, typename _OutputIterator,
+	   typename _BinaryOperation>
+    _OutputIterator
+    partial_sum(_InputIterator __first, _InputIterator __last,
+		_OutputIterator __result, _BinaryOperation __binary_op)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				                         _ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __result;
+      _ValueType __value = *__first;
+      *__result = __value;
+      while (++__first != __last)
+	{
+	  __value = __binary_op(__value, *__first);
+	  *++__result = __value;
+	}
+      return ++__result;
+    }
+
+  /**
+   *  @brief  Return differences between adjacent values.
+   *
+   *  Computes the difference between adjacent values in the range
+   *  [first,last) using operator-() and writes the result to @a result.
+   *
+   *  @param  first  Start of input range.
+   *  @param  last  End of input range.
+   *  @param  result  Output to write sums to.
+   *  @return  Iterator pointing just beyond the values written to result.
+   *
+   *  _GLIBCXX_RESOLVE_LIB_DEFECTS
+   *  DR 539. partial_sum and adjacent_difference should mention requirements
+   */
+  template<typename _InputIterator, typename _OutputIterator>
+    _OutputIterator
+    adjacent_difference(_InputIterator __first,
+			_InputIterator __last, _OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				                         _ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __result;
+      _ValueType __value = *__first;
+      *__result = __value;
+      while (++__first != __last)
+	{
+	  _ValueType __tmp = *__first;
+	  *++__result = __tmp - __value;
+	  __value = _GLIBCXX_MOVE(__tmp);
+	}
+      return ++__result;
+    }
+
+  /**
+   *  @brief  Return differences between adjacent values.
+   *
+   *  Computes the difference between adjacent values in the range
+   *  [first,last) using the function object @a binary_op and writes the
+   *  result to @a result.
+   *
+   *  @param  first  Start of input range.
+   *  @param  last  End of input range.
+   *  @param  result  Output to write sums to.
+   *  @return  Iterator pointing just beyond the values written to result.
+   *
+   *  _GLIBCXX_RESOLVE_LIB_DEFECTS
+   *  DR 539. partial_sum and adjacent_difference should mention requirements
+   */
+  template<typename _InputIterator, typename _OutputIterator,
+	   typename _BinaryOperation>
+    _OutputIterator
+    adjacent_difference(_InputIterator __first, _InputIterator __last,
+			_OutputIterator __result, _BinaryOperation __binary_op)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+				                         _ValueType>)
+      __glibcxx_requires_valid_range(__first, __last);
+
+      if (__first == __last)
+	return __result;
+      _ValueType __value = *__first;
+      *__result = __value;
+      while (++__first != __last)
+	{
+	  _ValueType __tmp = *__first;
+	  *++__result = __binary_op(__tmp, __value);
+	  __value = _GLIBCXX_MOVE(__tmp);
+	}
+      return ++__result;
+    }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_NUMERIC_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_pair.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_pair.h
new file mode 100644
index 0000000..b3dd166
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_pair.h
@@ -0,0 +1,259 @@
+// Pair implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_pair.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_PAIR_H
+#define _STL_PAIR_H 1
+
+#include <bits/move.h> // for std::move / std::forward, std::decay, and
+                       // std::swap
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <type_traits>
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /// pair holds two objects of arbitrary type.
+  template<class _T1, class _T2>
+    struct pair
+    {
+      typedef _T1 first_type;    ///<  @c first_type is the first bound type
+      typedef _T2 second_type;   ///<  @c second_type is the second bound type
+
+      _T1 first;                 ///< @c first is a copy of the first object
+      _T2 second;                ///< @c second is a copy of the second object
+
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 265.  std::pair::pair() effects overly restrictive
+      /** The default constructor creates @c first and @c second using their
+       *  respective default constructors.  */
+      pair()
+      : first(), second() { }
+
+      /** Two objects may be passed to a @c pair constructor to be copied.  */
+      pair(const _T1& __a, const _T2& __b)
+      : first(__a), second(__b) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      // DR 811.
+      template<class _U1, class = typename
+	       std::enable_if<std::is_convertible<_U1, _T1>::value>::type>
+        pair(_U1&& __x, const _T2& __y)
+	: first(std::forward<_U1>(__x)),
+	  second(__y) { }
+
+      template<class _U2, class = typename
+	       std::enable_if<std::is_convertible<_U2, _T2>::value>::type>
+        pair(const _T1& __x, _U2&& __y)
+	: first(__x),
+	  second(std::forward<_U2>(__y)) { }
+
+      template<class _U1, class _U2, class = typename
+	       std::enable_if<std::is_convertible<_U1, _T1>::value
+			      && std::is_convertible<_U2, _T2>::value>::type>
+        pair(_U1&& __x, _U2&& __y)
+	: first(std::forward<_U1>(__x)),
+	  second(std::forward<_U2>(__y)) { }
+#endif
+
+      /** There is also a templated copy ctor for the @c pair class itself.  */
+      template<class _U1, class _U2>
+        pair(const pair<_U1, _U2>& __p)
+	: first(__p.first),
+	  second(__p.second) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      template<class _U1, class _U2>
+        pair(pair<_U1, _U2>&& __p)
+	: first(std::forward<_U1>(__p.first)),
+	  second(std::forward<_U2>(__p.second)) { }
+
+      pair&
+      operator=(pair&& __p)
+      { 
+	first = std::move(__p.first);
+	second = std::move(__p.second);
+	return *this;
+      }
+
+      template<class _U1, class _U2>
+        pair&
+        operator=(pair<_U1, _U2>&& __p)
+	{
+	  first = std::move(__p.first);
+	  second = std::move(__p.second);
+	  return *this;
+	}
+
+      void
+      swap(pair& __p)
+      {
+	using std::swap;
+	swap(first, __p.first);
+	swap(second, __p.second);	
+      }
+#endif
+    };
+
+  /// Two pairs of the same type are equal iff their members are equal.
+  template<class _T1, class _T2>
+    inline bool
+    operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+    { return __x.first == __y.first && __x.second == __y.second; }
+
+  /// <http://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html>
+  template<class _T1, class _T2>
+    inline bool
+    operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+    { return __x.first < __y.first
+	     || (!(__y.first < __x.first) && __x.second < __y.second); }
+
+  /// Uses @c operator== to find the result.
+  template<class _T1, class _T2>
+    inline bool
+    operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+    { return !(__x == __y); }
+
+  /// Uses @c operator< to find the result.
+  template<class _T1, class _T2>
+    inline bool
+    operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+    { return __y < __x; }
+
+  /// Uses @c operator< to find the result.
+  template<class _T1, class _T2>
+    inline bool
+    operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+    { return !(__y < __x); }
+
+  /// Uses @c operator< to find the result.
+  template<class _T1, class _T2>
+    inline bool
+    operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+    { return !(__x < __y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  /// See std::pair::swap().
+  // Note:  no std::swap overloads in C++03 mode, this has performance
+  //        implications, see, eg, libstdc++/38466.
+  template<class _T1, class _T2>
+    inline void
+    swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
+    { __x.swap(__y); }
+#endif
+
+  /**
+   *  @brief A convenience wrapper for creating a pair from two objects.
+   *  @param  x  The first object.
+   *  @param  y  The second object.
+   *  @return   A newly-constructed pair<> object of the appropriate type.
+   *
+   *  The standard requires that the objects be passed by reference-to-const,
+   *  but LWG issue #181 says they should be passed by const value.  We follow
+   *  the LWG by default.
+   */
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 181.  make_pair() unintended behavior
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+  template<class _T1, class _T2>
+    inline pair<_T1, _T2>
+    make_pair(_T1 __x, _T2 __y)
+    { return pair<_T1, _T2>(__x, __y); }
+#else
+  template<typename _Tp>
+    class reference_wrapper;
+
+  // Helper which adds a reference to a type when given a reference_wrapper
+  template<typename _Tp>
+    struct __strip_reference_wrapper
+    {
+      typedef _Tp __type;
+    };
+
+  template<typename _Tp>
+    struct __strip_reference_wrapper<reference_wrapper<_Tp> >
+    {
+      typedef _Tp& __type;
+    };
+
+  template<typename _Tp>
+    struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
+    {
+      typedef _Tp& __type;
+    };
+
+  template<typename _Tp>
+    struct __decay_and_strip
+    {
+      typedef typename __strip_reference_wrapper<
+	typename decay<_Tp>::type>::__type __type;
+    };
+
+  // NB: DR 706.
+  template<class _T1, class _T2>
+    inline pair<typename __decay_and_strip<_T1>::__type,
+		typename __decay_and_strip<_T2>::__type>
+    make_pair(_T1&& __x, _T2&& __y)
+    {
+      return pair<typename __decay_and_strip<_T1>::__type,
+	          typename __decay_and_strip<_T2>::__type>
+	(std::forward<_T1>(__x), std::forward<_T2>(__y));
+    }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_PAIR_H */
diff --git a/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_queue.h b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_queue.h
new file mode 100644
index 0000000..058f1b6
--- /dev/null
+++ b/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/bits/stl_queue.h
@@ -0,0 +1,564 @@
+// Queue implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_queue.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _STL_QUEUE_H
+#define _STL_QUEUE_H 1
+
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+  /**
+   *  @brief  A standard container giving FIFO behavior.
+   *
+   *  @ingroup sequences
+   *
+   *  Meets many of the requirements of a
+   *  <a href="tables.html#65">container</a>,
+   *  but does not define anything to do with iterators.  Very few of the
+   *  other standard container interfaces are defined.
+   *
+   *  This is not a true container, but an @e adaptor.  It holds another
+   *  container, and provides a wrapper interface to that container.  The
+   *  wrapper is what enforces strict first-in-first-out %queue behavior.
+   *
+   *  The second template parameter defines the type of the underlying
+   *  sequence/container.  It defaults to std::deque, but it can be any type
+   *  that supports @c front, @c back, @c push_back, and @c pop_front,
+   *  such as std::list or an appropriate user-defined type.
+   *
+   *  Members not found in @a normal containers are @c container_type,
+   *  which is a typedef for the second Sequence parameter, and @c push and
+   *  @c pop, which are standard %queue/FIFO operations.
+  */
+  template<typename _Tp, typename _Sequence = deque<_Tp> >
+    class queue
+    {
+      // concept requirements
+      typedef typename _Sequence::value_type _Sequence_value_type;
+      __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+      __glibcxx_class_requires(_Sequence, _FrontInsertionSequenceConcept)
+      __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
+      __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
+
+      template<typename _Tp1, typename _Seq1>
+        friend bool
+        operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
+
+      template<typename _Tp1, typename _Seq1>
+        friend bool
+        operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
+
+    public:
+      typedef typename _Sequence::value_type                value_type;
+      typedef typename _Sequence::reference                 reference;
+      typedef typename _Sequence::const_reference           const_reference;
+      typedef typename _Sequence::size_type                 size_type;
+      typedef          _Sequence                            container_type;
+
+    protected:
+      /**
+       *  'c' is the underlying container.  Maintainers wondering why
+       *  this isn't uglified as per style guidelines should note that
+       *  this name is specified in the standard, [23.2.3.1].  (Why?
+       *  Presumably for the same reason that it's protected instead
+       *  of private: to allow derivation.  But none of the other
+       *  containers allow for derivation.  Odd.)
+       */
+      _Sequence c;
+
+    public:
+      /**
+       *  @brief  Default constructor creates no elements.
+       */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+      explicit
+      queue(const _Sequence& __c = _Sequence())
+      : c(__c) { }
+#else
+      explicit
+      queue(const _Sequence& __c)
+      : c(__c) { }
+
+      explicit
+      queue(_Sequence&& __c = _Sequence())
+      : c(std::move(__c)) { }
+
+      queue(queue&& __q)
+      : c(std::move(__q.c)) { }
+
+      queue&
+      operator=(queue&& __q)
+      {
+	c = std::move(__q.c);
+	return *this;
+      }
+#endif
+
+      /**
+       *  Returns true if the %queue is empty.
+       */
+      bool
+      empty() const
+      { return c.empty(); }