Adjust to cm-13/M
No moar stlport
diff --git a/cnefeatureconfig/Android.mk b/cnefeatureconfig/Android.mk
index 951e134..30f5c5f 100644
--- a/cnefeatureconfig/Android.mk
+++ b/cnefeatureconfig/Android.mk
@@ -8,15 +8,12 @@
LOCAL_MODULE:= libcnefeatureconfig
LOCAL_MODULE_TAGS := optional
-LOCAL_SHARED_LIBRARIES := libc libcutils libstlport \
+LOCAL_SHARED_LIBRARIES := libc libcutils
LOCAL_C_INCLUDES := \
external/connectivity/cnefeatureconfig/inc \
external/connectivity/stlport/stlport
-LOCAL_REQUIRED_MODULES := \
- external/connectivity/stlport
-
LOCAL_PRELINK_MODULE := false
include $(BUILD_SHARED_LIBRARY)
diff --git a/stlport/README b/stlport/README
deleted file mode 100644
index a759495..0000000
--- a/stlport/README
+++ /dev/null
@@ -1,64 +0,0 @@
-**********************************************************************
-* README file for STLport 5.0 *
-* *
-**********************************************************************
-
-This directory contains the STLport-5.0 release.
-
-What's inside :
-
-README - this file
-INSTALL - installation instructions
-
-bin - installation directory for STLport unit tests;
- it may contain more subdirs, if you use
- crosscompilation
-build/lib - build directory for STLport library (if you use
- STLport iostreams and/or locale only)
-build/test/unit - build directory for regression (unit) tests
-build/test/eh - build directory for exception handling tests
-stlport - main STLport include directory
-src - source for iostreams implementation and other parts
- that aren't pure template code
-lib - installation directory for STLport library (if you
- use STLport iostreams and/or locale only);
- it may contain more subdirs, if you use
- crosscompilation
-test/unit - unit (regression) tests
-test/eh - exception handling test using STLport iostreams
-etc - miscellanous files (ChangeLog, TODO, scripts, etc.)
-
-GETTING STLPORT
-
-To download the latest version of STLport, please be sure to visit
-https://sourceforge.net/project/showfiles.php?group_id=146814
-
-LEGALESE
-
-This software is being distributed under the following terms:
-
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999-2003
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
-
-**********************************************************************
diff --git a/stlport/configure b/stlport/configure
deleted file mode 100755
index 2f48511..0000000
--- a/stlport/configure
+++ /dev/null
@@ -1,333 +0,0 @@
-#!/bin/sh
-
-# Time-stamp: <08/06/07 15:22:19 yeti>
-
-base=`cd \`dirname $0\`; echo $PWD`
-
-configmak=$base/build/Makefiles/gmake/config.mak
-
-write_option() {
- target=`echo $1 | sed -e 's/^[^=]*=//'`
- echo $2 := $3$target >> ${configmak}
-}
-
-write_over_option() {
- target=`echo $1 | sed -e 's/^[^=]*=//'`
- echo $2 ?= $target >> ${configmak}
-}
-
-print_help() {
- cat <<EOF
-Configuration utility.
-
-Usage:
-
- configure [options]
-
-Available options:
-
- --prefix=<dir> base install path (/usr/local/)
- --bindir=<dir> install path for executables (PREFIX/bin)
- --libdir=<dir> install path for libraries (PREFIX/lib)
- --includedir=<dir> install path for headers (PREFIX/include)
-
- --target=<target> target platform (cross-compiling)
-
- --help print this help message and exit
-
- --with-stlport=<dir> use STLport in catalog <dir>
- --without-stlport compile without STLport
- --with-boost=<dir> use boost headers in catalog <dir>
- --with-system-boost use boost installed on this system
- --with-msvc=<dir> use MS VC from this catalog
- --with-mssdk=<dir> use MS SDK from this catalog
- --with-extra-cxxflags=<options>
- pass extra options to C++ compiler
- --with-extra-cflags=<options>
- pass extra options to C compiler
- --with-extra-ldflags=<options>
- pass extra options to linker (via C/C++)
- --use-static-gcc use static gcc libs instead of shared libgcc_s (useful for gcc compiler,
- that was builded with --enable-shared [default]; if compiler was builded
- with --disable-shared, static libraries will be used in any case)
- --clean remove custom settings (file ${configmak})
- and use default values
- --with-cxx=<name> use <name> as C++ compiler (use --target= for cross-compilation)
- --with-cc=<name> use <name> as C compiler (use --target= for cross-compilation)
- --use-compiler-family=<name> use compiler family; one of:
- gcc GNU compilers (default)
- icc Intel compilers
- aCC HP's aCC compilers
- CC SunPro's CC compilers
- bcc Borland's compilers
- --without-debug don't build debug variant
- --without-stldebug don't build STLport's STLP_DEBUG mode
- --enable-static build static
- --disable-shared don't build shared
- --with-lib-motif=<motif>
- Use this option to customize the generated library name.
- The motif will be used in the last place before version information,
- separated by an underscore, ex:
- stlportd_MOTIF.5.0.lib
- stlportstld_static_MOTIF.5.1.lib
- --without-thread Per default STLport libraries are built in order to be usable
- in a multithreaded context. If you don't need this you can ask
- for a not thread safe version with this option.
- --without-rtti Disable RTTI when building libraries.
- --with-static-rtl
- --with-dynamic-rtl
- Enables usage of static (libc.lib family) or dynamic (msvcrt.lib family)
- C/C++ runtime library when linking with STLport. If you want your appli/dll
- to link statically with STLport but using the dynamic C runtime use
- --with-dynamic-rtl; if you want to link dynamicaly with STLport but using the
- static C runtime use --with-static-rtl. See README.options for details.
- Don't forget to signal the link method when building your appli or dll, in
- stlport/stl/config/host.h set the following macro depending on the configure
- option:
- --with-static-rtl -> _STLP_USE_DYNAMIC_LIB"
- --with-dynamic-rtl -> _STLP_USE_STATIC_LIB"
- --windows-platform=<name>
- Targetted OS when building for Windows; one of:
- win95 Windows 95
- win98 Windows 98
- winxp Windows XP and later (default)
-
-Environment variables:
-
- \$CXX C++ compiler name (use --target= for cross-compilation)
- \$CC C compiler name (use --target= for cross-compilation)
- \$CXXFLAGS pass extra options to C++ compiler
- \$CFLAGS pass extra options to C compiler
- \$LDFLAGS pass extra options to linker (via C/C++)
-
- Options has preference over environment variables.
-
-EOF
-}
-
-default_settings () {
- # if [ "$boost_set" = "" ]; then
- # write_option "${PWD}/external/boost" BOOST_DIR
- # fi
-
- # if [ -z "${stlport_set}" ]; then
- # write_over_option "$base" STLPORT_DIR
- # fi
-
- # Set in Makefiles/gmake/top.mak
- if [ -z "${compiler_family_set}" ]; then
- # write_option gcc COMPILER_NAME
- echo include gcc.mak > ${base}/build/lib/Makefile
- echo include gcc.mak > ${base}/build/test/unit/Makefile
- echo include gcc.mak > ${base}/build/test/eh/Makefile
- fi
-
- # Set in Makefiles/gmake/targetdirs.mak
- # if [ -z "${prefix_set}" ]; then
- # write_option "/usr/local" BASE_INSTALL_DIR '${DESTDIR}'
- # fi
-}
-
-[ $# -eq 0 ] && { >${configmak}; default_settings; exit 0; }
-
-for a in $@ ; do
- case $a in
- --help)
- print_help
- exit 0
- ;;
- --clean)
- rm -f ${configmak}
- exit 0
- ;;
- esac
-done
-
->${configmak}
-
-while :
-do
- case $# in
- 0)
- break
- ;;
- esac
- option="$1"
- shift
- case $option in
- --target=*)
- write_option "$option" TARGET_OS
- target_set=y
- ;;
- --with-stlport=*)
- write_option "$option" STLPORT_DIR
- stlport_set=y
- ;;
- --without-stlport)
- write_option 1 WITHOUT_STLPORT
- stlport_set=y
- ;;
- --with-boost=*)
- write_option "$option" BOOST_DIR
- ;;
- --with-system-boost)
- write_option 1 USE_SYSTEM_BOOST
- ;;
- --with-msvc=*)
- write_option "$option" MSVC_DIR
- ;;
- --with-mssdk=*)
- write_option "$option" MSSDK_DIR
- ;;
- --with-extra-cxxflags=*)
- write_option "$option" EXTRA_CXXFLAGS
- cxxflags_set=y
- ;;
- --with-extra-cflags=*)
- write_option "$option" EXTRA_CFLAGS
- cflags_set=y
- ;;
- --with-extra-ldflags=*)
- write_option "$option" EXTRA_LDFLAGS
- ldflags_set=y
- ;;
- --with-lib-motif=*)
- echo "Using $option in generated library names"
- write_option "$option" LIB_MOTIF
- ;;
- --without-thread)
- write_option 1 WITHOUT_THREAD
- ;;
- --without-rtti)
- write_option 1 WITHOUT_RTTI
- ;;
- --with-dynamic-rtl)
- write_option 1 WITH_DYNAMIC_RTL
- ;;
- --with-static-rtl)
- write_option 1 WITH_STATIC_RTL
- ;;
- --use-static-gcc)
- write_option 1 USE_STATIC_LIBGCC
- ;;
- --without-debug)
- write_option 1 _NO_DBG_BUILD
- ;;
- --without-stldebug)
- write_option 1 _NO_STLDBG_BUILD
- ;;
- --enable-static)
- write_option 1 _STATIC_BUILD
- ;;
- --disable-shared)
- write_option 1 _NO_SHARED_BUILD
- ;;
- --with-cxx=*)
- write_option "$option" _FORCE_CXX
- cxx_set=y
- ;;
- --with-cc=*)
- write_option "$option" _FORCE_CC
- cc_set=y
- ;;
- --use-compiler-family=*)
- case `echo $option | sed -e 's/^[^=]*=//'` in
- gcc|icc|aCC|CC|bcc|dmc)
- target=`echo $option | sed -e 's/^[^=]*=//'`
- echo COMPILER_NAME := $target >> ${configmak}
- echo include $target.mak > ${base}/build/lib/Makefile
- echo include $target.mak > ${base}/build/test/unit/Makefile
- echo include $target.mak > ${base}/build/test/eh/Makefile
- ;;
- *)
- echo "Not supported compilers family"
- exit -1
- ;;
- esac
- compiler_family_set=y
- ;;
- --prefix=*)
- write_option "$option" BASE_INSTALL_DIR '${DESTDIR}'
- prefix_set=y
- ;;
- --bindir=*)
- write_option "$option" INSTALL_BIN_DIR '${DESTDIR}'
- ;;
- --libdir=*)
- write_option "$option" INSTALL_LIB_DIR '${DESTDIR}'
- ;;
- --includedir=*)
- write_option "$option" INSTALL_HDR_DIR '${DESTDIR}'
- ;;
- --windows-platform=*)
- case `echo $option | sed -e 's/^[^=]*=//'` in
- win95)
- write_option 0x0400 WINVER
- ;;
- win98)
- write_option 0x0410 WINVER
- ;;
- winxp)
- write_option 0x0501 WINVER
- ;;
- *)
- echo "Not supported windows platform"
- exit -1
- ;;
- esac
- ;;
- *)
- echo "Unknown configuration option '$option'"
- exit -1
- ;;
- esac
-done
-
-if [ -n "${CXX}" ]; then
- if [ -n "${cxx_set}" ]; then
- echo "Both --with-cxx and \$CXX set, using the first"
- elif [ -z "${target_set}" ]; then
- write_option "${CXX}" _FORCE_CXX
- else
- echo "For cross-compilation with gcc use --target option only"
- fi
- if [ -z "${CC}" -a -z "${cc_set}" ]; then
- echo "\$CXX set, but I don't see \$CC!"
- fi
-fi
-
-if [ -n "${CC}" ]; then
- if [ -n "${cxx_set}" ]; then
- echo "Both --with-cc and \$CC set, using the first"
- else
- write_option "${CC}" _FORCE_CC
- fi
-fi
-
-if [ -n "${CXXFLAGS}" ]; then
- if [ -z "${cxxflags_set}" ]; then
- write_option "${CXXFLAGS}" EXTRA_CXXFLAGS
- else
- echo "Both --with-extra-cxxflags and \$CXXFLAGS set, using the first"
- fi
-fi
-
-if [ -n "${CFLAGS}" ]; then
- if [ -z "${cflags_set}" ]; then
- write_option "${CFLAGS}" EXTRA_CFLAGS
- else
- echo "Both --with-extra-cflags and \$CFLAGS set, using the first"
- fi
-fi
-
-if [ -n "${LDFLAGS}" ]; then
- if [ -z "${ldflags_set}" ]; then
- write_option "${LDFLAGS}" EXTRA_LDFLAGS
- else
- echo "Both --with-extra-ldflags and \$LDFLAGS set, using the first"
- fi
-fi
-
-# default settings
-
-default_settings
diff --git a/stlport/libstlport.mk b/stlport/libstlport.mk
deleted file mode 100644
index 8321d4a..0000000
--- a/stlport/libstlport.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-# Add a couple include paths to use stlport.
-
-# Only use this on the device or emulator.
-ifeq ($(TARGET_SIMULATOR),true)
-$(error STLPort not suitable for the simulator! $(LOCAL_PATH))
-endif
-
-# Make sure bionic is first so we can include system headers.
-LOCAL_C_INCLUDES := \
- bionic \
- external/connectivity/stlport/stlport \
- $(LOCAL_C_INCLUDES)
diff --git a/stlport/stlport/algorithm b/stlport/stlport/algorithm
deleted file mode 100644
index c653d8c..0000000
--- a/stlport/stlport/algorithm
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ALGORITHM
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x1
-# include <stl/_prolog.h>
-# define _STLP_ALGORITHM
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x1)
-# ifndef _STLP_INTERNAL_CSTDIO
-// remove() conflicts, <cstdio> should always go first
-# include <stl/_cstdio.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALGO_H
-# include <stl/_algo.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x1) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <algorithm>
-# else
-# include _STLP_NATIVE_HEADER(algorithm)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x1 )
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_ALGORITHM */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/assert.h b/stlport/stlport/assert.h
deleted file mode 100644
index 112dd26..0000000
--- a/stlport/stlport/assert.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x202
-# include <stl/_cprolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x202) && ! defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-#endif
-
-/* evc3 doesn't have assert.h; macro assert() is defined in stl_evc.h */
-#ifndef _STLP_WCE_EVC3
-# if !defined (assert)
-# define _STLP_NATIVE_ASSERT_H_INCLUDED
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <assert.h>
-# else
-# include _STLP_NATIVE_C_HEADER(assert.h)
-# endif
-# endif
-# if !defined (_STLP_NATIVE_ASSERT_H_INCLUDED)
-/* See errno.h for additional information about this #error */
-# error assert has been defined before inclusion of assert.h header.
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x202)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# endif
-# undef _STLP_DONT_POP_HEADER_ID
-#endif
-
-/* Local Variables:
- * mode:C++
- * End:
- */
diff --git a/stlport/stlport/bitset b/stlport/stlport/bitset
deleted file mode 100644
index 1d7fcf3..0000000
--- a/stlport/stlport/bitset
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_BITSET
-
-// This implementation of bitset<> has a second template parameter,
-// _WordT, which defaults to unsigned long. *YOU SHOULD NOT USE
-// THIS FEATURE*. It is experimental, and it may be removed in
-// future releases.
-
-// A bitset of size N, using words of type _WordT, will have
-// N % (sizeof(_WordT) * CHAR_BIT) unused bits. (They are the high-
-// order bits in the highest word.) It is a class invariant
-// of class bitset<> that those unused bits are always zero.
-
-// Most of the actual code isn't contained in bitset<> itself, but in the
-// base class _Base_bitset. The base class works with whole words, not with
-// individual bits. This allows us to specialize _Base_bitset for the
-// important special case where the bitset is only a single word.
-
-// The C++ standard does not define the precise semantics of operator[].
-// In this implementation the const version of operator[] is equivalent
-// to test(), except that it does no range checking. The non-const version
-// returns a reference to a bit, again without doing any range checking.
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x2
-# include <stl/_prolog.h>
-# define _STLP_BITSET
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x2)
-# ifndef _STLP_INTERNAL_BITSET
-# include <stl/_bitset.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x2) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <bitset>
-# else
-# include _STLP_NATIVE_HEADER(bitset)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x2 )
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_BITSET */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/cctype b/stlport/stlport/cctype
deleted file mode 100644
index 513512e..0000000
--- a/stlport/stlport/cctype
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CCTYPE
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x104
-# define _STLP_CCTYPE
-# include <stl/_prolog.h>
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x104 )
-# ifndef _STLP_INTERNAL_CCTYPE
-# include <stl/_cctype.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x104) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cctype>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cctype)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x104 )
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_CCTYPE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/cfloat b/stlport/stlport/cfloat
deleted file mode 100644
index cb2e0cd..0000000
--- a/stlport/stlport/cfloat
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CFLOAT
-#define _STLP_CFLOAT
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x106
-# include <stl/_prolog.h>
-#endif
-
-// Borland defines some implementation constants in std:: namespace,
-// we do not want to import them.
-#if defined (_STLP_USE_NEW_C_HEADERS) && !defined (__BORLANDC__)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cfloat>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cfloat)
-# endif
-#else
-# include <float.h>
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x106 )
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_CFLOAT */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/climits b/stlport/stlport/climits
deleted file mode 100644
index 86bc413..0000000
--- a/stlport/stlport/climits
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CLIMITS
-# define _STLP_CLIMITS
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x108
-# include <stl/_prolog.h>
-#endif
-
-#if defined (__SUNPRO_CC) && ((__SUNPRO_CC == 0x500) && (__SUNPRO_CC_COMPAT > 4))
-# include </usr/include/limits.h>
-#elif defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <climits>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(climits)
-# endif
-#else
-# if defined (__BORLANDC__)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <limits.h>
-# else
-# include _STLP_NATIVE_C_HEADER(limits.h)
-# endif
-# else
-# include <limits.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x108 )
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_CLIMITS */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/cstdarg b/stlport/stlport/cstdarg
deleted file mode 100644
index 6882bbd..0000000
--- a/stlport/stlport/cstdarg
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTDARG
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x113
-# define _STLP_CSTDARG
-# include <stl/_prolog.h>
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x113)
-# ifndef _STLP_INTERNAL_CSTDARG
-# include <stl/_cstdarg.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x113) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstdarg>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstdarg)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x113 )
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_CSTDARG */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/cstddef b/stlport/stlport/cstddef
deleted file mode 100644
index 0a66f0e..0000000
--- a/stlport/stlport/cstddef
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTDDEF
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x114
-# define _STLP_CSTDDEF
-# include <stl/_prolog.h>
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x114)
-# ifndef _STLP_INTERNAL_CSTDDEF
-# include <stl/_cstddef.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x114) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstddef>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstddef)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x114 )
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_CSTDDEF */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/cstdio b/stlport/stlport/cstdio
deleted file mode 100644
index e20c8ff..0000000
--- a/stlport/stlport/cstdio
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTDIO
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x15
-# include <stl/_prolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x15) && !defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-# define _STLP_CSTDIO
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x15) && !defined (_STLP_DONT_POP_HEADER_ID)
-# ifndef _STLP_INTERNAL_CSTDIO
-# include <stl/_cstdio.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x15) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstdio>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstdio)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x15)
-# if !defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-#endif
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/cstring b/stlport/stlport/cstring
deleted file mode 100644
index d5cf58d..0000000
--- a/stlport/stlport/cstring
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTRING
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x117
-# define _STLP_CSTRING
-# include <stl/_prolog.h>
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x117)
-# ifndef _STLP_INTERNAL_CSTRING
-# include <stl/_cstring.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x117) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstring>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstring)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x117)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_CSTRING */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/ctype.h b/stlport/stlport/ctype.h
deleted file mode 100644
index f9d1000..0000000
--- a/stlport/stlport/ctype.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CTYPE_H
-
-/* Workaround for a "misbehaviour" when compiling resource scripts using
- * eMbedded Visual C++. The standard .rc file includes windows header files,
- * which in turn include ctype.h, which results in warnings and errors
- */
-#if !defined(RC_INVOKED)
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x219
-# include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x219)
-# define _STLP_DONT_POP_HEADER_ID
-# define _STLP_CTYPE_H
-# endif
-
-# if defined(_STLP_WCE_EVC3)
-struct _exception;
-# endif
-
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <ctype.h>
-# else
-# include _STLP_NATIVE_C_HEADER(ctype.h)
-# endif
-
-/* on evc4 including ctype.h also defines setjmp macro */
-# if defined (_STLP_WCE)
-# define _STLP_NATIVE_SETJMP_H_INCLUDED
-# endif
-
-# ifndef _STLP_CTYPE_H_SEEN
-# define _STLP_CTYPE_H_SEEN
-
-/* Undef convenience interfaces */
-# undef isspace
-# undef isprint
-# undef iscntrl
-# undef isupper
-# undef islower
-# undef isalpha
-# undef isdigit
-# undef ispunct
-# undef isxdigit
-# undef isalnum
-# undef isgraph
-# undef toupper
-# undef tolower
-
-# if defined (UNDER_CE)
-
-# if (_WIN32_WCE < 300) /* Only wide chars for older versions */
-# define _isctype iswctype
-# endif
-
-__inline int (isalpha)(int c) { return _isctype(c, _ALPHA); }
-__inline int (isupper)(int c) { return _isctype(c, _UPPER); }
-__inline int (islower)(int c) { return _isctype(c, _LOWER); }
-__inline int (isdigit)(int c) { return _isctype(c, _DIGIT); }
-__inline int (isxdigit)(int c) { return _isctype(c, _HEX); }
-__inline int (isspace)(int c) { return _isctype(c, _SPACE); }
-__inline int (ispunct)(int c) { return _isctype(c, _PUNCT); }
-__inline int (isalnum)(int c) { return _isctype(c, _ALPHA|_DIGIT); }
-__inline int (isprint)(int c) { return _isctype(c, _BLANK|_PUNCT|_ALPHA|_DIGIT); }
-__inline int (isgraph)(int c) { return _isctype(c, _PUNCT|_ALPHA|_DIGIT); }
-__inline int (iscntrl)(int c) { return _isctype(c, _CONTROL); }
-__inline int (isascii)(int c) { return ((unsigned)(c) < 0x80); }
-
-# undef _isctype
-
-__inline int (iswalpha)(int c) { return iswctype((unsigned short)(c), _ALPHA); }
-__inline int (iswupper)(int c) { return iswctype((unsigned short)(c), _UPPER); }
-__inline int (iswlower)(int c) { return iswctype((unsigned short)(c), _LOWER); }
-__inline int (iswdigit)(int c) { return iswctype((unsigned short)(c), _DIGIT); }
-__inline int (iswxdigit)(int c) { return iswctype((unsigned short)(c), _HEX); }
-__inline int (iswspace)(int c) { return iswctype((unsigned short)(c), _SPACE); }
-__inline int (iswpunct)(int c) { return iswctype((unsigned short)(c), _PUNCT); }
-__inline int (iswalnum)(int c) { return iswctype((unsigned short)(c), _ALPHA|_DIGIT); }
-__inline int (iswprint)(int c) { return iswctype((unsigned short)(c), _BLANK|_PUNCT|_ALPHA|_DIGIT); }
-__inline int (iswgraph)(int c) { return iswctype((unsigned short)(c), _PUNCT|_ALPHA|_DIGIT); }
-__inline int (iswcntrl)(int c) { return iswctype((unsigned short)(c), _CONTROL); }
-__inline int (iswascii)(int c) { return ((unsigned)(c) < 0x80); }
-
-# endif /* UNDER_CE */
-
-# endif /* _STLP_CTYPE_H_SEEN */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x219)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-# endif
-
-#endif /* RC_INVOKED */
-
-#endif /* _STLP_CTYPE_H */
diff --git a/stlport/stlport/deque b/stlport/stlport/deque
deleted file mode 100644
index 448f159..0000000
--- a/stlport/stlport/deque
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_DEQUE
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x22
-# include <stl/_prolog.h>
-# define _STLP_DEQUE
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x22)
-# ifndef _STLP_INTERNAL_DEQUE_H
-# include <stl/_deque.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x22) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <deque>
-# else
-# include _STLP_NATIVE_HEADER(deque)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x22)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_DEQUE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/errno.h b/stlport/stlport/errno.h
deleted file mode 100644
index bb7999b..0000000
--- a/stlport/stlport/errno.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x205
-# include <stl/_cprolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x205) && !defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-#endif
-
-#ifdef _STLP_WCE
-/* only show message when directly including this file in a non-library build */
-# if !defined(__BUILDING_STLPORT) && (_STLP_OUTERMOST_HEADER_ID == 0x205)
-# pragma message("eMbedded Visual C++ 3 and .NET don't have a errno.h header; STLport won't include native errno.h here")
-# endif
-#else
-# ifndef errno
-/* We define the following macro first to guaranty the header reentrancy: */
-# define _STLP_NATIVE_ERRNO_H_INCLUDED
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <errno.h>
-# else
-# include _STLP_NATIVE_C_HEADER(errno.h)
-# endif
-# if defined (__BORLANDC__) && (__BORLANDC__ >= 0x590) && defined (__cplusplus)
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::__errno;
-_STLP_END_NAMESPACE
-# endif
-# endif /* errno */
-
-# if !defined (_STLP_NATIVE_ERRNO_H_INCLUDED)
-/* If errno has been defined before inclusion of native errno.h including it from STLport errno.h
- * becomes impossible because if:
- * #define errno foo
- * then
- * #include _STLP_NATIVE_C_HEADER(errno.h)
- * becomes:
- * #include _STLP_NATIVE_C_HEADER(foo.h)
- *
- * To fix this problem you have to find where this definition comes from and include errno.h before it.
- */
-# error errno has been defined before inclusion of errno.h header.
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x205)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# endif
-# undef _STLP_DONT_POP_HEADER_ID
-#endif
-
-/* Local Variables:
- * mode: C
- * End:
- */
diff --git a/stlport/stlport/exception b/stlport/stlport/exception
deleted file mode 100644
index 47822e9..0000000
--- a/stlport/stlport/exception
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- */
-
-// This header exists solely for portability. Normally it just includes
-// the native header <exception>.
-
-#ifndef _STLP_EXCEPTION
-
-#if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x423
-# include <stl/_prolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x423)
-# define _STLP_DONT_POP_HEADER_ID
-# define _STLP_EXCEPTION
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x423) && !defined (_STLP_DONT_POP_HEADER_ID)
-# ifndef _STLP_INTERNAL_EXCEPTION
-# include <stl/_exception.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x423) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
-/* If we are here it means that we are in an include called
- * from the native lib which means that we can simply forward this
- * call to the native exception header:
- */
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <exception>
-# else
-# if defined (__DMC__) && (_STLP_OUTERMOST_HEADER_ID == 0x874)
-// Workaround to DMC harcoded typeinfo.h inclusion.
-# include <../include/exception>
-# else
-# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception)
-# endif
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x423)
-# if !defined(_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-#endif
-
-#endif /* _STLP_EXCEPTION */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/float.h b/stlport/stlport/float.h
deleted file mode 100644
index 70fe3ad..0000000
--- a/stlport/stlport/float.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x203
-# include <stl/_cprolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x203) && !defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x203)
-# error This header is only reentrant once, it should be modified if it has to be included more.
-#endif
-
-#if defined (_STLP_WCE_EVC3)
-struct _exception;
-#endif
-
-#if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <float.h>
-#else
-# include _STLP_NATIVE_C_HEADER(float.h)
-#endif
-
-#if !defined (__linux__)
-# if defined(__BORLANDC__) && defined (__cplusplus) && (__BORLANDC__ >= 0x560)
-_STLP_BEGIN_NAMESPACE
-using ::_max_dble;
-using ::_max_flt;
-using ::_max_ldble;
-using ::_tiny_ldble;
-_STLP_END_NAMESPACE
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x203)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# endif
-# undef _STLP_DONT_POP_HEADER_ID
-#endif
diff --git a/stlport/stlport/hash_map b/stlport/stlport/hash_map
deleted file mode 100644
index 0e2422d..0000000
--- a/stlport/stlport/hash_map
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_HASH_MAP
-#define _STLP_HASH_MAP
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x4028
-# include <stl/_prolog.h>
-#endif
-
-#ifdef _STLP_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined (_STLP_NO_EXTENSIONS)
-/* Comment following if you want to use hash constainers even if you ask for
- * no extension.
- */
-# error The hash_map and hash_multimap class are STLport extensions.
-#endif
-
-#include <stl/_hash_map.h>
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x4028)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_HASH_MAP */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/hash_set b/stlport/stlport/hash_set
deleted file mode 100644
index 0fc89ec..0000000
--- a/stlport/stlport/hash_set
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_HASH_SET
-#define _STLP_HASH_SET
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x4029
-# include <stl/_prolog.h>
-#endif
-
-#ifdef _STLP_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined (_STLP_NO_EXTENSIONS)
-/* Comment following if you want to use hash constainers even if you ask for
- * no extension.
- */
-# error The hash_set and hash_multiset class are STLport extensions.
-#endif
-
-#include <stl/_hash_set.h>
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x4029)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_HASH_SET */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/iterator b/stlport/stlport/iterator
deleted file mode 100644
index f8d3dee..0000000
--- a/stlport/stlport/iterator
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ITERATOR
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x38
-# include <stl/_prolog.h>
-# define _STLP_ITERATOR
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x38)
-# ifndef _STLP_INTERNAL_ITERATOR_H
-# include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_STREAM_ITERATOR_H
-# include <stl/_stream_iterator.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x38) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <iterator>
-# else
-# include _STLP_NATIVE_HEADER(iterator)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x38)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_ITERATOR */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/limits b/stlport/stlport/limits
deleted file mode 100644
index 5333b14..0000000
--- a/stlport/stlport/limits
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_LIMITS
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x39
-# include <stl/_prolog.h>
-# define _STLP_LIMITS
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x39)
-# ifndef _STLP_INTERNAL_LIMITS
-# include <stl/_limits.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x39) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <limits>
-# else
-# include _STLP_NATIVE_HEADER(limits)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x39)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_LIMITS */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/limits.h b/stlport/stlport/limits.h
deleted file mode 100644
index aab553b..0000000
--- a/stlport/stlport/limits.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x201
-# include <stl/_cprolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x201) && ! defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-#endif
-
-#if defined(_STLP_WCE_EVC3)
-struct _exception;
-#endif
-
-#if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <limits.h>
-#else
-# include _STLP_NATIVE_C_HEADER(limits.h)
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x201)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# endif
-# undef _STLP_DONT_POP_HEADER_ID
-#endif
diff --git a/stlport/stlport/list b/stlport/stlport/list
deleted file mode 100644
index 647a8be..0000000
--- a/stlport/stlport/list
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_LIST
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x40
-# include <stl/_prolog.h>
-# define _STLP_LIST
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x40)
-# ifndef _STLP_INTERNAL_LIST_H
-# include <stl/_list.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x40) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <list>
-# else
-# include _STLP_NATIVE_HEADER(list)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x40)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_LIST */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/map b/stlport/stlport/map
deleted file mode 100644
index f30c400..0000000
--- a/stlport/stlport/map
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_MAP
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x43
-# include <stl/_prolog.h>
-# define _STLP_MAP
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x43)
-# ifndef _STLP_INTERNAL_MAP_H
-# include <stl/_map.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x43) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <map>
-# else
-# include _STLP_NATIVE_HEADER(map)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x43)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_MAP */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/math.h b/stlport/stlport/math.h
deleted file mode 100644
index 32b666f..0000000
--- a/stlport/stlport/math.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x244
-# include <stl/_cprolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x244) && !defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-#endif
-
-#if !defined (exception) && (!defined (__KCC) || (__KCC_VERSION < 4000)) && \
- !(defined(__IBMCPP__) && (500 <= __IBMCPP__)) && !defined(_STLP_WCE_EVC3)
-# define _STLP_EXCEPTION_WAS_REDEFINED 1
-# define exception __math_exception
-#endif
-
-#if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <math.h>
-#else
-# include _STLP_NATIVE_C_HEADER(math.h)
-#endif
-
-#if defined (_STLP_EXCEPTION_WAS_REDEFINED)
-# undef exception
-# undef _STLP_EXCEPTION_WAS_REDEFINED
-#endif
-
-#ifdef _STLP_WCE_EVC3
-# undef _exception
-# define _exception exception
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x244)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-#endif
-
diff --git a/stlport/stlport/memory b/stlport/stlport/memory
deleted file mode 100644
index 3c0ceb3..0000000
--- a/stlport/stlport/memory
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_MEMORY
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x46
-# include <stl/_prolog.h>
-# define _STLP_MEMORY
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x46)
-# ifndef _STLP_INTERNAL_ALLOC_H
-# include <stl/_alloc.h>
-# endif
-
-# ifndef _STLP_INTERNAL_TEMPBUF_H
-# include <stl/_tempbuf.h>
-# endif
-
-# ifndef _STLP_INTERNAL_RAW_STORAGE_ITER_H
-# include <stl/_raw_storage_iter.h>
-# endif
-
-# include <stl/_auto_ptr.h>
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x46) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (__MSL__)
-# include _STLP_NATIVE_HEADER(limits)
-# endif
-
-# if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT)
-# define BOOST_TR1_MEMORY_INCLUDED
-# define BOOST_TR1_FULL_MEMORY_INCLUDED
-# endif
-
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <memory>
-# else
-# include _STLP_NATIVE_HEADER(memory)
-# endif
-
-# if defined (__MSL__) && (__MSL__ >= 0x2405 && __MSL__ < 0x5201)
-/* 980401 vss MSL 2.4 Pro 3 Release */
-# include <new_mem.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x46)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT)
-
-namespace boost {
-
-class bad_weak_ptr;
-template<class T> class shared_ptr;
-template<class T> class weak_ptr;
-template<class T> class enable_shared_from_this;
-template<class D, class T> D * get_deleter(shared_ptr<T> const & p);
-template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r);
-template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r);
-template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r);
-template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b);
-template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b);
-
-namespace detail{
-class shared_count;
-class weak_count;
-}
-
-} // namespace boost
-
-# ifndef BOOST_SHARED_PTR_HPP_INCLUDED
-# include <boost/shared_ptr.hpp>
-# endif
-# ifndef BOOST_WEAK_PTR_HPP_INCLUDED
-# include <boost/weak_ptr.hpp>
-# endif
-# ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED
-# include <boost/enable_shared_from_this.hpp>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-namespace tr1 {
-
-using ::boost::bad_weak_ptr;
-using ::boost::shared_ptr;
-using ::boost::swap;
-using ::boost::static_pointer_cast;
-using ::boost::dynamic_pointer_cast;
-using ::boost::const_pointer_cast;
-using ::boost::get_deleter;
-using ::boost::weak_ptr;
-using ::boost::enable_shared_from_this;
-
-// shared_ptr IO
-// weak_ptr IO
-
-} // namespace tr1
-
-_STLP_END_NAMESPACE
-
-#endif /* !_STLP_NO_EXTENSIONS && _STLP_USE_BOOST_SUPPORT */
-
-#endif /* _STLP_MEMORY */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/stlport/stlport/new b/stlport/stlport/new
deleted file mode 100644
index 974ca44..0000000
--- a/stlport/stlport/new
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_NEW_HEADER
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x447
-# define _STLP_NEW_HEADER
-# include <stl/_prolog.h>
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x447)
-# ifndef _STLP_NEW_H_HEADER
-# include <stl/_new.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x447) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <new>
-# else
-# include _STLP_NATIVE_CPP_RUNTIME_HEADER(new)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x447)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_NEW */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/pthread.h b/stlport/stlport/pthread.h
deleted file mode 100644
index 4f0d90c..0000000
--- a/stlport/stlport/pthread.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x280
-# include <stl/_prolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x280) && ! defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-#endif
-
-#if defined (__SUNPRO_CC) || defined (__HP_aCC)
-# include "/usr/include/pthread.h"
-#else
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <pthread.h>
-# else
-# include _STLP_NATIVE_C_HEADER(pthread.h)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x280)
-# if !defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-#endif
-
-/*
- Local Variables:
- mode:C++
- End:
-*/
diff --git a/stlport/stlport/queue b/stlport/stlport/queue
deleted file mode 100644
index 6acd63f..0000000
--- a/stlport/stlport/queue
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_QUEUE
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x53
-# include <stl/_prolog.h>
-# define _STLP_QUEUE
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x53)
-# ifndef _STLP_INTERNAL_QUEUE_H
-# include <stl/_queue.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x53) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <queue>
-# else
-# include _STLP_NATIVE_HEADER(queue)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x53)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_QUEUE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/set b/stlport/stlport/set
deleted file mode 100644
index ed79d89..0000000
--- a/stlport/stlport/set
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_SET
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x55
-# include <stl/_prolog.h>
-# define _STLP_SET
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x55)
-# ifndef _STLP_INTERNAL_SET_H
-# include <stl/_set.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x55) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <set>
-# else
-# include _STLP_NATIVE_HEADER(set)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x55)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_SET */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/signal.h b/stlport/stlport/signal.h
deleted file mode 100644
index 27f91be..0000000
--- a/stlport/stlport/signal.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x257
-# include <stl/_cprolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x257) && ! defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-#endif
-
-/* evc3 and evc4 don't have signal.h */
-#ifndef _STLP_WCE
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <signal.h>
-# else
-# include _STLP_NATIVE_C_HEADER(signal.h)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x257)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# endif
-# undef _STLP_DONT_POP_HEADER_ID
-#endif
-
diff --git a/stlport/stlport/slist b/stlport/stlport/slist
deleted file mode 100644
index c1930e4..0000000
--- a/stlport/stlport/slist
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.
- *
- */
-
-#ifndef _STLP_SLIST
-#define _STLP_SLIST
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x58
-# include <stl/_prolog.h>
-#endif
-
-#ifdef _STLP_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined (_STLP_NO_EXTENSIONS)
-/* Comment following if you want to use the slist constainer even if you ask for
- * no extension.
- */
-# error The slist class is an STLport extension.
-#endif
-
-#ifndef _STLP_INTERNAL_SLIST_H
-# include <stl/_slist.h>
-#endif
-
-#if defined (_STLP_IMPORT_VENDOR_STD)
-//This is not a Standard header, it might failed for most of
-//the compilers so we comment it for the moment. Should be uncommented
-//on a compiler basis.
-//# include _STLP_NATIVE_HEADER(slist)
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x58)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_SLIST */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stack b/stlport/stlport/stack
deleted file mode 100644
index 253b31d..0000000
--- a/stlport/stlport/stack
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STACK
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x60
-# include <stl/_prolog.h>
-# define _STLP_STACK
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x60)
-# ifndef _STLP_INTERNAL_STACK_H
-# include <stl/_stack.h>
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID != 0x60) || defined (_STLP_IMPORT_VENDOR_STD)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <stack>
-# else
-# include _STLP_NATIVE_HEADER(stack)
-# endif
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x60)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-#endif
-
-#endif /* _STLP_STACK */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stdarg.h b/stlport/stlport/stdarg.h
deleted file mode 100644
index 368e672..0000000
--- a/stlport/stlport/stdarg.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* Workaround for a "misbehaviour" when compiling resource scripts using
- * eMbedded Visual C++. The standard .rc file includes windows header files,
- * which in turn include stdarg.h, which results in warnings and errors
- */
-#if !defined (RC_INVOKED)
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x261
-# include <stl/_cprolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x261) && !defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-# endif
-
-# if defined(_STLP_WCE_EVC3)
-struct _exception;
-# endif
-
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <stdarg.h>
-# else
-# include _STLP_NATIVE_C_HEADER(stdarg.h)
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x261)
-# if !defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-# endif
-#endif /* RC_INVOKED */
diff --git a/stlport/stlport/stddef.h b/stlport/stlport/stddef.h
deleted file mode 100644
index f959c23..0000000
--- a/stlport/stlport/stddef.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x262
-# include <stl/_cprolog.h>
-#elif (_STLP_OUTERMOST_HEADER_ID == 0x262) && ! defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-#endif
-
-#if defined (_MSC_VER) || defined (__DMC__)
-/* Native stddef.h contains errno macro definition making inclusion of native
- * errno.h in STLport errno.h impossible. We are then forced to include errno.h
- * first.
- */
-# include "errno.h"
-#endif
-
-#if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <stddef.h>
-#else
-# include _STLP_NATIVE_C_HEADER(stddef.h)
-#endif
-
-#if (_STLP_OUTERMOST_HEADER_ID == 0x262)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-#endif
diff --git a/stlport/stlport/stdio.h b/stlport/stlport/stdio.h
deleted file mode 100644
index e2dbdea..0000000
--- a/stlport/stlport/stdio.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* Workaround for a "misbehaviour" when compiling resource scripts using
- * eMbedded Visual C++. The standard .rc file includes windows header files,
- * which in turn include stdarg.h, which results in warnings and errors
- */
-#if !defined(RC_INVOKED)
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-# define _STLP_OUTERMOST_HEADER_ID 0x264
-# include <stl/_cprolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x264) && !defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-# endif
-
-# if defined(_STLP_WCE_EVC3)
-struct _exception;
-# endif
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <stdio.h>
-# else
-# include _STLP_NATIVE_C_HEADER(stdio.h)
-# endif
-
-# if defined (__SUNPRO_CC) && !defined (_STRUCT_FILE)
-# define _STRUCT_FILE
-# endif
-
-# if defined (__BORLANDC__) && defined (__cplusplus) && !defined (__linux__)
-_STLP_BEGIN_NAMESPACE
-using __std_alias::_streams;
-_STLP_END_NAMESPACE
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x264)
-# if !defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-# endif
-
-#endif /* RC_INVOKED */
diff --git a/stlport/stlport/stdlib.h b/stlport/stlport/stdlib.h
deleted file mode 100644
index fd55f8a..0000000
--- a/stlport/stlport/stdlib.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* Workaround for a "misbehaviour" when compiling resource scripts using
- * eMbedded Visual C++. The standard .rc file includes windows header files,
- * which in turn include stdlib.h, which results in warnings and errors
- */
-#if !defined (RC_INVOKED)
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-# define _STLP_OUTERMOST_HEADER_ID 0x265
-# include <stl/_cprolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x265) && !defined (_STLP_DONT_POP_HEADER_ID)
-# define _STLP_DONT_POP_HEADER_ID
-# endif
-
-# if defined (_STLP_MSVC_LIB) || (defined (__GNUC__) && defined (__MINGW32__)) || \
- defined (__BORLANDC__) || defined (__DMC__) || \
- (defined (__HP_aCC) && defined (_REENTRANT))
-/* Native stdlib.h contains errno macro definition making inclusion of native
- * errno.h in STLport errno.h impossible. We are then forced to include errno.h
- * first.
- */
-# include "errno.h"
-# endif
-
-/*
- forward-declaration for _exception struct; prevents warning message
- ../include/stdlib.h(817) : warning C4115: '_exception' : named type definition in parentheses
-*/
-# if defined(_STLP_WCE_EVC3)
-struct _exception;
-# endif
-
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <stdlib.h>
-# else
-# include _STLP_NATIVE_C_HEADER(stdlib.h)
-# endif
-
-/* on evc3/evc4 including stdlib.h also defines setjmp macro */
-# if defined (_STLP_WCE)
-# define _STLP_NATIVE_SETJMP_H_INCLUDED
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x265)
-# if ! defined (_STLP_DONT_POP_HEADER_ID)
-# include <stl/_epilog.h>
-# undef _STLP_OUTERMOST_HEADER_ID
-# else
-# undef _STLP_DONT_POP_HEADER_ID
-# endif
-# endif
-
-#endif /* RC_INVOKED */
diff --git a/stlport/stlport/stl/_algo.c b/stlport/stlport/stl/_algo.c
deleted file mode 100644
index b58b92d..0000000
--- a/stlport/stlport/stl/_algo.c
+++ /dev/null
@@ -1,2028 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ALGO_C
-#define _STLP_ALGO_C
-
-#if !defined (_STLP_INTERNAL_ALGO_H)
-# include <stl/_algo.h>
-#endif
-
-#ifndef _STLP_INTERNAL_TEMPBUF_H
-# include <stl/_tempbuf.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _BidirectionalIter, class _Distance, class _Compare>
-void __merge_without_buffer(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
- _Distance __len1, _Distance __len2,
- _Compare __comp);
-
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
- class _BidirectionalIter3, class _Compare>
-_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
- _BidirectionalIter1 __last1,
- _BidirectionalIter2 __first2,
- _BidirectionalIter2 __last2,
- _BidirectionalIter3 __result,
- _Compare __comp);
-
-template <class _Tp>
-#if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 ))
-inline
-#endif
-const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) {
- if (__a < __b)
- if (__b < __c)
- return __b;
- else if (__a < __c)
- return __c;
- else
- return __a;
- else if (__a < __c)
- return __a;
- else if (__b < __c)
- return __c;
- else
- return __b;
-}
-
-template <class _Tp, class _Compare>
-#if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 ))
-inline
-#endif
-const _Tp&
-__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) {
- if (__comp(__a, __b)) {
- _STLP_VERBOSE_ASSERT(!__comp(__b, __a), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- if (__comp(__b, __c)) {
- _STLP_VERBOSE_ASSERT(!__comp(__c, __b), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return __b;
- }
- else if (__comp(__a, __c)) {
- _STLP_VERBOSE_ASSERT(!__comp(__c, __a), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return __c;
- }
- else
- return __a;
- }
- else if (__comp(__a, __c)) {
- _STLP_VERBOSE_ASSERT(!__comp(__c, __a), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return __a;
- }
- else if (__comp(__b, __c)) {
- _STLP_VERBOSE_ASSERT(!__comp(__c, __b), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return __c;
- }
- else
- return __b;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter1, class _ForwardIter2>
-_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- // Test for empty ranges
- if (__first1 == __last1 || __first2 == __last2)
- return __first1;
-
- // Test for a pattern of length 1.
- _ForwardIter2 __p1(__first2);
-
- if ( ++__p1 == __last2 )
- return find(__first1, __last1, *__first2);
-
- // General case.
-
- for ( ; ; ) { // __first1 != __last1 will be checked in find below
- __first1 = find(__first1, __last1, *__first2);
- if (__first1 == __last1)
- return __last1;
-
- _ForwardIter2 __p = __p1;
- _ForwardIter1 __current = __first1;
- if (++__current == __last1)
- return __last1;
-
- while (*__current == *__p) {
- if (++__p == __last2)
- return __first1;
- if (++__current == __last1)
- return __last1;
- }
-
- ++__first1;
- }
- return __first1;
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _RandomAccessIter, class _Integer, class _Tp,
- class _BinaryPred, class _Distance>
-_RandomAccessIter __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
- _Integer __count, const _Tp& __val, _BinaryPred __pred,
- _Distance*, const random_access_iterator_tag &)
-{
- _Distance __tailSize = __last - __first;
- const _Distance __pattSize = __count;
- const _Distance __skipOffset = __pattSize - 1;
- _RandomAccessIter __backTrack;
- _Distance __remainder, __prevRemainder;
-
- for ( _RandomAccessIter __lookAhead = __first + __skipOffset; __tailSize >= __pattSize; __lookAhead += __pattSize ) { // the main loop...
- //__lookAhead here is always pointing to the last element of next possible match.
- __tailSize -= __pattSize;
-
- while ( !__pred(*__lookAhead, __val) ) { // the skip loop...
- if (__tailSize < __pattSize)
- return __last;
-
- __lookAhead += __pattSize;
- __tailSize -= __pattSize;
- }
-
- if ( __skipOffset == 0 ) {
- return (__lookAhead - __skipOffset); //Success
- }
-
- __remainder = __skipOffset;
-
- for (__backTrack = __lookAhead; __pred(*--__backTrack, __val); ) {
- if (--__remainder == 0)
- return (__lookAhead - __skipOffset); //Success
- }
-
- if (__remainder > __tailSize)
- return __last; //failure
-
- __lookAhead += __remainder;
- __tailSize -= __remainder;
-
- while ( __pred(*__lookAhead, __val) ) {
- __prevRemainder = __remainder;
- __backTrack = __lookAhead;
-
- do {
- if (--__remainder == 0)
- return (__lookAhead - __skipOffset); //Success
- } while (__pred(*--__backTrack, __val));
-
- //adjust remainder for next comparison
- __remainder += __pattSize - __prevRemainder;
-
- if (__remainder > __tailSize)
- return __last; //failure
-
- __lookAhead += __remainder;
- __tailSize -= __remainder;
- }
-
- //__lookAhead here is always pointing to the element of the last mismatch.
- }
-
- return __last; //failure
-}
-
-template <class _ForwardIter, class _Integer, class _Tp,
- class _Distance, class _BinaryPred>
-_ForwardIter __search_n(_ForwardIter __first, _ForwardIter __last,
- _Integer __count, const _Tp& __val, _BinaryPred __pred,
- _Distance*, const forward_iterator_tag &) {
- for (; (__first != __last) && !__pred(*__first, __val); ++__first) {}
- while (__first != __last) {
- _Integer __n = __count - 1;
- _ForwardIter __i = __first;
- ++__i;
- while (__i != __last && __n != 0 && __pred(*__i, __val)) {
- ++__i;
- --__n;
- }
- if (__n == 0)
- return __first;
- else if (__i != __last)
- for (__first = ++__i; (__first != __last) && !__pred(*__first, __val); ++__first) {}
- else
- break;
- }
- return __last;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-// search_n. Search for __count consecutive copies of __val.
-template <class _ForwardIter, class _Integer, class _Tp>
-_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
- _Integer __count, const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__count <= 0)
- return __first;
- if (__count == 1)
- //We use find when __count == 1 to use potential find overload.
- return find(__first, __last, __val);
- return _STLP_PRIV __search_n(__first, __last, __count, __val, equal_to<_Tp>(),
- _STLP_DISTANCE_TYPE(__first, _ForwardIter),
- _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Integer, class _Tp, class _BinaryPred>
-_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
- _Integer __count, const _Tp& __val,
- _BinaryPred __binary_pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__count <= 0)
- return __first;
- return _STLP_PRIV __search_n(__first, __last, __count, __val, __binary_pred,
- _STLP_DISTANCE_TYPE(__first, _ForwardIter),
- _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
-}
-
-template <class _ForwardIter1, class _ForwardIter2>
-_ForwardIter1
-find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- return _STLP_PRIV __find_end(__first1, __last1, __first2, __last2,
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
- _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1),
- _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2),
-#else
- forward_iterator_tag(),
- forward_iterator_tag(),
-#endif
- _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first1, _ForwardIter1))
- );
-}
-
-// unique and unique_copy
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIterator, class _OutputIterator, class _BinaryPredicate,
- class _Tp>
-_STLP_INLINE_LOOP _OutputIterator
-__unique_copy(_InputIterator __first, _InputIterator __last,
- _OutputIterator __result,
- _BinaryPredicate __binary_pred, _Tp*) {
- _Tp __val = *__first;
- *__result = __val;
- while (++__first != __last)
- if (!__binary_pred(__val, *__first)) {
- __val = *__first;
- *++__result = __val;
- }
- return ++__result;
-}
-
-template <class _InputIter, class _OutputIter, class _BinaryPredicate>
-inline _OutputIter
-__unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
- _BinaryPredicate __binary_pred, const output_iterator_tag &) {
- return _STLP_PRIV __unique_copy(__first, __last, __result, __binary_pred,
- _STLP_VALUE_TYPE(__first, _InputIter));
-}
-
-template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
-_STLP_INLINE_LOOP _ForwardIter
-__unique_copy(_InputIter __first, _InputIter __last, _ForwardIter __result,
- _BinaryPredicate __binary_pred, const forward_iterator_tag &) {
- *__result = *__first;
- while (++__first != __last)
- if (!__binary_pred(*__result, *__first)) *++__result = *__first;
- return ++__result;
-}
-
-#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _InputIterator, class _BidirectionalIterator, class _BinaryPredicate>
-inline _BidirectionalIterator
-__unique_copy(_InputIterator __first, _InputIterator __last,
- _BidirectionalIterator __result, _BinaryPredicate __binary_pred,
- const bidirectional_iterator_tag &) {
- return _STLP_PRIV __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag());
-}
-
-template <class _InputIterator, class _RandomAccessIterator, class _BinaryPredicate>
-inline _RandomAccessIterator
-__unique_copy(_InputIterator __first, _InputIterator __last,
- _RandomAccessIterator __result, _BinaryPredicate __binary_pred,
- const random_access_iterator_tag &) {
- return _STLP_PRIV __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag());
-}
-#endif /* _STLP_NONTEMPL_BASE_MATCH_BUG */
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter, class _OutputIter>
-_OutputIter
-unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last) return __result;
- return _STLP_PRIV __unique_copy(__first, __last, __result,
- _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first, _InputIter)),
- _STLP_ITERATOR_CATEGORY(__result, _OutputIter));
-}
-
-template <class _InputIter, class _OutputIter, class _BinaryPredicate>
-_OutputIter
-unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
- _BinaryPredicate __binary_pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last) return __result;
- return _STLP_PRIV __unique_copy(__first, __last, __result, __binary_pred,
- _STLP_ITERATOR_CATEGORY(__result, _OutputIter));
-}
-
-// rotate and rotate_copy, and their auxiliary functions
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Distance>
-_ForwardIter __rotate_aux(_ForwardIter __first,
- _ForwardIter __middle,
- _ForwardIter __last,
- _Distance*,
- const forward_iterator_tag &) {
- if (__first == __middle)
- return __last;
- if (__last == __middle)
- return __first;
-
- _ForwardIter __first2 = __middle;
- do {
- _STLP_STD::swap(*__first++, *__first2++);
- if (__first == __middle)
- __middle = __first2;
- } while (__first2 != __last);
-
- _ForwardIter __new_middle = __first;
-
- __first2 = __middle;
-
- while (__first2 != __last) {
- _STLP_STD::swap (*__first++, *__first2++);
- if (__first == __middle)
- __middle = __first2;
- else if (__first2 == __last)
- __first2 = __middle;
- }
-
- return __new_middle;
-}
-
-template <class _BidirectionalIter, class _Distance>
-_BidirectionalIter __rotate_aux(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
- _Distance*,
- const bidirectional_iterator_tag &) {
- if (__first == __middle)
- return __last;
- if (__last == __middle)
- return __first;
-
- _STLP_PRIV __reverse(__first, __middle, bidirectional_iterator_tag());
- _STLP_PRIV __reverse(__middle, __last, bidirectional_iterator_tag());
-
- while (__first != __middle && __middle != __last)
- _STLP_STD::swap(*__first++, *--__last);
-
- if (__first == __middle) {
- _STLP_PRIV __reverse(__middle, __last, bidirectional_iterator_tag());
- return __last;
- }
- else {
- _STLP_PRIV __reverse(__first, __middle, bidirectional_iterator_tag());
- return __first;
- }
-}
-
-// rotate and rotate_copy, and their auxiliary functions
-template <class _EuclideanRingElement>
-_STLP_INLINE_LOOP
-_EuclideanRingElement __gcd(_EuclideanRingElement __m,
- _EuclideanRingElement __n) {
- while (__n != 0) {
- _EuclideanRingElement __t = __m % __n;
- __m = __n;
- __n = __t;
- }
- return __m;
-}
-
-template <class _RandomAccessIter, class _Distance, class _Tp>
-_RandomAccessIter __rotate_aux(_RandomAccessIter __first,
- _RandomAccessIter __middle,
- _RandomAccessIter __last,
- _Distance *, _Tp *) {
-
- _Distance __n = __last - __first;
- _Distance __k = __middle - __first;
- _Distance __l = __n - __k;
- _RandomAccessIter __result = __first + (__last - __middle);
-
- if (__k == 0) /* __first == middle */
- return __last;
-
- if (__k == __l) {
- _STLP_STD::swap_ranges(__first, __middle, __middle);
- return __result;
- }
-
- _Distance __d = _STLP_PRIV __gcd(__n, __k);
-
- for (_Distance __i = 0; __i < __d; __i++) {
- _Tp __tmp = *__first;
- _RandomAccessIter __p = __first;
-
- if (__k < __l) {
- for (_Distance __j = 0; __j < __l/__d; __j++) {
- if (__p > __first + __l) {
- *__p = *(__p - __l);
- __p -= __l;
- }
-
- *__p = *(__p + __k);
- __p += __k;
- }
- }
-
- else {
- for (_Distance __j = 0; __j < __k/__d - 1; __j ++) {
- if (__p < __last - __k) {
- *__p = *(__p + __k);
- __p += __k;
- }
-
- *__p = * (__p - __l);
- __p -= __l;
- }
- }
-
- *__p = __tmp;
- ++__first;
- }
-
- return __result;
-}
-
-template <class _RandomAccessIter, class _Distance>
-inline _RandomAccessIter
-__rotate_aux(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last,
- _Distance * __dis, const random_access_iterator_tag &) {
- return _STLP_PRIV __rotate_aux(__first, __middle, __last,
- __dis, _STLP_VALUE_TYPE(__first, _RandomAccessIter));
-}
-
-template <class _ForwardIter>
-_ForwardIter
-__rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) {
- _STLP_DEBUG_CHECK(__check_range(__first, __middle))
- _STLP_DEBUG_CHECK(__check_range(__middle, __last))
- return __rotate_aux(__first, __middle, __last,
- _STLP_DISTANCE_TYPE(__first, _ForwardIter),
- _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter>
-void rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) {
- _STLP_PRIV __rotate(__first, __middle, __last);
-}
-
-// Return a random number in the range [0, __n). This function encapsulates
-// whether we're using rand (part of the standard C library) or lrand48
-// (not standard, but a much better choice whenever it's available).
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Distance>
-inline _Distance __random_number(_Distance __n) {
-#ifdef _STLP_NO_DRAND48
- return rand() % __n;
-#else
- return lrand48() % __n;
-#endif
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _RandomAccessIter>
-void random_shuffle(_RandomAccessIter __first,
- _RandomAccessIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last) return;
- for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
- iter_swap(__i, __first + _STLP_PRIV __random_number((__i - __first) + 1));
-}
-
-template <class _RandomAccessIter, class _RandomNumberGenerator>
-void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
- _RandomNumberGenerator &__rand) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last) return;
- for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
- iter_swap(__i, __first + __rand((__i - __first) + 1));
-}
-
-#if !defined (_STLP_NO_EXTENSIONS)
-// random_sample and random_sample_n (extensions, not part of the standard).
-template <class _ForwardIter, class _OutputIter, class _Distance>
-_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
- _OutputIter __out_ite, const _Distance __n) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _Distance __remaining = _STLP_STD::distance(__first, __last);
- _Distance __m = (min) (__n, __remaining);
-
- while (__m > 0) {
- if (_STLP_PRIV __random_number(__remaining) < __m) {
- *__out_ite = *__first;
- ++__out_ite;
- --__m;
- }
-
- --__remaining;
- ++__first;
- }
- return __out_ite;
-}
-
-
-template <class _ForwardIter, class _OutputIter, class _Distance,
- class _RandomNumberGenerator>
-_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
- _OutputIter __out_ite, const _Distance __n,
- _RandomNumberGenerator& __rand) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _Distance __remaining = _STLP_STD::distance(__first, __last);
- _Distance __m = (min) (__n, __remaining);
-
- while (__m > 0) {
- if (__rand(__remaining) < __m) {
- *__out_ite = *__first;
- ++__out_ite;
- --__m;
- }
-
- --__remaining;
- ++__first;
- }
- return __out_ite;
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter, class _RandomAccessIter, class _Distance>
-_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out_ite,
- const _Distance __n) {
- _Distance __m = 0;
- _Distance __t = __n;
- for ( ; __first != __last && __m < __n; ++__m, ++__first)
- __out_ite[__m] = *__first;
-
- while (__first != __last) {
- ++__t;
- _Distance __M = __random_number(__t);
- if (__M < __n)
- __out_ite[__M] = *__first;
- ++__first;
- }
-
- return __out_ite + __m;
-}
-
-template <class _InputIter, class _RandomAccessIter,
- class _RandomNumberGenerator, class _Distance>
-_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out_ite,
- _RandomNumberGenerator& __rand,
- const _Distance __n) {
- _Distance __m = 0;
- _Distance __t = __n;
- for ( ; __first != __last && __m < __n; ++__m, ++__first)
- __out_ite[__m] = *__first;
-
- while (__first != __last) {
- ++__t;
- _Distance __M = __rand(__t);
- if (__M < __n)
- __out_ite[__M] = *__first;
- ++__first;
- }
-
- return __out_ite + __m;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter, class _RandomAccessIter>
-_RandomAccessIter
-random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out_first, _RandomAccessIter __out_last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__out_first, __out_last))
- return _STLP_PRIV __random_sample(__first, __last,
- __out_first, __out_last - __out_first);
-}
-
-template <class _InputIter, class _RandomAccessIter, class _RandomNumberGenerator>
-_RandomAccessIter
-random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out_first, _RandomAccessIter __out_last,
- _RandomNumberGenerator& __rand) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__out_first, __out_last))
- return _STLP_PRIV __random_sample(__first, __last,
- __out_first, __rand,
- __out_last - __out_first);
-}
-
-#endif /* _STLP_NO_EXTENSIONS */
-
-// partition, stable_partition, and their auxiliary functions
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Predicate>
-_STLP_INLINE_LOOP _ForwardIter __partition(_ForwardIter __first,
- _ForwardIter __last,
- _Predicate __pred,
- const forward_iterator_tag &) {
- if (__first == __last) return __first;
-
- while (__pred(*__first))
- if (++__first == __last) return __first;
-
- _ForwardIter __next = __first;
-
- while (++__next != __last) {
- if (__pred(*__next)) {
- _STLP_STD::swap(*__first, *__next);
- ++__first;
- }
- }
- return __first;
-}
-
-template <class _BidirectionalIter, class _Predicate>
-_STLP_INLINE_LOOP _BidirectionalIter __partition(_BidirectionalIter __first,
- _BidirectionalIter __last,
- _Predicate __pred,
- const bidirectional_iterator_tag &) {
- for (;;) {
- for (;;) {
- if (__first == __last)
- return __first;
- else if (__pred(*__first))
- ++__first;
- else
- break;
- }
- --__last;
- for (;;) {
- if (__first == __last)
- return __first;
- else if (!__pred(*__last))
- --__last;
- else
- break;
- }
- iter_swap(__first, __last);
- ++__first;
- }
-}
-
-#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _BidirectionalIter, class _Predicate>
-inline
-_BidirectionalIter __partition(_BidirectionalIter __first,
- _BidirectionalIter __last,
- _Predicate __pred,
- const random_access_iterator_tag &) {
- return __partition(__first, __last, __pred, bidirectional_iterator_tag());
-}
-#endif
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __partition(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
-}
-
-
-/* __pred_of_first: false if we know that __pred(*__first) is false,
- * true when we don't know the result of __pred(*__first).
- * __not_pred_of_before_last: true if we know that __pred(*--__last) is true,
- * false when we don't know the result of __pred(*--__last).
- */
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Predicate, class _Distance>
-_ForwardIter __inplace_stable_partition(_ForwardIter __first,
- _ForwardIter __last,
- _Predicate __pred, _Distance __len,
- bool __pred_of_first, bool __pred_of_before_last) {
- if (__len == 1)
- return (__pred_of_first && (__pred_of_before_last || __pred(*__first))) ? __last : __first;
- _ForwardIter __middle = __first;
- _Distance __half_len = __len / 2;
- _STLP_STD::advance(__middle, __half_len);
- return _STLP_PRIV __rotate(_STLP_PRIV __inplace_stable_partition(__first, __middle, __pred, __half_len, __pred_of_first, false),
- __middle,
- _STLP_PRIV __inplace_stable_partition(__middle, __last, __pred, __len - __half_len, true, __pred_of_before_last));
-}
-
-template <class _ForwardIter, class _Pointer, class _Predicate,
- class _Distance>
-_ForwardIter __stable_partition_adaptive(_ForwardIter __first,
- _ForwardIter __last,
- _Predicate __pred, _Distance __len,
- _Pointer __buffer, _Distance __buffer_size,
- bool __pred_of_first, bool __pred_of_before_last) {
- if (__len <= __buffer_size) {
- _ForwardIter __result1 = __first;
- _Pointer __result2 = __buffer;
- if ((__first != __last) && (!__pred_of_first || __pred(*__first))) {
- *__result2 = *__first;
- ++__result2; ++__first; --__len;
- }
- for (; __first != __last ; ++__first, --__len) {
- if (((__len == 1) && (__pred_of_before_last || __pred(*__first))) ||
- ((__len != 1) && __pred(*__first))){
- *__result1 = *__first;
- ++__result1;
- }
- else {
- *__result2 = *__first;
- ++__result2;
- }
- }
- _STLP_STD::copy(__buffer, __result2, __result1);
- return __result1;
- }
- else {
- _ForwardIter __middle = __first;
- _Distance __half_len = __len / 2;
- _STLP_STD::advance(__middle, __half_len);
- return _STLP_PRIV __rotate(_STLP_PRIV __stable_partition_adaptive(__first, __middle, __pred,
- __half_len, __buffer, __buffer_size,
- __pred_of_first, false),
- __middle,
- _STLP_PRIV __stable_partition_adaptive(__middle, __last, __pred,
- __len - __half_len, __buffer, __buffer_size,
- true, __pred_of_before_last));
- }
-}
-
-template <class _ForwardIter, class _Predicate, class _Tp, class _Distance>
-inline _ForwardIter
-__stable_partition_aux_aux(_ForwardIter __first, _ForwardIter __last,
- _Predicate __pred, _Tp*, _Distance*, bool __pred_of_before_last) {
- _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last);
- _STLP_MPWFIX_TRY //*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present
- return (__buf.size() > 0) ?
- __stable_partition_adaptive(__first, __last, __pred,
- _Distance(__buf.requested_size()),
- __buf.begin(), __buf.size(),
- false, __pred_of_before_last) :
- __inplace_stable_partition(__first, __last, __pred,
- _Distance(__buf.requested_size()),
- false, __pred_of_before_last);
- _STLP_MPWFIX_CATCH //*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present
-}
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter
-__stable_partition_aux(_ForwardIter __first, _ForwardIter __last, _Predicate __pred,
- const forward_iterator_tag &) {
- return __stable_partition_aux_aux(__first, __last, __pred,
- _STLP_VALUE_TYPE(__first, _ForwardIter),
- _STLP_DISTANCE_TYPE(__first, _ForwardIter), false);
-}
-
-template <class _BidirectIter, class _Predicate>
-_BidirectIter
-__stable_partition_aux(_BidirectIter __first, _BidirectIter __last, _Predicate __pred,
- const bidirectional_iterator_tag &) {
- for (--__last;;) {
- if (__first == __last)
- return __first;
- else if (!__pred(*__last))
- --__last;
- else
- break;
- }
- ++__last;
- //Here we know that __pred(*--__last) is true
- return __stable_partition_aux_aux(__first, __last, __pred,
- _STLP_VALUE_TYPE(__first, _BidirectIter),
- _STLP_DISTANCE_TYPE(__first, _BidirectIter), true);
-}
-
-#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _BidirectIter, class _Predicate>
-_BidirectIter
-__stable_partition_aux(_BidirectIter __first, _BidirectIter __last, _Predicate __pred,
- const random_access_iterator_tag &) {
- return __stable_partition_aux(__first, __last, __pred, bidirectional_iterator_tag());
-}
-#endif
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter
-stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for (;;) {
- if (__first == __last)
- return __first;
- else if (__pred(*__first))
- ++__first;
- else
- break;
- }
- return _STLP_PRIV __stable_partition_aux(__first, __last, __pred,
- _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-_RandomAccessIter __unguarded_partition(_RandomAccessIter __first,
- _RandomAccessIter __last,
- _Tp __pivot, _Compare __comp) {
- for (;;) {
- while (__comp(*__first, __pivot)) {
- _STLP_VERBOSE_ASSERT(!__comp(__pivot, *__first), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- ++__first;
- }
- --__last;
- while (__comp(__pivot, *__last)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__last, __pivot), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- --__last;
- }
- if (!(__first < __last))
- return __first;
- iter_swap(__first, __last);
- ++__first;
- }
-}
-
-// sort() and its auxiliary functions.
-#define __stl_threshold 16
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val,
- _Compare __comp) {
- _RandomAccessIter __next = __last;
- --__next;
- while (__comp(__val, *__next)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__next, __val), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- *__last = *__next;
- __last = __next;
- --__next;
- }
- *__last = __val;
-}
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-inline void __linear_insert(_RandomAccessIter __first,
- _RandomAccessIter __last, _Tp __val, _Compare __comp) {
- //*TY 12/26/1998 - added __val as a paramter
- // _Tp __val = *__last; //*TY 12/26/1998 - __val supplied by caller
- if (__comp(__val, *__first)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first, __val), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- copy_backward(__first, __last, __last + 1);
- *__first = __val;
- }
- else
- __unguarded_linear_insert(__last, __val, __comp);
-}
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __insertion_sort(_RandomAccessIter __first,
- _RandomAccessIter __last,
- _Tp *, _Compare __comp) {
- if (__first == __last) return;
- for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
- __linear_insert<_RandomAccessIter, _Tp, _Compare>(__first, __i, *__i, __comp); //*TY 12/26/1998 - supply *__i as __val
-}
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __unguarded_insertion_sort_aux(_RandomAccessIter __first,
- _RandomAccessIter __last,
- _Tp*, _Compare __comp) {
- for (_RandomAccessIter __i = __first; __i != __last; ++__i)
- __unguarded_linear_insert<_RandomAccessIter, _Tp, _Compare>(__i, *__i, __comp);
-}
-
-template <class _RandomAccessIter, class _Compare>
-inline void __unguarded_insertion_sort(_RandomAccessIter __first,
- _RandomAccessIter __last,
- _Compare __comp) {
- __unguarded_insertion_sort_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
-}
-
-template <class _RandomAccessIter, class _Compare>
-void __final_insertion_sort(_RandomAccessIter __first,
- _RandomAccessIter __last, _Compare __comp) {
- if (__last - __first > __stl_threshold) {
- __insertion_sort(__first, __first + __stl_threshold, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
- __unguarded_insertion_sort(__first + __stl_threshold, __last, __comp);
- }
- else
- __insertion_sort(__first, __last, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
-}
-
-template <class _RandomAccessIter, class _Tp, class _Size, class _Compare>
-void __introsort_loop(_RandomAccessIter __first,
- _RandomAccessIter __last, _Tp*,
- _Size __depth_limit, _Compare __comp) {
- while (__last - __first > __stl_threshold) {
- if (__depth_limit == 0) {
- partial_sort(__first, __last, __last, __comp);
- return;
- }
- --__depth_limit;
- _RandomAccessIter __cut =
- __unguarded_partition(__first, __last,
- _Tp(__median(*__first,
- *(__first + (__last - __first)/2),
- *(__last - 1), __comp)),
- __comp);
- __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit, __comp);
- __last = __cut;
- }
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _RandomAccessIter>
-void sort(_RandomAccessIter __first, _RandomAccessIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first != __last) {
- _STLP_PRIV __introsort_loop(__first, __last,
- _STLP_VALUE_TYPE(__first, _RandomAccessIter),
- _STLP_PRIV __lg(__last - __first) * 2,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
- _STLP_PRIV __final_insertion_sort(__first, __last,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
- }
-}
-
-template <class _RandomAccessIter, class _Compare>
-void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first != __last) {
- _STLP_PRIV __introsort_loop(__first, __last,
- _STLP_VALUE_TYPE(__first, _RandomAccessIter),
- _STLP_PRIV __lg(__last - __first) * 2, __comp);
- _STLP_PRIV __final_insertion_sort(__first, __last, __comp);
- }
-}
-
-// stable_sort() and its auxiliary functions.
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _RandomAccessIter, class _Compare>
-void __inplace_stable_sort(_RandomAccessIter __first,
- _RandomAccessIter __last, _Compare __comp) {
- if (__last - __first < 15) {
- __insertion_sort(__first, __last, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
- return;
- }
- _RandomAccessIter __middle = __first + (__last - __first) / 2;
- __inplace_stable_sort(__first, __middle, __comp);
- __inplace_stable_sort(__middle, __last, __comp);
- __merge_without_buffer(__first, __middle, __last,
- __middle - __first,
- __last - __middle,
- __comp);
-}
-
-template <class _RandomAccessIter1, class _RandomAccessIter2,
- class _Distance, class _Compare>
-void __merge_sort_loop(_RandomAccessIter1 __first,
- _RandomAccessIter1 __last,
- _RandomAccessIter2 __result, _Distance __step_size,
- _Compare __comp) {
- _Distance __two_step = 2 * __step_size;
-
- while (__last - __first >= __two_step) {
- __result = merge(__first, __first + __step_size,
- __first + __step_size, __first + __two_step,
- __result,
- __comp);
- __first += __two_step;
- }
- __step_size = (min) (_Distance(__last - __first), __step_size);
-
- merge(__first, __first + __step_size,
- __first + __step_size, __last,
- __result,
- __comp);
-}
-
-const int __stl_chunk_size = 7;
-
-template <class _RandomAccessIter, class _Distance, class _Compare>
-void __chunk_insertion_sort(_RandomAccessIter __first,
- _RandomAccessIter __last,
- _Distance __chunk_size, _Compare __comp) {
- while (__last - __first >= __chunk_size) {
- __insertion_sort(__first, __first + __chunk_size,
- _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
- __first += __chunk_size;
- }
- __insertion_sort(__first, __last, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
-}
-
-template <class _RandomAccessIter, class _Pointer, class _Distance,
- class _Compare>
-void __merge_sort_with_buffer(_RandomAccessIter __first,
- _RandomAccessIter __last, _Pointer __buffer,
- _Distance*, _Compare __comp) {
- _Distance __len = __last - __first;
- _Pointer __buffer_last = __buffer + __len;
-
- _Distance __step_size = __stl_chunk_size;
- __chunk_insertion_sort(__first, __last, __step_size, __comp);
-
- while (__step_size < __len) {
- __merge_sort_loop(__first, __last, __buffer, __step_size, __comp);
- __step_size *= 2;
- __merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp);
- __step_size *= 2;
- }
-}
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
- class _Distance>
-_BidirectionalIter1 __rotate_adaptive(_BidirectionalIter1 __first,
- _BidirectionalIter1 __middle,
- _BidirectionalIter1 __last,
- _Distance __len1, _Distance __len2,
- _BidirectionalIter2 __buffer,
- _Distance __buffer_size) {
- if (__len1 > __len2 && __len2 <= __buffer_size) {
- _BidirectionalIter2 __buffer_end = _STLP_STD::copy(__middle, __last, __buffer);
- _STLP_STD::copy_backward(__first, __middle, __last);
- return _STLP_STD::copy(__buffer, __buffer_end, __first);
- }
- else if (__len1 <= __buffer_size) {
- _BidirectionalIter2 __buffer_end = _STLP_STD::copy(__first, __middle, __buffer);
- _STLP_STD::copy(__middle, __last, __first);
- return _STLP_STD::copy_backward(__buffer, __buffer_end, __last);
- }
- else
- return _STLP_PRIV __rotate(__first, __middle, __last);
-}
-
-template <class _BidirectionalIter, class _Distance, class _Pointer,
- class _Compare>
-void __merge_adaptive(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
- _Distance __len1, _Distance __len2,
- _Pointer __buffer, _Distance __buffer_size,
- _Compare __comp) {
- if (__len1 <= __len2 && __len1 <= __buffer_size) {
- _Pointer __buffer_end = _STLP_STD::copy(__first, __middle, __buffer);
- _STLP_STD::merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
- }
- else if (__len2 <= __buffer_size) {
- _Pointer __buffer_end = _STLP_STD::copy(__middle, __last, __buffer);
- _STLP_PRIV __merge_backward(__first, __middle, __buffer, __buffer_end, __last,
- __comp);
- }
- else {
- _BidirectionalIter __first_cut = __first;
- _BidirectionalIter __second_cut = __middle;
- _Distance __len11 = 0;
- _Distance __len22 = 0;
- if (__len1 > __len2) {
- __len11 = __len1 / 2;
- _STLP_STD::advance(__first_cut, __len11);
- __second_cut = _STLP_STD::lower_bound(__middle, __last, *__first_cut, __comp);
- __len22 += _STLP_STD::distance(__middle, __second_cut);
- }
- else {
- __len22 = __len2 / 2;
- _STLP_STD::advance(__second_cut, __len22);
- __first_cut = _STLP_STD::upper_bound(__first, __middle, *__second_cut, __comp);
- __len11 += _STLP_STD::distance(__first, __first_cut);
- }
- _BidirectionalIter __new_middle =
- __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11,
- __len22, __buffer, __buffer_size);
- __merge_adaptive(__first, __first_cut, __new_middle, __len11,
- __len22, __buffer, __buffer_size, __comp);
- __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
- __len2 - __len22, __buffer, __buffer_size, __comp);
- }
-}
-
-template <class _RandomAccessIter, class _Pointer, class _Distance,
- class _Compare>
-void __stable_sort_adaptive(_RandomAccessIter __first,
- _RandomAccessIter __last, _Pointer __buffer,
- _Distance __buffer_size, _Compare __comp) {
- _Distance __len = (__last - __first + 1) / 2;
- _RandomAccessIter __middle = __first + __len;
- if (__len > __buffer_size) {
- __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size,
- __comp);
- __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size,
- __comp);
- }
- else {
- __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0,
- __comp);
- __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0,
- __comp);
- }
- __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first),
- _Distance(__last - __middle), __buffer, __buffer_size,
- __comp);
-}
-
-template <class _RandomAccessIter, class _Tp, class _Distance, class _Compare>
-void __stable_sort_aux(_RandomAccessIter __first,
- _RandomAccessIter __last, _Tp*, _Distance*,
- _Compare __comp) {
- _Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last);
- if (buf.begin() == 0)
- __inplace_stable_sort(__first, __last, __comp);
- else
- __stable_sort_adaptive(__first, __last, buf.begin(),
- _Distance(buf.size()),
- __comp);
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _RandomAccessIter>
-void stable_sort(_RandomAccessIter __first,
- _RandomAccessIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_PRIV __stable_sort_aux(__first, __last,
- _STLP_VALUE_TYPE(__first, _RandomAccessIter),
- _STLP_DISTANCE_TYPE(__first, _RandomAccessIter),
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
-}
-
-template <class _RandomAccessIter, class _Compare>
-void stable_sort(_RandomAccessIter __first,
- _RandomAccessIter __last, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_PRIV __stable_sort_aux(__first, __last,
- _STLP_VALUE_TYPE(__first, _RandomAccessIter),
- _STLP_DISTANCE_TYPE(__first, _RandomAccessIter),
- __comp);
-}
-
-// partial_sort, partial_sort_copy, and auxiliary functions.
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle,
- _RandomAccessIter __last, _Tp*, _Compare __comp) {
- make_heap(__first, __middle, __comp);
- for (_RandomAccessIter __i = __middle; __i < __last; ++__i) {
- if (__comp(*__i, *__first)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first, *__i), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __pop_heap(__first, __middle, __i, _Tp(*__i), __comp,
- _STLP_DISTANCE_TYPE(__first, _RandomAccessIter));
- }
- }
- sort_heap(__first, __middle, __comp);
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _RandomAccessIter>
-void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle,
- _RandomAccessIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __middle))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__middle, __last))
- _STLP_PRIV __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter),
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
-}
-
-template <class _RandomAccessIter, class _Compare>
-void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle,
- _RandomAccessIter __last, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __middle))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__middle, __last))
- _STLP_PRIV __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter, class _RandomAccessIter, class _Compare,
- class _Distance, class _Tp>
-_RandomAccessIter __partial_sort_copy(_InputIter __first,
- _InputIter __last,
- _RandomAccessIter __result_first,
- _RandomAccessIter __result_last,
- _Compare __comp, _Distance*, _Tp*) {
- if (__result_first == __result_last) return __result_last;
- _RandomAccessIter __result_real_last = __result_first;
- while(__first != __last && __result_real_last != __result_last) {
- *__result_real_last = *__first;
- ++__result_real_last;
- ++__first;
- }
- make_heap(__result_first, __result_real_last, __comp);
- while (__first != __last) {
- if (__comp(*__first, *__result_first)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__result_first, *__first), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __adjust_heap(__result_first, _Distance(0),
- _Distance(__result_real_last - __result_first),
- _Tp(*__first),
- __comp);
- }
- ++__first;
- }
- sort_heap(__result_first, __result_real_last, __comp);
- return __result_real_last;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter, class _RandomAccessIter>
-_RandomAccessIter
-partial_sort_copy(_InputIter __first, _InputIter __last,
- _RandomAccessIter __result_first, _RandomAccessIter __result_last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__result_first, __result_last))
- return _STLP_PRIV __partial_sort_copy(__first, __last, __result_first, __result_last,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _InputIter)),
- _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter),
- _STLP_VALUE_TYPE(__first, _InputIter));
-}
-
-template <class _InputIter, class _RandomAccessIter, class _Compare>
-_RandomAccessIter
-partial_sort_copy(_InputIter __first, _InputIter __last,
- _RandomAccessIter __result_first,
- _RandomAccessIter __result_last, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__result_first, __result_last))
- return _STLP_PRIV __partial_sort_copy(__first, __last, __result_first, __result_last,
- __comp,
- _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter),
- _STLP_VALUE_TYPE(__first, _InputIter));
-}
-
-// nth_element() and its auxiliary functions.
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
- _RandomAccessIter __last, _Tp*, _Compare __comp) {
- while (__last - __first > 3) {
- _RandomAccessIter __cut =
- __unguarded_partition(__first, __last,
- _Tp(__median(*__first,
- *(__first + (__last - __first)/2),
- *(__last - 1),
- __comp)),
- __comp);
- if (__cut <= __nth)
- __first = __cut;
- else
- __last = __cut;
- }
- __insertion_sort(__first, __last, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _RandomAccessIter>
-void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
- _RandomAccessIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __nth))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__nth, __last))
- _STLP_PRIV __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter),
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
-}
-
-template <class _RandomAccessIter, class _Compare>
-void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
- _RandomAccessIter __last, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __nth))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__nth, __last))
- _STLP_PRIV __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
-}
-
-// Binary search (lower_bound, upper_bound, equal_range, binary_search).
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Tp,
- class _Compare1, class _Compare2, class _Distance>
-_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- _Compare1 __comp1, _Compare2 __comp2, _Distance*) {
- _Distance __len = _STLP_STD::distance(__first, __last);
- _Distance __half;
-
- while (__len > 0) {
- __half = __len >> 1;
- _ForwardIter __middle = __first;
- _STLP_STD::advance(__middle, __half);
- if (__comp2(__val, *__middle)) {
- _STLP_VERBOSE_ASSERT(!__comp1(*__middle, __val), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __len = __half;
- }
- else {
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
- }
- }
- return __first;
-}
-
-template <class _ForwardIter, class _Tp,
- class _Compare1, class _Compare2, class _Distance>
-pair<_ForwardIter, _ForwardIter>
-__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- _Compare1 __comp1, _Compare2 __comp2, _Distance* __dist) {
- _Distance __len = _STLP_STD::distance(__first, __last);
- _Distance __half;
-
- while (__len > 0) {
- __half = __len >> 1;
- _ForwardIter __middle = __first;
- _STLP_STD::advance(__middle, __half);
- if (__comp1(*__middle, __val)) {
- _STLP_VERBOSE_ASSERT(!__comp2(__val, *__middle), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
- }
- else if (__comp2(__val, *__middle)) {
- _STLP_VERBOSE_ASSERT(!__comp1(*__middle, __val), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __len = __half;
- }
- else {
- _ForwardIter __left = _STLP_PRIV __lower_bound(__first, __middle, __val, __comp1, __comp2, __dist);
- //Small optim: If lower_bound haven't found an equivalent value
- //there is no need to call upper_bound.
- if (__comp1(*__left, __val)) {
- _STLP_VERBOSE_ASSERT(!__comp2(__val, *__left), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return pair<_ForwardIter, _ForwardIter>(__left, __left);
- }
- _STLP_STD::advance(__first, __len);
- _ForwardIter __right = _STLP_PRIV __upper_bound(++__middle, __first, __val, __comp1, __comp2, __dist);
- return pair<_ForwardIter, _ForwardIter>(__left, __right);
- }
- }
- return pair<_ForwardIter, _ForwardIter>(__first, __first);
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- while (__first1 != __last1 && __first2 != __last2) {
- if (*__first2 < *__first1) {
- *__result = *__first2;
- ++__first2;
- }
- else {
- *__result = *__first1;
- ++__first1;
- }
- ++__result;
- }
- return _STLP_STD::copy(__first2, __last2, _STLP_STD::copy(__first1, __last1, __result));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- while (__first1 != __last1 && __first2 != __last2) {
- if (__comp(*__first2, *__first1)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first1, *__first2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- *__result = *__first2;
- ++__first2;
- }
- else {
- *__result = *__first1;
- ++__first1;
- }
- ++__result;
- }
- return _STLP_STD::copy(__first2, __last2, _STLP_STD::copy(__first1, __last1, __result));
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _BidirectionalIter, class _Distance, class _Compare>
-void __merge_without_buffer(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
- _Distance __len1, _Distance __len2,
- _Compare __comp) {
- if (__len1 == 0 || __len2 == 0)
- return;
- if (__len1 + __len2 == 2) {
- if (__comp(*__middle, *__first)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first, *__middle), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- iter_swap(__first, __middle);
- }
- return;
- }
- _BidirectionalIter __first_cut = __first;
- _BidirectionalIter __second_cut = __middle;
- _Distance __len11 = 0;
- _Distance __len22 = 0;
- if (__len1 > __len2) {
- __len11 = __len1 / 2;
- _STLP_STD::advance(__first_cut, __len11);
- __second_cut = _STLP_STD::lower_bound(__middle, __last, *__first_cut, __comp);
- __len22 += _STLP_STD::distance(__middle, __second_cut);
- }
- else {
- __len22 = __len2 / 2;
- _STLP_STD::advance(__second_cut, __len22);
- __first_cut = _STLP_STD::upper_bound(__first, __middle, *__second_cut, __comp);
- __len11 += _STLP_STD::distance(__first, __first_cut);
- }
- _BidirectionalIter __new_middle
- = _STLP_PRIV __rotate(__first_cut, __middle, __second_cut);
- __merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22,
- __comp);
- __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11,
- __len2 - __len22, __comp);
-}
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
- class _BidirectionalIter3, class _Compare>
-_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
- _BidirectionalIter1 __last1,
- _BidirectionalIter2 __first2,
- _BidirectionalIter2 __last2,
- _BidirectionalIter3 __result,
- _Compare __comp) {
- if (__first1 == __last1)
- return copy_backward(__first2, __last2, __result);
- if (__first2 == __last2)
- return copy_backward(__first1, __last1, __result);
- --__last1;
- --__last2;
- for (;;) {
- if (__comp(*__last2, *__last1)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__last1, *__last2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- *--__result = *__last1;
- if (__first1 == __last1)
- return copy_backward(__first2, ++__last2, __result);
- --__last1;
- }
- else {
- *--__result = *__last2;
- if (__first2 == __last2)
- return copy_backward(__first1, ++__last1, __result);
- --__last2;
- }
- }
-}
-
-template <class _BidirectionalIter, class _Tp,
- class _Distance, class _Compare>
-inline void __inplace_merge_aux(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last, _Tp*, _Distance*,
- _Compare __comp) {
- _Distance __len1 = _STLP_STD::distance(__first, __middle);
- _Distance __len2 = _STLP_STD::distance(__middle, __last);
-
- _Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last);
- if (__buf.begin() == 0)
- __merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp);
- else
- __merge_adaptive(__first, __middle, __last, __len1, __len2,
- __buf.begin(), _Distance(__buf.size()),
- __comp);
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _BidirectionalIter>
-void inplace_merge(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __middle))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__middle, __last))
- if (__first == __middle || __middle == __last)
- return;
- _STLP_PRIV __inplace_merge_aux(__first, __middle, __last,
- _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter),
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
-}
-
-template <class _BidirectionalIter, class _Compare>
-void inplace_merge(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __middle))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__middle, __last))
- if (__first == __middle || __middle == __last)
- return;
- _STLP_PRIV __inplace_merge_aux(__first, __middle, __last,
- _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter),
- __comp);
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool __includes(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- while (__first1 != __last1 && __first2 != __last2)
- if (__comp(*__first2, *__first1)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first1, *__first2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return false;
- }
- else if (__comp(*__first1, *__first2))
- ++__first1;
- else
- ++__first1, ++__first2;
-
- return __first2 == __last2;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool includes(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) {
- return _STLP_PRIV __includes(__first1, __last1, __first2, __last2, __comp);
-}
-
-template <class _InputIter1, class _InputIter2>
-bool includes(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2) {
- return _STLP_PRIV __includes(__first1, __last1, __first2, __last2,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter __set_union(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- while (__first1 != __last1 && __first2 != __last2) {
- if (__comp(*__first1, *__first2)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- *__result = *__first1;
- ++__first1;
- }
- else if (__comp(*__first2, *__first1)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first1, *__first2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- *__result = *__first2;
- ++__first2;
- }
- else {
- *__result = *__first1;
- ++__first1;
- ++__first2;
- }
- ++__result;
- }
- return _STLP_STD::copy(__first2, __last2, _STLP_STD::copy(__first1, __last1, __result));
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result) {
- return _STLP_PRIV __set_union(__first1, __last1, __first2, __last2, __result,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp) {
- return _STLP_PRIV __set_union(__first1, __last1, __first2, __last2, __result, __comp);
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter __set_intersection(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- while (__first1 != __last1 && __first2 != __last2)
- if (__comp(*__first1, *__first2)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- ++__first1;
- }
- else if (__comp(*__first2, *__first1))
- ++__first2;
- else {
- *__result = *__first1;
- ++__first1;
- ++__first2;
- ++__result;
- }
- return __result;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result) {
- return _STLP_PRIV __set_intersection(__first1, __last1, __first2, __last2, __result,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp) {
- return _STLP_PRIV __set_intersection(__first1, __last1, __first2, __last2, __result, __comp);
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter __set_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- while (__first1 != __last1 && __first2 != __last2)
- if (__comp(*__first1, *__first2)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- *__result = *__first1;
- ++__first1;
- ++__result;
- }
- else if (__comp(*__first2, *__first1))
- ++__first2;
- else {
- ++__first1;
- ++__first2;
- }
- return _STLP_STD::copy(__first1, __last1, __result);
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result) {
- return _STLP_PRIV __set_difference(__first1, __last1, __first2, __last2, __result,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp) {
- return _STLP_PRIV __set_difference(__first1, __last1, __first2, __last2, __result, __comp);
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter, class _Compare>
-_OutputIter
-__set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- while (__first1 != __last1 && __first2 != __last2) {
- if (__comp(*__first1, *__first2)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- *__result = *__first1;
- ++__first1;
- ++__result;
- }
- else if (__comp(*__first2, *__first1)) {
- *__result = *__first2;
- ++__first2;
- ++__result;
- }
- else {
- ++__first1;
- ++__first2;
- }
- }
- return _STLP_STD::copy(__first2, __last2, _STLP_STD::copy(__first1, __last1, __result));
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter
-set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result) {
- return _STLP_PRIV __set_symmetric_difference(__first1, __last1, __first2, __last2, __result,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter, class _Compare>
-_OutputIter
-set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result,
- _Compare __comp) {
- return _STLP_PRIV __set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __comp);
-}
-
-// min_element and max_element, with and without an explicitly supplied
-// comparison function.
-
-template <class _ForwardIter>
-_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last) return __first;
- _ForwardIter __result = __first;
- while (++__first != __last)
- if (*__result < *__first) {
- _STLP_VERBOSE_ASSERT(!(*__first < *__result), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __result = __first;
- }
- return __result;
-}
-
-template <class _ForwardIter, class _Compare>
-_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last,
- _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last) return __first;
- _ForwardIter __result = __first;
- while (++__first != __last) {
- if (__comp(*__result, *__first)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first, *__result), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __result = __first;
- }
- }
- return __result;
-}
-
-template <class _ForwardIter>
-_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last) return __first;
- _ForwardIter __result = __first;
- while (++__first != __last)
- if (*__first < *__result) {
- _STLP_VERBOSE_ASSERT(!(*__result < *__first), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __result = __first;
- }
- return __result;
-}
-
-template <class _ForwardIter, class _Compare>
-_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last,
- _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last) return __first;
- _ForwardIter __result = __first;
- while (++__first != __last) {
- if (__comp(*__first, *__result)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__result, *__first), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __result = __first;
- }
- }
- return __result;
-}
-
-// next_permutation and prev_permutation, with and without an explicitly
-// supplied comparison function.
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _BidirectionalIter, class _Compare>
-bool __next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
- _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last)
- return false;
- _BidirectionalIter __i = __first;
- ++__i;
- if (__i == __last)
- return false;
- __i = __last;
- --__i;
-
- for(;;) {
- _BidirectionalIter __ii = __i;
- --__i;
- if (__comp(*__i, *__ii)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__ii, *__i), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- _BidirectionalIter __j = __last;
- while (!__comp(*__i, *--__j)) {}
- iter_swap(__i, __j);
- reverse(__ii, __last);
- return true;
- }
- if (__i == __first) {
- reverse(__first, __last);
- return false;
- }
- }
-#if defined (_STLP_NEED_UNREACHABLE_RETURN)
- return false;
-#endif
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _BidirectionalIter>
-bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __next_permutation(__first, __last,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
-}
-
-template <class _BidirectionalIter, class _Compare>
-bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
- _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __next_permutation(__first, __last, __comp);
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _BidirectionalIter, class _Compare>
-bool __prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
- _Compare __comp) {
- if (__first == __last)
- return false;
- _BidirectionalIter __i = __first;
- ++__i;
- if (__i == __last)
- return false;
- __i = __last;
- --__i;
-
- for(;;) {
- _BidirectionalIter __ii = __i;
- --__i;
- if (__comp(*__ii, *__i)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__i, *__ii), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- _BidirectionalIter __j = __last;
- while (!__comp(*--__j, *__i)) {}
- iter_swap(__i, __j);
- reverse(__ii, __last);
- return true;
- }
- if (__i == __first) {
- reverse(__first, __last);
- return false;
- }
- }
-#if defined (_STLP_NEED_UNREACHABLE_RETURN)
- return false;
-#endif
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _BidirectionalIter>
-bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __prev_permutation(__first, __last,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
-}
-
-template <class _BidirectionalIter, class _Compare>
-bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
- _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __prev_permutation(__first, __last, __comp);
-}
-
-#if !defined (_STLP_NO_EXTENSIONS)
-
-// is_heap, a predicate testing whether or not a range is
-// a heap. This function is an extension, not part of the C++
-// standard.
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _RandomAccessIter, class _Distance, class _StrictWeakOrdering>
-bool __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp,
- _Distance __n) {
- _Distance __parent = 0;
- for (_Distance __child = 1; __child < __n; ++__child) {
- if (__comp(__first[__parent], __first[__child])) {
- _STLP_VERBOSE_ASSERT(!__comp(__first[__child], __first[__parent]), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return false;
- }
- if ((__child & 1) == 0)
- ++__parent;
- }
- return true;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _RandomAccessIter>
-bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __is_heap(__first, _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)), __last - __first);
-}
-
-template <class _RandomAccessIter, class _StrictWeakOrdering>
-bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
- _StrictWeakOrdering __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __is_heap(__first, __comp, __last - __first);
-}
-
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _StrictWeakOrdering>
-bool __is_sorted(_ForwardIter __first, _ForwardIter __last,
- _StrictWeakOrdering __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last)
- return true;
-
- _ForwardIter __next = __first;
- for (++__next; __next != __last; __first = __next, ++__next) {
- if (__comp(*__next, *__first)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first, *__next), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return false;
- }
- }
-
- return true;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif /* _STLP_NO_EXTENSIONS */
-
-_STLP_END_NAMESPACE
-
-#undef __stl_threshold
-
-#endif /* _STLP_ALGO_C */
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_algo.h b/stlport/stlport/stl/_algo.h
deleted file mode 100644
index 01e5f93..0000000
--- a/stlport/stlport/stl/_algo.h
+++ /dev/null
@@ -1,745 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ALGO_H
-#define _STLP_INTERNAL_ALGO_H
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-# include <stl/_algobase.h>
-#endif
-
-#ifndef _STLP_INTERNAL_HEAP_H
-# include <stl/_heap.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_H
-# include <stl/_iterator.h>
-#endif
-
-#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-# include <stl/_function_base.h>
-#endif
-
-#if defined (__SUNPRO_CC) && !defined (_STLP_INTERNAL_CSTDIO)
-// remove() conflict
-# include <stl/_cstdio.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// for_each. Apply a function to every element of a range.
-template <class _InputIter, class _Function>
-_STLP_INLINE_LOOP _Function
-for_each(_InputIter __first, _InputIter __last, _Function __f) {
- for ( ; __first != __last; ++__first)
- __f(*__first);
- return __f;
-}
-
-// count_if
-template <class _InputIter, class _Predicate>
-_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter)
-count_if(_InputIter __first, _InputIter __last, _Predicate __pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_DIFFERENCE_TYPE(_InputIter) __n = 0;
- for ( ; __first != __last; ++__first) {
- if (__pred(*__first))
- ++__n;
- }
- return __n;
-}
-
-// adjacent_find.
-
-template <class _ForwardIter, class _BinaryPredicate>
-_STLP_INLINE_LOOP _ForwardIter
-adjacent_find(_ForwardIter __first, _ForwardIter __last,
- _BinaryPredicate __binary_pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- if (__first == __last)
- return __last;
- _ForwardIter __next = __first;
- while(++__next != __last) {
- if (__binary_pred(*__first, *__next))
- return __first;
- __first = __next;
- }
- return __last;
-}
-
-template <class _ForwardIter>
-_STLP_INLINE_LOOP _ForwardIter
-adjacent_find(_ForwardIter __first, _ForwardIter __last) {
- return adjacent_find(__first, __last,
- _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first, _ForwardIter)));
-}
-
-#if !defined (_STLP_NO_ANACHRONISMS)
-template <class _InputIter, class _Tp, class _Size>
-_STLP_INLINE_LOOP void
-count(_InputIter __first, _InputIter __last, const _Tp& __val, _Size& __n) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first)
- if (*__first == __val)
- ++__n;
-}
-
-template <class _InputIter, class _Predicate, class _Size>
-_STLP_INLINE_LOOP void
-count_if(_InputIter __first, _InputIter __last, _Predicate __pred, _Size& __n) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first)
- if (__pred(*__first))
- ++__n;
-}
-#endif
-
-template <class _ForwardIter1, class _ForwardIter2>
-_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2);
-
-// search_n. Search for __count consecutive copies of __val.
-template <class _ForwardIter, class _Integer, class _Tp>
-_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
- _Integer __count, const _Tp& __val);
-template <class _ForwardIter, class _Integer, class _Tp, class _BinaryPred>
-_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
- _Integer __count, const _Tp& __val, _BinaryPred __binary_pred);
-
-template <class _InputIter, class _ForwardIter>
-inline _InputIter find_first_of(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- return _STLP_PRIV __find_first_of(__first1, __last1, __first2, __last2);
-}
-
-template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
-inline _InputIter
-find_first_of(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2, _BinaryPredicate __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- return _STLP_PRIV __find_first_of(__first1, __last1, __first2, __last2, __comp);
-}
-
-template <class _ForwardIter1, class _ForwardIter2>
-_ForwardIter1
-find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2);
-
-// swap_ranges
-template <class _ForwardIter1, class _ForwardIter2>
-_STLP_INLINE_LOOP _ForwardIter2
-swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- for ( ; __first1 != __last1; ++__first1, ++__first2)
- iter_swap(__first1, __first2);
- return __first2;
-}
-
-// transform
-template <class _InputIter, class _OutputIter, class _UnaryOperation>
-_STLP_INLINE_LOOP _OutputIter
-transform(_InputIter __first, _InputIter __last, _OutputIter __result, _UnaryOperation __opr) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first, ++__result)
- *__result = __opr(*__first);
- return __result;
-}
-template <class _InputIter1, class _InputIter2, class _OutputIter, class _BinaryOperation>
-_STLP_INLINE_LOOP _OutputIter
-transform(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _OutputIter __result,_BinaryOperation __binary_op) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
- *__result = __binary_op(*__first1, *__first2);
- return __result;
-}
-
-// replace_if, replace_copy, replace_copy_if
-
-template <class _ForwardIter, class _Predicate, class _Tp>
-_STLP_INLINE_LOOP void
-replace_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, const _Tp& __new_value) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first)
- if (__pred(*__first))
- *__first = __new_value;
-}
-
-template <class _InputIter, class _OutputIter, class _Tp>
-_STLP_INLINE_LOOP _OutputIter
-replace_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
- const _Tp& __old_value, const _Tp& __new_value) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first, ++__result)
- *__result = *__first == __old_value ? __new_value : *__first;
- return __result;
-}
-
-template <class _Iterator, class _OutputIter, class _Predicate, class _Tp>
-_STLP_INLINE_LOOP _OutputIter
-replace_copy_if(_Iterator __first, _Iterator __last,
- _OutputIter __result,
- _Predicate __pred, const _Tp& __new_value) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first, ++__result)
- *__result = __pred(*__first) ? __new_value : *__first;
- return __result;
-}
-
-// generate and generate_n
-
-template <class _ForwardIter, class _Generator>
-_STLP_INLINE_LOOP void
-generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first)
- *__first = __gen();
-}
-
-template <class _OutputIter, class _Size, class _Generator>
-_STLP_INLINE_LOOP void
-generate_n(_OutputIter __first, _Size __n, _Generator __gen) {
- for ( ; __n > 0; --__n, ++__first)
- *__first = __gen();
-}
-
-// remove, remove_if, remove_copy, remove_copy_if
-
-template <class _InputIter, class _OutputIter, class _Tp>
-_STLP_INLINE_LOOP _OutputIter
-remove_copy(_InputIter __first, _InputIter __last,_OutputIter __result, const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first) {
- if (!(*__first == __val)) {
- *__result = *__first;
- ++__result;
- }
- }
- return __result;
-}
-
-template <class _InputIter, class _OutputIter, class _Predicate>
-_STLP_INLINE_LOOP _OutputIter
-remove_copy_if(_InputIter __first, _InputIter __last, _OutputIter __result, _Predicate __pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first) {
- if (!__pred(*__first)) {
- *__result = *__first;
- ++__result;
- }
- }
- return __result;
-}
-
-template <class _ForwardIter, class _Tp>
-_STLP_INLINE_LOOP _ForwardIter
-remove(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- __first = find(__first, __last, __val);
- if (__first == __last)
- return __first;
- else {
- _ForwardIter __next = __first;
- return remove_copy(++__next, __last, __first, __val);
- }
-}
-
-template <class _ForwardIter, class _Predicate>
-_STLP_INLINE_LOOP _ForwardIter
-remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- __first = find_if(__first, __last, __pred);
- if ( __first == __last )
- return __first;
- else {
- _ForwardIter __next = __first;
- return remove_copy_if(++__next, __last, __first, __pred);
- }
-}
-
-// unique and unique_copy
-template <class _InputIter, class _OutputIter>
-_OutputIter unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result);
-
-template <class _InputIter, class _OutputIter, class _BinaryPredicate>
-_OutputIter unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
- _BinaryPredicate __binary_pred);
-
-template <class _ForwardIter>
-inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) {
- __first = adjacent_find(__first, __last);
- return unique_copy(__first, __last, __first);
-}
-
-template <class _ForwardIter, class _BinaryPredicate>
-inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last,
- _BinaryPredicate __binary_pred) {
- __first = adjacent_find(__first, __last, __binary_pred);
- return unique_copy(__first, __last, __first, __binary_pred);
-}
-
-// reverse and reverse_copy, and their auxiliary functions
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _BidirectionalIter>
-_STLP_INLINE_LOOP void
-__reverse(_BidirectionalIter __first, _BidirectionalIter __last, const bidirectional_iterator_tag &) {
- for (; __first != __last && __first != --__last; ++__first)
- _STLP_STD::iter_swap(__first,__last);
-}
-
-template <class _RandomAccessIter>
-_STLP_INLINE_LOOP void
-__reverse(_RandomAccessIter __first, _RandomAccessIter __last, const random_access_iterator_tag &) {
- for (; __first < __last; ++__first)
- _STLP_STD::iter_swap(__first, --__last);
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _BidirectionalIter>
-inline void
-reverse(_BidirectionalIter __first, _BidirectionalIter __last) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_PRIV __reverse(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _BidirectionalIter));
-}
-
-template <class _BidirectionalIter, class _OutputIter>
-_STLP_INLINE_LOOP
-_OutputIter reverse_copy(_BidirectionalIter __first,
- _BidirectionalIter __last,
- _OutputIter __result) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- while (__first != __last) {
- --__last;
- *__result = *__last;
- ++__result;
- }
- return __result;
-}
-
-template <class _ForwardIter>
-void rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last);
-
-template <class _ForwardIter, class _OutputIter>
-inline _OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle,
- _ForwardIter __last, _OutputIter __result) {
- return _STLP_STD::copy(__first, __middle, copy(__middle, __last, __result));
-}
-
-// random_shuffle
-
-template <class _RandomAccessIter>
-void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _RandomNumberGenerator>
-void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
- _RandomNumberGenerator& __rand);
-
-#if !defined (_STLP_NO_EXTENSIONS)
-// random_sample and random_sample_n (extensions, not part of the standard).
-
-template <class _ForwardIter, class _OutputIter, class _Distance>
-_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
- _OutputIter __out_ite, const _Distance __n);
-
-template <class _ForwardIter, class _OutputIter, class _Distance,
- class _RandomNumberGenerator>
-_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
- _OutputIter __out_ite, const _Distance __n,
- _RandomNumberGenerator& __rand);
-
-template <class _InputIter, class _RandomAccessIter>
-_RandomAccessIter
-random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out_first, _RandomAccessIter __out_last);
-
-template <class _InputIter, class _RandomAccessIter,
- class _RandomNumberGenerator>
-_RandomAccessIter
-random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out_first, _RandomAccessIter __out_last,
- _RandomNumberGenerator& __rand);
-
-#endif /* _STLP_NO_EXTENSIONS */
-
-// partition, stable_partition, and their auxiliary functions
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred);
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter
-stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred);
-
-// sort() and its auxiliary functions.
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Size>
-inline _Size __lg(_Size __n) {
- _Size __k;
- for (__k = 0; __n != 1; __n >>= 1) ++__k;
- return __k;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _RandomAccessIter>
-void sort(_RandomAccessIter __first, _RandomAccessIter __last);
-template <class _RandomAccessIter, class _Compare>
-void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp);
-
-// stable_sort() and its auxiliary functions.
-template <class _RandomAccessIter>
-void stable_sort(_RandomAccessIter __first,
- _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _Compare>
-void stable_sort(_RandomAccessIter __first,
- _RandomAccessIter __last, _Compare __comp);
-
-// partial_sort, partial_sort_copy, and auxiliary functions.
-
-template <class _RandomAccessIter>
-void partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle,
- _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _Compare>
-void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle,
- _RandomAccessIter __last, _Compare __comp);
-
-template <class _InputIter, class _RandomAccessIter>
-_RandomAccessIter
-partial_sort_copy(_InputIter __first, _InputIter __last,
- _RandomAccessIter __result_first, _RandomAccessIter __result_last);
-
-template <class _InputIter, class _RandomAccessIter, class _Compare>
-_RandomAccessIter
-partial_sort_copy(_InputIter __first, _InputIter __last,
- _RandomAccessIter __result_first,
- _RandomAccessIter __result_last, _Compare __comp);
-
-// nth_element() and its auxiliary functions.
-template <class _RandomAccessIter>
-void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
- _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _Compare>
-void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
- _RandomAccessIter __last, _Compare __comp);
-
-// auxiliary class for lower_bound, etc.
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _T1, class _T2>
-struct __less_2 {
- bool operator() (const _T1& __x, const _T2& __y) const { return __x < __y ; }
-};
-
-template <class _T1, class _T2>
-__less_2<_T1,_T2> __less2(_T1*, _T2* ) { return __less_2<_T1, _T2>(); }
-
-#if defined (_STLP_FUNCTION_PARTIAL_ORDER)
-template <class _Tp>
-less<_Tp> __less2(_Tp*, _Tp* ) { return less<_Tp>(); }
-#endif
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-// Binary search (lower_bound, upper_bound, equal_range, binary_search).
-template <class _ForwardIter, class _Tp>
-inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __lower_bound(__first, __last, __val,
- _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
- _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp, class _Compare>
-inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __lower_bound(__first, __last, __val, __comp, __comp,
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance>
-_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- _Compare1 __comp1, _Compare2 __comp2, _Distance*);
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter, class _Tp>
-inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __upper_bound(__first, __last, __val,
- _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
- _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp, class _Compare>
-inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val, _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __upper_bound(__first, __last, __val, __comp, __comp,
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance>
-pair<_ForwardIter, _ForwardIter>
-__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- _Compare1 __comp1, _Compare2 __comp2, _Distance*);
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter, class _Tp>
-inline pair<_ForwardIter, _ForwardIter>
-equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __equal_range(__first, __last, __val,
- _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
- _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp, class _Compare>
-inline pair<_ForwardIter, _ForwardIter>
-equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __equal_range(__first, __last, __val, __comp, __comp,
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp>
-inline bool binary_search(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _ForwardIter __i = _STLP_PRIV __lower_bound(__first, __last, __val,
- _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
- _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
- return __i != __last && !(__val < *__i);
-}
-
-template <class _ForwardIter, class _Tp, class _Compare>
-inline bool binary_search(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val,
- _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _ForwardIter __i = _STLP_PRIV __lower_bound(__first, __last, __val, __comp, __comp,
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
- return __i != __last && !__comp(__val, *__i);
-}
-
-// merge, with and without an explicitly supplied comparison function.
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp);
-
-
-// inplace_merge and its auxiliary functions.
-
-
-template <class _BidirectionalIter>
-void inplace_merge(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last) ;
-
-template <class _BidirectionalIter, class _Compare>
-void inplace_merge(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last, _Compare __comp);
-
-// 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.
-
-template <class _InputIter1, class _InputIter2>
-bool includes(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2);
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool includes(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2, _Compare __comp);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp);
-
-
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter
-set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result);
-
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
- class _Compare>
-_OutputIter
-set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result,
- _Compare __comp);
-
-
-// min_element and max_element, with and without an explicitly supplied
-// comparison function.
-
-template <class _ForwardIter>
-_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last);
-template <class _ForwardIter, class _Compare>
-_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last,
- _Compare __comp);
-
-template <class _ForwardIter>
-_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last);
-
-template <class _ForwardIter, class _Compare>
-_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last,
- _Compare __comp);
-
-// next_permutation and prev_permutation, with and without an explicitly
-// supplied comparison function.
-
-template <class _BidirectionalIter>
-bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last);
-
-template <class _BidirectionalIter, class _Compare>
-bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
- _Compare __comp);
-
-
-template <class _BidirectionalIter>
-bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last);
-
-
-template <class _BidirectionalIter, class _Compare>
-bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
- _Compare __comp);
-
-#if !defined (_STLP_NO_EXTENSIONS)
-// 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 <class _RandomAccessIter>
-bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _StrictWeakOrdering>
-bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
- _StrictWeakOrdering __comp);
-
-// is_sorted, a predicated testing whether a range is sorted in
-// nondescending order. This is an extension, not part of the C++
-// standard.
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _StrictWeakOrdering>
-bool __is_sorted(_ForwardIter __first, _ForwardIter __last,
- _StrictWeakOrdering __comp);
-
-_STLP_MOVE_TO_STD_NAMESPACE
-template <class _ForwardIter>
-inline bool is_sorted(_ForwardIter __first, _ForwardIter __last) {
- return _STLP_PRIV __is_sorted(__first, __last,
- _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _ForwardIter)));
-}
-
-template <class _ForwardIter, class _StrictWeakOrdering>
-inline bool is_sorted(_ForwardIter __first, _ForwardIter __last,
- _StrictWeakOrdering __comp) {
- return _STLP_PRIV __is_sorted(__first, __last, __comp);
-}
-#endif
-
-_STLP_END_NAMESPACE
-
-#if !defined (_STLP_LINK_TIME_INSTANTIATION)
-# include <stl/_algo.c>
-#endif
-
-#endif /* _STLP_INTERNAL_ALGO_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/stlport/stlport/stl/_algobase.c b/stlport/stlport/stl/_algobase.c
deleted file mode 100644
index 157e25c..0000000
--- a/stlport/stlport/stl/_algobase.c
+++ /dev/null
@@ -1,483 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_ALGOBASE_C
-#define _STLP_ALGOBASE_C
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-# include <stl/_algobase.h>
-#endif
-
-#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-# include <stl/_function_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _InputIter1, class _InputIter2>
-bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- for ( ; __first1 != __last1 && __first2 != __last2
- ; ++__first1, ++__first2) {
- if (*__first1 < *__first2) {
- _STLP_VERBOSE_ASSERT(!(*__first2 < *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return true;
- }
- if (*__first2 < *__first1)
- return false;
- }
- return __first1 == __last1 && __first2 != __last2;
-}
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _Compare __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- for ( ; __first1 != __last1 && __first2 != __last2
- ; ++__first1, ++__first2) {
- if (__comp(*__first1, *__first2)) {
- _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1),
- _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return true;
- }
- if (__comp(*__first2, *__first1))
- return false;
- }
- return __first1 == __last1 && __first2 != __last2;
-}
-
-#if !defined (_STLP_NO_EXTENSIONS)
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter1, class _InputIter2>
-int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2) {
- while (__first1 != __last1 && __first2 != __last2) {
- if (*__first1 < *__first2) {
- _STLP_VERBOSE_ASSERT(!(*__first2 < *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- return -1;
- }
- if (*__first2 < *__first1)
- return 1;
- ++__first1;
- ++__first2;
- }
- if (__first2 == __last2) {
- return !(__first1 == __last1);
- }
- else {
- return -1;
- }
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter1, class _InputIter2>
-int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- return _STLP_PRIV __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
-}
-#endif
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _RandomAccessIter, class _Tp>
-_STLP_INLINE_LOOP _RandomAccessIter __find(_RandomAccessIter __first, _RandomAccessIter __last,
- const _Tp& __val,
- const random_access_iterator_tag &) {
- _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __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;
- }
-}
-
-inline char*
-__find(char* __first, char* __last, char __val, const random_access_iterator_tag &) {
- void *res = memchr(__first, __val, __last - __first);
- return res != 0 ? __STATIC_CAST(char*, res) : __last;
-}
-inline const char*
-__find(const char* __first, const char* __last, char __val, const random_access_iterator_tag &) {
- const void *res = memchr(__first, __val, __last - __first);
- return res != 0 ? __STATIC_CAST(const char*, res) : __last;
-}
-
-template <class _RandomAccessIter, class _Predicate>
-_STLP_INLINE_LOOP _RandomAccessIter __find_if(_RandomAccessIter __first, _RandomAccessIter __last,
- _Predicate __pred,
- const random_access_iterator_tag &) {
- _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __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;
- }
-}
-
-template <class _InputIter, class _Tp>
-_STLP_INLINE_LOOP _InputIter __find(_InputIter __first, _InputIter __last,
- const _Tp& __val,
- const input_iterator_tag &) {
- while (__first != __last && !(*__first == __val)) ++__first;
- return __first;
-}
-
-template <class _InputIter, class _Predicate>
-_STLP_INLINE_LOOP _InputIter __find_if(_InputIter __first, _InputIter __last,
- _Predicate __pred,
- const input_iterator_tag &) {
- while (__first != __last && !__pred(*__first))
- ++__first;
- return __first;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter, class _Predicate>
-_InputIter find_if(_InputIter __first, _InputIter __last,
- _Predicate __pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __find_if(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-}
-
-template <class _InputIter, class _Tp>
-_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __find(__first, __last, __val, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-}
-
-template <class _ForwardIter1, class _ForwardIter2, class _BinaryPred>
-_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2,
- _BinaryPred __pred) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- // Test for empty ranges
- if (__first1 == __last1 || __first2 == __last2)
- return __first1;
-
- // Test for a pattern of length 1.
- _ForwardIter2 __p1(__first2);
-
- if ( ++__p1 == __last2 ) {
- while (__first1 != __last1 && !__pred(*__first1, *__first2)) {
- ++__first1;
- }
- return __first1;
- }
-
- // General case.
-
- for ( ; ; ) { // __first1 != __last1 will be checked below
- while (__first1 != __last1 && !__pred(*__first1, *__first2)) {
- ++__first1;
- }
- if (__first1 == __last1) {
- return __last1;
- }
- _ForwardIter2 __p = __p1;
- _ForwardIter1 __current = __first1;
- if (++__current == __last1) return __last1;
-
- while (__pred(*__current, *__p)) {
- if (++__p == __last2)
- return __first1;
- if (++__current == __last1)
- return __last1;
- }
- ++__first1;
- }
- return __first1;
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-template <class _Tp>
-struct _IsCharLikeType
-{ typedef __false_type _Ret; };
-
-_STLP_TEMPLATE_NULL struct _IsCharLikeType<char>
-{ typedef __true_type _Ret; };
-
-_STLP_TEMPLATE_NULL struct _IsCharLikeType<unsigned char>
-{ typedef __true_type _Ret; };
-
-# ifndef _STLP_NO_SIGNED_BUILTINS
-_STLP_TEMPLATE_NULL struct _IsCharLikeType<signed char>
-{ typedef __true_type _Ret; };
-# endif
-
-template <class _Tp1, class _Tp2>
-inline bool __stlp_eq(_Tp1 __val1, _Tp2 __val2)
-{ return __val1 == __val2; }
-
-#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
-template <class _Tp>
-inline bool __stlp_eq(_Tp, _Tp)
-{ return true; }
-#endif
-
-template <class _InputIter, class _ForwardIter, class _Tp2, class _Predicate>
-inline _InputIter __find_first_of_aux2(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2,
- _Tp2*, _Predicate __pred,
- const __true_type& /* _UseStrcspnLikeAlgo */) {
- unsigned char __hints[(UCHAR_MAX + 1) / CHAR_BIT];
- memset(__hints, 0, sizeof(__hints) / sizeof(unsigned char));
- for (; __first2 != __last2; ++__first2) {
- unsigned char __tmp = (unsigned char)*__first2;
- __hints[__tmp / CHAR_BIT] |= (1 << (__tmp % CHAR_BIT));
- }
-
- for (; __first1 != __last1; ++__first1) {
- _Tp2 __tmp = (_Tp2)*__first1;
- if (__stlp_eq(*__first1, __tmp) &&
- __pred((__hints[(unsigned char)__tmp / CHAR_BIT] & (1 << ((unsigned char)__tmp % CHAR_BIT))) != 0))
- break;
- }
- return __first1;
-}
-
-template <class _InputIter, class _ForwardIter, class _Tp2, class _Predicate>
-inline _InputIter __find_first_of_aux2(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2,
- _Tp2* /* __dummy */, _Predicate /* __pred */,
- const __false_type& /* _UseStrcspnLikeAlgo */) {
- return _STLP_PRIV __find_first_of(__first1, __last1, __first2, __last2,
- _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first1, _InputIter)));
-}
-
-template <class _InputIter, class _ForwardIter, class _Tp1, class _Tp2>
-inline _InputIter __find_first_of_aux1(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2,
- _Tp1* __pt1, _Tp2* __pt2) {
- typedef _STLP_TYPENAME _STLP_STD::_IsIntegral<_Tp1>::_Ret _IsIntegral;
- typedef _STLP_TYPENAME _STLP_PRIV _IsCharLikeType<_Tp2>::_Ret _IsCharLike;
- typedef _STLP_TYPENAME _STLP_STD::_Land2<_IsIntegral, _IsCharLike>::_Ret _UseStrcspnLikeAlgo;
- return _STLP_PRIV __find_first_of_aux2(__first1, __last1,
- __first2, __last2,
- __pt2, _Identity<bool>(), _UseStrcspnLikeAlgo());
-}
-
-template <class _InputIter, class _ForwardIter>
-inline _InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2) {
- return _STLP_PRIV __find_first_of_aux1(__first1, __last1, __first2, __last2,
- _STLP_VALUE_TYPE(__first1, _InputIter),
- _STLP_VALUE_TYPE(__first2, _ForwardIter));
-}
-
-// find_first_of, with and without an explicitly supplied comparison function.
-template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
-_InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2,
- _BinaryPredicate __comp) {
- for ( ; __first1 != __last1; ++__first1) {
- for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) {
- if (__comp(*__first1, *__iter)) {
- return __first1;
- }
- }
- }
- return __last1;
-}
-
-// find_end, with and without an explicitly supplied comparison function.
-// Search [first2, last2) as a subsequence in [first1, last1), and return
-// the *last* possible match. Note that find_end for bidirectional iterators
-// is much faster than for forward iterators.
-
-// find_end for forward iterators.
-template <class _ForwardIter1, class _ForwardIter2,
- class _BinaryPredicate>
-_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2,
- const forward_iterator_tag &, const forward_iterator_tag &,
- _BinaryPredicate __comp) {
- if (__first2 == __last2)
- return __last1;
- else {
- _ForwardIter1 __result = __last1;
- for (;;) {
- _ForwardIter1 __new_result = _STLP_STD::search(__first1, __last1, __first2, __last2, __comp);
- if (__new_result == __last1)
- return __result;
- else {
- __result = __new_result;
- __first1 = __new_result;
- ++__first1;
- }
- }
- }
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-// find_end for bidirectional iterators. Requires partial specialization.
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-_STLP_END_NAMESPACE
-# include <stl/_iterator.h>
-_STLP_BEGIN_NAMESPACE
-# endif /*_STLP_INTERNAL_ITERATOR_H*/
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
- class _BinaryPredicate>
-_BidirectionalIter1
-__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
- _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
- const bidirectional_iterator_tag &, const bidirectional_iterator_tag &,
- _BinaryPredicate __comp) {
- typedef _STLP_STD::reverse_iterator<_BidirectionalIter1> _RevIter1;
- typedef _STLP_STD::reverse_iterator<_BidirectionalIter2> _RevIter2;
-
- _RevIter1 __rlast1(__first1);
- _RevIter2 __rlast2(__first2);
- _RevIter1 __rresult = _STLP_STD::search(_RevIter1(__last1), __rlast1,
- _RevIter2(__last2), __rlast2,
- __comp);
-
- if (__rresult == __rlast1)
- return __last1;
- else {
- _BidirectionalIter1 __result = __rresult.base();
- _STLP_STD::advance(__result, -_STLP_STD::distance(__first2, __last2));
- return __result;
- }
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-template <class _ForwardIter1, class _ForwardIter2,
- class _BinaryPredicate>
-_ForwardIter1
-find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2,
- _BinaryPredicate __comp) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
- return _STLP_PRIV __find_end(__first1, __last1, __first2, __last2,
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
- _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1),
- _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2),
-#else
- forward_iterator_tag(),
- forward_iterator_tag(),
-#endif
- __comp);
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance>
-_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- _Compare1 __comp1, _Compare2 __comp2, _Distance*) {
- _Distance __len = _STLP_STD::distance(__first, __last);
- _Distance __half;
- _ForwardIter __middle;
-
- while (__len > 0) {
- __half = __len >> 1;
- __middle = __first;
- _STLP_STD::advance(__middle, __half);
- if (__comp1(*__middle, __val)) {
- _STLP_VERBOSE_ASSERT(!__comp2(__val, *__middle), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
- }
- else
- __len = __half;
- }
- return __first;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_ALGOBASE_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_algobase.h b/stlport/stlport/stl/_algobase.h
deleted file mode 100644
index 597dcbe..0000000
--- a/stlport/stlport/stl/_algobase.h
+++ /dev/null
@@ -1,728 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-#define _STLP_INTERNAL_ALGOBASE_H
-
-#ifndef _STLP_INTERNAL_CSTDDEF
-# include <stl/_cstddef.h>
-#endif
-
-#ifndef _STLP_INTERNAL_CSTRING
-# include <stl/_cstring.h>
-#endif
-
-#ifndef _STLP_CLIMITS
-# include <climits>
-#endif
-
-#ifndef _STLP_INTERNAL_CSTDLIB
-# include <stl/_cstdlib.h>
-#endif
-
-#ifndef _STLP_INTERNAL_PAIR_H
-# include <stl/_pair.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-#ifndef _STLP_TYPE_TRAITS_H
-# include <stl/type_traits.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
-_STLP_MOVE_TO_PRIV_NAMESPACE
-template <class _Tp>
-inline void __swap_aux(_Tp& __a, _Tp& __b, const __true_type& /*SwapImplemented*/) {
- __a._M_swap_workaround(__b);
-}
-
-template <class _Tp>
-inline void __swap_aux(_Tp& __a, _Tp& __b, const __false_type& /*SwapImplemented*/) {
- _Tp __tmp = __a;
- __a = __b;
- __b = __tmp;
-}
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif
-
-// swap and iter_swap
-template <class _Tp>
-inline void swap(_Tp& __a, _Tp& __b) {
-#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
-# if !defined(__BORLANDC__)
- typedef typename _SwapImplemented<_Tp>::_Ret _Implemented;
-# else
- enum { _Is = _SwapImplemented<_Tp>::_Is };
- typedef typename __bool2type<_Is>::_Ret _Implemented;
-# endif
- _STLP_PRIV __swap_aux(__a, __b, _Implemented());
-#else
- _Tp __tmp = __a;
- __a = __b;
- __b = __tmp;
-#endif
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter1, class _ForwardIter2, class _Value>
-inline void __iter_swap_aux_aux(_ForwardIter1& __i1, _ForwardIter2& __i2, _Value *) {
- _Value tmp = *__i1;
- *__i1 = *__i2;
- *__i2 = tmp;
-}
-
-template <class _ForwardIter1, class _ForwardIter2>
-inline void __iter_swap_aux(_ForwardIter1& __i1, _ForwardIter2& __i2, const __true_type& /*OKToSwap*/) {
- /* namespace specification breaks access to the right swap template overload (at least for gcc) */
- /*_STLP_STD::*/ swap(*__i1, *__i2);
-}
-
-template <class _ForwardIter1, class _ForwardIter2>
-inline void __iter_swap_aux(_ForwardIter1& __i1, _ForwardIter2& __i2, const __false_type& /*OKToSwap*/) {
- _STLP_PRIV __iter_swap_aux_aux( __i1, __i2, _STLP_VALUE_TYPE(__i1,_ForwardIter1) );
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter1, class _ForwardIter2>
-inline void iter_swap(_ForwardIter1 __i1, _ForwardIter2 __i2) {
- _STLP_PRIV __iter_swap_aux( __i1, __i2, _IsOKToSwap(_STLP_VALUE_TYPE(__i1, _ForwardIter1), _STLP_VALUE_TYPE(__i2, _ForwardIter2),
- _STLP_IS_REF_TYPE_REAL_REF(__i1, _ForwardIter1),
- _STLP_IS_REF_TYPE_REAL_REF(__i2, _ForwardIter2))._Answer());
-}
-
-//--------------------------------------------------
-// min and max
-
-#if !defined (__BORLANDC__) || defined (_STLP_USE_OWN_NAMESPACE)
-# if (defined (__BORLANDC__) && (__BORLANDC__ < 0x580)) && !defined (__STDC__)
-//In not ANSI mode Borland import min/max in global namespace which conflict
-//with STLport min/max when user does a 'using namespace std' in its code
-//(see test/unit/alg_test.cpp). To avoid this clash we simply import Borland min/max
-//in STLport namespace.
-using _STLP_VENDOR_STD::min;
-using _STLP_VENDOR_STD::max;
-# else
-template <class _Tp>
-inline const _Tp& (min)(const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; }
-template <class _Tp>
-inline const _Tp& (max)(const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; }
-# endif
-#endif
-
-# if defined (__BORLANDC__) && defined (_STLP_USE_OWN_NAMESPACE)
-inline unsigned long (min) (unsigned long __a, unsigned long __b) { return __b < __a ? __b : __a; }
-inline unsigned long (max) (unsigned long __a, unsigned long __b) { return __a < __b ? __b : __a; }
-# endif
-
-# if !defined (__BORLANDC__) || (__BORLANDC__ < 0x590)
-template <class _Tp, class _Compare>
-inline const _Tp& (min)(const _Tp& __a, const _Tp& __b, _Compare __comp) {
- return __comp(__b, __a) ? __b : __a;
-}
-
-template <class _Tp, class _Compare>
-inline const _Tp& (max)(const _Tp& __a, const _Tp& __b, _Compare __comp) {
- return __comp(__a, __b) ? __b : __a;
-}
-# else
-template <class _Tp, class _Compare>
-inline const _Tp (min)(const _Tp __a, const _Tp __b, _Compare __comp) {
- return __comp(__b, __a) ? __b : __a;
-}
-
-template <class _Tp, class _Compare>
-inline const _Tp (max)(const _Tp __a, const _Tp __b, _Compare __comp) {
- return __comp(__a, __b) ? __b : __a;
-}
-# endif
-
-//--------------------------------------------------
-// copy
-
-// All of these auxiliary functions 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.
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter, class _OutputIter, class _Distance>
-inline _OutputIter __copy(_InputIter __first, _InputIter __last,
- _OutputIter __result, const input_iterator_tag &, _Distance*) {
- for ( ; __first != __last; ++__result, ++__first)
- *__result = *__first;
- return __result;
-}
-
-#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _InputIter, class _OutputIter, class _Distance>
-inline _OutputIter __copy(_InputIter __first, _InputIter __last,
- _OutputIter __result, const forward_iterator_tag &, _Distance* ) {
- for ( ; __first != __last; ++__result, ++__first)
- *__result = *__first;
- return __result;
-}
-
-template <class _InputIter, class _OutputIter, class _Distance>
-inline _OutputIter __copy(_InputIter __first, _InputIter __last,
- _OutputIter __result, const bidirectional_iterator_tag &, _Distance* ) {
- for ( ; __first != __last; ++__result, ++__first)
- *__result = *__first;
- return __result;
-}
-#endif
-
-template <class _RandomAccessIter, class _OutputIter, class _Distance>
-inline _OutputIter
-__copy(_RandomAccessIter __first, _RandomAccessIter __last,
- _OutputIter __result, const random_access_iterator_tag &, _Distance*) {
- for (_Distance __n = __last - __first; __n > 0; --__n) {
- *__result = *__first;
- ++__first;
- ++__result;
- }
- return __result;
-}
-
-inline void*
-__copy_trivial(const void* __first, const void* __last, void* __result) {
- size_t __n = (const char*)__last - (const char*)__first;
- return __n ? (void *)((char*)memmove(__result, __first, __n) + __n) : __result;
-}
-
-//--------------------------------------------------
-// copy_backward auxiliary functions
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
- class _Distance>
-inline _BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first,
- _BidirectionalIter1 __last,
- _BidirectionalIter2 __result,
- const bidirectional_iterator_tag &,
- _Distance*) {
- while (__first != __last)
- *--__result = *--__last;
- return __result;
-}
-
-template <class _RandomAccessIter, class _BidirectionalIter, class _Distance>
-inline _BidirectionalIter __copy_backward(_RandomAccessIter __first,
- _RandomAccessIter __last,
- _BidirectionalIter __result,
- const random_access_iterator_tag &,
- _Distance*) {
- for (_Distance __n = __last - __first; __n > 0; --__n)
- *--__result = *--__last;
- return __result;
-}
-
-inline void*
-__copy_trivial_backward(const void* __first, const void* __last, void* __result) {
- const ptrdiff_t _Num = (const char*)__last - (const char*)__first;
- return (_Num > 0) ? memmove((char*)__result - _Num, __first, _Num) : __result ;
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result,
- const __false_type& /*IsOKToMemCpy*/) {
- return _STLP_PRIV __copy(__first, __last, __result, random_access_iterator_tag(), (ptrdiff_t*)0);
-}
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result,
- const __true_type& /*IsOKToMemCpy*/) {
- // we know they all pointers, so this cast is OK
- // return (_OutputIter)__copy_trivial(&(*__first), &(*__last), &(*__result));
- return (_OutputIter)_STLP_PRIV __copy_trivial(__first, __last, __result);
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result,
- const __true_type& /*BothPtrType*/) {
- return _STLP_PRIV __copy_ptrs(__first, __last, __result,
- _UseTrivialCopy(_STLP_VALUE_TYPE(__first, _InputIter),
- _STLP_VALUE_TYPE(__result, _OutputIter))._Answer());
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result,
- const __false_type& /*BothPtrType*/) {
- return _STLP_PRIV __copy(__first, __last, __result,
- _STLP_ITERATOR_CATEGORY(__first, _InputIter),
- _STLP_DISTANCE_TYPE(__first, _InputIter));
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter>::_Answer());
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last,
- _OutputIter __result, const __false_type& /*TrivialAssignment*/) {
- return _STLP_PRIV __copy_backward(__first, __last, __result,
- _STLP_ITERATOR_CATEGORY(__first, _InputIter),
- _STLP_DISTANCE_TYPE(__first, _InputIter));
-}
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last,
- _OutputIter __result, const __true_type& /*TrivialAssignment*/) {
- return (_OutputIter)_STLP_PRIV __copy_trivial_backward(__first, __last, __result);
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) {
- return _STLP_PRIV __copy_backward(__first, __last, __result,
- _STLP_ITERATOR_CATEGORY(__first,_InputIter),
- _STLP_DISTANCE_TYPE(__first, _InputIter));
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) {
- return _STLP_PRIV __copy_backward_ptrs(__first, __last, __result,
- _UseTrivialCopy(_STLP_VALUE_TYPE(__first, _InputIter),
- _STLP_VALUE_TYPE(__result, _OutputIter))._Answer());
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter copy_backward(_InputIter __first, _InputIter __last, _OutputIter __result) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- return _STLP_PRIV __copy_backward_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter>::_Answer() );
-}
-
-#if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
-# define _STLP_DECLARE_COPY_TRIVIAL(_Tp) \
-inline _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) \
-{ return (_Tp*)_STLP_PRIV __copy_trivial(__first, __last, __result); } \
-inline _Tp* copy_backward(const _Tp* __first, const _Tp* __last, _Tp* __result) \
-{ return (_Tp*)_STLP_PRIV __copy_trivial_backward(__first, __last, __result); }
-
-# if !defined (_STLP_NO_BOOL)
-_STLP_DECLARE_COPY_TRIVIAL(bool)
-# endif
-_STLP_DECLARE_COPY_TRIVIAL(char)
-# if !defined (_STLP_NO_SIGNED_BUILTINS)
-_STLP_DECLARE_COPY_TRIVIAL(signed char)
-# endif
-_STLP_DECLARE_COPY_TRIVIAL(unsigned char)
-_STLP_DECLARE_COPY_TRIVIAL(short)
-_STLP_DECLARE_COPY_TRIVIAL(unsigned short)
-_STLP_DECLARE_COPY_TRIVIAL(int)
-_STLP_DECLARE_COPY_TRIVIAL(unsigned int)
-_STLP_DECLARE_COPY_TRIVIAL(long)
-_STLP_DECLARE_COPY_TRIVIAL(unsigned long)
-# if !defined(_STLP_NO_WCHAR_T) && !defined (_STLP_WCHAR_T_IS_USHORT)
-_STLP_DECLARE_COPY_TRIVIAL(wchar_t)
-# endif
-# if defined (_STLP_LONG_LONG)
-_STLP_DECLARE_COPY_TRIVIAL(_STLP_LONG_LONG)
-_STLP_DECLARE_COPY_TRIVIAL(unsigned _STLP_LONG_LONG)
-# endif
-_STLP_DECLARE_COPY_TRIVIAL(float)
-_STLP_DECLARE_COPY_TRIVIAL(double)
-# if !defined (_STLP_NO_LONG_DOUBLE)
-_STLP_DECLARE_COPY_TRIVIAL(long double)
-# endif
-# undef _STLP_DECLARE_COPY_TRIVIAL
-#endif
-
-//--------------------------------------------------
-// copy_n (not part of the C++ standard)
-
-#if !defined (_STLP_NO_EXTENSIONS)
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter, class _Size, class _OutputIter>
-_STLP_INLINE_LOOP _STLP_STD::pair<_InputIter, _OutputIter>
-__copy_n(_InputIter __first, _Size __count, _OutputIter __result,
- const input_iterator_tag &) {
- for ( ; __count > 0; --__count) {
- *__result = *__first;
- ++__first;
- ++__result;
- }
- return _STLP_STD::pair<_InputIter, _OutputIter>(__first, __result);
-}
-
-template <class _RAIter, class _Size, class _OutputIter>
-inline _STLP_STD::pair<_RAIter, _OutputIter>
-__copy_n(_RAIter __first, _Size __count, _OutputIter __result,
- const random_access_iterator_tag &) {
- _RAIter __last = __first + __count;
- return _STLP_STD::pair<_RAIter, _OutputIter>(__last, _STLP_STD::copy(__first, __last, __result));
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _InputIter, class _Size, class _OutputIter>
-inline pair<_InputIter, _OutputIter>
-copy_n(_InputIter __first, _Size __count, _OutputIter __result) {
- _STLP_FIX_LITERAL_BUG(__first)
- return _STLP_PRIV __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-}
-#endif
-
-//--------------------------------------------------
-// fill and fill_n
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Tp>
-_STLP_INLINE_LOOP
-void __fill_fwd(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
- for ( ; __first != __last; ++__first)
- *__first = __val;
-}
-
-template <class _ForwardIter, class _Tp, class _Distance>
-inline void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- const input_iterator_tag &, _Distance*) {
- _STLP_PRIV __fill_fwd(__first, __last, __val);
-}
-
-#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _ForwardIter, class _Tp, class _Distance>
-_STLP_INLINE_LOOP
-void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- const forward_iterator_tag &, _Distance*) {
- _STLP_PRIV __fill_fwd(__first, __last, __val);
-}
-
-template <class _ForwardIter, class _Tp, class _Distance>
-_STLP_INLINE_LOOP
-void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- const bidirectional_iterator_tag &, _Distance*) {
- _STLP_PRIV __fill_fwd(__first, __last, __val);
-}
-#endif
-
-template <class _RandomAccessIter, class _Tp, class _Distance>
-_STLP_INLINE_LOOP
-void __fill(_RandomAccessIter __first, _RandomAccessIter __last, const _Tp& __val,
- const random_access_iterator_tag &, _Distance*) {
- for (_Distance __n = __last - __first ; __n > 0; ++__first, --__n)
- *__first = __val;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter, class _Tp>
-inline void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_PRIV __fill(__first, __last, __val,
- _STLP_ITERATOR_CATEGORY(__first, _ForwardIter),
- _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-// Specialization: for one-byte types we can use memset.
-inline void fill(unsigned char* __first, unsigned char* __last,
- const unsigned char& __val) {
- unsigned char __tmp = __val;
- memset(__first, __tmp, __last - __first);
-}
-#if !defined (_STLP_NO_SIGNED_BUILTINS)
-inline void fill(signed char* __first, signed char* __last,
- const signed char& __val) {
- signed char __tmp = __val;
- memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
-}
-#endif
-inline void fill(char* __first, char* __last, const char& __val) {
- char __tmp = __val;
- memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _OutputIter, class _Size, class _Tp>
-_STLP_INLINE_LOOP
-_OutputIter __fill_n(_OutputIter __first, _Size __n, const _Tp& __val) {
- _STLP_FIX_LITERAL_BUG(__first)
- for ( ; __n > 0; --__n, ++__first)
- *__first = __val;
- return __first;
-}
-
-#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
-template <class _Size>
-inline unsigned char* __fill_n(unsigned char* __first, _Size __n,
- const unsigned char& __val) {
- _STLP_STD::fill(__first, __first + __n, __val);
- return __first + __n;
-}
-#if !defined (_STLP_NO_SIGNED_BUILTINS)
-template <class _Size>
-inline signed char* __fill_n(signed char* __first, _Size __n,
- const signed char& __val) {
- _STLP_STD::fill(__first, __first + __n, __val);
- return __first + __n;
-}
-#endif
-template <class _Size>
-inline char* __fill_n(char* __first, _Size __n,
- const char& __val) {
- _STLP_STD::fill(__first, __first + __n, __val);
- return __first + __n;
-}
-#endif
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _OutputIter, class _Size, class _Tp>
-inline void fill_n(_OutputIter __first, _Size __n, const _Tp& __val) {
- _STLP_FIX_LITERAL_BUG(__first)
- _STLP_PRIV __fill_n(__first, __n, __val);
-}
-
-
-//--------------------------------------------------
-// equal and mismatch
-
-template <class _InputIter1, class _InputIter2>
-_STLP_INLINE_LOOP
-_STLP_STD::pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1,
- _InputIter1 __last1,
- _InputIter2 __first2) {
- _STLP_FIX_LITERAL_BUG(__first2)
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- while (__first1 != __last1 && *__first1 == *__first2) {
- ++__first1;
- ++__first2;
- }
- return _STLP_STD::pair<_InputIter1, _InputIter2>(__first1, __first2);
-}
-
-template <class _InputIter1, class _InputIter2, class _BinaryPredicate>
-_STLP_INLINE_LOOP
-_STLP_STD::pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1,
- _InputIter1 __last1,
- _InputIter2 __first2,
- _BinaryPredicate __binary_pred) {
- _STLP_FIX_LITERAL_BUG(__first2)
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
- ++__first1;
- ++__first2;
- }
- return _STLP_STD::pair<_InputIter1, _InputIter2>(__first1, __first2);
-}
-
-template <class _InputIter1, class _InputIter2>
-_STLP_INLINE_LOOP
-bool equal(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2) {
- _STLP_FIX_LITERAL_BUG(__first1) _STLP_FIX_LITERAL_BUG(__last1) _STLP_FIX_LITERAL_BUG(__first2)
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- for ( ; __first1 != __last1; ++__first1, ++__first2)
- if (!(*__first1 == *__first2))
- return false;
- return true;
-}
-
-template <class _InputIter1, class _InputIter2, class _BinaryPredicate>
-_STLP_INLINE_LOOP
-bool equal(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _BinaryPredicate __binary_pred) {
- _STLP_FIX_LITERAL_BUG(__first2)
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- for ( ; __first1 != __last1; ++__first1, ++__first2)
- if (!__binary_pred(*__first1, *__first2))
- return false;
- return true;
-}
-
-//--------------------------------------------------
-// lexicographical_compare and lexicographical_compare_3way.
-// (the latter is not part of the C++ standard.)
-
-template <class _InputIter1, class _InputIter2>
-bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2);
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _Compare __comp);
-
-inline bool
-lexicographical_compare(const unsigned char* __first1,
- const unsigned char* __last1,
- const unsigned char* __first2,
- const unsigned char* __last2) {
- const size_t __len1 = __last1 - __first1;
- const size_t __len2 = __last2 - __first2;
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
-
- const int __result = memcmp(__first1, __first2, (min) (__len1, __len2));
- return __result != 0 ? (__result < 0) : (__len1 < __len2);
-}
-
-
-#if !(CHAR_MAX == SCHAR_MAX)
-inline bool lexicographical_compare(const char* __first1, const char* __last1,
- const char* __first2, const char* __last2) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
-
- return lexicographical_compare((const unsigned char*) __first1,
- (const unsigned char*) __last1,
- (const unsigned char*) __first2,
- (const unsigned char*) __last2);
-}
-#endif /* CHAR_MAX == SCHAR_MAX */
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _InputIter1, class _InputIter2>
-int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2);
-
-inline int
-__lexicographical_compare_3way(const unsigned char* __first1,
- const unsigned char* __last1,
- const unsigned char* __first2,
- const unsigned char* __last2) {
- const ptrdiff_t __len1 = __last1 - __first1;
- const ptrdiff_t __len2 = __last2 - __first2;
- const int __result = memcmp(__first1, __first2, (min) (__len1, __len2));
- return __result != 0 ? __result
- : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1));
-}
-
-
-#if !(CHAR_MAX == SCHAR_MAX)
-inline int
-__lexicographical_compare_3way(const char* __first1, const char* __last1,
- const char* __first2, const char* __last2) {
- return __lexicographical_compare_3way((const unsigned char*) __first1,
- (const unsigned char*) __last1,
- (const unsigned char*) __first2,
- (const unsigned char*) __last2);
-}
-#endif
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-#if !defined (_STLP_NO_EXTENSIONS)
-template <class _InputIter1, class _InputIter2>
-int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2);
-
-#endif
-
-// count
-template <class _InputIter, class _Tp>
-_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter)
-count(_InputIter __first, _InputIter __last, const _Tp& __val) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- _STLP_DIFFERENCE_TYPE(_InputIter) __n = 0;
- for ( ; __first != __last; ++__first)
- if (*__first == __val)
- ++__n;
- return __n;
-}
-
-// find and find_if. Note find may be expressed in terms of find_if if appropriate binder was available.
-template <class _InputIter, class _Tp>
-_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val);
-
-template <class _InputIter, class _Predicate>
-_InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred);
-
-// search.
-template <class _ForwardIter1, class _ForwardIter2, class _BinaryPred>
-_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPred __predicate);
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-// find_first_of
-template <class _InputIter, class _ForwardIter>
-_InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2);
-
-template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
-_InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2,
- _BinaryPredicate __comp);
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _ForwardIter1, class _ForwardIter2,
- class _BinaryPredicate>
-_ForwardIter1
-find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2,
- _BinaryPredicate __comp);
-
-// replace
-template <class _ForwardIter, class _Tp>
-_STLP_INLINE_LOOP void
-replace(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __old_value, const _Tp& __new_value) {
- _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
- for ( ; __first != __last; ++__first)
- if (*__first == __old_value)
- *__first = __new_value;
-}
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance>
-_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val, _Compare1 __comp1, _Compare2 __comp2, _Distance*);
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-_STLP_END_NAMESPACE
-
-#if !defined (_STLP_LINK_TIME_INSTANTIATION)
-# include <stl/_algobase.c>
-#endif
-
-#endif /* _STLP_INTERNAL_ALGOBASE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/stlport/stlport/stl/_alloc.c b/stlport/stlport/stl/_alloc.c
deleted file mode 100644
index 467405b..0000000
--- a/stlport/stlport/stl/_alloc.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_ALLOC_C
-#define _STLP_ALLOC_C
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-# include <stl/_alloc.h>
-#endif
-
-#if defined (__WATCOMC__)
-# pragma warning 13 9
-# pragma warning 367 9
-# pragma warning 368 9
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Alloc>
-void * _STLP_CALL __debug_alloc<_Alloc>::allocate(size_t __n) {
- size_t __total_extra = __extra_before_chunk() + __extra_after_chunk();
- size_t __real_n = __n + __total_extra;
- if (__real_n < __n) {
- //It means that we rolled on size_t, __n must be very large:
- _STLP_THROW_BAD_ALLOC;
- }
- __alloc_header *__result = (__alloc_header *)__allocator_type::allocate(__real_n);
- memset((char*)__result, __shred_byte, __real_n * sizeof(value_type));
- __result->__magic = __magic;
- __result->__type_size = sizeof(value_type);
- __result->_M_size = (_STLP_UINT32_T)__n;
- return ((char*)__result) + (long)__extra_before;
-}
-
-template <class _Alloc>
-void _STLP_CALL
-__debug_alloc<_Alloc>::deallocate(void *__p, size_t __n) {
- __alloc_header * __real_p = (__alloc_header*)((char *)__p -(long)__extra_before);
- // check integrity
- _STLP_VERBOSE_ASSERT(__real_p->__magic != __deleted_magic, _StlMsg_DBA_DELETED_TWICE)
- _STLP_VERBOSE_ASSERT(__real_p->__magic == __magic, _StlMsg_DBA_NEVER_ALLOCATED)
- _STLP_VERBOSE_ASSERT(__real_p->__type_size == 1,_StlMsg_DBA_TYPE_MISMATCH)
- _STLP_VERBOSE_ASSERT(__real_p->_M_size == __n, _StlMsg_DBA_SIZE_MISMATCH)
- // check pads on both sides
- unsigned char* __tmp;
- for (__tmp = (unsigned char*)(__real_p + 1); __tmp < (unsigned char*)__p; ++__tmp) {
- _STLP_VERBOSE_ASSERT(*__tmp == __shred_byte, _StlMsg_DBA_UNDERRUN)
- }
-
- size_t __real_n = __n + __extra_before_chunk() + __extra_after_chunk();
-
- for (__tmp= ((unsigned char*)__p) + __n * sizeof(value_type);
- __tmp < ((unsigned char*)__real_p) + __real_n ; ++__tmp) {
- _STLP_VERBOSE_ASSERT(*__tmp == __shred_byte, _StlMsg_DBA_OVERRUN)
- }
-
- // that may be unfortunate, just in case
- __real_p->__magic = __deleted_magic;
- memset((char*)__p, __shred_byte, __n * sizeof(value_type));
- __allocator_type::deallocate(__real_p, __real_n);
-}
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_ALLOC_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_alloc.h b/stlport/stlport/stl/_alloc.h
deleted file mode 100644
index 09b8af5..0000000
--- a/stlport/stlport/stl/_alloc.h
+++ /dev/null
@@ -1,580 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-#define _STLP_INTERNAL_ALLOC_H
-
-#ifndef _STLP_INTERNAL_CSTDDEF
-# include <stl/_cstddef.h>
-#endif
-
-#ifndef _STLP_INTERNAL_CSTDLIB
-# include <stl/_cstdlib.h>
-#endif
-
-#ifndef _STLP_INTERNAL_CSTRING
-# include <stl/_cstring.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-# include <stl/_algobase.h>
-#endif
-
-#ifndef _STLP_INTERNAL_NEW_HEADER
-# include <stl/_new.h>
-#endif
-
-#ifndef _STLP_INTERNAL_CONSTRUCT_H
-# include <stl/_construct.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// Malloc-based allocator. Typically slower than default alloc below.
-// Typically thread-safe and more storage efficient.
-
-#if !defined (_STLP_USE_NO_IOSTREAMS)
-typedef void (* __oom_handler_type)();
-#endif
-
-class _STLP_CLASS_DECLSPEC __malloc_alloc {
-public:
- // this one is needed for proper simple_alloc wrapping
- typedef char value_type;
- static void* _STLP_CALL allocate(size_t __n)
-#if !defined (_STLP_USE_NO_IOSTREAMS)
- ;
-#else
- {
- void *__result = malloc(__n);
- if (__result == 0) {
- _STLP_THROW_BAD_ALLOC;
- }
- return __result;
- }
-#endif
-
- static void _STLP_CALL deallocate(void* __p, size_t /* __n */) { free((char*)__p); }
-#if !defined (_STLP_USE_NO_IOSTREAMS)
- static __oom_handler_type _STLP_CALL set_malloc_handler(__oom_handler_type __f);
-#endif
-};
-
-// New-based allocator. Typically slower than default alloc below.
-// Typically thread-safe and more storage efficient.
-class _STLP_CLASS_DECLSPEC __new_alloc {
-public:
- // this one is needed for proper simple_alloc wrapping
- typedef char value_type;
- static void* _STLP_CALL allocate(size_t __n) { return __stl_new(__n); }
- static void _STLP_CALL deallocate(void* __p, size_t) { __stl_delete(__p); }
-};
-
-// Allocator adaptor to check size arguments for debugging.
-// Reports errors using assert. Checking can be disabled with
-// NDEBUG, but it's far better to just use the underlying allocator
-// instead when no checking is desired.
-// There is some evidence that this can confuse Purify.
-// This adaptor can only be applied to raw allocators
-
-template <class _Alloc>
-class __debug_alloc : public _Alloc {
-public:
- typedef _Alloc __allocator_type;
- typedef typename _Alloc::value_type value_type;
-private:
- struct __alloc_header {
- size_t __magic: 16;
- size_t __type_size:16;
- _STLP_UINT32_T _M_size;
- }; // that is 8 bytes for sure
- // Sunpro CC has bug on enums, so extra_before/after set explicitly
- enum { __pad = 8, __magic = 0xdeba, __deleted_magic = 0xdebd,
- __shred_byte = _STLP_SHRED_BYTE };
-
- enum { __extra_before = 16, __extra_after = 8 };
- // Size of space used to store size. Note
- // that this must be large enough to preserve
- // alignment.
- static size_t _STLP_CALL __extra_before_chunk() {
- return (long)__extra_before / sizeof(value_type) +
- (size_t)((long)__extra_before % sizeof(value_type) > 0);
- }
- static size_t _STLP_CALL __extra_after_chunk() {
- return (long)__extra_after / sizeof(value_type) +
- (size_t)((long)__extra_after % sizeof(value_type) > 0);
- }
-public:
- __debug_alloc() {}
- ~__debug_alloc() {}
- static void* _STLP_CALL allocate(size_t);
- static void _STLP_CALL deallocate(void *, size_t);
-};
-
-# if defined (__OS400__)
-// dums 02/05/2007: is it really necessary ?
-enum { _MAX_BYTES = 256 };
-# else
-enum { _MAX_BYTES = 32 * sizeof(void*) };
-# endif
-
-#if !defined (_STLP_USE_NO_IOSTREAMS)
-// Default node allocator.
-// With a reasonable compiler, this should be roughly as fast as the
-// original STL class-specific allocators, but with less fragmentation.
-class _STLP_CLASS_DECLSPEC __node_alloc {
- static void * _STLP_CALL _M_allocate(size_t& __n);
- /* __p may not be 0 */
- static void _STLP_CALL _M_deallocate(void *__p, size_t __n);
-
-public:
- // this one is needed for proper simple_alloc wrapping
- typedef char value_type;
- /* __n must be > 0 */
- static void* _STLP_CALL allocate(size_t& __n)
- { return (__n > (size_t)_MAX_BYTES) ? __stl_new(__n) : _M_allocate(__n); }
- /* __p may not be 0 */
- static void _STLP_CALL deallocate(void *__p, size_t __n)
- { if (__n > (size_t)_MAX_BYTES) __stl_delete(__p); else _M_deallocate(__p, __n); }
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__node_alloc>;
-# endif
-
-#endif
-
-#if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__new_alloc>;
-_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__malloc_alloc>;
-#endif
-
-/* macro to convert the allocator for initialization
- * not using MEMBER_TEMPLATE_CLASSES as it should work given template constructor */
-#if defined (_STLP_MEMBER_TEMPLATES) || ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-/* if _STLP_NO_TEMPLATE_CONVERSIONS is set, the member template constructor is
- * not used implicitly to convert allocator parameter, so let us do it explicitly */
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_NO_TEMPLATE_CONVERSIONS)
-# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
-# else
-# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __a
-# endif
-/* else convert, but only if partial specialization works, since else
- * Container::allocator_type won't be different */
-#else
-# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
-#endif
-
-// Another allocator adaptor: _Alloc_traits. This serves two
-// purposes. First, make it possible to write containers that can use
-// either SGI-style allocators or standard-conforming allocator.
-
-// The fully general version.
-template <class _Tp, class _Allocator>
-struct _Alloc_traits {
- typedef _Allocator _Orig;
-#if !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
- typedef typename _Allocator::_STLP_TEMPLATE rebind<_Tp> _Rebind_type;
- typedef typename _Rebind_type::other allocator_type;
- static allocator_type create_allocator(const _Orig& __a)
- { return allocator_type(_STLP_CONVERT_ALLOCATOR(__a, _Tp)); }
-#else
- // this is not actually true, used only to pass this type through
- // to dynamic overload selection in _STLP_alloc_proxy methods
- typedef _Allocator allocator_type;
-#endif
-};
-
-#if defined (_STLP_USE_PERTHREAD_ALLOC)
-
-_STLP_END_NAMESPACE
-// include additional header here
-# include <stl/_pthread_alloc.h>
-_STLP_BEGIN_NAMESPACE
-
-typedef __pthread_alloc __alloc_type;
-#elif defined (_STLP_USE_NEWALLOC)
-typedef __new_alloc __alloc_type;
-#elif defined (_STLP_USE_MALLOC)
-typedef __malloc_alloc __alloc_type;
-#else
-typedef __node_alloc __alloc_type;
-#endif
-
-#if defined (_STLP_DEBUG_ALLOC)
-typedef __debug_alloc<__alloc_type> __sgi_alloc;
-#else
-typedef __alloc_type __sgi_alloc;
-#endif
-
-#if !defined (_STLP_NO_ANACHRONISMS)
-typedef __sgi_alloc __single_client_alloc;
-typedef __sgi_alloc __multithreaded_alloc;
-#endif
-
-// This implements allocators as specified in the C++ standard.
-//
-// Note that standard-conforming allocators use many language features
-// that are not yet widely implemented. In particular, they rely on
-// member templates, partial specialization, partial ordering of function
-// templates, the typename keyword, and the use of the template keyword
-// to refer to a template member of a dependent type.
-
-/*
-template <class _Tp>
-struct _AllocatorAux {
- typedef _Tp* pointer;
- typedef const _Tp* const_pointer;
- typedef _Tp& reference;
- typedef const _Tp& const_reference;
-
- pointer address(reference __x) const {return &__x;}
- const_pointer address(const_reference __x) const { return &__x; }
-};
-
-template <class _Tp>
-struct _AllocatorAux<const _Tp> {
- typedef _Tp* pointer;
- typedef const _Tp* const_pointer;
- typedef _Tp& reference;
- typedef const _Tp& const_reference;
-
- const_pointer address(const_reference __x) const { return &__x; }
-};
-*/
-
-template <class _Tp>
-class allocator //: public _AllocatorAux<_Tp>
-/* A small helper struct to recognize STLport allocator implementation
- * from any user specialization one.
- */
- : public __stlport_class<allocator<_Tp> >
-{
-public:
- typedef _Tp value_type;
- typedef _Tp* pointer;
- typedef const _Tp* const_pointer;
- typedef _Tp& reference;
- typedef const _Tp& const_reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
-#if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
- template <class _Tp1> struct rebind {
- typedef allocator<_Tp1> other;
- };
-#endif
- allocator() _STLP_NOTHROW {}
-#if defined (_STLP_MEMBER_TEMPLATES)
- template <class _Tp1> allocator(const allocator<_Tp1>&) _STLP_NOTHROW {}
-#endif
- allocator(const allocator<_Tp>&) _STLP_NOTHROW {}
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- allocator(__move_source<allocator<_Tp> > src) _STLP_NOTHROW {}
-#endif
- ~allocator() _STLP_NOTHROW {}
- pointer address(reference __x) const {return &__x;}
- const_pointer address(const_reference __x) const { return &__x; }
- // __n is permitted to be 0. The C++ standard says nothing about what the return value is when __n == 0.
- _Tp* allocate(size_type __n, const void* = 0) {
- if (__n > max_size()) {
- _STLP_THROW_BAD_ALLOC;
- }
- if (__n != 0) {
- size_type __buf_size = __n * sizeof(value_type);
- _Tp* __ret = __REINTERPRET_CAST(_Tp*, __sgi_alloc::allocate(__buf_size));
-#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
- memset((char*)__ret, _STLP_SHRED_BYTE, __buf_size);
-#endif
- return __ret;
- }
-
- return 0;
- }
- // __p is permitted to be a null pointer, only if n==0.
- void deallocate(pointer __p, size_type __n) {
- _STLP_ASSERT( (__p == 0) == (__n == 0) )
- if (__p != 0) {
-#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
- memset((char*)__p, _STLP_SHRED_BYTE, __n * sizeof(value_type));
-#endif
- __sgi_alloc::deallocate((void*)__p, __n * sizeof(value_type));
- }
- }
-#if !defined (_STLP_NO_ANACHRONISMS)
- // backwards compatibility
- void deallocate(pointer __p) const { if (__p != 0) __sgi_alloc::deallocate((void*)__p, sizeof(value_type)); }
-#endif
- size_type max_size() const _STLP_NOTHROW { return size_t(-1) / sizeof(value_type); }
- void construct(pointer __p, const_reference __val) { _STLP_STD::_Copy_Construct(__p, __val); }
- void destroy(pointer __p) { _STLP_STD::_Destroy(__p); }
-
-#if defined (_STLP_NO_EXTENSIONS)
- /* STLport extension giving rounded size of an allocated memory buffer
- * This method do not have to be part of a user defined allocator implementation
- * and won't even be called if such a function was granted.
- */
-protected:
-#endif
- _Tp* _M_allocate(size_type __n, size_type& __allocated_n) {
- if (__n > max_size()) {
- _STLP_THROW_BAD_ALLOC;
- }
-
- if (__n != 0) {
- size_type __buf_size = __n * sizeof(value_type);
- _Tp* __ret = __REINTERPRET_CAST(_Tp*, __sgi_alloc::allocate(__buf_size));
-#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
- memset((char*)__ret, _STLP_SHRED_BYTE, __buf_size);
-#endif
- __allocated_n = __buf_size / sizeof(value_type);
- return __ret;
- }
-
- return 0;
- }
-#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
- void _M_swap_workaround(allocator<_Tp>& __other) {}
-#endif
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC allocator<void> {
-public:
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef void* pointer;
- typedef const void* const_pointer;
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
- typedef void value_type;
-#endif
-#if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
- template <class _Tp1> struct rebind {
- typedef allocator<_Tp1> other;
- };
-#endif
-};
-
-template <class _T1, class _T2>
-inline bool _STLP_CALL operator==(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW
-{ return true; }
-template <class _T1, class _T2>
-inline bool _STLP_CALL operator!=(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW
-{ return false; }
-
-#if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS allocator<char>;
-# if defined (_STLP_HAS_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS allocator<wchar_t>;
-# endif
-# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
-_STLP_EXPORT_TEMPLATE_CLASS allocator<void*>;
-# endif
-#endif
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Tp>
-struct __alloc_type_traits {
-#if !defined (__BORLANDC__)
- typedef typename _IsSTLportClass<allocator<_Tp> >::_Ret _STLportAlloc;
-#else
- enum { _Is = _IsSTLportClass<allocator<_Tp> >::_Is };
- typedef typename __bool2type<_Is>::_Ret _STLportAlloc;
-#endif
- //The default allocator implementation which is recognize thanks to the
- //__stlport_class inheritance is a stateless object so:
- typedef _STLportAlloc has_trivial_default_constructor;
- typedef _STLportAlloc has_trivial_copy_constructor;
- typedef _STLportAlloc has_trivial_assignment_operator;
- typedef _STLportAlloc has_trivial_destructor;
- typedef _STLportAlloc is_POD_type;
-};
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-template <class _Tp>
-struct __type_traits<allocator<_Tp> > : _STLP_PRIV __alloc_type_traits<_Tp> {};
-#else
-_STLP_TEMPLATE_NULL
-struct __type_traits<allocator<char> > : _STLP_PRIV __alloc_type_traits<char> {};
-# if defined (_STLP_HAS_WCHAR_T)
-_STLP_TEMPLATE_NULL
-struct __type_traits<allocator<wchar_t> > : _STLP_PRIV __alloc_type_traits<wchar_t> {};
-# endif
-# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
-_STLP_TEMPLATE_NULL
-struct __type_traits<allocator<void*> > : _STLP_PRIV __alloc_type_traits<void*> {};
-# endif
-#endif
-
-
-#if !defined (_STLP_FORCE_ALLOCATORS)
-# define _STLP_FORCE_ALLOCATORS(a,y)
-#endif
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-// The version for the default allocator, for rare occasion when we have partial spec w/o member template classes
-template <class _Tp, class _Tp1>
-struct _Alloc_traits<_Tp, allocator<_Tp1> > {
- typedef allocator<_Tp1> _Orig;
- typedef allocator<_Tp> allocator_type;
- static allocator_type create_allocator(const allocator<_Tp1 >& __a)
- { return allocator_type(_STLP_CONVERT_ALLOCATOR(__a, _Tp)); }
-};
-#endif
-
-#if !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) && defined (_STLP_MEMBER_TEMPLATES)
-template <class _Tp, class _Alloc>
-inline _STLP_TYPENAME_ON_RETURN_TYPE _Alloc_traits<_Tp, _Alloc>::allocator_type _STLP_CALL
-__stl_alloc_create(const _Alloc& __a, const _Tp*) {
- typedef typename _Alloc::_STLP_TEMPLATE rebind<_Tp>::other _Rebound_type;
- return _Rebound_type(__a);
-}
-#else
-// If custom allocators are being used without member template classes support :
-// user (on purpose) is forced to define rebind/get operations !!!
-template <class _Tp1, class _Tp2>
-inline allocator<_Tp2>& _STLP_CALL
-__stl_alloc_rebind(allocator<_Tp1>& __a, const _Tp2*) { return (allocator<_Tp2>&)(__a); }
-template <class _Tp1, class _Tp2>
-inline allocator<_Tp2> _STLP_CALL
-__stl_alloc_create(const allocator<_Tp1>&, const _Tp2*) { return allocator<_Tp2>(); }
-#endif
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-// inheritance is being used for EBO optimization
-template <class _Value, class _Tp, class _MaybeReboundAlloc>
-class _STLP_alloc_proxy : public _MaybeReboundAlloc {
-private:
- typedef _MaybeReboundAlloc _Base;
- typedef typename _Base::size_type size_type;
- typedef _STLP_alloc_proxy<_Value, _Tp, _MaybeReboundAlloc> _Self;
-public:
- _Value _M_data;
-
- _STLP_alloc_proxy (const _MaybeReboundAlloc& __a, _Value __p) :
- _MaybeReboundAlloc(__a), _M_data(__p) {}
-
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- _STLP_alloc_proxy (__move_source<_Self> src) :
- _Base(_STLP_PRIV _AsMoveSource(src.get()._M_base())),
- _M_data(_STLP_PRIV _AsMoveSource(src.get()._M_data)) {}
-
- _Base& _M_base()
- { return *this; }
-#endif
-
-private:
- /* Following are helper methods to detect stateless allocators and avoid
- * swap in this case. For some compilers (VC6) it is a workaround for a
- * compiler bug in the Empty Base class Optimization feature, for others
- * it is a small optimization or nothing if no EBO. */
- void _M_swap_alloc(_Self&, const __true_type& /*_IsStateless*/)
- {}
-
- void _M_swap_alloc(_Self& __x, const __false_type& /*_IsStateless*/) {
- _MaybeReboundAlloc &__base_this = *this;
- _MaybeReboundAlloc &__base_x = __x;
- _STLP_STD::swap(__base_this, __base_x);
- }
-
-public:
- void _M_swap_alloc(_Self& __x) {
-#if !defined (__BORLANDC__)
- typedef typename _IsStateless<_MaybeReboundAlloc>::_Ret _StatelessAlloc;
-#else
- typedef typename __bool2type<_IsStateless<_MaybeReboundAlloc>::_Is>::_Ret _StatelessAlloc;
-#endif
- _M_swap_alloc(__x, _StatelessAlloc());
- }
-
- /* We need to define the following swap implementation for allocator with state
- * as those allocators might have implement a special swap function to correctly
- * move datas from an instance to the oher, _STLP_alloc_proxy should not break
- * this mecanism. */
- void swap(_Self& __x) {
- _M_swap_alloc(__x);
- _STLP_STD::swap(_M_data, __x._M_data);
- }
-
- _Tp* allocate(size_type __n, size_type& __allocated_n) {
-#if !defined (__BORLANDC__)
- typedef typename _IsSTLportClass<_MaybeReboundAlloc>::_Ret _STLportAlloc;
-#else
- typedef typename __bool2type<_IsSTLportClass<_MaybeReboundAlloc>::_Is>::_Ret _STLportAlloc;
-#endif
- return allocate(__n, __allocated_n, _STLportAlloc());
- }
-
- // Unified interface to perform allocate()/deallocate() with limited
- // language support
-#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
- // else it is rebound already, and allocate() member is accessible
- _Tp* allocate(size_type __n)
- { return __stl_alloc_rebind(__STATIC_CAST(_Base&, *this), __STATIC_CAST(_Tp*, 0)).allocate(__n, 0); }
- void deallocate(_Tp* __p, size_type __n)
- { __stl_alloc_rebind(__STATIC_CAST(_Base&, *this), __STATIC_CAST(_Tp*, 0)).deallocate(__p, __n); }
-private:
- _Tp* allocate(size_type __n, size_type& __allocated_n, const __true_type& /*STLport allocator*/)
- { return __stl_alloc_rebind(__STATIC_CAST(_Base&, *this), __STATIC_CAST(_Tp*, 0))._M_allocate(__n, __allocated_n); }
-#else
- //Expose Standard allocate overload (using expression do not work for some compilers (Borland))
- _Tp* allocate(size_type __n)
- { return _Base::allocate(__n); }
-private:
- _Tp* allocate(size_type __n, size_type& __allocated_n, const __true_type& /*STLport allocator*/)
- { return _Base::_M_allocate(__n, __allocated_n); }
-#endif
-
- _Tp* allocate(size_type __n, size_type& __allocated_n, const __false_type& /*STLport allocator*/)
- { __allocated_n = __n; return allocate(__n); }
-};
-
-#if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<char*, char, allocator<char> >;
-# if defined (_STLP_HAS_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<wchar_t*, wchar_t, allocator<wchar_t> >;
-# endif
-# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
-_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<void**, void*, allocator<void*> >;
-# endif
-#endif
-
-_STLP_MOVE_TO_STD_NAMESPACE
-_STLP_END_NAMESPACE
-
-#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-# include <stl/_alloc.c>
-#endif
-
-#endif /* _STLP_INTERNAL_ALLOC_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/stlport/stlport/stl/_auto_ptr.h b/stlport/stlport/stl/_auto_ptr.h
deleted file mode 100644
index c750534..0000000
--- a/stlport/stlport/stl/_auto_ptr.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_AUTO_PTR_H
-#define _STLP_AUTO_PTR_H
-
-_STLP_BEGIN_NAMESPACE
-// implementation primitive
-class __ptr_base {
-public:
- void* _M_p;
- void __set(const volatile void* p) { _M_p = __CONST_CAST(void*,p); }
- void __set(void* p) { _M_p = p; }
-};
-
-template <class _Tp>
-class auto_ptr_ref {
-public:
- __ptr_base& _M_r;
- _Tp* const _M_p;
-
- auto_ptr_ref(__ptr_base& __r, _Tp* __p) : _M_r(__r), _M_p(__p) { }
-
- _Tp* release() const { _M_r.__set(__STATIC_CAST(void*, 0)); return _M_p; }
-
-private:
- //explicitely defined as private to avoid warnings:
- typedef auto_ptr_ref<_Tp> _Self;
- _Self& operator = (_Self const&);
-};
-
-template<class _Tp>
-class auto_ptr : public __ptr_base {
-public:
- typedef _Tp element_type;
- typedef auto_ptr<_Tp> _Self;
-
- _Tp* release() _STLP_NOTHROW {
- _Tp* __px = this->get();
- this->_M_p = 0;
- return __px;
- }
-
- void reset(_Tp* __px = 0) _STLP_NOTHROW {
- _Tp* __pt = this->get();
- if (__px != __pt)
- delete __pt;
- this->__set(__px);
- }
-
- _Tp* get() const _STLP_NOTHROW
-#if !defined (__GNUC__) || (__GNUC__ > 2)
- { return __STATIC_CAST(_Tp*, _M_p); }
-#else
- { return __REINTERPRET_CAST(_Tp*, _M_p); }
-#endif
-
-#if !defined (_STLP_NO_ARROW_OPERATOR)
- _Tp* operator->() const _STLP_NOTHROW {
- _STLP_VERBOSE_ASSERT(get() != 0, _StlMsg_AUTO_PTR_NULL)
- return get();
- }
-#endif
- _Tp& operator*() const _STLP_NOTHROW {
- _STLP_VERBOSE_ASSERT(get() != 0, _StlMsg_AUTO_PTR_NULL)
- return *get();
- }
-
- explicit auto_ptr(_Tp* __px = 0) _STLP_NOTHROW { this->__set(__px); }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
-# if !defined (_STLP_NO_TEMPLATE_CONVERSIONS)
- template<class _Tp1> auto_ptr(auto_ptr<_Tp1>& __r) _STLP_NOTHROW {
- _Tp* __conversionCheck = __r.release();
- this->__set(__conversionCheck);
- }
-# endif
- template<class _Tp1> auto_ptr<_Tp>& operator=(auto_ptr<_Tp1>& __r) _STLP_NOTHROW {
- _Tp* __conversionCheck = __r.release();
- reset(__conversionCheck);
- return *this;
- }
-#endif
-
- auto_ptr(_Self& __r) _STLP_NOTHROW { this->__set(__r.release()); }
-
- _Self& operator=(_Self& __r) _STLP_NOTHROW {
- reset(__r.release());
- return *this;
- }
-
- ~auto_ptr() _STLP_NOTHROW { /* boris : reset(0) might be better */ delete this->get(); }
-
- auto_ptr(auto_ptr_ref<_Tp> __r) _STLP_NOTHROW
- { this->__set(__r.release()); }
-
- _Self& operator=(auto_ptr_ref<_Tp> __r) _STLP_NOTHROW {
- reset(__r.release());
- return *this;
- }
-
-#if defined(_STLP_MEMBER_TEMPLATES) && !defined(_STLP_NO_TEMPLATE_CONVERSIONS)
- template<class _Tp1> operator auto_ptr_ref<_Tp1>() _STLP_NOTHROW
- { return auto_ptr_ref<_Tp1>(*this, this->get()); }
- template<class _Tp1> operator auto_ptr<_Tp1>() _STLP_NOTHROW
- { return auto_ptr<_Tp1>(release()); }
-#else
- operator auto_ptr_ref<_Tp>() _STLP_NOTHROW
- { return auto_ptr_ref<_Tp>(*this, this->get()); }
-#endif
-};
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_AUTO_PTR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_bitset.c b/stlport/stlport/stl/_bitset.c
deleted file mode 100644
index 82b9312..0000000
--- a/stlport/stlport/stl/_bitset.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_BITSET_C
-#define _STLP_BITSET_C
-
-#ifndef _STLP_BITSET_H
-# include <stl/_bitset.h>
-#endif
-
-#define __BITS_PER_WORD (CHAR_BIT * sizeof(unsigned long))
-
-_STLP_BEGIN_NAMESPACE
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-//
-// Definitions of non-inline functions from _Base_bitset.
-//
-template<size_t _Nw>
-void _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) {
- if (__shift != 0) {
- const size_t __wshift = __shift / __BITS_PER_WORD;
- const size_t __offset = __shift % __BITS_PER_WORD;
-
- if (__offset == 0)
- for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
- _M_w[__n] = _M_w[__n - __wshift];
-
- else {
- const size_t __sub_offset = __BITS_PER_WORD - __offset;
- for (size_t __n = _Nw - 1; __n > __wshift; --__n)
- _M_w[__n] = (_M_w[__n - __wshift] << __offset) |
- (_M_w[__n - __wshift - 1] >> __sub_offset);
- _M_w[__wshift] = _M_w[0] << __offset;
- }
-
- fill(_M_w + 0, _M_w + __wshift, __STATIC_CAST(_WordT,0));
- }
-}
-
-template<size_t _Nw>
-void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) {
- if (__shift != 0) {
- const size_t __wshift = __shift / __BITS_PER_WORD;
- const size_t __offset = __shift % __BITS_PER_WORD;
- const size_t __limit = _Nw - __wshift - 1;
-
- if (__offset == 0)
- for (size_t __n = 0; __n <= __limit; ++__n)
- _M_w[__n] = _M_w[__n + __wshift];
-
- else {
- const size_t __sub_offset = __BITS_PER_WORD - __offset;
- for (size_t __n = 0; __n < __limit; ++__n)
- _M_w[__n] = (_M_w[__n + __wshift] >> __offset) |
- (_M_w[__n + __wshift + 1] << __sub_offset);
- _M_w[__limit] = _M_w[_Nw-1] >> __offset;
- }
-
- fill(_M_w + __limit + 1, _M_w + _Nw, __STATIC_CAST(_WordT,0));
- }
-}
-
-template<size_t _Nw>
-unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const {
- for (size_t __i = 1; __i < _Nw; ++__i)
- if (_M_w[__i])
- __stl_throw_overflow_error("bitset");
- return _M_w[0];
-} // End _M_do_to_ulong
-
-template<size_t _Nw>
-size_t _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const {
- for ( size_t __i = 0; __i < _Nw; __i++ ) {
- _WordT __thisword = _M_w[__i];
- if ( __thisword != __STATIC_CAST(_WordT,0) ) {
- // find byte within word
- for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
- unsigned char __this_byte
- = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
- if ( __this_byte )
- return __i*__BITS_PER_WORD + __j*CHAR_BIT +
- _Bs_G::_S_first_one(__this_byte);
-
- __thisword >>= CHAR_BIT;
- }
- }
- }
- // not found, so return an indication of failure.
- return __not_found;
-}
-
-template<size_t _Nw>
-size_t
-_Base_bitset<_Nw>::_M_do_find_next(size_t __prev,
- size_t __not_found) const {
- // make bound inclusive
- ++__prev;
-
- // check out of bounds
- if ( __prev >= _Nw * __BITS_PER_WORD )
- return __not_found;
-
- // search first word
- size_t __i = _S_whichword(__prev);
- _WordT __thisword = _M_w[__i];
-
- // mask off bits below bound
- __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev);
-
- if ( __thisword != __STATIC_CAST(_WordT,0) ) {
- // find byte within word
- // get first byte into place
- __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
- for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); ++__j ) {
- unsigned char __this_byte
- = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
- if ( __this_byte )
- return __i*__BITS_PER_WORD + __j*CHAR_BIT +
- _Bs_G::_S_first_one(__this_byte);
-
- __thisword >>= CHAR_BIT;
- }
- }
-
- // check subsequent words
- ++__i;
- for ( ; __i < _Nw; ++__i ) {
- /* _WordT */ __thisword = _M_w[__i];
- if ( __thisword != __STATIC_CAST(_WordT,0) ) {
- // find byte within word
- for ( size_t __j = 0; __j < sizeof(_WordT); ++__j ) {
- unsigned char __this_byte
- = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
- if ( __this_byte )
- return __i*__BITS_PER_WORD + __j*CHAR_BIT +
- _Bs_G::_S_first_one(__this_byte);
-
- __thisword >>= CHAR_BIT;
- }
- }
- }
-
- // not found, so return an indication of failure.
- return __not_found;
-} // end _M_do_find_next
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-#if !defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
-
-# if !defined (_STLP_USE_NO_IOSTREAMS)
-
-_STLP_END_NAMESPACE
-
-#ifndef _STLP_STRING_IO_H
-# include <stl/_string_io.h> //includes _istream.h and _ostream.h
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_istream<_CharT, _Traits>& _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) {
- basic_string<_CharT, _Traits> __tmp;
- __tmp.reserve(_Nb);
-
- // Skip whitespace
- typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
- if (__sentry) {
- basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
- for (size_t __i = 0; __i < _Nb; ++__i) {
- static typename _Traits::int_type __eof = _Traits::eof();
-
- typename _Traits::int_type __c1 = __buf->sbumpc();
- if (_Traits::eq_int_type(__c1, __eof)) {
- __is.setstate(ios_base::eofbit);
- break;
- }
- else {
- typename _Traits::char_type __c2 = _Traits::to_char_type(__c1);
- char __c = __is.narrow(__c2, '*');
-
- if (__c == '0' || __c == '1')
- __tmp.push_back(__c);
- else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
- __is.setstate(ios_base::failbit);
- break;
- }
- }
- }
-
- if (__tmp.empty())
- __is.setstate(ios_base::failbit);
- else
- __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb);
- }
-
- return __is;
-}
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os,
- const bitset<_Nb>& __x) {
- basic_string<_CharT, _Traits> __tmp;
- __x._M_copy_to_string(__tmp);
- return __os << __tmp;
-}
-
-# endif /* !_STLP_USE_NO_IOSTREAMS */
-
-#endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
-
-_STLP_END_NAMESPACE
-
-#undef __BITS_PER_WORD
-#undef bitset
-
-#endif /* _STLP_BITSET_C */
diff --git a/stlport/stlport/stl/_bitset.h b/stlport/stlport/stl/_bitset.h
deleted file mode 100644
index f894346..0000000
--- a/stlport/stlport/stl/_bitset.h
+++ /dev/null
@@ -1,880 +0,0 @@
-/*
- * Copyright (c) 1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_BITSET_H
-#define _STLP_BITSET_H
-
-// A bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused
-// bits. (They are the high- order bits in the highest word.) It is
-// a class invariant of class bitset<> that those unused bits are
-// always zero.
-
-// Most of the actual code isn't contained in bitset<> itself, but in the
-// base class _Base_bitset. The base class works with whole words, not with
-// individual bits. This allows us to specialize _Base_bitset for the
-// important special case where the bitset is only a single word.
-
-// The C++ standard does not define the precise semantics of operator[].
-// In this implementation the const version of operator[] is equivalent
-// to test(), except that it does no range checking. The non-const version
-// returns a reference to a bit, again without doing any range checking.
-
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-# include <stl/_algobase.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-# include <stl/_alloc.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_H
-# include <stl/_iterator.h>
-#endif
-
-#ifndef _STLP_INTERNAL_UNINITIALIZED_H
-# include <stl/_uninitialized.h>
-#endif
-
-#ifndef _STLP_RANGE_ERRORS_H
-# include <stl/_range_errors.h>
-#endif
-
-#ifndef _STLP_INTERNAL_STRING_H
-# include <stl/_string.h>
-#endif
-
-#define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
-#define __BITSET_WORDS(__n) ((__n + __BITS_PER_WORD - 1)/__BITS_PER_WORD)
-
-_STLP_BEGIN_NAMESPACE
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-// structure to aid in counting bits
-class _STLP_CLASS_DECLSPEC _Bs_G
-{
- public:
- //returns the number of bit set within the buffer between __beg and __end.
- static size_t _S_count(const unsigned char *__beg, const unsigned char *__end)
-#if defined (_STLP_USE_NO_IOSTREAMS)
- {
- size_t __result = 0;
- for (; __beg != __end; ++__beg) {
- for (size_t i = 0; i < (sizeof(unsigned char) * 8); ++i) {
- if ((*__beg & (1 << i)) != 0) { ++__result; }
- }
- }
- return __result;
- }
-#else
- ;
-#endif
- // Mapping from 8 bit unsigned integers to the index of the first one bit set:
- static unsigned char _S_first_one(unsigned char __x)
-#if defined (_STLP_USE_NO_IOSTREAMS)
- {
- for (unsigned char i = 0; i < (sizeof(unsigned char) * 8); ++i) {
- if ((__x & (1 << i)) != 0) { return i; }
- }
- return 0;
- }
-#else
- ;
-#endif
-};
-
-//
-// Base class: general case.
-//
-
-template<size_t _Nw>
-struct _Base_bitset {
- typedef unsigned long _WordT;
-
- _WordT _M_w[_Nw]; // 0 is the least significant word.
-
- _Base_bitset() { _M_do_reset(); }
-
- _Base_bitset(unsigned long __val) {
- _M_do_reset();
- _M_w[0] = __val;
- }
-
- static size_t _STLP_CALL _S_whichword( size_t __pos ) {
- return __pos / __BITS_PER_WORD;
- }
- static size_t _STLP_CALL _S_whichbyte( size_t __pos ) {
- return (__pos % __BITS_PER_WORD) / CHAR_BIT;
- }
- static size_t _STLP_CALL _S_whichbit( size_t __pos ) {
- return __pos % __BITS_PER_WORD;
- }
- static _WordT _STLP_CALL _S_maskbit( size_t __pos ) {
- return __STATIC_CAST(_WordT,1) << _S_whichbit(__pos);
- }
-
- _WordT& _M_getword(size_t __pos) { return _M_w[_S_whichword(__pos)]; }
- _WordT _M_getword(size_t __pos) const { return _M_w[_S_whichword(__pos)]; }
-
- _WordT& _M_hiword() { return _M_w[_Nw - 1]; }
- _WordT _M_hiword() const { return _M_w[_Nw - 1]; }
-
- void _M_do_and(const _Base_bitset<_Nw>& __x) {
- for ( size_t __i = 0; __i < _Nw; __i++ ) {
- _M_w[__i] &= __x._M_w[__i];
- }
- }
-
- void _M_do_or(const _Base_bitset<_Nw>& __x) {
- for ( size_t __i = 0; __i < _Nw; __i++ ) {
- _M_w[__i] |= __x._M_w[__i];
- }
- }
-
- void _M_do_xor(const _Base_bitset<_Nw>& __x) {
- for ( size_t __i = 0; __i < _Nw; __i++ ) {
- _M_w[__i] ^= __x._M_w[__i];
- }
- }
-
- void _M_do_left_shift(size_t __shift);
-
- void _M_do_right_shift(size_t __shift);
-
- void _M_do_flip() {
- for ( size_t __i = 0; __i < _Nw; __i++ ) {
- _M_w[__i] = ~_M_w[__i];
- }
- }
-
- void _M_do_set() {
- for ( size_t __i = 0; __i < _Nw; __i++ ) {
- _M_w[__i] = ~__STATIC_CAST(_WordT,0);
- }
- }
-
- void _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); }
-
- bool _M_is_equal(const _Base_bitset<_Nw>& __x) const {
- for (size_t __i = 0; __i < _Nw; ++__i) {
- if (_M_w[__i] != __x._M_w[__i])
- return false;
- }
- return true;
- }
-
- bool _M_is_any() const {
- for ( size_t __i = 0; __i < _Nw ; __i++ ) {
- if ( _M_w[__i] != __STATIC_CAST(_WordT,0) )
- return true;
- }
- return false;
- }
-
- size_t _M_do_count() const {
- const unsigned char* __byte_ptr = (const unsigned char*)_M_w;
- const unsigned char* __end_ptr = (const unsigned char*)(_M_w+_Nw);
-
- return _Bs_G::_S_count(__byte_ptr, __end_ptr);
- }
-
- unsigned long _M_do_to_ulong() const;
-
- // find first "on" bit
- size_t _M_do_find_first(size_t __not_found) const;
-
- // find the next "on" bit that follows "prev"
- size_t _M_do_find_next(size_t __prev, size_t __not_found) const;
-};
-
-//
-// Base class: specialization for a single word.
-//
-_STLP_TEMPLATE_NULL
-struct _Base_bitset<1UL> {
- typedef unsigned long _WordT;
- typedef _Base_bitset<1UL> _Self;
-
- _WordT _M_w;
-
- _Base_bitset( void ) : _M_w(0) {}
- _Base_bitset(unsigned long __val) : _M_w(__val) {}
-
- static size_t _STLP_CALL _S_whichword( size_t __pos ) {
- return __pos / __BITS_PER_WORD ;
- }
- static size_t _STLP_CALL _S_whichbyte( size_t __pos ) {
- return (__pos % __BITS_PER_WORD) / CHAR_BIT;
- }
- static size_t _STLP_CALL _S_whichbit( size_t __pos ) {
- return __pos % __BITS_PER_WORD;
- }
- static _WordT _STLP_CALL _S_maskbit( size_t __pos ) {
- return (__STATIC_CAST(_WordT,1)) << _S_whichbit(__pos);
- }
-
- _WordT& _M_getword(size_t) { return _M_w; }
- _WordT _M_getword(size_t) const { return _M_w; }
-
- _WordT& _M_hiword() { return _M_w; }
- _WordT _M_hiword() const { return _M_w; }
-
- void _M_do_and(const _Self& __x) { _M_w &= __x._M_w; }
- void _M_do_or(const _Self& __x) { _M_w |= __x._M_w; }
- void _M_do_xor(const _Self& __x) { _M_w ^= __x._M_w; }
- void _M_do_left_shift(size_t __shift) { _M_w <<= __shift; }
- void _M_do_right_shift(size_t __shift) { _M_w >>= __shift; }
- void _M_do_flip() { _M_w = ~_M_w; }
- void _M_do_set() { _M_w = ~__STATIC_CAST(_WordT,0); }
- void _M_do_reset() { _M_w = 0; }
-
- bool _M_is_equal(const _Self& __x) const {
- return _M_w == __x._M_w;
- }
- bool _M_is_any() const {
- return _M_w != 0;
- }
-
- size_t _M_do_count() const {
- const unsigned char* __byte_ptr = (const unsigned char*)&_M_w;
- const unsigned char* __end_ptr = ((const unsigned char*)&_M_w)+sizeof(_M_w);
- return _Bs_G::_S_count(__byte_ptr, __end_ptr);
- }
-
- unsigned long _M_do_to_ulong() const { return _M_w; }
-
- inline size_t _M_do_find_first(size_t __not_found) const;
-
- // find the next "on" bit that follows "prev"
- inline size_t _M_do_find_next(size_t __prev, size_t __not_found) const;
-};
-
-
-// ------------------------------------------------------------
-//
-// Definitions of should-be-non-inline functions from the single-word version of
-// _Base_bitset.
-//
-inline size_t
-_Base_bitset<1UL>::_M_do_find_first(size_t __not_found) const {
- // typedef unsigned long _WordT;
- _WordT __thisword = _M_w;
-
- if ( __thisword != __STATIC_CAST(_WordT,0) ) {
- // find byte within word
- for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
- unsigned char __this_byte
- = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
- if ( __this_byte )
- return __j*CHAR_BIT + _Bs_G::_S_first_one(__this_byte);
-
- __thisword >>= CHAR_BIT;
- }
- }
- // not found, so return a value that indicates failure.
- return __not_found;
-}
-
-inline size_t
-_Base_bitset<1UL>::_M_do_find_next(size_t __prev,
- size_t __not_found ) const {
- // make bound inclusive
- ++__prev;
-
- // check out of bounds
- if ( __prev >= __BITS_PER_WORD )
- return __not_found;
-
- // search first (and only) word
- _WordT __thisword = _M_w;
-
- // mask off bits below bound
- __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev);
-
- if ( __thisword != __STATIC_CAST(_WordT,0) ) {
- // find byte within word
- // get first byte into place
- __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
- for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) {
- unsigned char __this_byte
- = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
- if ( __this_byte )
- return __j*CHAR_BIT + _Bs_G::_S_first_one(__this_byte);
-
- __thisword >>= CHAR_BIT;
- }
- }
-
- // not found, so return a value that indicates failure.
- return __not_found;
-} // end _M_do_find_next
-
-
-// ------------------------------------------------------------
-// Helper class to zero out the unused high-order bits in the highest word.
-
-template <size_t _Extrabits> struct _Sanitize {
- static void _STLP_CALL _M_do_sanitize(unsigned long& __val)
- { __val &= ~((~__STATIC_CAST(unsigned long,0)) << _Extrabits); }
-};
-
-_STLP_TEMPLATE_NULL struct _Sanitize<0UL> {
- static void _STLP_CALL _M_do_sanitize(unsigned long) {}
-};
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-// ------------------------------------------------------------
-// Class bitset.
-// _Nb may be any nonzero number of type size_t.
-template<size_t _Nb>
-class bitset : public _STLP_PRIV _Base_bitset<__BITSET_WORDS(_Nb) > {
-public:
- enum { _Words = __BITSET_WORDS(_Nb) } ;
-
-private:
- typedef _STLP_PRIV _Base_bitset< _Words > _Base;
-
- void _M_do_sanitize() {
- _STLP_PRIV _Sanitize<_Nb%__BITS_PER_WORD >::_M_do_sanitize(this->_M_hiword());
- }
-public:
- typedef unsigned long _WordT;
- struct reference;
- friend struct reference;
-
- // bit reference:
- struct reference {
- typedef _STLP_PRIV _Base_bitset<_Words > _Bitset_base;
- typedef bitset<_Nb> _Bitset;
- // friend _Bitset;
- _WordT *_M_wp;
- size_t _M_bpos;
-
- // should be left undefined
- reference() {}
-
- reference( _Bitset& __b, size_t __pos ) {
- _M_wp = &__b._M_getword(__pos);
- _M_bpos = _Bitset_base::_S_whichbit(__pos);
- }
-
- public:
- ~reference() {}
-
- // for b[i] = __x;
- reference& operator=(bool __x) {
- if ( __x )
- *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos);
- else
- *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos);
-
- return *this;
- }
-
- // for b[i] = b[__j];
- reference& operator=(const reference& __j) {
- if ( (*(__j._M_wp) & _Bitset_base::_S_maskbit(__j._M_bpos)) )
- *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos);
- else
- *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos);
-
- return *this;
- }
-
- // flips the bit
- bool operator~() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) == 0; }
-
- // for __x = b[i];
- operator bool() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) != 0; }
-
- // for b[i].flip();
- reference& flip() {
- *_M_wp ^= _Bitset_base::_S_maskbit(_M_bpos);
- return *this;
- }
- };
-
- // 23.3.5.1 constructors:
- bitset() {}
-
- bitset(unsigned long __val) : _STLP_PRIV _Base_bitset<_Words>(__val) { _M_do_sanitize(); }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
- template<class _CharT, class _Traits, class _Alloc>
- explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s,
- size_t __pos = 0)
- : _STLP_PRIV _Base_bitset<_Words >() {
- if (__pos > __s.size())
- __stl_throw_out_of_range("bitset");
- _M_copy_from_string(__s, __pos,
- basic_string<_CharT, _Traits, _Alloc>::npos);
- }
- template<class _CharT, class _Traits, class _Alloc>
- bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
- size_t __pos,
- size_t __n)
- : _STLP_PRIV _Base_bitset<_Words >() {
- if (__pos > __s.size())
- __stl_throw_out_of_range("bitset");
- _M_copy_from_string(__s, __pos, __n);
- }
-#else /* _STLP_MEMBER_TEMPLATES */
- explicit bitset(const string& __s,
- size_t __pos = 0,
- size_t __n = (size_t)-1)
- : _STLP_PRIV _Base_bitset<_Words >() {
- if (__pos > __s.size())
- __stl_throw_out_of_range("bitset");
- _M_copy_from_string(__s, __pos, __n);
- }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
- // 23.3.5.2 bitset operations:
- bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) {
- this->_M_do_and(__rhs);
- return *this;
- }
-
- bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) {
- this->_M_do_or(__rhs);
- return *this;
- }
-
- bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) {
- this->_M_do_xor(__rhs);
- return *this;
- }
-
- bitset<_Nb>& operator<<=(size_t __pos) {
- this->_M_do_left_shift(__pos);
- this->_M_do_sanitize();
- return *this;
- }
-
- bitset<_Nb>& operator>>=(size_t __pos) {
- this->_M_do_right_shift(__pos);
- this->_M_do_sanitize();
- return *this;
- }
-
- //
- // Extension:
- // Versions of single-bit set, reset, flip, test with no range checking.
- //
-
- bitset<_Nb>& _Unchecked_set(size_t __pos) {
- this->_M_getword(__pos) |= _STLP_PRIV _Base_bitset<_Words > ::_S_maskbit(__pos);
- return *this;
- }
-
- bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) {
- if (__val)
- this->_M_getword(__pos) |= this->_S_maskbit(__pos);
- else
- this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos);
-
- return *this;
- }
-
- bitset<_Nb>& _Unchecked_reset(size_t __pos) {
- this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos);
- return *this;
- }
-
- bitset<_Nb>& _Unchecked_flip(size_t __pos) {
- this->_M_getword(__pos) ^= this->_S_maskbit(__pos);
- return *this;
- }
-
- bool _Unchecked_test(size_t __pos) const {
- return (this->_M_getword(__pos) & this->_S_maskbit(__pos)) != __STATIC_CAST(_WordT,0);
- }
-
- // Set, reset, and flip.
-
- bitset<_Nb>& set() {
- this->_M_do_set();
- this->_M_do_sanitize();
- return *this;
- }
-
- bitset<_Nb>& set(size_t __pos) {
- if (__pos >= _Nb)
- __stl_throw_out_of_range("bitset");
- return _Unchecked_set(__pos);
- }
-
- bitset<_Nb>& set(size_t __pos, int __val) {
- if (__pos >= _Nb)
- __stl_throw_out_of_range("bitset");
- return _Unchecked_set(__pos, __val);
- }
-
- bitset<_Nb>& reset() {
- this->_M_do_reset();
- return *this;
- }
-
- bitset<_Nb>& reset(size_t __pos) {
- if (__pos >= _Nb)
- __stl_throw_out_of_range("bitset");
-
- return _Unchecked_reset(__pos);
- }
-
- bitset<_Nb>& flip() {
- this->_M_do_flip();
- this->_M_do_sanitize();
- return *this;
- }
-
- bitset<_Nb>& flip(size_t __pos) {
- if (__pos >= _Nb)
- __stl_throw_out_of_range("bitset");
-
- return _Unchecked_flip(__pos);
- }
-
- bitset<_Nb> operator~() const {
- return bitset<_Nb>(*this).flip();
- }
-
- // element access:
- //for b[i];
- reference operator[](size_t __pos) { return reference(*this,__pos); }
- bool operator[](size_t __pos) const { return _Unchecked_test(__pos); }
-
- unsigned long to_ulong() const { return this->_M_do_to_ulong(); }
-
-#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
- template <class _CharT, class _Traits, class _Alloc>
- basic_string<_CharT, _Traits, _Alloc> to_string() const {
- basic_string<_CharT, _Traits, _Alloc> __result;
- _M_copy_to_string(__result);
- return __result;
- }
-#else
- string to_string() const {
- string __result;
- _M_copy_to_string(__result);
- return __result;
- }
-#endif /* _STLP_EXPLICIT_FUNCTION_TMPL_ARGS */
-
- size_t count() const { return this->_M_do_count(); }
-
- size_t size() const { return _Nb; }
-
- bool operator==(const bitset<_Nb>& __rhs) const {
- return this->_M_is_equal(__rhs);
- }
- bool operator!=(const bitset<_Nb>& __rhs) const {
- return !this->_M_is_equal(__rhs);
- }
-
- bool test(size_t __pos) const {
- if (__pos >= _Nb)
- __stl_throw_out_of_range("bitset");
-
- return _Unchecked_test(__pos);
- }
-
- bool any() const { return this->_M_is_any(); }
- bool none() const { return !this->_M_is_any(); }
-
- bitset<_Nb> operator<<(size_t __pos) const {
- bitset<_Nb> __result(*this);
- __result <<= __pos ; return __result;
- }
- bitset<_Nb> operator>>(size_t __pos) const {
- bitset<_Nb> __result(*this);
- __result >>= __pos ; return __result;
- }
-
-#if !defined (_STLP_NO_EXTENSIONS)
- //
- // EXTENSIONS: bit-find operations. These operations are
- // experimental, and are subject to change or removal in future
- // versions.
- //
-
- // find the index of the first "on" bit
- size_t _Find_first() const
- { return this->_M_do_find_first(_Nb); }
-
- // find the index of the next "on" bit after prev
- size_t _Find_next( size_t __prev ) const
- { return this->_M_do_find_next(__prev, _Nb); }
-#endif
-
-//
-// Definitions of should-be non-inline member functions.
-//
-#if defined (_STLP_MEMBER_TEMPLATES)
- template<class _CharT, class _Traits, class _Alloc>
- void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s,
- size_t __pos, size_t __n) {
-#else
- void _M_copy_from_string(const string& __s,
- size_t __pos, size_t __n) {
- typedef typename string::traits_type _Traits;
-#endif
- reset();
- size_t __tmp = _Nb;
- const size_t __Nbits = (min) (__tmp, (min) (__n, __s.size() - __pos));
- for ( size_t __i= 0; __i < __Nbits; ++__i) {
- typename _Traits::int_type __k = _Traits::to_int_type(__s[__pos + __Nbits - __i - 1]);
- // boris : widen() ?
- if (__k == '1')
- set(__i);
- else if (__k != '0')
- __stl_throw_invalid_argument("bitset");
- }
- }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
- template <class _CharT, class _Traits, class _Alloc>
- void _M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const
-#else
- void _M_copy_to_string(string& __s) const
-#endif
- {
- __s.assign(_Nb, '0');
-
- for (size_t __i = 0; __i < _Nb; ++__i) {
- if (_Unchecked_test(__i))
- __s[_Nb - 1 - __i] = '1';
- }
- }
-
-#if !defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_WCHAR_T)
- void _M_copy_to_string(wstring& __s) const {
- __s.assign(_Nb, '0');
-
- for (size_t __i = 0; __i < _Nb; ++__i) {
- if (_Unchecked_test(__i))
- __s[_Nb - 1 - __i] = '1';
- }
- }
-#endif
-
-#if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
- bitset<_Nb> operator&(const bitset<_Nb>& __y) const {
- bitset<_Nb> __result(*this);
- __result &= __y;
- return __result;
- }
- bitset<_Nb> operator|(const bitset<_Nb>& __y) const {
- bitset<_Nb> __result(*this);
- __result |= __y;
- return __result;
- }
- bitset<_Nb> operator^(const bitset<_Nb>& __y) const {
- bitset<_Nb> __result(*this);
- __result ^= __y;
- return __result;
- }
-#endif
-};
-
-// ------------------------------------------------------------
-//
-// 23.3.5.3 bitset operations:
-//
-#if ! defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
-template <size_t _Nb>
-inline bitset<_Nb> _STLP_CALL
-operator&(const bitset<_Nb>& __x,
- const bitset<_Nb>& __y) {
- bitset<_Nb> __result(__x);
- __result &= __y;
- return __result;
-}
-
-
-template <size_t _Nb>
-inline bitset<_Nb> _STLP_CALL
-operator|(const bitset<_Nb>& __x,
- const bitset<_Nb>& __y) {
- bitset<_Nb> __result(__x);
- __result |= __y;
- return __result;
-}
-
-template <size_t _Nb>
-inline bitset<_Nb> _STLP_CALL
-operator^(const bitset<_Nb>& __x,
- const bitset<_Nb>& __y) {
- bitset<_Nb> __result(__x);
- __result ^= __y;
- return __result;
-}
-
-#if !defined (_STLP_USE_NO_IOSTREAMS)
-
-_STLP_END_NAMESPACE
-
-# if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1300)) && \
- !(defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x500))
-
-#ifndef _STLP_INTERNAL_IOSFWD
-# include <stl/_iosfwd.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_istream<_CharT, _Traits>& _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x);
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x);
-
-# else
-
-#ifndef _STLP_STRING_IO_H
-# include <stl/_string_io.h> //includes _istream.h and _ostream.h
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <size_t _Nb>
-istream& _STLP_CALL
-operator>>(istream& __is, bitset<_Nb>& __x) {
- typedef typename string::traits_type _Traits;
- string __tmp;
- __tmp.reserve(_Nb);
-
- // Skip whitespace
- typename istream::sentry __sentry(__is);
- if (__sentry) {
- streambuf* __buf = __is.rdbuf();
- for (size_t __i = 0; __i < _Nb; ++__i) {
- static typename _Traits::int_type __eof = _Traits::eof();
-
- typename _Traits::int_type __c1 = __buf->sbumpc();
- if (_Traits::eq_int_type(__c1, __eof)) {
- __is.setstate(ios_base::eofbit);
- break;
- }
- else {
- typename _Traits::char_type __c2 = _Traits::to_char_type(__c1);
- char __c = __is.narrow(__c2, '*');
-
- if (__c == '0' || __c == '1')
- __tmp.push_back(__c);
- else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
- __is.setstate(ios_base::failbit);
- break;
- }
- }
- }
-
- if (__tmp.empty())
- __is.setstate(ios_base::failbit);
- else
- __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb);
- }
-
- return __is;
-}
-
-template <size_t _Nb>
-ostream& _STLP_CALL
-operator<<(ostream& __os, const bitset<_Nb>& __x) {
- string __tmp;
- __x._M_copy_to_string(__tmp);
- return __os << __tmp;
-}
-
-# if !defined (_STLP_NO_WCHAR_T)
-
-template <size_t _Nb>
-wistream& _STLP_CALL
-operator>>(wistream& __is, bitset<_Nb>& __x) {
- typedef typename wstring::traits_type _Traits;
- wstring __tmp;
- __tmp.reserve(_Nb);
-
- // Skip whitespace
- typename wistream::sentry __sentry(__is);
- if (__sentry) {
- wstreambuf* __buf = __is.rdbuf();
- for (size_t __i = 0; __i < _Nb; ++__i) {
- static typename _Traits::int_type __eof = _Traits::eof();
-
- typename _Traits::int_type __c1 = __buf->sbumpc();
- if (_Traits::eq_int_type(__c1, __eof)) {
- __is.setstate(ios_base::eofbit);
- break;
- }
- else {
- typename _Traits::char_type __c2 = _Traits::to_char_type(__c1);
- char __c = __is.narrow(__c2, '*');
-
- if (__c == '0' || __c == '1')
- __tmp.push_back(__c);
- else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
- __is.setstate(ios_base::failbit);
- break;
- }
- }
- }
-
- if (__tmp.empty())
- __is.setstate(ios_base::failbit);
- else
- __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb);
- }
-
- return __is;
-}
-
-template <size_t _Nb>
-wostream& _STLP_CALL
-operator<<(wostream& __os, const bitset<_Nb>& __x) {
- wstring __tmp;
- __x._M_copy_to_string(__tmp);
- return __os << __tmp;
-}
-
-# endif /* _STLP_NO_WCHAR_T */
-# endif
-#endif
-
-#endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
-
-#undef bitset
-
-_STLP_END_NAMESPACE
-
-#undef __BITS_PER_WORD
-#undef __BITSET_WORDS
-
-#if !defined (_STLP_LINK_TIME_INSTANTIATION)
-# include <stl/_bitset.c>
-#endif
-
-#endif /* _STLP_BITSET_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_bvector.h b/stlport/stlport/stl/_bvector.h
deleted file mode 100644
index bf417f1..0000000
--- a/stlport/stlport/stl/_bvector.h
+++ /dev/null
@@ -1,841 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_BVECTOR_H
-#define _STLP_INTERNAL_BVECTOR_H
-
-#ifndef _STLP_INTERNAL_VECTOR_H
-# include <stl/_vector.h>
-#endif
-
-#define _STLP_WORD_BIT (int(CHAR_BIT * sizeof(unsigned int)))
-
-_STLP_BEGIN_NAMESPACE
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-struct _Bit_reference {
- unsigned int* _M_p;
- unsigned int _M_mask;
- _Bit_reference(unsigned int* __x, unsigned int __y)
- : _M_p(__x), _M_mask(__y) {}
-
-public:
- _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);
- }
-
- _Bit_reference& operator |= (bool __x) {
- if (__x)
- *_M_p |= _M_mask;
- return *this;
- }
- _Bit_reference& operator &= (bool __x) {
- if (!__x)
- *_M_p &= ~_M_mask;
- return *this;
- }
- void flip() { *_M_p ^= _M_mask; }
-};
-
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-inline void swap(_STLP_PRIV _Bit_reference& __x, _STLP_PRIV _Bit_reference& __y) {
- bool __tmp = (bool)__x;
- __x = __y;
- __y = __tmp;
-}
-
-// Might not be very useful but costs nothing!
-_STLP_TEMPLATE_NULL
-struct __type_traits<_STLP_PRIV _Bit_reference> {
- typedef __false_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __false_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __false_type is_POD_type;
-};
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-struct _Bit_iterator_base {
- typedef ptrdiff_t difference_type;
-
- unsigned int* _M_p;
- unsigned int _M_offset;
-
- void _M_bump_up() {
- if (_M_offset++ == _STLP_WORD_BIT - 1) {
- _M_offset = 0;
- ++_M_p;
- }
- }
-
- void _M_bump_down() {
- if (_M_offset-- == 0) {
- _M_offset = _STLP_WORD_BIT - 1;
- --_M_p;
- }
- }
-
- _Bit_iterator_base() : _M_p(0), _M_offset(0) {}
- _Bit_iterator_base(unsigned int* __x, unsigned int __y) : _M_p(__x), _M_offset(__y) {}
-// see comment in doc/README.evc4 and doc/README.evc8
-#if defined(_MSC_VER) && _MSC_VER<=1401 && defined(MIPS) && defined(NDEBUG)
- _Bit_iterator_base( const _Bit_iterator_base& __x) : _M_p(__x._M_p), _M_offset(__x._M_offset) {}
-#endif
- // _Bit_iterator_base& operator = ( const _Bit_iterator_base& __x) { _M_p = __x._M_p ; _M_offset = __x._M_offset ; return *this; }
-
- void _M_advance (difference_type __i) {
- difference_type __n = __i + _M_offset;
- _M_p += __n / _STLP_WORD_BIT;
- __n = __n % _STLP_WORD_BIT;
- if (__n < 0) {
- _M_offset = (unsigned int) __n + _STLP_WORD_BIT;
- --_M_p;
- } else
- _M_offset = (unsigned int) __n;
- }
-
- difference_type _M_subtract(const _Bit_iterator_base& __x) const {
- return _STLP_WORD_BIT * (_M_p - __x._M_p) + _M_offset - __x._M_offset;
- }
-};
-
-inline bool _STLP_CALL operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
- return __y._M_p == __x._M_p && __y._M_offset == __x._M_offset;
-}
-inline bool _STLP_CALL operator!=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
- return __y._M_p != __x._M_p || __y._M_offset != __x._M_offset;
-}
-
-inline bool _STLP_CALL operator<(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
- return __x._M_p < __y._M_p || (__x._M_p == __y._M_p && __x._M_offset < __y._M_offset);
-}
-
-inline bool _STLP_CALL operator>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
- return operator <(__y , __x);
-}
-inline bool _STLP_CALL operator<=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
- return !(__y < __x);
-}
-inline bool _STLP_CALL operator>=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
- return !(__x < __y);
-}
-
-template <class _Ref, class _Ptr>
-struct _Bit_iter : public _Bit_iterator_base {
- typedef _Ref reference;
- typedef _Ptr pointer;
- typedef _Bit_iter<_Ref, _Ptr> _Self;
- typedef random_access_iterator_tag iterator_category;
- typedef bool value_type;
- typedef ptrdiff_t difference_type;
- typedef size_t size_type;
-
- _Bit_iter(unsigned int* __x, unsigned int __y) : _Bit_iterator_base(__x, __y) {}
- _Bit_iter() {}
-
- _Bit_iter(const _Bit_iter<_Bit_reference, _Bit_reference*>& __x):
- _Bit_iterator_base((const _Bit_iterator_base&)__x) {}
-
- // _Self& operator = (const _Bit_iter<_Bit_reference, _Bit_reference*>& __x)
- // { (_Bit_iterator_base&)*this = (const _Bit_iterator_base&)__x; return *this; }
-
- reference operator*() const {
- return _Bit_reference(_M_p, 1UL << _M_offset);
- }
- _Self& operator++() {
- _M_bump_up();
- return *this;
- }
- _Self operator++(int) {
- _Self __tmp = *this;
- _M_bump_up();
- return __tmp;
- }
- _Self& operator--() {
- _M_bump_down();
- return *this;
- }
- _Self operator--(int) {
- _Self __tmp = *this;
- _M_bump_down();
- return __tmp;
- }
- _Self& operator+=(difference_type __i) {
- _M_advance(__i);
- return *this;
- }
- _Self& operator-=(difference_type __i) {
- *this += -__i;
- return *this;
- }
- _Self operator+(difference_type __i) const {
- _Self __tmp = *this;
- return __tmp += __i;
- }
- _Self operator-(difference_type __i) const {
- _Self __tmp = *this;
- return __tmp -= __i;
- }
- difference_type operator-(const _Self& __x) const {
- return _M_subtract(__x);
- }
- reference operator[](difference_type __i) { return *(*this + __i); }
-};
-
-template <class _Ref, class _Ptr>
-inline _Bit_iter<_Ref,_Ptr> _STLP_CALL
-operator+(ptrdiff_t __n, const _Bit_iter<_Ref, _Ptr>& __x) {
- return __x + __n;
-}
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-template <class _Ref, class _Ptr>
-struct __type_traits< _STLP_PRIV _Bit_iter<_Ref, _Ptr> > {
- typedef __false_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __false_type is_POD_type;
-};
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
-inline random_access_iterator_tag iterator_category(const _STLP_PRIV _Bit_iterator_base&)
-{ return random_access_iterator_tag(); }
-inline ptrdiff_t* distance_type(const _STLP_PRIV _Bit_iterator_base&)
-{ return (ptrdiff_t*)0; }
-inline bool* value_type(const _STLP_PRIV _Bit_iter<_STLP_PRIV _Bit_reference, _STLP_PRIV _Bit_reference*>&)
-{ return (bool*)0; }
-inline bool* value_type(const _STLP_PRIV _Bit_iter<bool, const bool*>&)
-{ return (bool*)0; }
-#endif
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-typedef _Bit_iter<bool, const bool*> _Bit_const_iterator;
-typedef _Bit_iter<_Bit_reference, _Bit_reference*> _Bit_iterator;
-
-// Bit-vector base class, which encapsulates the difference between
-// old SGI-style allocators and standard-conforming allocators.
-template <class _Alloc>
-class _Bvector_base {
- typedef _Bvector_base<_Alloc> _Self;
-public:
- _STLP_FORCE_ALLOCATORS(bool, _Alloc)
- typedef _Alloc allocator_type;
- typedef unsigned int __chunk_type;
- typedef typename _Alloc_traits<__chunk_type, _Alloc>::allocator_type __chunk_allocator_type;
- allocator_type get_allocator() const
- { return _STLP_CONVERT_ALLOCATOR(__STATIC_CAST(const __chunk_allocator_type&, _M_end_of_storage), bool); }
-
- _Bvector_base(const allocator_type& __a)
- : _M_start(), _M_finish(), _M_end_of_storage(_STLP_CONVERT_ALLOCATOR(__a, __chunk_type),
- (__chunk_type*)0)
- {}
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- _Bvector_base(__move_source<_Self> src)
- : _M_start(src.get()._M_start), _M_finish(src.get()._M_finish),
- _M_end_of_storage(src.get()._M_end_of_storage) {
- //Make the source destroyable
- src.get()._M_start._M_p = 0;
- }
-#endif
-
- ~_Bvector_base() {
- _M_deallocate();
- }
-
-protected:
-
- static size_t _M_bits_to_chunks(size_t __n_bits)
- { return (__n_bits + _STLP_WORD_BIT - 1) / _STLP_WORD_BIT; }
-
- __chunk_type* _M_bit_alloc(size_t __n)
- { return _M_end_of_storage.allocate(_M_bits_to_chunks(__n)); }
-
- void _M_deallocate() {
- if (_M_start._M_p)
- _M_end_of_storage.deallocate(_M_start._M_p,
- _M_end_of_storage._M_data - _M_start._M_p);
- }
-
- _Bit_iterator _M_start;
- _Bit_iterator _M_finish;
- _STLP_alloc_proxy<__chunk_type*, __chunk_type, __chunk_allocator_type> _M_end_of_storage;
-};
-
-
-// The next few lines are confusing. What we're doing is declaring a
-// partial specialization of vector<T, Alloc> if we have the necessary
-// compiler support. Otherwise, we define a class bit_vector which uses
-// the default allocator.
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_BOOL) && !defined (__SUNPRO_CC)
-# define _STLP_VECBOOL_TEMPLATE
-# define __BVEC_TMPL_HEADER template <class _Alloc>
-#else
-# undef _STLP_VECBOOL_TEMPLATE
-# ifdef _STLP_NO_BOOL
-# define __BVEC_TMPL_HEADER
-# else
-# define __BVEC_TMPL_HEADER _STLP_TEMPLATE_NULL
-# endif
-# define _Alloc allocator<bool>
-#endif
-
-#if defined (_STLP_DEBUG)
-# define vector _STLP_NON_DBG_NAME(vector)
-#endif
-
-#ifdef _STLP_NO_BOOL
-# define __BVECTOR_QUALIFIED bit_vector
-# define __BVECTOR bit_vector
-#else
-# ifdef _STLP_VECBOOL_TEMPLATE
-# define __BVECTOR_QUALIFIED vector<bool, _Alloc>
-# else
-# define __BVECTOR_QUALIFIED vector<bool, allocator<bool> >
-# endif
-# if defined (_STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS)
-# define __BVECTOR __BVECTOR_QUALIFIED
-# else
-# define __BVECTOR vector
-# endif
-#endif
-
-#if !defined (_STLP_DEBUG) || defined (_STLP_NO_BOOL)
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif
-
-__BVEC_TMPL_HEADER
-class __BVECTOR_QUALIFIED : public _STLP_PRIV _Bvector_base<_Alloc >
-#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_DEBUG)
- , public __stlport_class< __BVECTOR_QUALIFIED >
-#endif
-{
- typedef _STLP_PRIV _Bvector_base<_Alloc > _Base;
- typedef __BVECTOR_QUALIFIED _Self;
-public:
- typedef bool value_type;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef _STLP_PRIV _Bit_reference reference;
- typedef bool const_reference;
- typedef _STLP_PRIV _Bit_reference* pointer;
- typedef const bool* const_pointer;
- typedef random_access_iterator_tag _Iterator_category;
-
- typedef _STLP_PRIV _Bit_iterator iterator;
- typedef _STLP_PRIV _Bit_const_iterator const_iterator;
-
- _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-
-#ifdef _STLP_VECBOOL_TEMPLATE
- typedef _STLP_TYPENAME _STLP_PRIV _Bvector_base<_Alloc >::allocator_type allocator_type;
- typedef _STLP_TYPENAME _STLP_PRIV _Bvector_base<_Alloc >::__chunk_type __chunk_type;
-#else
- typedef _STLP_PRIV _Bvector_base<_Alloc >::allocator_type allocator_type;
- typedef _STLP_PRIV _Bvector_base<_Alloc >::__chunk_type __chunk_type;
-#endif
-
-protected:
-
- void _M_initialize(size_type __n) {
- __chunk_type* __q = this->_M_bit_alloc(__n);
- this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__n);
- this->_M_start = iterator(__q, 0);
- this->_M_finish = this->_M_start + difference_type(__n);
- }
- void _M_insert_aux(iterator __position, bool __x) {
- if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
- _STLP_PRIV __copy_backward(__position, this->_M_finish, this->_M_finish + 1,
- random_access_iterator_tag(), (difference_type*)0 );
- *__position = __x;
- ++this->_M_finish;
- }
- else {
- size_type __len = size() ? 2 * size() : _STLP_WORD_BIT;
- __chunk_type* __q = this->_M_bit_alloc(__len);
- iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
- *__i++ = __x;
- this->_M_finish = _STLP_STD::copy(__position, end(), __i);
- this->_M_deallocate();
- this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
- this->_M_start = iterator(__q, 0);
- }
- }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
- template <class _InputIterator>
- void _M_initialize_range(_InputIterator __first, _InputIterator __last,
- const input_iterator_tag &) {
- this->_M_start = iterator();
- this->_M_finish = iterator();
- this->_M_end_of_storage._M_data = 0;
- for ( ; __first != __last; ++__first)
- push_back(*__first);
- }
-
- template <class _ForwardIterator>
- void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
- const forward_iterator_tag &) {
- size_type __n = _STLP_STD::distance(__first, __last);
- _M_initialize(__n);
- _STLP_STD::copy(__first, __last, this->_M_start);
- }
-
- template <class _InputIterator>
- void _M_insert_range(iterator __pos,
- _InputIterator __first, _InputIterator __last,
- const input_iterator_tag &) {
- for ( ; __first != __last; ++__first) {
- __pos = insert(__pos, *__first);
- ++__pos;
- }
- }
-
- template <class _ForwardIterator>
- void _M_insert_range(iterator __position,
- _ForwardIterator __first, _ForwardIterator __last,
- const forward_iterator_tag &) {
- if (__first != __last) {
- size_type __n = _STLP_STD::distance(__first, __last);
- if (capacity() - size() >= __n) {
- _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + difference_type(__n),
- random_access_iterator_tag(), (difference_type*)0 );
- _STLP_STD::copy(__first, __last, __position);
- this->_M_finish += difference_type(__n);
- }
- else {
- size_type __len = size() + (max)(size(), __n);
- __chunk_type* __q = this->_M_bit_alloc(__len);
- iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
- __i = _STLP_STD::copy(__first, __last, __i);
- this->_M_finish = _STLP_STD::copy(__position, end(), __i);
- this->_M_deallocate();
- this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
- this->_M_start = iterator(__q, 0);
- }
- }
- }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:
- iterator begin() { return this->_M_start; }
- const_iterator begin() const { return this->_M_start; }
- iterator end() { return this->_M_finish; }
- const_iterator end() const { return this->_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());
- }
-
- size_type size() const { return size_type(end() - begin()); }
- size_type max_size() const { return size_type(-1); }
- size_type capacity() const {
- return size_type(const_iterator(this->_M_end_of_storage._M_data, 0) - begin());
- }
- bool empty() const { return begin() == end(); }
- reference operator[](size_type __n)
- { return *(begin() + difference_type(__n)); }
- const_reference operator[](size_type __n) const
- { return *(begin() + difference_type(__n)); }
-
- void _M_range_check(size_type __n) const {
- if (__n >= this->size())
- __stl_throw_range_error("vector<bool>");
- }
-
- 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]; }
-
- explicit __BVECTOR(const allocator_type& __a = allocator_type())
- : _STLP_PRIV _Bvector_base<_Alloc >(__a) {}
-
- __BVECTOR(size_type __n, bool __val,
- const allocator_type& __a = allocator_type())
- : _STLP_PRIV _Bvector_base<_Alloc >(__a) {
- _M_initialize(__n);
- fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __val ? ~0 : 0);
- }
-
- explicit __BVECTOR(size_type __n)
- : _STLP_PRIV _Bvector_base<_Alloc >(allocator_type()) {
- _M_initialize(__n);
- fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), 0);
- }
-
- __BVECTOR(const _Self& __x)
- : _STLP_PRIV _Bvector_base<_Alloc >(__x.get_allocator()) {
- _M_initialize(__x.size());
- _STLP_STD::copy(__x.begin(), __x.end(), this->_M_start);
- }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
- template <class _Integer>
- void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) {
- _M_initialize(__n);
- fill(this->_M_start._M_p, this->_M_end_of_storage._M_data, __x ? ~0 : 0);
- }
-
- template <class _InputIterator>
- void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
- const __false_type&) {
- _M_initialize_range(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
- }
-# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
- // Check whether it's an integral type. If so, it's not an iterator.
- template <class _InputIterator>
- __BVECTOR(_InputIterator __first, _InputIterator __last)
- : _STLP_PRIV _Bvector_base<_Alloc >(allocator_type()) {
- typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
- _M_initialize_dispatch(__first, __last, _Integral());
- }
-# endif
- template <class _InputIterator>
- __BVECTOR(_InputIterator __first, _InputIterator __last,
- const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
- : _STLP_PRIV _Bvector_base<_Alloc >(__a) {
- typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
- _M_initialize_dispatch(__first, __last, _Integral());
- }
-#else /* _STLP_MEMBER_TEMPLATES */
- __BVECTOR(const_iterator __first, const_iterator __last,
- const allocator_type& __a = allocator_type())
- : _STLP_PRIV _Bvector_base<_Alloc >(__a) {
- size_type __n = _STLP_STD::distance(__first, __last);
- _M_initialize(__n);
- _STLP_STD::copy(__first, __last, this->_M_start);
- }
- __BVECTOR(const bool* __first, const bool* __last,
- const allocator_type& __a = allocator_type())
- : _STLP_PRIV _Bvector_base<_Alloc >(__a) {
- size_type __n = _STLP_STD::distance(__first, __last);
- _M_initialize(__n);
- _STLP_STD::copy(__first, __last, this->_M_start);
- }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- __BVECTOR(__move_source<_Self> src)
- : _STLP_PRIV _Bvector_base<_Alloc >(__move_source<_Base>(src.get())) {}
-#endif
-
- ~__BVECTOR() {}
-
- __BVECTOR_QUALIFIED& operator=(const __BVECTOR_QUALIFIED& __x) {
- if (&__x == this) return *this;
- if (__x.size() > capacity()) {
- this->_M_deallocate();
- _M_initialize(__x.size());
- }
- _STLP_STD::copy(__x.begin(), __x.end(), begin());
- this->_M_finish = begin() + difference_type(__x.size());
- return *this;
- }
-
- // 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 _M_fill_assign(size_t __n, bool __x) {
- if (__n > size()) {
- fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
- insert(end(), __n - size(), __x);
- }
- else {
- erase(begin() + __n, end());
- fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
- }
- }
- void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
- template <class _InputIterator>
- void assign(_InputIterator __first, _InputIterator __last) {
- typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
- _M_assign_dispatch(__first, __last, _Integral());
- }
-
- template <class _Integer>
- void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&)
- { _M_fill_assign((size_t) __n, (bool) __val); }
-
- template <class _InputIter>
- void _M_assign_dispatch(_InputIter __first, _InputIter __last, const __false_type&)
- { _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); }
-
- template <class _InputIterator>
- void _M_assign_aux(_InputIterator __first, _InputIterator __last,
- const input_iterator_tag &) {
- iterator __cur = begin();
- for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
- *__cur = *__first;
- if (__first == __last)
- erase(__cur, end());
- else
- insert(end(), __first, __last);
- }
-
- template <class _ForwardIterator>
- void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
- const forward_iterator_tag &) {
- size_type __len = _STLP_STD::distance(__first, __last);
- if (__len < size())
- erase(_STLP_STD::copy(__first, __last, begin()), end());
- else {
- _ForwardIterator __mid = __first;
- _STLP_STD::advance(__mid, size());
- _STLP_STD::copy(__first, __mid, begin());
- insert(end(), __mid, __last);
- }
- }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
- void reserve(size_type __n) {
- if (capacity() < __n) {
- if (max_size() < __n)
- __stl_throw_length_error("vector<bool>");
- __chunk_type* __q = this->_M_bit_alloc(__n);
- _STLP_PRIV _Bit_iterator __z(__q, 0);
- this->_M_finish = _STLP_STD::copy(begin(), end(), __z);
- this->_M_deallocate();
- this->_M_start = iterator(__q, 0);
- this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__n);
- }
- }
-
- reference front() { return *begin(); }
- const_reference front() const { return *begin(); }
- reference back() { return *(end() - 1); }
- const_reference back() const { return *(end() - 1); }
- void push_back(bool __x) {
- if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
- *(this->_M_finish) = __x;
- ++this->_M_finish;
- }
- else
- _M_insert_aux(end(), __x);
- }
- void swap(__BVECTOR_QUALIFIED& __x) {
- _STLP_STD::swap(this->_M_start, __x._M_start);
- _STLP_STD::swap(this->_M_finish, __x._M_finish);
- this->_M_end_of_storage.swap(__x._M_end_of_storage);
- }
-#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
- void _M_swap_workaround(__BVECTOR_QUALIFIED& __x) { swap(__x); }
-#endif
-
- iterator insert(iterator __position, bool __x = bool()) {
- difference_type __n = __position - begin();
- if (this->_M_finish._M_p != this->_M_end_of_storage._M_data && __position == end()) {
- *(this->_M_finish) = __x;
- ++this->_M_finish;
- }
- else
- _M_insert_aux(__position, __x);
- return begin() + __n;
- }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
-
- template <class _Integer>
- void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
- const __true_type&) {
- _M_fill_insert(__pos, (size_type) __n, (bool) __x);
- }
-
- template <class _InputIterator>
- void _M_insert_dispatch(iterator __pos,
- _InputIterator __first, _InputIterator __last,
- const __false_type&) {
- _M_insert_range(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
- }
-
- // Check whether it's an integral type. If so, it's not an iterator.
- template <class _InputIterator>
- void insert(iterator __position,
- _InputIterator __first, _InputIterator __last) {
- typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
- _M_insert_dispatch(__position, __first, __last, _Integral());
- }
-#else /* _STLP_MEMBER_TEMPLATES */
- void insert(iterator __position,
- const_iterator __first, const_iterator __last) {
- if (__first == __last) return;
- size_type __n = _STLP_STD::distance(__first, __last);
- if (capacity() - size() >= __n) {
- _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + __n,
- random_access_iterator_tag(), (difference_type*)0 );
- _STLP_STD::copy(__first, __last, __position);
- this->_M_finish += __n;
- }
- else {
- size_type __len = size() + (max)(size(), __n);
- __chunk_type* __q = this->_M_bit_alloc(__len);
- iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
- __i = _STLP_STD::copy(__first, __last, __i);
- this->_M_finish = _STLP_STD::copy(__position, end(), __i);
- this->_M_deallocate();
- this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
- this->_M_start = iterator(__q, 0);
- }
- }
-
- void insert(iterator __position, const bool* __first, const bool* __last) {
- if (__first == __last) return;
- size_type __n = _STLP_STD::distance(__first, __last);
- if (capacity() - size() >= __n) {
- _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + __n,
- random_access_iterator_tag(), (difference_type*)0 );
- _STLP_STD::copy(__first, __last, __position);
- this->_M_finish += __n;
- }
- else {
- size_type __len = size() + (max)(size(), __n);
- __chunk_type* __q = this->_M_bit_alloc(__len);
- iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
- __i = _STLP_STD::copy(__first, __last, __i);
- this->_M_finish = _STLP_STD::copy(__position, end(), __i);
- this->_M_deallocate();
- this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
- this->_M_start = iterator(__q, 0);
- }
- }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
- void _M_fill_insert(iterator __position, size_type __n, bool __x) {
- if (__n == 0) return;
- if (capacity() - size() >= __n) {
- _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + difference_type(__n),
- random_access_iterator_tag(), (difference_type*)0 );
- fill(__position, __position + difference_type(__n), __x);
- this->_M_finish += difference_type(__n);
- }
- else {
- size_type __len = size() + (max)(size(), __n);
- __chunk_type* __q = this->_M_bit_alloc(__len);
- iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
- fill_n(__i, __n, __x);
- this->_M_finish = _STLP_STD::copy(__position, end(), __i + difference_type(__n));
- this->_M_deallocate();
- this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
- this->_M_start = iterator(__q, 0);
- }
- }
-
- void insert(iterator __position, size_type __n, bool __x) {
- _M_fill_insert(__position, __n, __x);
- }
-
- void pop_back() {
- --this->_M_finish;
- }
- iterator erase(iterator __position) {
- if (__position + 1 != end())
- _STLP_STD::copy(__position + 1, end(), __position);
- --this->_M_finish;
- return __position;
- }
- iterator erase(iterator __first, iterator __last) {
- this->_M_finish = _STLP_STD::copy(__last, end(), __first);
- return __first;
- }
- void resize(size_type __new_size, bool __x = bool()) {
- if (__new_size < size())
- erase(begin() + difference_type(__new_size), end());
- else
- insert(end(), __new_size - size(), __x);
- }
- void flip() {
- for (__chunk_type* __p = this->_M_start._M_p; __p != this->_M_end_of_storage._M_data; ++__p)
- *__p = ~*__p;
- }
-
- void clear() { erase(begin(), end()); }
-};
-
-#if defined (_STLP_NO_BOOL) || defined (__HP_aCC) // fixed soon (03/17/2000)
-# define _STLP_TEMPLATE_HEADER __BVEC_TMPL_HEADER
-# define _STLP_TEMPLATE_CONTAINER __BVECTOR_QUALIFIED
-# include <stl/_relops_cont.h>
-# undef _STLP_TEMPLATE_CONTAINER
-# undef _STLP_TEMPLATE_HEADER
-#endif /* NO_BOOL */
-
-#if defined (_STLP_DEBUG) && !defined (_STLP_NO_BOOL)
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif
-
-_STLP_END_NAMESPACE
-
-#undef vector
-#undef _Alloc
-#undef _STLP_VECBOOL_TEMPLATE
-#undef __BVECTOR
-#undef __BVECTOR_QUALIFIED
-#undef __BVEC_TMPL_HEADER
-
-#undef _STLP_WORD_BIT
-
-#endif /* _STLP_INTERNAL_BVECTOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_carray.h b/stlport/stlport/stl/_carray.h
deleted file mode 100644
index 560bab2..0000000
--- a/stlport/stlport/stl/_carray.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005
- * Francois Dumont
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_CARRAY_H
-#define _STLP_CARRAY_H
-
-/* Purpose: Mimic a pur C array with the additionnal feature of
- * being able to be used with type not default constructible.
- */
-
-#ifndef _STLP_INTERNAL_CONSTRUCT_H
-# include <stl/_construct.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Tp, size_t _Nb>
-struct _CArray {
- _CArray (const _Tp& __val) {
- for (size_t __i = 0; __i < _Nb; ++__i) {
- _Copy_Construct(__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp)), __val);
- }
- }
-
- ~_CArray() {
- _Destroy_Range(__REINTERPRET_CAST(_Tp*, _M_data + 0),
- __REINTERPRET_CAST(_Tp*, _M_data + _Nb * sizeof(_Tp)));
- }
-
- _Tp& operator [] (size_t __i) {
- _STLP_ASSERT(__i < _Nb)
- return *__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp));
- }
-
-private:
- char _M_data[sizeof(_Tp) * _Nb];
-};
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-_STLP_END_NAMESPACE
-
-#endif //_STLP_CARRAY_H
diff --git a/stlport/stlport/stl/_cctype.h b/stlport/stlport/stl/_cctype.h
deleted file mode 100644
index cf82524..0000000
--- a/stlport/stlport/stl/_cctype.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_INTERNAL_CCTYPE
-#define _STLP_INTERNAL_CCTYPE
-
-#if defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cctype>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cctype)
-# endif
-#else
-# include <ctype.h>
-#endif /* _STLP_USE_NEW_C_HEADERS */
-
-#if ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-# if defined ( _STLP_IMPORT_VENDOR_CSTD )
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::isalnum;
-using _STLP_VENDOR_CSTD::isalpha;
-using _STLP_VENDOR_CSTD::iscntrl;
-using _STLP_VENDOR_CSTD::isdigit;
-using _STLP_VENDOR_CSTD::isgraph;
-using _STLP_VENDOR_CSTD::islower;
-using _STLP_VENDOR_CSTD::isprint;
-using _STLP_VENDOR_CSTD::ispunct;
-using _STLP_VENDOR_CSTD::isspace;
-using _STLP_VENDOR_CSTD::isupper;
-using _STLP_VENDOR_CSTD::isxdigit;
-using _STLP_VENDOR_CSTD::tolower;
-using _STLP_VENDOR_CSTD::toupper;
-_STLP_END_NAMESPACE
-# endif /* _STLP_IMPORT_VENDOR_CSTD*/
-#endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-
-#endif
diff --git a/stlport/stlport/stl/_cmath.h b/stlport/stlport/stl/_cmath.h
deleted file mode 100755
index 0afebea..0000000
--- a/stlport/stlport/stl/_cmath.h
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- * Copyright (c) 2010, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _STLP_INTERNAL_CMATH
-#define _STLP_INTERNAL_CMATH
-
-/* gcc do not like when a using directive appear after a function
- * declaration. cmath have abs overloads and cstdlib a using directive
- * so cstdlib has to be included first.
- */
-#if defined (__GNUC__) && defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstdlib>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
-# endif
-#endif
-
-#if defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_NO_NAMESPACES) && !defined (exception)
-# define exception __math_exception
-# endif
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cmath>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cmath)
-# endif
-# if defined (_STLP_HAS_NO_NAMESPACES)
-# undef exception
-# endif
-#else
-# include <math.h>
-#endif
-
-#if (defined (__SUNPRO_CC) && (__SUNPRO_CC > 0x500)) || \
- !(defined (__IBMCPP__) && (__IBMCPP__ >= 500) || !(defined(__HP_aCC) && (__HP_aCC >= 30000) ))
-# if !defined(_STLP_HAS_NO_NAMESPACES) && !defined(__SUNPRO_CC)
-// All the other hypot stuff is going to be at file scope, so follow along here.
-namespace std {
-# endif
-extern "C" double hypot(double x, double y);
-# if !defined(_STLP_HAS_NO_NAMESPACES) && !defined(__SUNPRO_CC)
-}
-# endif
-
-#endif
-
-#if defined (__sun) && defined (__GNUC__)
-extern "C" {
- float __cosf(float v);
- float __sinf(float v);
- float __atan2f(float, float);
- float __coshf(float v);
- float __sinhf(float v);
- float __sqrtf(float v);
- float __expf(float v);
- float __logf(float v);
- float __log10f(float v);
-
- long double __cosl(long double v);
- long double __sinl(long double v);
- long double __atan2l(long double, long double);
- long double __coshl(long double v);
- long double __sinhl(long double v);
- long double __sqrtl(long double v);
- long double __expl(long double v);
- long double __logl(long double v);
- long double __log10l(long double v);
-}
-
-extern "C" {
- inline float cosf(float v) { return __cosf(v); }
- inline float sinf(float v) { return __sinf(v); }
- inline float atan2f(float v1, float v2) { return __atan2f(v1,v2); }
- inline float coshf(float v) { return __coshf(v); }
- inline float sinhf(float v) { return __sinhf(v); }
- inline float sqrtf(float v) { return __sqrtf(v); }
- inline float expf(float v) { return __expf(v); }
- inline float logf(float v) { return __logf(v); }
- inline float log10f(float v) { return __log10f(v); }
-
- inline long double cosl(long double v) { return __cosl(v); }
- inline long double sinl(long double v) { return __sinl(v); }
- inline long double atan2l(long double v1, long double v2) { return __atan2l(v1,v2); }
- inline long double coshl(long double v) { return __coshl(v); }
- inline long double sinhl(long double v) { return __sinhl(v); }
- inline long double sqrtl(long double v) { return __sqrtl(v); }
- inline long double expl(long double v) { return __expl(v); }
- inline long double logl(long double v) { return __logl(v); }
- inline long double log10l(long double v) { return __log10l(v); }
-}
-#endif // __sun && __GNUC__
-
-#if defined (__sun)
-extern "C" {
-extern float __acosf(float);
-extern float __asinf(float);
-extern float __atanf(float);
-extern float __atan2f(float, float);
-extern float __ceilf(float);
-extern float __cosf(float);
-extern float __coshf(float);
-extern float __expf(float);
-extern float __fabsf(float);
-extern float __floorf(float);
-extern float __fmodf(float, float);
-extern float __frexpf(float, int *);
-extern float __ldexpf(float, int);
-extern float __logf(float);
-extern float __log10f(float);
-extern float __modff(float, float *);
-extern float __powf(float, float);
-extern float __sinf(float);
-extern float __sinhf(float);
-extern float __sqrtf(float);
-extern float __tanf(float);
-extern float __tanhf(float);
-
-extern long double __acosl(long double);
-extern long double __asinl(long double);
-extern long double __atanl(long double);
-extern long double __atan2l(long double, long double);
-extern long double __ceill(long double);
-extern long double __cosl(long double);
-extern long double __coshl(long double);
-extern long double __expl(long double);
-extern long double __fabsl(long double);
-extern long double __floorl(long double);
-extern long double __fmodl(long double, long double);
-extern long double __frexpl(long double, int *);
-extern long double __ldexpl(long double, int);
-extern long double __logl(long double);
-extern long double __log10l(long double);
-extern long double __modfl(long double, long double *);
-extern long double __powl(long double, long double);
-extern long double __sinl(long double);
-extern long double __sinhl(long double);
-extern long double __sqrtl(long double);
-extern long double __tanl(long double);
-extern long double __tanhl(long double);
-}
-#endif
-
-#if defined (__BORLANDC__)
-# define _STLP_CMATH_FUNC_NAMESPACE _STLP_VENDOR_CSTD
-#else
-# define _STLP_CMATH_FUNC_NAMESPACE
-#endif
-
-#if !defined (__sun) || defined (__GNUC__)
-# define _STLP_MATH_INLINE(float_type, func, cfunc) \
- inline float_type func (float_type x) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x); }
-# define _STLP_MATH_INLINE2(float_type, type, func, cfunc) \
- inline float_type func (float_type x, type y) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x, y); }
-# define _STLP_MATH_INLINE_D(float_type, func, cfunc)
-# define _STLP_MATH_INLINE2_D(float_type, type, func, cfunc)
-#else
-# ifdef __SUNPRO_CC
-# define _STLP_MATH_INLINE(float_type, func, cfunc) \
- inline float_type func (float_type x) { return _STLP_VENDOR_CSTD::__##cfunc(x); }
-# define _STLP_MATH_INLINE_D(float_type, func, cfunc) \
- inline float_type func (float_type x) { return _STLP_VENDOR_CSTD::cfunc(x); }
-# define _STLP_MATH_INLINE2(float_type, type, func, cfunc) \
- inline float_type func (float_type x, type y) { return _STLP_VENDOR_CSTD::__##cfunc(x,y); }
-# define _STLP_MATH_INLINE2_D(float_type, type, func, cfunc) \
- inline float_type func (float_type x, type y) { return _STLP_VENDOR_CSTD::cfunc(x,y); }
-# else
-# error Unknown compiler for the Sun platform
-# endif
-#endif
-
-/** macros to define math functions
-These macros (having an X somewhere in the name) forward to the C library's
-double functions but cast the arguments and return values to the given type. */
-
-#define _STLP_MATH_INLINEX(__type,func,cfunc) \
- inline __type func (__type x) \
- { return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x)); }
-#define _STLP_MATH_INLINE2X(__type1,__type2,func,cfunc) \
- inline __type1 func (__type1 x, __type2 y) \
- { return __STATIC_CAST(__type1, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, y)); }
-#define _STLP_MATH_INLINE2PX(__type,func,cfunc) \
- inline __type func (__type x, __type *y) { \
- double tmp1, tmp2; \
- tmp1 = _STLP_CMATH_FUNC_NAMESPACE::cfunc(__STATIC_CAST(double, x), &tmp2); \
- *y = __STATIC_CAST(__type, tmp2); \
- return __STATIC_CAST(__type, tmp1); \
- }
-#define _STLP_MATH_INLINE2XX(__type,func,cfunc) \
- inline __type func (__type x, __type y) \
- { return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, (double)y)); }
-
-
-/** rough characterization of compiler and native C library
-For the compiler, it can either support long double or not. If it doesn't, the
-macro _STLP_NO_LONG_DOUBLE is not defined and we don't define any long double
-overloads.
-For the native C library the question is whether it has variants with an 'f'
-suffix (for float as opposed to double) or an 'l' suffix (for long double). If
-the float variants are missing, _STLP_NO_VENDOR_MATH_F is defined, when the
-long double variants are missing, _STLP_NO_VENDOR_MATH_L is defined. Of course
-the latter doesn't make sense anyway when the compiler already has no long
-double support.
-
-Those two traits determine a) which overloads get defined and b) how they are
-defined.
-
-Meaning of suffixes:
-"" : function returning and taking a float_type
-"2" : function returning a float_type and taking to float_types
-"2P" : function returning a float_type and taking a float_type and a float_type*
-"2PI": function returning a float_type and taking a float_type and an int*
-"2I" : function returning a float_type and taking a float_Type and an int
-*/
-
-#if !defined (_STLP_NO_LONG_DOUBLE) && !defined (_STLP_NO_VENDOR_MATH_L) && !defined (_STLP_NO_VENDOR_MATH_F)
- // long double support and both e.g. sinl(long double) and sinf(float)
- // This is the default for a correct and complete native library.
-# define _STLP_DEF_MATH_INLINE(func,cf) \
- _STLP_MATH_INLINE(float,func,cf##f) \
- _STLP_MATH_INLINE_D(double,func,cf) \
- _STLP_MATH_INLINE(long double,func,cf##l)
-# define _STLP_DEF_MATH_INLINE2(func,cf) \
- _STLP_MATH_INLINE2(float,float,func,cf##f) \
- _STLP_MATH_INLINE2_D(double,double,func,cf) \
- _STLP_MATH_INLINE2(long double,long double,func,cf##l)
-# define _STLP_DEF_MATH_INLINE2P(func,cf) \
- _STLP_MATH_INLINE2(float,float *,func,cf##f) \
- _STLP_MATH_INLINE2_D(double,double *,func,cf) \
- _STLP_MATH_INLINE2(long double,long double *,func,cf##l)
-# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
- _STLP_MATH_INLINE2(float,int *,func,cf##f) \
- _STLP_MATH_INLINE2_D(double,int *,func,cf) \
- _STLP_MATH_INLINE2(long double,int *,func,cf##l)
-# define _STLP_DEF_MATH_INLINE2I(func,cf) \
- _STLP_MATH_INLINE2(float,int,func,cf##f) \
- _STLP_MATH_INLINE2_D(double,int,func,cf) \
- _STLP_MATH_INLINE2(long double,int,func,cf##l)
-#else
-# if !defined (_STLP_NO_LONG_DOUBLE)
-# if !defined (_STLP_NO_VENDOR_MATH_F)
- // long double support and e.g. sinf(float) but not e.g. sinl(long double)
-# define _STLP_DEF_MATH_INLINE(func,cf) \
- _STLP_MATH_INLINE(float,func,cf##f) \
- _STLP_MATH_INLINEX(long double,func,cf)
-# define _STLP_DEF_MATH_INLINE2(func,cf) \
- _STLP_MATH_INLINE2(float,float,func,cf##f) \
- _STLP_MATH_INLINE2XX(long double,func,cf)
-# define _STLP_DEF_MATH_INLINE2P(func,cf) \
- _STLP_MATH_INLINE2(float,float *,func,cf##f) \
- _STLP_MATH_INLINE2PX(long double,func,cf)
-# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
- _STLP_MATH_INLINE2(float,int *,func,cf##f) \
- _STLP_MATH_INLINE2X(long double,int *,func,cf)
-# define _STLP_DEF_MATH_INLINE2I(func,cf) \
- _STLP_MATH_INLINE2(float,int,func,cf##f) \
- _STLP_MATH_INLINE2X(long double,int,func,cf)
-# elif !defined (_STLP_NO_VENDOR_MATH_L)
- // long double support and e.g. sinl(long double) but not e.g. sinf(float)
-# define _STLP_DEF_MATH_INLINE(func,cf) \
- _STLP_MATH_INLINEX(float,func,cf) \
- _STLP_MATH_INLINE(long double,func,cf##l)
-# define _STLP_DEF_MATH_INLINE2(func,cf) \
- _STLP_MATH_INLINE2XX(float,func,cf) \
- _STLP_MATH_INLINE2(long double,long double,func,cf##l)
-# define _STLP_DEF_MATH_INLINE2P(func,cf) \
- _STLP_MATH_INLINE2PX(float,func,cf) \
- _STLP_MATH_INLINE2(long double,long double *,func,cf##l)
-# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
- _STLP_MATH_INLINE2X(float,int *,func,cf) \
- _STLP_MATH_INLINE2(long double,int *,func,cf##l)
-# define _STLP_DEF_MATH_INLINE2I(func,cf) \
- _STLP_MATH_INLINE2X(float,int,func,cf) \
- _STLP_MATH_INLINE2(long double,int,func,cf##l)
-# else
-# define _STLP_DEF_MATH_INLINE(func,cf) \
- _STLP_MATH_INLINEX(float,func,cf) \
- _STLP_MATH_INLINEX(long double,func,cf)
-# define _STLP_DEF_MATH_INLINE2(func,cf) \
- _STLP_MATH_INLINE2XX(float,func,cf) \
- _STLP_MATH_INLINE2XX(long double,func,cf)
-# define _STLP_DEF_MATH_INLINE2P(func,cf) \
- _STLP_MATH_INLINE2PX(float,func,cf) \
- _STLP_MATH_INLINE2PX(long double,func,cf)
-# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
- _STLP_MATH_INLINE2X(float,int *,func,cf) \
- _STLP_MATH_INLINE2X(long double,int *,func,cf)
-# define _STLP_DEF_MATH_INLINE2I(func,cf) \
- _STLP_MATH_INLINE2X(float,int,func,cf) \
- _STLP_MATH_INLINE2X(long double,int,func,cf)
-# endif
-# else
-# if !defined (_STLP_NO_VENDOR_MATH_F)
-# define _STLP_DEF_MATH_INLINE(func,cf) \
- _STLP_MATH_INLINE(float,func,cf##f)
-# define _STLP_DEF_MATH_INLINE2(func,cf) \
- _STLP_MATH_INLINE2(float,float,func,cf##f)
-# define _STLP_DEF_MATH_INLINE2P(func,cf) \
- _STLP_MATH_INLINE2(float,float *,func,cf##f)
-# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
- _STLP_MATH_INLINE2(float,int *,func,cf##f)
-# define _STLP_DEF_MATH_INLINE2I(func,cf) \
- _STLP_MATH_INLINE2(float,int,func,cf##f)
-# else // _STLP_NO_VENDOR_MATH_F
- // neither long double support nor e.g. sinf(float) functions
-# define _STLP_DEF_MATH_INLINE(func,cf) \
- _STLP_MATH_INLINEX(float,func,cf)
-# define _STLP_DEF_MATH_INLINE2(func,cf) \
- _STLP_MATH_INLINE2XX(float,func,cf)
-# define _STLP_DEF_MATH_INLINE2P(func,cf) \
- _STLP_MATH_INLINE2PX(float,func,cf)
-# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
- _STLP_MATH_INLINE2X(float,int *,func,cf)
-# define _STLP_DEF_MATH_INLINE2I(func,cf) \
- _STLP_MATH_INLINE2X(float,int,func,cf)
-# endif // _STLP_NO_VENDOR_MATH_F
-# endif
-#endif
-
-#if defined (_STLP_WCE) || \
- (defined(_STLP_MSVC) && (_STLP_MSVC <= 1300) && defined (_MSC_EXTENSIONS) /* && !defined(_STLP_WCE_NET) */)
-/*
- * dums: VC6 has all the required C++ functions but only define them if
- * _MSC_EXTENSIONS is not defined (a bug?). STLport just do the same
- * thing also when _MSC_EXTENSIONS is defined.
- * TODO: above check (_STLP_MSVC <= 1300) also catches VC7.0, is that intended?
- */
-//We have to tell the compilers that abs, acos ... math functions are not intrinsic
-//otherwise we have Internal Compiler Error in release mode...
-# pragma warning(push)
-# pragma warning(disable: 4162) // no function with C linkage found
-# pragma warning(disable: 4163) // not available as an intrinsic function
-# pragma function (abs, acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, sqrt, tan, tanh)
-# if defined (_STLP_WCE)
-# pragma function (ceil, floor)
-# endif
-# define _STLP_RESTORE_FUNCTION_INTRINSIC
-#endif // _STLP_MSVC && _STLP_MSVC <= 1300 && !_STLP_WCE && _MSC_EXTENSIONS
-
-#if (defined (__BORLANDC__) || defined (__WATCOMC__)) && defined (_STLP_USE_NEW_C_HEADERS)
-/* In this config Borland native lib only define functions in std namespace.
- * In order to have all overloads in STLport namespace we need to add the
- * double overload in global namespace. We do not use a using statement to avoid
- * import of invalid overload.
- */
-# define _STLP_DMATH_INLINE(func) _STLP_MATH_INLINE(double, func, func)
-# define _STLP_DMATH_INLINE2(func) _STLP_MATH_INLINE2(double, double, func, func)
-
-_STLP_DMATH_INLINE(acos)
-_STLP_DMATH_INLINE(asin)
-_STLP_DMATH_INLINE(atan)
-_STLP_DMATH_INLINE2(atan2)
-_STLP_DMATH_INLINE(ceil)
-_STLP_DMATH_INLINE(cos)
-_STLP_DMATH_INLINE(cosh)
-_STLP_DMATH_INLINE(exp)
-_STLP_DMATH_INLINE(fabs)
-_STLP_DMATH_INLINE(floor)
-_STLP_DMATH_INLINE2(fmod)
-_STLP_MATH_INLINE2X(double, int*, frexp, frexp)
-_STLP_MATH_INLINE2X(double, int, ldexp, ldexp)
-_STLP_DMATH_INLINE(log)
-_STLP_DMATH_INLINE(log10)
-_STLP_MATH_INLINE2PX(double, modf, modf)
-_STLP_DMATH_INLINE(sin)
-_STLP_DMATH_INLINE(sinh)
-_STLP_DMATH_INLINE(sqrt)
-_STLP_DMATH_INLINE(tan)
-_STLP_DMATH_INLINE(tanh)
-_STLP_DMATH_INLINE2(pow)
-_STLP_DMATH_INLINE2(hypot)
-
-# undef _STLP_DMATH_INLINE
-# undef _STLP_DMATH_INLINE2
-#endif
-
-#if defined (__DMC__)
-# if defined (fabs)
-inline double __stlp_fabs(double __x) { return fabs(__x); }
-# undef fabs
-inline double fabs(double __x) { return __stlp_fabs(__x); }
-# endif
-# if defined (cos)
-inline double __stlp_cos(double __x) { return cos(__x); }
-# undef cos
-inline double cos(double __x) { return __stlp_cos(__x); }
-# endif
-# if defined (sin)
-inline double __stlp_sin(double __x) { return sin(__x); }
-# undef sin
-inline double sin(double __x) { return __stlp_sin(__x); }
-# endif
-# if defined (sqrt)
-inline double __stlp_sqrt(double __x) { return sqrt(__x); }
-# undef sqrt
-inline double sqrt(double __x) { return __stlp_sqrt(__x); }
-# endif
-# if defined (ldexp)
-inline double __stlp_ldexp(double __x, int __y) { return ldexp(__x, __y); }
-# undef ldexp
-inline double ldexp(double __x, int __y) { return __stlp_ldexp(__x, __y); }
-# endif
-#endif
-
-/* MSVC native lib starting with .Net 2003 has already all math functions
- * in global namespace.
- * HP-UX native lib has math functions in the global namespace.
- */
-#if (!defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1310) || defined(UNDER_CE)) && \
- (!defined (__HP_aCC) || (__HP_aCC < 30000)) && \
- !defined (__WATCOMC__) && \
- !defined (ANDROID)
-inline double abs(double __x)
-{ return ::fabs(__x); }
-# if !defined (__MVS__)
-_STLP_DEF_MATH_INLINE(abs, fabs)
-# else // __MVS__ has native long double abs?
-inline float abs(float __x) { return ::fabsf(__x); }
-# endif
-
-_STLP_DEF_MATH_INLINE(acos, acos)
-_STLP_DEF_MATH_INLINE(asin, asin)
-_STLP_DEF_MATH_INLINE(atan, atan)
-_STLP_DEF_MATH_INLINE2(atan2, atan2)
-_STLP_DEF_MATH_INLINE(ceil, ceil)
-_STLP_DEF_MATH_INLINE(cos, cos)
-_STLP_DEF_MATH_INLINE(cosh, cosh)
-_STLP_DEF_MATH_INLINE(exp, exp)
-_STLP_DEF_MATH_INLINE(fabs, fabs)
-_STLP_DEF_MATH_INLINE(floor, floor)
-_STLP_DEF_MATH_INLINE2(fmod, fmod)
-_STLP_DEF_MATH_INLINE2PI(frexp, frexp)
-_STLP_DEF_MATH_INLINE2I(ldexp, ldexp)
-_STLP_DEF_MATH_INLINE(log, log)
-_STLP_DEF_MATH_INLINE(log10, log10)
-_STLP_DEF_MATH_INLINE2P(modf, modf)
-_STLP_DEF_MATH_INLINE(sin, sin)
-_STLP_DEF_MATH_INLINE(sinh, sinh)
-_STLP_DEF_MATH_INLINE(sqrt, sqrt)
-_STLP_DEF_MATH_INLINE(tan, tan)
-_STLP_DEF_MATH_INLINE(tanh, tanh)
-_STLP_DEF_MATH_INLINE2(pow, pow)
-
-# if !defined(_STLP_MSVC) /* || (_STLP_MSVC > 1300) */ || defined(_STLP_WCE) || !defined (_MSC_EXTENSIONS) /* && !defined(_STLP_WCE_NET) */
-# ifndef _STLP_NO_VENDOR_MATH_F
-# ifndef __sun
-inline float pow(float __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::powf(__x, __STATIC_CAST(float,__y)); }
-# else
-inline float pow(float __x, int __y) { return ::__powf(__x, __STATIC_CAST(float,__y)); }
-# endif
-# else
-inline float pow(float __x, int __y) { return __STATIC_CAST(float, _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(float,__y))); }
-# endif
-inline double pow(double __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(double,__y)); }
-# if !defined (_STLP_NO_LONG_DOUBLE)
-# if !defined(_STLP_NO_VENDOR_MATH_L)
-# ifndef __sun
-inline long double pow(long double __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::powl(__x, __STATIC_CAST(long double,__y)); }
-# else
-# ifndef __SUNPRO_CC
-inline long double pow(long double __x, int __y) { return ::__powl(__x, __STATIC_CAST(long double,__y)); }
-# else
-inline long double pow(long double __x, int __y) { return _STLP_VENDOR_CSTD::__powl(__x, __STATIC_CAST(long double,__y)); }
-# endif
-# endif
-# else
-inline long double pow(long double __x, int __y) { return __STATIC_CAST(long double, _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(long double,__y))); }
-# endif
-# endif
-# else
-//The MS native pow version has a bugged overload so it is not imported
-//in the STLport namespace.
-//Here is the bugged version:
-//inline double pow(int __x, int __y) { return (_Pow_int(__x, __y)); }
-inline double pow(double __x, int __y) { return (_Pow_int(__x, __y)); }
-inline float pow(float __x, int __y) { return (_Pow_int(__x, __y)); }
-inline long double pow(long double __x, int __y) { return (_Pow_int(__x, __y)); }
-# endif
-#endif
-
-#if (defined (_STLP_MSVC) && !defined (_STLP_WCE)) || defined (__ICL) || defined (__sun)
-# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1400)
-# pragma warning (push)
-# pragma warning (disable : 4996) // hypot is deprecated.
-# endif
-_STLP_MATH_INLINE2XX(float, hypot, hypot)
-inline long double hypot(long double x, long double y) { return sqrt(x * x + y * y); }
-# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1400)
-# pragma warning (pop)
-# endif
-#else
-# if defined (_STLP_USE_UCLIBC)
-inline double hypot(double x, double y) { return sqrt(x * x + y * y); }
-_STLP_DEF_MATH_INLINE2(hypot, hypot)
-# elif defined (_STLP_WCE)
- /* CE has a double _hypot(double,double) which we use */
-inline double hypot(double __x, double __y) { return _hypot(__x,__y); }
-_STLP_DEF_MATH_INLINE2(hypot, _hypot)
-# endif
-#endif
-
-#if defined (_STLP_RESTORE_FUNCTION_INTRINSIC)
-//restoration of the default intrinsic status of those functions:
-# pragma intrinsic (abs, acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, sqrt, tan, tanh)
-# if defined (_STLP_WCE)
-# pragma intrinsic (ceil, floor)
-# endif
-# pragma warning(pop)
-# undef _STLP_RESTORE_FUNCTION_INTRINSIC
-#endif // _STLP_MSVC && _STLP_MSVC <= 1300 && !_STLP_WCE && _MSC_EXTENSIONS
-
-/* C++ Standard is unclear about several call to 'using ::func' if new overloads
- * of ::func appears between 2 successive 'using' calls. To avoid this potential
- * problem we provide all abs overload before the 'using' call.
- * Beware: This header inclusion has to be after all abs overload of this file.
- * The first 'using ::abs' call is going to be in the other header.
- */
-#ifndef _STLP_INTERNAL_CSTDLIB
-# include <stl/_cstdlib.h>
-#endif
-
-#if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-_STLP_BEGIN_NAMESPACE
-using ::abs;
-using ::acos;
-using ::asin;
-using ::atan;
-using ::atan2;
-using ::ceil;
-using ::cos;
-using ::cosh;
-using ::exp;
-using ::fabs;
-using ::floor;
-using ::fmod;
-using ::frexp;
-/*
- Because of some weird interaction between STLport headers
- and native HP-UX headers, when compiled with _STLP_DEBUG
- macro defined with aC++, hypot() is not declared.
- At some point we'll need to get to the bottom line of
- this problem.
-*/
-#if !(defined(__HP_aCC) && defined(_STLP_DEBUG))
-using ::hypot;
-#endif
-using ::ldexp;
-using ::log;
-using ::log10;
-using ::modf;
-using ::pow;
-using ::sin;
-using ::sinh;
-using ::sqrt;
-using ::tan;
-using ::tanh;
-_STLP_END_NAMESPACE
-# if defined (__BORLANDC__) && (__BORLANDC__ >= 0x560) && !defined (__linux__)
-using _STLP_VENDOR_CSTD::_ecvt;
-using _STLP_VENDOR_CSTD::_fcvt;
-# endif
-#endif
-
-#endif /* _STLP_INTERNAL_CMATH */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_config_compat_post.h b/stlport/stlport/stl/_config_compat_post.h
deleted file mode 100644
index e3b4111..0000000
--- a/stlport/stlport/stl/_config_compat_post.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*========================================== */
-#if 1 /* def _STLP_3_COMPATIBILITY */
-
-# define __SGI_STL_PORT _STLPORT_VERSION
-
-# if defined (_STLP_DEBUG) && ! defined ( __STL_DEBUG )
-# define __STL_DEBUG _STLP_DEBUG
-# endif
-
-# if defined (_STLP_USE_NAMESPACES)
-# undef __STL_USE_NAMESPACES
-# define __STL_USE_NAMESPACES _STLP_USE_NAMESPACES
-# endif
-
-# if defined (_STLP_USE_EXCEPTIONS)
-# undef __STL_USE_EXCEPTIONS
-# define __STL_USE_EXCEPTIONS _STLP_USE_EXCEPTIONS
-# endif
-
-# if defined (_STLP_BEGIN_NAMESPACE) && ! defined ( __STL_BEGIN_NAMESPACE )
-# define __STL_BEGIN_NAMESPACE _STLP_BEGIN_NAMESPACE
-# define __STL_END_NAMESPACE _STLP_END_NAMESPACE
-# define __STL_VENDOR_STD _STLP_VENDOR_STD
-# define __STL_VENDOR_CSTD _STLP_VENDOR_CSTD
-# endif
-# endif
-
-/*
-# if defined (_STLP_XXX) && ! defined ( __STL_XXX )
-# define __STL_XXX _STLP_XXX
-# endif
-*/
-
-/* 5.0 -> 4.6 compatibility section */
-#if 1 /* def _STLP_46_COMPATIBILITY */
-
-/* provide a uniform way to access full functionality */
-# define __slist__ slist
-# define __map__ map
-# define __multimap__ multimap
-# define __set__ set
-# define __multiset__ multiset
-# define __list__ list
-# define __hash_map__ hash_map
-# define __hash_multimap__ hash_multimap
-# define __hash_set__ hash_set
-# define __hash_multiset__ hash_multiset
-# define __vector__ vector
-
-#endif
-
diff --git a/stlport/stlport/stl/_construct.h b/stlport/stlport/stl/_construct.h
deleted file mode 100644
index 9361878..0000000
--- a/stlport/stlport/stl/_construct.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_CONSTRUCT_H
-#define _STLP_INTERNAL_CONSTRUCT_H
-
-#if !defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_INTERNAL_CSTRING)
-# include <stl/_cstring.h>
-#endif
-
-#ifndef _STLP_INTERNAL_NEW
-# include <stl/_new.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-#ifndef _STLP_TYPE_TRAITS_H
-# include <stl/type_traits.h>
-#endif
-
-#if !defined (_STLP_MOVE_CONSTRUCT_FWK_H) && !defined (_STLP_NO_MOVE_SEMANTIC)
-# include <stl/_move_construct_fwk.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Tp>
-inline void __destroy_aux(_Tp* __pointer, const __false_type& /*_Trivial_destructor*/)
-{ __pointer->~_Tp(); }
-
-template <class _Tp>
-inline void __destroy_aux(_Tp*, const __true_type& /*_Trivial_destructor*/) {}
-
-template <class _Tp>
-inline void _Destroy(_Tp* __pointer) {
- typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor;
- __destroy_aux(__pointer, _Trivial_destructor());
-#if defined (_STLP_DEBUG_UNINITIALIZED)
- memset(__REINTERPRET_CAST(char*, __pointer), _STLP_SHRED_BYTE, sizeof(_Tp));
-#endif
-}
-
-template <class _Tp>
-inline void _Destroy_Moved(_Tp* __pointer) {
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- typedef typename __move_traits<_Tp>::complete _Trivial_destructor;
- __destroy_aux(__pointer, _Trivial_destructor());
-# if defined (_STLP_DEBUG_UNINITIALIZED)
- memset((char*)__pointer, _STLP_SHRED_BYTE, sizeof(_Tp));
-# endif
-#else
- _Destroy(__pointer);
-#endif
-}
-
-#if defined (new)
-# define _STLP_NEW_REDEFINE new
-# undef new
-#endif
-
-template <class _T1>
-inline void _Construct_aux (_T1* __p, const __false_type&) {
- new(__p) _T1();
-}
-
-template <class _T1>
-inline void _Construct_aux (_T1* __p, const __true_type&) {
-#if defined (_STLP_DEF_CONST_PLCT_NEW_BUG)
- *__p = _T1(0);
-#else
- // We use binary copying for POD types since it results
- // in a considerably better code at least on MSVC.
- *__p = _T1();
-#endif /* _STLP_DEF_CONST_PLCT_NEW_BUG */
-}
-
-template <class _T1>
-inline void _Construct(_T1* __p) {
-#if defined (_STLP_DEBUG_UNINITIALIZED)
- memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1));
-#endif
-#if defined (_STLP_DEF_CONST_PLCT_NEW_BUG)
- _Construct_aux (__p, _HasDefaultZeroValue(__p)._Answer());
-#else
- _Construct_aux (__p, _Is_POD(__p)._Answer());
-#endif /* _STLP_DEF_CONST_PLCT_NEW_BUG */
-}
-
-template <class _Tp>
-inline void _Copy_Construct_aux(_Tp* __p, const _Tp& __val, const __false_type&) {
- new(__p) _Tp(__val);
-}
-
-template <class _Tp>
-inline void _Copy_Construct_aux(_Tp* __p, const _Tp& __val, const __true_type&) {
- // We use binary copying for POD types since it results
- // in a considerably better code at least on MSVC.
- *__p = __val;
-}
-
-template <class _Tp>
-inline void _Copy_Construct(_Tp* __p, const _Tp& __val) {
-#if defined (_STLP_DEBUG_UNINITIALIZED)
- memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_Tp));
-#endif
- _Copy_Construct_aux(__p, __val, _Is_POD(__p)._Answer());
-}
-
-template <class _T1, class _T2>
-inline void _Param_Construct_aux(_T1* __p, const _T2& __val, const __false_type&) {
- new(__p) _T1(__val);
-}
-
-template <class _T1, class _T2>
-inline void _Param_Construct_aux(_T1* __p, const _T2& __val, const __true_type&) {
- // We use binary copying for POD types since it results
- // in a considerably better code at least on MSVC.
- *__p = _T1(__val);
-}
-
-template <class _T1, class _T2>
-inline void _Param_Construct(_T1* __p, const _T2& __val) {
-#if defined (_STLP_DEBUG_UNINITIALIZED)
- memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1));
-#endif
- _Param_Construct_aux(__p, __val, _Is_POD(__p)._Answer());
-}
-
-template <class _T1, class _T2>
-inline void _Move_Construct_Aux(_T1* __p, _T2& __val, const __false_type& /*_IsPOD*/) {
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- new(__p) _T1(_STLP_PRIV _AsMoveSource(__val));
-#else
- _Param_Construct(__p, __val);
-#endif
-}
-
-template <class _T1, class _T2>
-inline void _Move_Construct_Aux(_T1* __p, _T2& __val, const __true_type& /*_IsPOD*/) {
- // We use binary copying for POD types since it results
- // in a considerably better code at least on MSVC.
- *__p = _T1(__val);
-}
-
-template <class _T1, class _T2>
-inline void _Move_Construct(_T1* __p, _T2& __val) {
-#if defined (_STLP_DEBUG_UNINITIALIZED)
- memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1));
-#endif
- _Move_Construct_Aux(__p, __val, _Is_POD(__p)._Answer());
-}
-
-#if defined(_STLP_NEW_REDEFINE)
-# if defined (DEBUG_NEW)
-# define new DEBUG_NEW
-# endif
-# undef _STLP_NEW_REDEFINE
-#endif
-
-template <class _ForwardIterator, class _Tp>
-_STLP_INLINE_LOOP void
-__destroy_range_aux(_ForwardIterator __first, _ForwardIterator __last, _Tp*, const __false_type& /*_Trivial_destructor*/) {
- for ( ; __first != __last; ++__first) {
- __destroy_aux(&(*__first), __false_type());
-#if defined (_STLP_DEBUG_UNINITIALIZED)
- memset((char*)&(*__first), _STLP_SHRED_BYTE, sizeof(_Tp));
-#endif
- }
-}
-
-template <class _ForwardIterator, class _Tp>
-#if defined (_STLP_DEBUG_UNINITIALIZED)
-_STLP_INLINE_LOOP void
-__destroy_range_aux(_ForwardIterator __first, _ForwardIterator __last, _Tp*, const __true_type& /*_Trivial_destructor*/) {
- for ( ; __first != __last; ++__first)
- memset((char*)&(*__first), _STLP_SHRED_BYTE, sizeof(_Tp));
-}
-#else
-inline void
-__destroy_range_aux(_ForwardIterator, _ForwardIterator, _Tp*, const __true_type& /*_Trivial_destructor*/) {}
-#endif
-
-template <class _ForwardIterator, class _Tp>
-inline void
-__destroy_range(_ForwardIterator __first, _ForwardIterator __last, _Tp *__ptr) {
- typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor;
- __destroy_range_aux(__first, __last, __ptr, _Trivial_destructor());
-}
-
-template <class _ForwardIterator>
-inline void _Destroy_Range(_ForwardIterator __first, _ForwardIterator __last) {
- __destroy_range(__first, __last, _STLP_VALUE_TYPE(__first, _ForwardIterator));
-}
-
-inline void _Destroy_Range(char*, char*) {}
-#if defined (_STLP_HAS_WCHAR_T) // dwa 8/15/97
-inline void _Destroy_Range(wchar_t*, wchar_t*) {}
-inline void _Destroy_Range(const wchar_t*, const wchar_t*) {}
-#endif
-
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
-template <class _ForwardIterator, class _Tp>
-inline void
-__destroy_mv_srcs(_ForwardIterator __first, _ForwardIterator __last, _Tp *__ptr) {
- typedef typename __move_traits<_Tp>::complete _CompleteMove;
- __destroy_range_aux(__first, __last, __ptr, _CompleteMove());
-}
-#endif
-
-template <class _ForwardIterator>
-inline void _Destroy_Moved_Range(_ForwardIterator __first, _ForwardIterator __last)
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
-{ __destroy_mv_srcs(__first, __last, _STLP_VALUE_TYPE(__first, _ForwardIterator)); }
-#else
-{ _Destroy_Range(__first, __last); }
-#endif
-
-#if defined (_STLP_DEF_CONST_DEF_PARAM_BUG)
-// Those adaptors are here to fix common compiler bug regarding builtins:
-// expressions like int k = int() should initialize k to 0
-template <class _Tp>
-inline _Tp __default_constructed_aux(_Tp*, const __false_type&) {
- return _Tp();
-}
-template <class _Tp>
-inline _Tp __default_constructed_aux(_Tp*, const __true_type&) {
- return _Tp(0);
-}
-
-template <class _Tp>
-inline _Tp __default_constructed(_Tp* __p) {
- return __default_constructed_aux(__p, _HasDefaultZeroValue(__p)._Answer());
-}
-
-# define _STLP_DEFAULT_CONSTRUCTED(_TTp) __default_constructed((_TTp*)0)
-#else
-# define _STLP_DEFAULT_CONSTRUCTED(_TTp) _TTp()
-#endif /* _STLP_DEF_CONST_DEF_PARAM_BUG */
-
-
-#if !defined (_STLP_NO_ANACHRONISMS)
-// --------------------------------------------------
-// Old names from the HP STL.
-
-template <class _T1, class _T2>
-inline void construct(_T1* __p, const _T2& __val) {_Param_Construct(__p, __val); }
-template <class _T1>
-inline void construct(_T1* __p) { _STLP_STD::_Construct(__p); }
-template <class _Tp>
-inline void destroy(_Tp* __pointer) { _STLP_STD::_Destroy(__pointer); }
-template <class _ForwardIterator>
-inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { _STLP_STD::_Destroy_Range(__first, __last); }
-#endif /* _STLP_NO_ANACHRONISMS */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_CONSTRUCT_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_cprolog.h b/stlport/stlport/stl/_cprolog.h
deleted file mode 100644
index 1d27656..0000000
--- a/stlport/stlport/stl/_cprolog.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* NOTE : this header has no guards and is MEANT for multiple inclusion!
- * If you are using "header protection" option with your compiler,
- * please also find #pragma which disables it and put it here, to
- * allow reentrancy of this header.
- */
-
-#ifdef std
-# undef std /* We undef "std" on entry , as STLport headers may include native ones. */
-#endif
-
-#ifdef _STLP_PROLOG_HEADER_INCLUDED
-# error STlport prolog header can not be reincluded as long as epilog has not be included.
-#endif
-
-#define _STLP_PROLOG_HEADER_INCLUDED
-
-#ifndef _STLP_FEATURES_H
-# include <stl/config/features.h>
-#endif
-
-/* If the platform provides any specific prolog actions,
- * like #pragmas, do include platform-specific prolog file */
-#if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG)
-# include <stl/config/_prolog.h>
-#endif
diff --git a/stlport/stlport/stl/_cstdarg.h b/stlport/stlport/stl/_cstdarg.h
deleted file mode 100644
index e98f31c..0000000
--- a/stlport/stlport/stl/_cstdarg.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- */
-
-#ifndef _STLP_INTERNAL_CSTDARG
-#define _STLP_INTERNAL_CSTDARG
-
-#if defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstdarg>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstdarg)
-# endif
-#else
-# include <stdarg.h>
-#endif
-
-#ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::va_list;
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#endif
diff --git a/stlport/stlport/stl/_cstddef.h b/stlport/stlport/stl/_cstddef.h
deleted file mode 100644
index 35a585c..0000000
--- a/stlport/stlport/stl/_cstddef.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_INTERNAL_CSTDDEF
-#define _STLP_INTERNAL_CSTDDEF
-
-# if (__GNUC__ >= 3) && defined (__CYGWIN__) // this total HACK is the only expedient way I could cygwin to work with GCC 3.0
-# define __need_wint_t // mostly because wint_t didn't seem to get defined otherwise :(
-# define __need_wchar_t
-# define __need_size_t
-# define __need_ptrdiff_t
-# define __need_NULL
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstddef>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstddef)
-# endif
-# else
-# include <stddef.h>
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::ptrdiff_t;
-using _STLP_VENDOR_CSTD::size_t;
-_STLP_END_NAMESPACE
-# endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#endif /* _STLP_INTERNAL_CSTDDEF */
diff --git a/stlport/stlport/stl/_cstdio.h b/stlport/stlport/stl/_cstdio.h
deleted file mode 100644
index 67236f2..0000000
--- a/stlport/stlport/stl/_cstdio.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_INTERNAL_CSTDIO
-#define _STLP_INTERNAL_CSTDIO
-
-#if defined (__Lynx__)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <stdarg.h>
-# else
-# include _STLP_NATIVE_C_HEADER(stdarg.h)
-# endif
-#endif
-
-#if defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstdio>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstdio)
-# endif
-#else
-# include <stdio.h>
-#endif
-
-#if defined (__MWERKS__)
-# undef stdin
-# undef stdout
-# undef stderr
-# define stdin (&_STLP_VENDOR_CSTD::__files[0])
-# define stdout (&_STLP_VENDOR_CSTD::__files[1])
-# define stderr (&_STLP_VENDOR_CSTD::__files[2])
-#endif
-
-#if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER)
-inline int vsnprintf(char *s1, size_t n, const char *s2, va_list v)
-{ return _STLP_VENDOR_CSTD::_vsnprintf(s1, n, s2, v); }
-#endif
-
-#if defined (_STLP_IMPORT_VENDOR_CSTD )
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::FILE;
-using _STLP_VENDOR_CSTD::fpos_t;
-using _STLP_VENDOR_CSTD::size_t;
-
-// undef obsolete macros
-# undef putc
-# undef getc
-# undef getchar
-# undef putchar
-# undef feof
-# undef ferror
-
-# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-using _STLP_VENDOR_CSTD::clearerr;
-using _STLP_VENDOR_CSTD::fclose;
-using _STLP_VENDOR_CSTD::feof;
-using _STLP_VENDOR_CSTD::ferror;
-using _STLP_VENDOR_CSTD::fflush;
-using _STLP_VENDOR_CSTD::fgetc;
-using _STLP_VENDOR_CSTD::fgetpos;
-using _STLP_VENDOR_CSTD::fgets;
-using _STLP_VENDOR_CSTD::fopen;
-using _STLP_VENDOR_CSTD::fprintf;
-using _STLP_VENDOR_CSTD::fputc;
-using _STLP_VENDOR_CSTD::fputs;
-using _STLP_VENDOR_CSTD::fread;
-# if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
-using _STLP_VENDOR_CSTD::freopen;
-# endif
-using _STLP_VENDOR_CSTD::fscanf;
-using _STLP_VENDOR_CSTD::fseek;
-using _STLP_VENDOR_CSTD::fsetpos;
-using _STLP_VENDOR_CSTD::ftell;
-using _STLP_VENDOR_CSTD::fwrite;
-
-# if !(defined (__IBMCPP__) && (__IBMCPP__ >= 500))
-# if !defined (_WIN32_WCE) || (_WIN32_WCE < 400) // Supplied as macros, TODO: use inline function to redirect to the macros?
- using _STLP_VENDOR_CSTD::getc;
- using _STLP_VENDOR_CSTD::putc;
-# endif
- using _STLP_VENDOR_CSTD::getchar;
- using _STLP_VENDOR_CSTD::putchar;
-# endif
-
-using _STLP_VENDOR_CSTD::gets;
-# if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
-using _STLP_VENDOR_CSTD::perror;
-# endif
-using _STLP_VENDOR_CSTD::printf;
-using _STLP_VENDOR_CSTD::puts;
-# if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
-using _STLP_VENDOR_CSTD::remove;
-using _STLP_VENDOR_CSTD::rename;
-using _STLP_VENDOR_CSTD::rewind;
-using _STLP_VENDOR_CSTD::setbuf;
-using _STLP_VENDOR_CSTD::tmpfile;
-using _STLP_VENDOR_CSTD::tmpnam;
-# endif
-using _STLP_VENDOR_CSTD::scanf;
-using _STLP_VENDOR_CSTD::setvbuf;
-using _STLP_VENDOR_CSTD::sprintf;
-using _STLP_VENDOR_CSTD::sscanf;
-using _STLP_VENDOR_CSTD::ungetc;
-using _STLP_VENDOR_CSTD::vfprintf;
-using _STLP_VENDOR_CSTD::vprintf;
-using _STLP_VENDOR_CSTD::vsprintf;
-# if (defined (__MWERKS__) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || \
- (defined (__BORLANDC__)))
-using _STLP_VENDOR_CSTD::vsnprintf;
-# endif
-# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#endif /* _STLP_INTERNAL_CSTDIO */
diff --git a/stlport/stlport/stl/_cstdlib.h b/stlport/stlport/stl/_cstdlib.h
deleted file mode 100755
index b7a4351..0000000
--- a/stlport/stlport/stl/_cstdlib.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- * Copyright (c) 2010, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _STLP_INTERNAL_CSTDLIB
-#define _STLP_INTERNAL_CSTDLIB
-
-#if defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstdlib>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
-# endif
-#else
-# include <stdlib.h>
-#endif
-
-#if defined (__BORLANDC__) && !defined (__linux__)
-/* Borland process.h header do not bring anything here and is just included
- * in order to avoid inclusion later. This header cannot be included later
- * because Borland compiler consider that for instance the abort function
- * defined as extern "C" cannot be overloaded and it finds 2 "overloads",
- * once in native std namespace and the other in STLport namespace...
- */
-# include <process.h>
-#endif
-
-/* on evc3/evc4 including stdlib.h also defines setjmp macro */
-#if defined (_STLP_WCE)
-# define _STLP_NATIVE_SETJMP_H_INCLUDED
-#endif
-
-#if defined (__MSL__) && (__MSL__ <= 0x5003)
-namespace std {
- typedef ::div_t div_t;
- typedef ::ldiv_t ldiv_t;
-# ifdef __MSL_LONGLONG_SUPPORT__
- typedef ::lldiv_t lldiv_t;
-# endif
-}
-#endif
-
-#ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-# if !defined (ANDROID)
-using _STLP_VENDOR_CSTD::div_t;
-using _STLP_VENDOR_CSTD::ldiv_t;
-# endif
-using _STLP_VENDOR_CSTD::size_t;
-
-# ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-# ifndef _STLP_WCE
-// these functions just don't exist on Windows CE
-using _STLP_VENDOR_CSTD::abort;
-using _STLP_VENDOR_CSTD::getenv;
-# if !defined (ANDROID)
-using _STLP_VENDOR_CSTD::mblen;
-using _STLP_VENDOR_CSTD::mbtowc;
-using _STLP_VENDOR_CSTD::system;
-using _STLP_VENDOR_CSTD::bsearch;
-# endif
-# endif
-using _STLP_VENDOR_CSTD::atexit;
-using _STLP_VENDOR_CSTD::exit;
-using _STLP_VENDOR_CSTD::calloc;
-using _STLP_VENDOR_CSTD::free;
-using _STLP_VENDOR_CSTD::malloc;
-using _STLP_VENDOR_CSTD::realloc;
-using _STLP_VENDOR_CSTD::atof;
-using _STLP_VENDOR_CSTD::atoi;
-using _STLP_VENDOR_CSTD::atol;
-using _STLP_VENDOR_CSTD::mbstowcs;
-using _STLP_VENDOR_CSTD::strtod;
-using _STLP_VENDOR_CSTD::strtol;
-using _STLP_VENDOR_CSTD::strtoul;
-
-# if !(defined (_STLP_NO_NATIVE_WIDE_STREAMS) || defined (_STLP_NO_NATIVE_MBSTATE_T))
-using _STLP_VENDOR_CSTD::wcstombs;
-# ifndef _STLP_WCE
-using _STLP_VENDOR_CSTD::wctomb;
-# endif
-# endif
-using _STLP_VENDOR_CSTD::qsort;
-using _STLP_VENDOR_CSTD::labs;
-# if !defined (ANDROID)
-using _STLP_VENDOR_CSTD::ldiv;
-# endif
-# if defined (_STLP_LONG_LONG) && !defined (_STLP_NO_VENDOR_STDLIB_L)
-# if !defined(__sun)
-using _STLP_VENDOR_CSTD::llabs;
-# if !defined (ANDROID)
-using _STLP_VENDOR_CSTD::lldiv_t;
-using _STLP_VENDOR_CSTD::lldiv;
-# endif
-# else
-using ::llabs;
-using ::lldiv_t;
-using ::lldiv;
-# endif
-# endif
-using _STLP_VENDOR_CSTD::rand;
-using _STLP_VENDOR_CSTD::srand;
-# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#if (defined (__BORLANDC__) || defined (__WATCOMC__)) && defined (_STLP_USE_NEW_C_HEADERS)
-//In this config bcc define everything in std namespace and not in
-//the global one.
-inline int abs(int __x) { return _STLP_VENDOR_CSTD::abs(__x); }
-inline _STLP_VENDOR_CSTD::div_t div(int __x, int __y) { return _STLP_VENDOR_CSTD::div(__x, __y); }
-#endif
-
-#if defined(_MSC_EXTENSIONS) && defined(_STLP_MSVC) && (_STLP_MSVC <= 1300)
-# define _STLP_RESTORE_FUNCTION_INTRINSIC
-# pragma warning (push)
-# pragma warning (disable: 4162)
-# pragma function (abs)
-#endif
-
-//HP-UX native lib has abs() and div() functions in global namespace
-#if !defined (__SUNPRO_CC) && \
- (!defined (__HP_aCC) || (__HP_aCC < 30000))
-
-//MSVC starting with .Net 2003 already define all math functions in global namespace:
-# if !defined (__WATCOMC__) && \
- !defined (ANDROID) && \
- (!defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1310) || defined (UNDER_CE))
-inline long abs(long __x) { return _STLP_VENDOR_CSTD::labs(__x); }
-# endif
-
-/** VC since version 8 has this, the platform SDK and CE SDKs hanging behind. */
-# if !defined (__WATCOMC__) && \
- !defined (ANDROID) && \
- (!defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER) || defined (UNDER_CE))
-inline _STLP_VENDOR_CSTD::ldiv_t div(long __x, long __y) { return _STLP_VENDOR_CSTD::ldiv(__x, __y); }
-# endif
-
-#endif
-
-#if defined (_STLP_RESTORE_FUNCTION_INTRINSIC)
-# pragma intrinsic (abs)
-# pragma warning (pop)
-# undef _STLP_RESTORE_FUNCTION_INTRINSIC
-#endif
-
-#if defined (_STLP_LONG_LONG)
-# if !defined (_STLP_NO_VENDOR_STDLIB_L)
-# if !defined (__sun)
-# if !defined (ANDROID)
-inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return _STLP_VENDOR_CSTD::llabs(__x); }
-inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return _STLP_VENDOR_CSTD::lldiv(__x, __y); }
-# endif
-# else
-inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return ::llabs(__x); }
-inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return ::lldiv(__x, __y); }
-# endif
-# else
-inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return __x < 0 ? -__x : __x; }
-# endif
-#endif
-
-/* C++ Standard is unclear about several call to 'using ::func' if new overloads
- * of ::func appears between 2 successive 'using' calls. To avoid this potential
- * problem we provide all abs overload before the 'using' call.
- * Beware: This header inclusion has to be after all abs overload of this file.
- * The first 'using ::abs' call is going to be in the other header.
- */
-#ifndef _STLP_INTERNAL_CMATH
-# include <stl/_cmath.h>
-#endif
-
-#if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-// ad hoc, don't replace with _STLP_VENDOR_CSTD::abs here! - ptr 2005-03-05
-_STLP_BEGIN_NAMESPACE
-# if !defined (ANDROID)
-using ::abs;
-using ::div;
-# endif
-_STLP_END_NAMESPACE
-#endif
-
-#endif /* _STLP_INTERNAL_CSTDLIB */
diff --git a/stlport/stlport/stl/_cstring.h b/stlport/stlport/stl/_cstring.h
deleted file mode 100644
index fe0fd5f..0000000
--- a/stlport/stlport/stl/_cstring.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_INTERNAL_CSTRING
-#define _STLP_INTERNAL_CSTRING
-
-#if defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstring>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstring)
-# endif
-#else
-# include <string.h>
-#endif
-
-#ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-# include <using/cstring>
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#endif /* _STLP_INTERNAL_CSTRING */
diff --git a/stlport/stlport/stl/_ctraits_fns.h b/stlport/stlport/stl/_ctraits_fns.h
deleted file mode 100644
index e4a4af1..0000000
--- a/stlport/stlport/stl/_ctraits_fns.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-// WARNING: This is an internal header file, included by other C++
-// standard library headers. You should not attempt to use this header
-// file directly.
-
-#ifndef _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
-#define _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
-
-#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-# include <stl/_function_base.h>
-#endif
-
-// This file contains a few small adapters that allow a character
-// traits class to be used as a function object.
-
-_STLP_BEGIN_NAMESPACE
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Traits>
-struct _Eq_traits
- : public binary_function<typename _Traits::char_type,
- typename _Traits::char_type,
- bool> {
- bool operator()(const typename _Traits::char_type& __x,
- const typename _Traits::char_type& __y) const
- { return _Traits::eq(__x, __y); }
-};
-
-template <class _Traits>
-struct _Eq_char_bound
- : public unary_function<typename _Traits::char_type, bool> {
- typename _Traits::char_type __val;
- _Eq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
- bool operator()(const typename _Traits::char_type& __x) const
- { return _Traits::eq(__x, __val); }
-};
-
-template <class _Traits>
-struct _Neq_char_bound
- : public unary_function<typename _Traits::char_type, bool>
-{
- typename _Traits::char_type __val;
- _Neq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
- bool operator()(const typename _Traits::char_type& __x) const
- { return !_Traits::eq(__x, __val); }
-};
-
-template <class _Traits>
-struct _Eq_int_bound
- : public unary_function<typename _Traits::char_type, bool> {
- typename _Traits::int_type __val;
-
- _Eq_int_bound(typename _Traits::int_type __c) : __val(__c) {}
- bool operator()(const typename _Traits::char_type& __x) const
- { return _Traits::eq_int_type(_Traits::to_int_type(__x), __val); }
-};
-
-#if 0
-template <class _Traits>
-struct _Lt_traits
- : public binary_function<typename _Traits::char_type,
- typename _Traits::char_type,
- bool> {
- bool operator()(const typename _Traits::char_type& __x,
- const typename _Traits::char_type& __y) const
- { return _Traits::lt(__x, __y); }
-};
-#endif
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_CTRAITS_FUNCTIONS_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_cwchar.h b/stlport/stlport/stl/_cwchar.h
deleted file mode 100644
index 87cb82b..0000000
--- a/stlport/stlport/stl/_cwchar.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_INTERNAL_CWCHAR
-#define _STLP_INTERNAL_CWCHAR
-
-#if defined (_STLP_WCE_EVC3)
-# ifndef _STLP_INTERNAL_MBSTATE_T
-# include <stl/_mbstate_t.h>
-# endif
-#else
-# if defined (__GNUC__)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cstddef>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cstddef)
-# endif
-# endif
-
-# if !defined (_STLP_NO_CWCHAR) && defined (_STLP_USE_NEW_C_HEADERS)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <cwchar>
-# else
-# include _STLP_NATIVE_CPP_C_HEADER(cwchar)
-# endif
-# if defined (__OpenBSD__)
-typedef _BSD_WINT_T_ wint_t;
-# endif /* __OpenBSD__ */
-
-# if defined (__DMC__)
-# define __STDC_LIMIT_MACROS
-# include <stdint.h> // WCHAR_MIN, WCHAR_MAX
-# endif
-# elif defined (_STLP_NO_WCHAR_T) || \
- (defined (__BORLANDC__) && (__BORLANDC__ < 0x570)) || \
- defined (__OpenBSD__) || defined (__FreeBSD__) || \
- (defined (__GNUC__) && (defined (__APPLE__) || defined ( __Lynx__ )))
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <stddef.h>
-# else
-# include _STLP_NATIVE_C_HEADER(stddef.h)
-# endif
-# if defined (__Lynx__)
-# ifndef _WINT_T
-typedef long int wint_t;
-# define _WINT_T
-# endif /* _WINT_T */
-# endif
-# if defined(__OpenBSD__)
-typedef _BSD_WINT_T_ wint_t;
-# endif /* __OpenBSD__ */
-# else
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <wchar.h>
-# else
-# include _STLP_NATIVE_C_HEADER(wchar.h)
-# endif
-
-# if defined (__sun) && (defined (_XOPEN_SOURCE) || (_XOPEN_VERSION - 0 == 4))
-extern wint_t btowc();
-extern int fwprintf();
-extern int fwscanf();
-extern int fwide();
-extern int mbsinit();
-extern size_t mbrlen();
-extern size_t mbrtowc();
-extern size_t mbsrtowcs();
-extern int swprintf();
-extern int swscanf();
-extern int vfwprintf();
-extern int vwprintf();
-extern int vswprintf();
-extern size_t wcrtomb();
-extern size_t wcsrtombs();
-extern wchar_t *wcsstr();
-extern int wctob();
-extern wchar_t *wmemchr();
-extern int wmemcmp();
-extern wchar_t *wmemcpy();
-extern wchar_t *wmemmove();
-extern wchar_t *wmemset();
-extern int wprintf();
-extern int wscanf();
-# endif
-# endif
-
-# if defined (__MSL__) && (__MSL__ <= 0x51FF) /* dwa 2/28/99 - not yet implemented by MSL */
-# define _STLP_WCHAR_MSL_EXCLUDE 1
-namespace std {
- extern "C" size_t wcsftime(wchar_t * str, size_t max_size, const wchar_t * format_str, const struct tm * timeptr);
-}
-# define _STLP_NO_NATIVE_MBSTATE_T 1
-# elif defined (__BORLANDC__)
-# if !defined (_STLP_USE_NO_IOSTREAMS)
-# define _STLP_NO_NATIVE_MBSTATE_T
-# endif
-# define _STLP_WCHAR_BORLAND_EXCLUDE 1
-# endif
-
-# ifndef _STLP_INTERNAL_MBSTATE_T
-# include <stl/_mbstate_t.h>
-# endif
-
-# if !defined (_STLP_NO_WCHAR_T)
-# ifndef WCHAR_MIN
-# define WCHAR_MIN 0
-/* SUNpro has some bugs with casts. wchar_t is size of int there anyway. */
-# if defined (__SUNPRO_CC) || defined (__DJGPP)
-# define WCHAR_MAX (~0)
-# else
-# define WCHAR_MAX ((wchar_t)~0)
-# endif
-# endif
-# if defined (__DMC__) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || defined(_WIN32_WCE)
-/* Compilers that do not define WCHAR_MIN and WCHAR_MAX to be testable at
- * preprocessing time. */
-# undef WCHAR_MIN
-# define WCHAR_MIN 0
-# undef WCHAR_MAX
-# define WCHAR_MAX 0xffff
-# endif
-# if defined (__GNUC__) && defined (__alpha__)
-/* Definition of WCHAR_MIN and MAX are wrong for alpha platform
- * as gcc consider wchar_t as an unsigned type but WCHAR_MIN is defined as
- * a negative value. Static assertion is here to check that a future alpha
- * SDK or a future gcc won't change the situation making this workaround
- * useless.
- */
-/* Check that gcc still consider wchar_t as unsigned */
-_STLP_STATIC_ASSERT(((wchar_t)-1 > 0))
-/* Check that WCHAR_MIN value hasn't been fixed */
-_STLP_STATIC_ASSERT((WCHAR_MIN < 0))
-# undef WCHAR_MIN
-# define WCHAR_MIN 0
-# undef WCHAR_MAX
-# define WCHAR_MAX 0xffffffff
-# endif
-# if defined(__HP_aCC) && (__HP_aCC >= 60000)
-/* Starting with B.11.31, HP-UX/ia64 provides C99-compliant definitions
- * of WCHAR_MIN/MAX macros without having to define
- * _INCLUDE_STDC__SOURCE_199901 macro (which aCC compiler does not
- * predefine). Let STLport provide B.11.31 definitions on any version of
- * HP-UX/ia64.
- */
-# undef WCHAR_MIN
-# define WCHAR_MIN 0
-# undef WCHAR_MAX
-# define WCHAR_MAX UINT_MAX
-# endif
-# endif
-
-# if defined (_STLP_IMPORT_VENDOR_CSTD)
-
-# if defined (__SUNPRO_CC) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
-using _STLP_VENDOR_CSTD::wint_t;
-# endif
-
-_STLP_BEGIN_NAMESPACE
-# if defined (_STLP_NO_WCHAR_T)
-typedef int wint_t;
-# else
-// gcc 3.0 has a glitch : wint_t only sucked into the global namespace if _GLIBCPP_USE_WCHAR_T is defined
-// __MWERKS__ has definition in wchar_t.h (MSL C++), but ones differ from definition
-// in stdio.h; I prefer settings from last file.
-# if (defined (__GNUC__) && ! defined (_GLIBCPP_USE_WCHAR_T))
-using ::wint_t;
-# else
-using _STLP_VENDOR_CSTD::wint_t;
-# endif
-# endif
-
-using _STLP_VENDOR_CSTD::size_t;
-
-# if !defined (_STLP_NO_NATIVE_MBSTATE_T) && !defined (_STLP_USE_OWN_MBSTATE_T)
-using _STLP_VENDOR_MB_NAMESPACE::mbstate_t;
-
-# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) && !defined(_STLP_WCHAR_BORLAND_EXCLUDE) && \
- (!defined(__MSL__) || __MSL__ > 0x6001)
-# if defined (__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 3) || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION >= 8))) || \
- !(defined (__KCC) || defined (__GNUC__)) && !defined(_STLP_WCE_NET)
-using _STLP_VENDOR_MB_NAMESPACE::btowc;
-# if (!defined(__MSL__) || __MSL__ > 0x7001)
-using _STLP_VENDOR_MB_NAMESPACE::mbsinit;
-# endif
-# endif
-# if defined (__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 3) || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION >= 8))) || \
- !defined (__GNUC__) && !defined(_STLP_WCE_NET)
-using _STLP_VENDOR_MB_NAMESPACE::mbrlen;
-using _STLP_VENDOR_MB_NAMESPACE::mbrtowc;
-using _STLP_VENDOR_MB_NAMESPACE::mbsrtowcs;
-using _STLP_VENDOR_MB_NAMESPACE::wcrtomb;
-using _STLP_VENDOR_MB_NAMESPACE::wcsrtombs;
-# endif
-# endif /* BORLAND && !__MSL__ || __MSL__ > 0x6001 */
-
-# endif /* _STLP_NO_NATIVE_MBSTATE_T */
-
-# if !defined (_STLP_NO_NATIVE_WIDE_FUNCTIONS) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-
-# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-using _STLP_VENDOR_CSTD::fgetwc;
-using _STLP_VENDOR_CSTD::fgetws;
-using _STLP_VENDOR_CSTD::fputwc;
-using _STLP_VENDOR_CSTD::fputws;
-# endif
-
-# if !(defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE) || \
- defined(_STLP_WCHAR_HPACC_EXCLUDE) )
-# if !defined (__DECCXX)
-using _STLP_VENDOR_CSTD::fwide;
-# endif
-using _STLP_VENDOR_CSTD::fwprintf;
-using _STLP_VENDOR_CSTD::fwscanf;
-using _STLP_VENDOR_CSTD::getwchar;
-# endif
-
-# if !defined(_STLP_WCHAR_BORLAND_EXCLUDE)
-# ifndef _STLP_WCE_NET
-using _STLP_VENDOR_CSTD::getwc;
-# endif
-using _STLP_VENDOR_CSTD::ungetwc;
-# ifndef _STLP_WCE_NET
-using _STLP_VENDOR_CSTD::putwc;
-# endif
-using _STLP_VENDOR_CSTD::putwchar;
-# endif
-
-# if !(defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE) || \
- defined (_STLP_WCHAR_HPACC_EXCLUDE) )
-# if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB <= 1300) || \
- defined (__MINGW32__)
-# undef swprintf
-# define swprintf _snwprintf
-# undef vswprintf
-# define vswprintf _vsnwprintf
-using ::swprintf;
-using ::vswprintf;
-# else
-using _STLP_VENDOR_CSTD::swprintf;
-using _STLP_VENDOR_CSTD::vswprintf;
-# endif
-using _STLP_VENDOR_CSTD::swscanf;
-using _STLP_VENDOR_CSTD::vfwprintf;
-using _STLP_VENDOR_CSTD::vwprintf;
-
-# if (!defined(__MSL__) || __MSL__ > 0x7001 ) && !defined(_STLP_WCE_NET) && \
- !defined(_STLP_USE_UCLIBC) /* at least in uClibc 0.9.26 */
-
-using _STLP_VENDOR_CSTD::wcsftime;
-# endif
-using _STLP_VENDOR_CSTD::wcstok;
-
-# endif
-
-# if !defined (_STLP_WCE_NET)
-using _STLP_VENDOR_CSTD::wcscoll;
-using _STLP_VENDOR_CSTD::wcsxfrm;
-# endif
-using _STLP_VENDOR_CSTD::wcscat;
-using _STLP_VENDOR_CSTD::wcsrchr;
-using _STLP_VENDOR_CSTD::wcscmp;
-
-using _STLP_VENDOR_CSTD::wcscpy;
-using _STLP_VENDOR_CSTD::wcscspn;
-
-using _STLP_VENDOR_CSTD::wcslen;
-using _STLP_VENDOR_CSTD::wcsncat;
-using _STLP_VENDOR_CSTD::wcsncmp;
-using _STLP_VENDOR_CSTD::wcsncpy;
-using _STLP_VENDOR_CSTD::wcspbrk;
-using _STLP_VENDOR_CSTD::wcschr;
-
-using _STLP_VENDOR_CSTD::wcsspn;
-
-# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
-using _STLP_VENDOR_CSTD::wcstod;
-using _STLP_VENDOR_CSTD::wcstol;
-# endif
-
-# if !(defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_HPACC_EXCLUDE) )
-using _STLP_VENDOR_CSTD::wcsstr;
-using _STLP_VENDOR_CSTD::wmemchr;
-
-# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
-# if !defined (_STLP_WCE_NET)
-using _STLP_VENDOR_CSTD::wctob;
-# endif
-# if !defined (__DMC__)
-using _STLP_VENDOR_CSTD::wmemcmp;
-using _STLP_VENDOR_CSTD::wmemmove;
-# endif
-using _STLP_VENDOR_CSTD::wprintf;
-using _STLP_VENDOR_CSTD::wscanf;
-# endif
-
-# if defined (__BORLANDC__) && !defined (__linux__)
-inline wchar_t* _STLP_wmemcpy(wchar_t* __wdst, const wchar_t* __wsrc, size_t __n)
-{ return __STATIC_CAST(wchar_t*, _STLP_VENDOR_CSTD::wmemcpy(__wdst, __wsrc, __n)); }
-inline wchar_t* _STLP_wmemset(wchar_t* __wdst, wchar_t __wc, size_t __n)
-{ return __STATIC_CAST(wchar_t*, _STLP_VENDOR_CSTD::memset(__wdst, __wc, __n)); }
-# undef wmemcpy
-# undef wmemset
-inline wchar_t* wmemcpy(wchar_t* __wdst, const wchar_t* __wsrc, size_t __n)
-{ return _STLP_wmemcpy(__wdst, __wsrc, __n); }
-inline wchar_t* wmemset(wchar_t* __wdst, wchar_t __wc, size_t __n)
-{ return _STLP_wmemset(__wdst, __wc, __n); }
-# elif defined (__DMC__)
-inline wchar_t* wmemcpy(wchar_t* __RESTRICT __wdst, const wchar_t* __RESTRICT __wsrc, size_t __n)
-{ return __STATIC_CAST(wchar_t*, memcpy(__wdst, __wsrc, __n * sizeof(wchar_t))); }
-inline wchar_t* wmemmove(wchar_t* __RESTRICT __wdst, const wchar_t * __RESTRICT __wc, size_t __n)
-{ return __STATIC_CAST(wchar_t*, memmove(__wdst, __wc, __n * sizeof(wchar_t))); }
-inline wchar_t* wmemset(wchar_t* __wdst, wchar_t __wc, size_t __n)
-{ for (size_t i = 0; i < __n; i++) __wdst[i] = __wc; return __wdst; }
-# else
-using _STLP_VENDOR_CSTD::wmemcpy;
-using _STLP_VENDOR_CSTD::wmemset;
-# endif
-# endif
-
-# endif /* _STLP_NO_NATIVE_WIDE_FUNCTIONS */
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# undef _STLP_WCHAR_SUNPRO_EXCLUDE
-# undef _STLP_WCHAR_MSL_EXCLUDE
-
-# endif /* !defined(_STLP_WCE_EVC3) */
-
-#endif /* _STLP_INTERNAL_CWCHAR */
diff --git a/stlport/stlport/stl/_deque.c b/stlport/stlport/stl/_deque.c
deleted file mode 100644
index 74e9ef6..0000000
--- a/stlport/stlport/stl/_deque.c
+++ /dev/null
@@ -1,823 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_DEQUE_C
-#define _STLP_DEQUE_C
-
-#ifndef _STLP_INTERNAL_DEQUE_H
-# include <stl/_deque.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-// Non-inline member functions from _Deque_base.
-
-template <class _Tp, class _Alloc >
-_Deque_base<_Tp,_Alloc >::~_Deque_base() {
- if (_M_map._M_data) {
- _M_destroy_nodes(_M_start._M_node, this->_M_finish._M_node + 1);
- _M_map.deallocate(_M_map._M_data, _M_map_size._M_data);
- }
-}
-
-template <class _Tp, class _Alloc >
-void _Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements) {
- size_t __num_nodes = __num_elements / this->buffer_size() + 1 ;
-
- _M_map_size._M_data = (max)((size_t) _S_initial_map_size, __num_nodes + 2);
- _M_map._M_data = _M_map.allocate(_M_map_size._M_data);
-
- _Tp** __nstart = _M_map._M_data + (_M_map_size._M_data - __num_nodes) / 2;
- _Tp** __nfinish = __nstart + __num_nodes;
-
- _STLP_TRY {
- _M_create_nodes(__nstart, __nfinish);
- }
- _STLP_UNWIND((_M_map.deallocate(_M_map._M_data, _M_map_size._M_data),
- _M_map._M_data = 0, _M_map_size._M_data = 0))
- _M_start._M_set_node(__nstart);
- this->_M_finish._M_set_node(__nfinish - 1);
- _M_start._M_cur = _M_start._M_first;
- this->_M_finish._M_cur = this->_M_finish._M_first + __num_elements % this->buffer_size();
-}
-
-template <class _Tp, class _Alloc >
-void _Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart,
- _Tp** __nfinish) {
- _Tp** __cur = __nstart;
- _STLP_TRY {
- for (; __cur < __nfinish; ++__cur)
- *__cur = _M_map_size.allocate(this->buffer_size());
- }
- _STLP_UNWIND(_M_destroy_nodes(__nstart, __cur))
-}
-
-template <class _Tp, class _Alloc >
-void _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart,
- _Tp** __nfinish) {
- for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
- _M_map_size.deallocate(*__n, this->buffer_size());
-}
-
-#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
-# define deque _STLP_PTR_IMPL_NAME(deque)
-#elif defined (_STLP_DEBUG)
-# define deque _STLP_NON_DBG_NAME(deque)
-#else
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif
-
-#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
-// qualified references
-# define __iterator__ _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >
-# define const_iterator _Deque_iterator<_Tp, _Const_traits<_Tp> >
-# define iterator __iterator__
-# define size_type size_t
-# define value_type _Tp
-#else
-# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE deque<_Tp, _Alloc>::iterator
-#endif
-
-template <class _Tp, class _Alloc >
-deque<_Tp, _Alloc >&
-deque<_Tp, _Alloc >::operator= (const deque<_Tp, _Alloc >& __x) {
- const size_type __len = size();
- if (&__x != this) {
- if (__len >= __x.size())
- erase(_STLP_STD::copy(__x.begin(), __x.end(), this->_M_start), this->_M_finish);
- else {
- const_iterator __mid = __x.begin() + difference_type(__len);
- _STLP_STD::copy(__x.begin(), __mid, this->_M_start);
- insert(this->_M_finish, __mid, __x.end());
- }
- }
- return *this;
-}
-
-template <class _Tp, class _Alloc >
-void deque<_Tp, _Alloc >::_M_fill_insert(iterator __pos,
- size_type __n, const value_type& __x) {
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- typedef typename __move_traits<_Tp>::implemented _Movable;
-#endif
- if (__pos._M_cur == this->_M_start._M_cur) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- _STLP_TRY {
- uninitialized_fill(__new_start, this->_M_start, __x);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- this->_M_start = __new_start;
- }
- else if (__pos._M_cur == this->_M_finish._M_cur) {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- _STLP_TRY {
- uninitialized_fill(this->_M_finish, __new_finish, __x);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node+1, __new_finish._M_node+1))
- this->_M_finish = __new_finish;
- }
- else
- _M_fill_insert_aux(__pos, __n, __x, _Movable());
-}
-
-#if !defined (_STLP_MEMBER_TEMPLATES)
-
-template <class _Tp, class _Alloc >
-void deque<_Tp, _Alloc>::insert(iterator __pos,
- const value_type* __first, const value_type* __last) {
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- typedef typename __move_traits<_Tp>::implemented _Movable;
-#endif
- size_type __n = __last - __first;
- if (__pos._M_cur == this->_M_start._M_cur) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- _STLP_TRY {
- _STLP_PRIV __ucopy(__first, __last, __new_start);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- this->_M_start = __new_start;
- }
- else if (__pos._M_cur == this->_M_finish._M_cur) {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- _STLP_TRY {
- _STLP_PRIV __ucopy(__first, __last, this->_M_finish);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,
- __new_finish._M_node + 1))
- this->_M_finish = __new_finish;
- }
- else
- _M_insert_range_aux(__pos, __first, __last, __n, _Movable());
-}
-
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::insert(iterator __pos,
- const_iterator __first, const_iterator __last) {
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- typedef typename __move_traits<_Tp>::implemented _Movable;
-#endif
- size_type __n = __last - __first;
- if (__pos._M_cur == this->_M_start._M_cur) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- _STLP_TRY {
- _STLP_PRIV __ucopy(__first, __last, __new_start);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- this->_M_start = __new_start;
- }
- else if (__pos._M_cur == this->_M_finish._M_cur) {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- _STLP_TRY {
- _STLP_PRIV __ucopy(__first, __last, this->_M_finish);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,
- __new_finish._M_node + 1))
- this->_M_finish = __new_finish;
- }
- else
- _M_insert_range_aux(__pos, __first, __last, __n, _Movable());
-}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-template <class _Tp, class _Alloc >
-__iterator__ deque<_Tp,_Alloc>::_M_erase(iterator __pos,
- const __true_type& /*_Movable*/) {
- difference_type __index = __pos - this->_M_start;
- if (size_type(__index) < this->size() >> 1) {
- //We move the start of the deque one position to the right
- //starting from the rightmost element to move.
- iterator __src = __pos, __dst = __pos;
- _STLP_STD::_Destroy(&(*__dst));
- if (__src != this->_M_start) {
- for (--__src; __dst != this->_M_start; --__src, --__dst) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- }
- _M_pop_front_aux();
- }
- else {
- iterator __src = __pos, __dst = __pos;
- _STLP_STD::_Destroy(&(*__dst));
- for (++__src; __src != this->_M_finish; ++__src, ++__dst) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- //Duplication of the pop_back code without the destroy which has already been done:
- if (this->_M_finish._M_cur != this->_M_finish._M_first) {
- --this->_M_finish._M_cur;
- }
- else {
- _M_pop_back_aux();
- }
- }
- return this->_M_start + __index;
-}
-
-template <class _Tp, class _Alloc >
-__iterator__ deque<_Tp,_Alloc>::_M_erase(iterator __pos,
- const __false_type& /*_Movable*/) {
- iterator __next = __pos;
- ++__next;
- difference_type __index = __pos - this->_M_start;
- if (size_type(__index) < this->size() >> 1) {
- copy_backward(this->_M_start, __pos, __next);
- pop_front();
- }
- else {
- _STLP_STD::copy(__next, this->_M_finish, __pos);
- pop_back();
- }
- return this->_M_start + __index;
-}
-
-template <class _Tp, class _Alloc >
-__iterator__ deque<_Tp,_Alloc>::_M_erase(iterator __first, iterator __last,
- const __true_type& /*_Movable*/) {
- difference_type __n = __last - __first;
- difference_type __elems_before = __first - this->_M_start;
- if (__elems_before <= difference_type(this->size() - __n) / 2) {
- iterator __src = __first, __dst = __last;
- if (__src != this->_M_start) {
- for (--__src, --__dst; (__src >= this->_M_start) && (__dst >= __first); --__src, --__dst) {
- _STLP_STD::_Destroy(&(*__dst));
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- }
- if (__dst >= __first) {
- //There are more elements to erase than elements to move
- _STLP_STD::_Destroy_Range(__first, ++__dst);
- _STLP_STD::_Destroy_Moved_Range(this->_M_start, __first);
- }
- else {
- //There are more elements to move than elements to erase
- for (; __src >= this->_M_start; --__src, --__dst) {
- _STLP_STD::_Destroy_Moved(&(*__dst));
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- }
- _STLP_STD::_Destroy_Moved_Range(this->_M_start, ++__dst);
- }
- }
- else {
- _STLP_STD::_Destroy_Range(this->_M_start, __last);
- }
- iterator __new_start = this->_M_start + __n;
- this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node);
- this->_M_start = __new_start;
- }
- else {
- if (__last != this->_M_finish) {
- iterator __src = __last, __dst = __first;
- for (; (__src != this->_M_finish) && (__dst != __last); ++__src, ++__dst) {
- _STLP_STD::_Destroy(&(*__dst));
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- }
- if (__dst != __last) {
- //There are more elements to erase than elements to move
- _STLP_STD::_Destroy_Range(__dst, __last);
- _STLP_STD::_Destroy_Moved_Range(__last, this->_M_finish);
- }
- else {
- //There are more elements to move than elements to erase
- for (; __src != this->_M_finish; ++__src, ++__dst) {
- _STLP_STD::_Destroy_Moved(&(*__dst));
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- }
- _STLP_STD::_Destroy_Moved_Range(__dst, this->_M_finish);
- }
- }
- else {
- _STLP_STD::_Destroy_Range(__first, this->_M_finish);
- }
- iterator __new_finish = this->_M_finish - __n;
- this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1);
- this->_M_finish = __new_finish;
- }
- return this->_M_start + __elems_before;
-}
-
-template <class _Tp, class _Alloc >
-__iterator__ deque<_Tp,_Alloc>::_M_erase(iterator __first, iterator __last,
- const __false_type& /*_Movable*/) {
- difference_type __n = __last - __first;
- difference_type __elems_before = __first - this->_M_start;
- if (__elems_before <= difference_type(this->size() - __n) / 2) {
- copy_backward(this->_M_start, __first, __last);
- iterator __new_start = this->_M_start + __n;
- _STLP_STD::_Destroy_Range(this->_M_start, __new_start);
- this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node);
- this->_M_start = __new_start;
- }
- else {
- _STLP_STD::copy(__last, this->_M_finish, __first);
- iterator __new_finish = this->_M_finish - __n;
- _STLP_STD::_Destroy_Range(__new_finish, this->_M_finish);
- this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1);
- this->_M_finish = __new_finish;
- }
- return this->_M_start + __elems_before;
-}
-
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::clear() {
- for (_Map_pointer __node = this->_M_start._M_node + 1;
- __node < this->_M_finish._M_node;
- ++__node) {
- _STLP_STD::_Destroy_Range(*__node, *__node + this->buffer_size());
- this->_M_map_size.deallocate(*__node, this->buffer_size());
- }
-
- if (this->_M_start._M_node != this->_M_finish._M_node) {
- _STLP_STD::_Destroy_Range(this->_M_start._M_cur, this->_M_start._M_last);
- _STLP_STD::_Destroy_Range(this->_M_finish._M_first, this->_M_finish._M_cur);
- this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size());
- }
- else
- _STLP_STD::_Destroy_Range(this->_M_start._M_cur, this->_M_finish._M_cur);
-
- this->_M_finish = this->_M_start;
-}
-
-// Precondition: this->_M_start and this->_M_finish have already been initialized,
-// but none of the deque's elements have yet been constructed.
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_fill_initialize(const value_type& __val,
- const __false_type& /*_TrivialInit*/) {
- _Map_pointer __cur = this->_M_start._M_node;
- _STLP_TRY {
- for (; __cur < this->_M_finish._M_node; ++__cur)
- uninitialized_fill(*__cur, *__cur + this->buffer_size(), __val);
- uninitialized_fill(this->_M_finish._M_first, this->_M_finish._M_cur, __val);
- }
- _STLP_UNWIND(_STLP_STD::_Destroy_Range(this->_M_start, iterator(*__cur, __cur)))
-}
-
-
-// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1.
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_push_back_aux_v(const value_type& __t) {
- _M_reserve_map_at_back();
- *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size());
- _STLP_TRY {
- _Copy_Construct(this->_M_finish._M_cur, __t);
- this->_M_finish._M_set_node(this->_M_finish._M_node + 1);
- this->_M_finish._M_cur = this->_M_finish._M_first;
- }
- _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1),
- this->buffer_size()))
-}
-
-#if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
-// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1.
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_push_back_aux() {
- _M_reserve_map_at_back();
- *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size());
- _STLP_TRY {
- _STLP_STD::_Construct(this->_M_finish._M_cur);
- this->_M_finish._M_set_node(this->_M_finish._M_node + 1);
- this->_M_finish._M_cur = this->_M_finish._M_first;
- }
- _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1),
- this->buffer_size()))
-}
-#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
-
-// Called only if this->_M_start._M_cur == this->_M_start._M_first.
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_push_front_aux_v(const value_type& __t) {
- _M_reserve_map_at_front();
- *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size());
- _STLP_TRY {
- this->_M_start._M_set_node(this->_M_start._M_node - 1);
- this->_M_start._M_cur = this->_M_start._M_last - 1;
- _Copy_Construct(this->_M_start._M_cur, __t);
- }
- _STLP_UNWIND((++this->_M_start,
- this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), this->buffer_size())))
-}
-
-
-#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
-// Called only if this->_M_start._M_cur == this->_M_start._M_first.
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_push_front_aux() {
- _M_reserve_map_at_front();
- *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size());
- _STLP_TRY {
- this->_M_start._M_set_node(this->_M_start._M_node - 1);
- this->_M_start._M_cur = this->_M_start._M_last - 1;
- _STLP_STD::_Construct(this->_M_start._M_cur);
- }
- _STLP_UNWIND((++this->_M_start, this->_M_map_size.deallocate(*(this->_M_start._M_node - 1),
- this->buffer_size())))
-}
-#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
-
-// Called only if this->_M_finish._M_cur == this->_M_finish._M_first.
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_pop_back_aux() {
- this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size());
- this->_M_finish._M_set_node(this->_M_finish._M_node - 1);
- this->_M_finish._M_cur = this->_M_finish._M_last - 1;
-}
-
-// Note that if the deque has at least one element (a precondition for this member
-// function), and if this->_M_start._M_cur == this->_M_start._M_last, then the deque
-// must have at least two nodes.
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_pop_front_aux() {
- if (this->_M_start._M_cur != this->_M_start._M_last - 1)
- ++this->_M_start._M_cur;
- else {
- this->_M_map_size.deallocate(this->_M_start._M_first, this->buffer_size());
- this->_M_start._M_set_node(this->_M_start._M_node + 1);
- this->_M_start._M_cur = this->_M_start._M_first;
- }
-}
-
-template <class _Tp, class _Alloc >
-__iterator__ deque<_Tp,_Alloc>::_M_fill_insert_aux(iterator __pos, size_type __n,
- const value_type& __x,
- const __true_type& /*_Movable*/) {
- const difference_type __elems_before = __pos - this->_M_start;
- 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);
- __pos = this->_M_start + __elems_before;
- _STLP_TRY {
- iterator __dst = __new_start;
- iterator __src = this->_M_start;
- for (; __src != __pos; ++__dst, ++__src) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- this->_M_start = __new_start;
- uninitialized_fill(__dst, __src, __x_copy);
- __pos = __dst;
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- const difference_type __elems_after = difference_type(__length) - __elems_before;
- __pos = this->_M_finish - __elems_after;
- _STLP_TRY {
- iterator __dst = __new_finish;
- iterator __src = this->_M_finish;
- for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- this->_M_finish = __new_finish;
- uninitialized_fill(__pos, __pos + __n, __x_copy);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
- return __pos;
-}
-
-template <class _Tp, class _Alloc >
-__iterator__ deque<_Tp,_Alloc>::_M_fill_insert_aux(iterator __pos, size_type __n,
- const value_type& __x,
- const __false_type& /*_Movable*/) {
- const difference_type __elems_before = __pos - this->_M_start;
- 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_start;
- __pos = this->_M_start + __elems_before;
- _STLP_TRY {
- if (__elems_before >= difference_type(__n)) {
- iterator __start_n = this->_M_start + difference_type(__n);
- _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
- this->_M_start = __new_start;
- _STLP_STD::copy(__start_n, __pos, __old_start);
- _STLP_STD::fill(__pos - difference_type(__n), __pos, __x_copy);
- __pos -= difference_type(__n);
- }
- else {
- _STLP_PRIV __uninitialized_copy_fill(this->_M_start, __pos, __new_start,
- this->_M_start, __x_copy);
- this->_M_start = __new_start;
- fill(__old_start, __pos, __x_copy);
- }
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- iterator __old_finish = this->_M_finish;
- const difference_type __elems_after =
- difference_type(__length) - __elems_before;
- __pos = this->_M_finish - __elems_after;
- _STLP_TRY {
- if (__elems_after > difference_type(__n)) {
- iterator __finish_n = this->_M_finish - difference_type(__n);
- _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
- this->_M_finish = __new_finish;
- copy_backward(__pos, __finish_n, __old_finish);
- fill(__pos, __pos + difference_type(__n), __x_copy);
- }
- else {
- _STLP_PRIV __uninitialized_fill_copy(this->_M_finish, __pos + difference_type(__n),
- __x_copy, __pos, this->_M_finish);
- this->_M_finish = __new_finish;
- fill(__pos, __old_finish, __x_copy);
- }
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
- return __pos;
-}
-
-#if !defined (_STLP_MEMBER_TEMPLATES)
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_insert_range_aux(iterator __pos,
- const value_type* __first, const value_type* __last,
- size_type __n, const __true_type& /*_Movable*/) {
- const difference_type __elems_before = __pos - this->_M_start;
- size_type __length = size();
- if (__elems_before <= difference_type(__length / 2)) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- __pos = this->_M_start + __elems_before;
- _STLP_TRY {
- iterator __dst = __new_start;
- iterator __src = this->_M_start;
- for (; __src != __pos; ++__dst, ++__src) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- this->_M_start = __new_start;
- _STLP_PRIV __ucopy(__first, __last, __dst);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- const difference_type __elems_after = difference_type(__length) - __elems_before;
- __pos = this->_M_finish - __elems_after;
- _STLP_TRY {
- iterator __dst = __new_finish;
- iterator __src = this->_M_finish;
- for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- this->_M_finish = __new_finish;
- _STLP_PRIV __ucopy(__first, __last, __pos);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
-}
-
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_insert_range_aux(iterator __pos,
- const value_type* __first, const value_type* __last,
- size_type __n, const __false_type& /*_Movable*/) {
- const difference_type __elems_before = __pos - this->_M_start;
- size_type __length = size();
- if (__elems_before <= difference_type(__length / 2)) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- iterator __old_start = this->_M_start;
- __pos = this->_M_start + __elems_before;
- _STLP_TRY {
- if (__elems_before >= difference_type(__n)) {
- iterator __start_n = this->_M_start + difference_type(__n);
- _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
- this->_M_start = __new_start;
- _STLP_STD::copy(__start_n, __pos, __old_start);
- _STLP_STD::copy(__first, __last, __pos - difference_type(__n));
- }
- else {
- const value_type* __mid = __first + (difference_type(__n) - __elems_before);
- _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start);
- this->_M_start = __new_start;
- _STLP_STD::copy(__mid, __last, __old_start);
- }
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- iterator __old_finish = this->_M_finish;
- const difference_type __elems_after =
- difference_type(__length) - __elems_before;
- __pos = this->_M_finish - __elems_after;
- _STLP_TRY {
-
- if (__elems_after > difference_type(__n)) {
- iterator __finish_n = this->_M_finish - difference_type(__n);
- _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
- this->_M_finish = __new_finish;
- _STLP_STD::copy_backward(__pos, __finish_n, __old_finish);
- _STLP_STD::copy(__first, __last, __pos);
- }
- else {
- const value_type* __mid = __first + __elems_after;
- _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish);
- this->_M_finish = __new_finish;
- _STLP_STD::copy(__first, __mid, __pos);
- }
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
-}
-
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_insert_range_aux(iterator __pos,
- const_iterator __first, const_iterator __last,
- size_type __n, const __true_type& /*_Movable*/) {
- const difference_type __elems_before = __pos - this->_M_start;
- size_type __length = size();
- if (__elems_before <= difference_type(__length / 2)) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- __pos = this->_M_start + __elems_before;
- _STLP_TRY {
- iterator __dst = __new_start;
- iterator __src = this->_M_start;
- for (; __src != __pos; ++__dst, ++__src) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- this->_M_start = __new_start;
- _STLP_PRIV __ucopy(__first, __last, __dst);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- const difference_type __elems_after = difference_type(__length) - __elems_before;
- __pos = this->_M_finish - __elems_after;
- _STLP_TRY {
- iterator __dst = __new_finish;
- iterator __src = this->_M_finish;
- for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- this->_M_finish = __new_finish;
- _STLP_PRIV __ucopy(__first, __last, __pos);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
-}
-
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_insert_range_aux(iterator __pos,
- const_iterator __first, const_iterator __last,
- size_type __n, const __false_type& /*_Movable*/) {
- const difference_type __elems_before = __pos - this->_M_start;
- size_type __length = size();
- if (__elems_before < difference_type(__length / 2)) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- iterator __old_start = this->_M_start;
- __pos = this->_M_start + __elems_before;
- _STLP_TRY {
- if (__elems_before >= difference_type(__n)) {
- iterator __start_n = this->_M_start + __n;
- _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
- this->_M_start = __new_start;
- _STLP_STD::copy(__start_n, __pos, __old_start);
- _STLP_STD::copy(__first, __last, __pos - difference_type(__n));
- }
- else {
- const_iterator __mid = __first + (__n - __elems_before);
- _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start);
- this->_M_start = __new_start;
- _STLP_STD::copy(__mid, __last, __old_start);
- }
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- iterator __old_finish = this->_M_finish;
- const difference_type __elems_after = __length - __elems_before;
- __pos = this->_M_finish - __elems_after;
- _STLP_TRY {
- if (__elems_after > difference_type(__n)) {
- iterator __finish_n = this->_M_finish - difference_type(__n);
- _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
- this->_M_finish = __new_finish;
- _STLP_STD::copy_backward(__pos, __finish_n, __old_finish);
- _STLP_STD::copy(__first, __last, __pos);
- }
- else {
- const_iterator __mid = __first + __elems_after;
- _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish);
- this->_M_finish = __new_finish;
- _STLP_STD::copy(__first, __mid, __pos);
- }
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
-}
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_new_elements_at_front(size_type __new_elems) {
- size_type __new_nodes
- = (__new_elems + this->buffer_size() - 1) / this->buffer_size();
- _M_reserve_map_at_front(__new_nodes);
- size_type __i = 1;
- _STLP_TRY {
- for (; __i <= __new_nodes; ++__i)
- *(this->_M_start._M_node - __i) = this->_M_map_size.allocate(this->buffer_size());
- }
- _STLP_UNWIND(for (size_type __j = 1; __j < __i; ++__j)
- this->_M_map_size.deallocate(*(this->_M_start._M_node - __j), this->buffer_size()))
-}
-
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_new_elements_at_back(size_type __new_elems) {
- size_type __new_nodes
- = (__new_elems + this->buffer_size() - 1) / this->buffer_size();
- _M_reserve_map_at_back(__new_nodes);
- size_type __i = 1;
- _STLP_TRY {
- for (; __i <= __new_nodes; ++__i)
- *(this->_M_finish._M_node + __i) = this->_M_map_size.allocate(this->buffer_size());
- }
- _STLP_UNWIND(for (size_type __j = 1; __j < __i; ++__j)
- this->_M_map_size.deallocate(*(this->_M_finish._M_node + __j), this->buffer_size()))
-}
-
-template <class _Tp, class _Alloc >
-void deque<_Tp,_Alloc>::_M_reallocate_map(size_type __nodes_to_add,
- bool __add_at_front) {
- size_type __old_num_nodes = this->_M_finish._M_node - this->_M_start._M_node + 1;
- size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
-
- _Map_pointer __new_nstart;
- if (this->_M_map_size._M_data > 2 * __new_num_nodes) {
- __new_nstart = this->_M_map._M_data + (this->_M_map_size._M_data - __new_num_nodes) / 2
- + (__add_at_front ? __nodes_to_add : 0);
- if (__new_nstart < this->_M_start._M_node)
- _STLP_STD::copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart);
- else
- _STLP_STD::copy_backward(this->_M_start._M_node, this->_M_finish._M_node + 1,
- __new_nstart + __old_num_nodes);
- }
- else {
- size_type __new_map_size =
- this->_M_map_size._M_data + (max)((size_t)this->_M_map_size._M_data, __nodes_to_add) + 2;
-
- _Map_pointer __new_map = this->_M_map.allocate(__new_map_size);
- __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
- + (__add_at_front ? __nodes_to_add : 0);
- _STLP_STD::copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart);
- this->_M_map.deallocate(this->_M_map._M_data, this->_M_map_size._M_data);
-
- this->_M_map._M_data = __new_map;
- this->_M_map_size._M_data = __new_map_size;
- }
-
- this->_M_start._M_set_node(__new_nstart);
- this->_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
-}
-
-#if defined (deque)
-# undef deque
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif
-
-_STLP_END_NAMESPACE
-
-#undef __iterator__
-#undef iterator
-#undef const_iterator
-#undef size_type
-#undef value_type
-
-#endif /* _STLP_DEQUE_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_deque.h b/stlport/stlport/stl/_deque.h
deleted file mode 100644
index a8faeef..0000000
--- a/stlport/stlport/stl/_deque.h
+++ /dev/null
@@ -1,1115 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_DEQUE_H
-#define _STLP_INTERNAL_DEQUE_H
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-# include <stl/_algobase.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-# include <stl/_alloc.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_H
-# include <stl/_iterator.h>
-#endif
-
-#ifndef _STLP_INTERNAL_UNINITIALIZED_H
-# include <stl/_uninitialized.h>
-#endif
-
-#ifndef _STLP_RANGE_ERRORS_H
-# include <stl/_range_errors.h>
-#endif
-
-/* Class invariants:
- * For any nonsingular iterator i:
- * i.node is the address of an element in the map array. The
- * contents of i.node is a pointer to the beginning of a node.
- * i.first == *(i.node)
- * 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, and that a deque
- * with N elements, where N is the buffer size, must have two nodes.
- * 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].
- */
-
-_STLP_BEGIN_NAMESPACE
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Tp>
-struct _Deque_iterator_base {
-
- static size_t _S_buffer_size() {
- const size_t blocksize = _MAX_BYTES;
- return (sizeof(_Tp) < blocksize ? (blocksize / sizeof(_Tp)) : 1);
- }
-
- typedef random_access_iterator_tag iterator_category;
-
- typedef _Tp value_type;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
-
- typedef value_type** _Map_pointer;
-
- typedef _Deque_iterator_base< _Tp > _Self;
-
- value_type* _M_cur;
- value_type* _M_first;
- value_type* _M_last;
- _Map_pointer _M_node;
-
- _Deque_iterator_base(value_type* __x, _Map_pointer __y)
- : _M_cur(__x), _M_first(*__y),
- _M_last(*__y + _S_buffer_size()), _M_node(__y) {}
-
- _Deque_iterator_base() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {}
-
-// see comment in doc/README.evc4 and doc/README.evc8
-#if defined (_STLP_MSVC) && (_STLP_MSVC <= 1401) && defined (MIPS) && defined (NDEBUG)
- _Deque_iterator_base(_Deque_iterator_base const& __other)
- : _M_cur(__other._M_cur), _M_first(__other._M_first),
- _M_last(__other._M_last), _M_node(__other._M_node) {}
-#endif
-
- difference_type _M_subtract(const _Self& __x) const {
- return difference_type(_S_buffer_size()) * (_M_node - __x._M_node - 1) +
- (_M_cur - _M_first) + (__x._M_last - __x._M_cur);
- }
-
- void _M_increment() {
- if (++_M_cur == _M_last) {
- _M_set_node(_M_node + 1);
- _M_cur = _M_first;
- }
- }
-
- void _M_decrement() {
- if (_M_cur == _M_first) {
- _M_set_node(_M_node - 1);
- _M_cur = _M_last;
- }
- --_M_cur;
- }
-
- void _M_advance(difference_type __n) {
- const size_t buffersize = _S_buffer_size();
- difference_type __offset = __n + (_M_cur - _M_first);
- if (__offset >= 0 && __offset < difference_type(buffersize))
- _M_cur += __n;
- else {
- difference_type __node_offset =
- __offset > 0 ? __offset / buffersize
- : -difference_type((-__offset - 1) / buffersize) - 1;
- _M_set_node(_M_node + __node_offset);
- _M_cur = _M_first +
-
- (__offset - __node_offset * difference_type(buffersize));
- }
- }
-
- void _M_set_node(_Map_pointer __new_node) {
- _M_last = (_M_first = *(_M_node = __new_node)) + difference_type(_S_buffer_size());
- }
-};
-
-
-template <class _Tp, class _Traits>
-struct _Deque_iterator : public _Deque_iterator_base< _Tp> {
- typedef random_access_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef typename _Traits::reference reference;
- typedef typename _Traits::pointer pointer;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef value_type** _Map_pointer;
-
- typedef _Deque_iterator_base< _Tp > _Base;
- typedef _Deque_iterator<_Tp, _Traits> _Self;
- typedef typename _Traits::_NonConstTraits _NonConstTraits;
- typedef _Deque_iterator<_Tp, _NonConstTraits> iterator;
- typedef typename _Traits::_ConstTraits _ConstTraits;
- typedef _Deque_iterator<_Tp, _ConstTraits> const_iterator;
-
- _Deque_iterator(value_type* __x, _Map_pointer __y) :
- _Deque_iterator_base<value_type>(__x,__y) {}
-
- _Deque_iterator() {}
- //copy constructor for iterator and constructor from iterator for const_iterator
- _Deque_iterator(const iterator& __x) :
- _Deque_iterator_base<value_type>(__x) {}
-
- reference operator*() const {
- return *this->_M_cur;
- }
-
- _STLP_DEFINE_ARROW_OPERATOR
-
- difference_type operator-(const const_iterator& __x) const { return this->_M_subtract(__x); }
-
- _Self& operator++() { this->_M_increment(); return *this; }
- _Self operator++(int) {
- _Self __tmp = *this;
- ++*this;
- return __tmp;
- }
-
- _Self& operator--() { this->_M_decrement(); return *this; }
- _Self operator--(int) {
- _Self __tmp = *this;
- --*this;
- return __tmp;
- }
-
- _Self& operator+=(difference_type __n) { this->_M_advance(__n); 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); }
-};
-
-
-template <class _Tp, class _Traits>
-inline _Deque_iterator<_Tp, _Traits> _STLP_CALL
-operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Traits>& __x)
-{ return __x + __n; }
-
-
-#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
-template <class _Tp>
-inline bool _STLP_CALL
-operator==(const _Deque_iterator_base<_Tp >& __x,
- const _Deque_iterator_base<_Tp >& __y)
-{ return __x._M_cur == __y._M_cur; }
-
-template <class _Tp>
-inline bool _STLP_CALL
-operator < (const _Deque_iterator_base<_Tp >& __x,
- const _Deque_iterator_base<_Tp >& __y) {
- return (__x._M_node == __y._M_node) ?
- (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node);
-}
-
-template <class _Tp>
-inline bool _STLP_CALL
-operator!=(const _Deque_iterator_base<_Tp >& __x,
- const _Deque_iterator_base<_Tp >& __y)
-{ return __x._M_cur != __y._M_cur; }
-
-template <class _Tp>
-inline bool _STLP_CALL
-operator>(const _Deque_iterator_base<_Tp >& __x,
- const _Deque_iterator_base<_Tp >& __y)
-{ return __y < __x; }
-
-template <class _Tp>
-inline bool _STLP_CALL operator>=(const _Deque_iterator_base<_Tp >& __x,
- const _Deque_iterator_base<_Tp >& __y)
-{ return !(__x < __y); }
-
-template <class _Tp>
-inline bool _STLP_CALL operator<=(const _Deque_iterator_base<_Tp >& __x,
- const _Deque_iterator_base<_Tp >& __y)
-{ return !(__y < __x); }
-
-#else /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-template <class _Tp, class _Traits1, class _Traits2>
-inline bool _STLP_CALL
-operator==(const _Deque_iterator<_Tp, _Traits1 >& __x,
- const _Deque_iterator<_Tp, _Traits2 >& __y)
-{ return __x._M_cur == __y._M_cur; }
-
-template <class _Tp, class _Traits1, class _Traits2>
-inline bool _STLP_CALL
-operator < (const _Deque_iterator<_Tp, _Traits1 >& __x,
- const _Deque_iterator<_Tp, _Traits2 >& __y) {
- return (__x._M_node == __y._M_node) ?
- (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node);
-}
-
-template <class _Tp>
-inline bool _STLP_CALL
-operator!=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
- const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y)
-{ return __x._M_cur != __y._M_cur; }
-
-template <class _Tp>
-inline bool _STLP_CALL
-operator>(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
- const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y)
-{ return __y < __x; }
-
-template <class _Tp>
-inline bool _STLP_CALL
-operator>=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
- const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y)
-{ return !(__x < __y); }
-
-template <class _Tp>
-inline bool _STLP_CALL
-operator<=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
- const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y)
-{ return !(__y < __x); }
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-_STLP_MOVE_TO_STD_NAMESPACE
-template <class _Tp, class _Traits>
-struct __type_traits<_STLP_PRIV _Deque_iterator<_Tp, _Traits> > {
- typedef __false_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __false_type is_POD_type;
-};
-_STLP_MOVE_TO_PRIV_NAMESPACE
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
-_STLP_MOVE_TO_STD_NAMESPACE
-template <class _Tp, class _Traits> inline _Tp* _STLP_CALL
-value_type(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return (_Tp*)0; }
-template <class _Tp, class _Traits> inline random_access_iterator_tag _STLP_CALL
-iterator_category(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return random_access_iterator_tag(); }
-template <class _Tp, class _Traits> inline ptrdiff_t* _STLP_CALL
-distance_type(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return 0; }
-_STLP_MOVE_TO_PRIV_NAMESPACE
-#endif
-
-/* Deque base class. It has two purposes. First, its constructor
- * and destructor allocate (but don't initialize) storage. This makes
- * exception safety easier. Second, the base class encapsulates all of
- * the differences between SGI-style allocators and standard-conforming
- * allocators.
- */
-
-template <class _Tp, class _Alloc>
-class _Deque_base {
- typedef _Deque_base<_Tp, _Alloc> _Self;
-public:
- typedef _Tp value_type;
- _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
- typedef _Alloc allocator_type;
- typedef _STLP_alloc_proxy<size_t, value_type, allocator_type> _Alloc_proxy;
-
- typedef typename _Alloc_traits<_Tp*, _Alloc>::allocator_type _Map_alloc_type;
- typedef _STLP_alloc_proxy<value_type**, value_type*, _Map_alloc_type> _Map_alloc_proxy;
-
- typedef _Deque_iterator<_Tp, _Nonconst_traits<_Tp> > iterator;
- typedef _Deque_iterator<_Tp, _Const_traits<_Tp> > const_iterator;
-
- static size_t _STLP_CALL buffer_size() { return _Deque_iterator_base<_Tp>::_S_buffer_size(); }
-
- _Deque_base(const allocator_type& __a, size_t __num_elements)
- : _M_start(), _M_finish(), _M_map(_STLP_CONVERT_ALLOCATOR(__a, _Tp*), 0),
- _M_map_size(__a, (size_t)0)
- { _M_initialize_map(__num_elements); }
-
- _Deque_base(const allocator_type& __a)
- : _M_start(), _M_finish(), _M_map(_STLP_CONVERT_ALLOCATOR(__a, _Tp*), 0),
- _M_map_size(__a, (size_t)0) {}
-
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- _Deque_base(__move_source<_Self> src)
- : _M_start(src.get()._M_start), _M_finish(src.get()._M_finish),
- _M_map(__move_source<_Map_alloc_proxy>(src.get()._M_map)),
- _M_map_size(__move_source<_Alloc_proxy>(src.get()._M_map_size)) {
- src.get()._M_map._M_data = 0;
- src.get()._M_map_size._M_data = 0;
- src.get()._M_finish = src.get()._M_start;
- }
-#endif
-
- ~_Deque_base();
-
-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 };
-
-protected:
- iterator _M_start;
- iterator _M_finish;
- _Map_alloc_proxy _M_map;
- _Alloc_proxy _M_map_size;
-};
-
-#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
-# define deque _STLP_PTR_IMPL_NAME(deque)
-#elif defined (_STLP_DEBUG)
-# define deque _STLP_NON_DBG_NAME(deque)
-#else
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif
-
-template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
-class deque : protected _STLP_PRIV _Deque_base<_Tp, _Alloc>
-#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (deque)
- , public __stlport_class<deque<_Tp, _Alloc> >
-#endif
-{
- typedef _STLP_PRIV _Deque_base<_Tp, _Alloc> _Base;
- typedef deque<_Tp, _Alloc> _Self;
-public: // Basic types
- typedef _Tp value_type;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef random_access_iterator_tag _Iterator_category;
- _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
- typedef typename _Base::allocator_type allocator_type;
-
-public: // Iterators
- typedef typename _Base::iterator iterator;
- typedef typename _Base::const_iterator const_iterator;
-
- _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-
-protected: // Internal typedefs
- typedef pointer* _Map_pointer;
-#if defined (_STLP_NO_MOVE_SEMANTIC)
- typedef __false_type _Movable;
-#endif
-
-public: // Basic accessors
- iterator begin() { return this->_M_start; }
- iterator end() { return this->_M_finish; }
- const_iterator begin() const { return const_iterator(this->_M_start); }
- const_iterator end() const { return const_iterator(this->_M_finish); }
-
- reverse_iterator rbegin() { return reverse_iterator(this->_M_finish); }
- reverse_iterator rend() { return reverse_iterator(this->_M_start); }
- const_reverse_iterator rbegin() const
- { return const_reverse_iterator(this->_M_finish); }
- const_reverse_iterator rend() const
- { return const_reverse_iterator(this->_M_start); }
-
- reference operator[](size_type __n)
- { return this->_M_start[difference_type(__n)]; }
- const_reference operator[](size_type __n) const
- { return this->_M_start[difference_type(__n)]; }
-
- void _M_range_check(size_type __n) const {
- if (__n >= this->size())
- __stl_throw_out_of_range("deque");
- }
- 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]; }
-
- reference front() { return *this->_M_start; }
- reference back() {
- iterator __tmp = this->_M_finish;
- --__tmp;
- return *__tmp;
- }
- const_reference front() const { return *this->_M_start; }
- const_reference back() const {
- const_iterator __tmp = this->_M_finish;
- --__tmp;
- return *__tmp;
- }
-
- size_type size() const { return this->_M_finish - this->_M_start; }
- size_type max_size() const { return size_type(-1); }
- bool empty() const { return this->_M_finish == this->_M_start; }
- allocator_type get_allocator() const { return this->_M_map_size; }
-
-public: // Constructor, destructor.
-#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
- explicit deque(const allocator_type& __a = allocator_type())
-#else
- deque()
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), 0) {}
- deque(const allocator_type& __a)
-#endif
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, 0) {}
-
- deque(const _Self& __x)
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__x.get_allocator(), __x.size())
- { _STLP_PRIV __ucopy(__x.begin(), __x.end(), this->_M_start); }
-
-#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
-private:
- void _M_initialize(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
- typedef typename _TrivialInit<_Tp>::_Ret _TrivialInit;
- _M_fill_initialize(__val, _TrivialInit());
- }
-public:
- explicit deque(size_type __n)
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n)
- { _M_initialize(__n); }
- deque(size_type __n, const value_type& __val, const allocator_type& __a = allocator_type())
-#else
- explicit deque(size_type __n)
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n) {
- typedef typename _TrivialInit<_Tp>::_Ret _TrivialInit;
- _M_fill_initialize(_STLP_DEFAULT_CONSTRUCTED(_Tp), _TrivialInit());
- }
- deque(size_type __n, const value_type& __val)
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n)
- { _M_fill_initialize(__val, __false_type()); }
- deque(size_type __n, const value_type& __val, const allocator_type& __a)
-#endif
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __n)
- { _M_fill_initialize(__val, __false_type()); }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
-protected:
- template <class _Integer>
- void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) {
- this->_M_initialize_map(__n);
- _M_fill_initialize(__x, __false_type());
- }
-
- template <class _InputIter>
- void _M_initialize_dispatch(_InputIter __first, _InputIter __last,
- const __false_type&) {
- _M_range_initialize(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
- }
-
-public:
- // Check whether it's an integral type. If so, it's not an iterator.
- template <class _InputIterator>
- deque(_InputIterator __first, _InputIterator __last,
- const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a) {
- typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
- _M_initialize_dispatch(__first, __last, _Integral());
- }
-
-# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
- template <class _InputIterator>
- deque(_InputIterator __first, _InputIterator __last)
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type()) {
- typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
- _M_initialize_dispatch(__first, __last, _Integral());
- }
-# endif
-
-#else
- deque(const value_type* __first, const value_type* __last,
- const allocator_type& __a = allocator_type() )
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __last - __first)
- { _STLP_PRIV __ucopy(__first, __last, this->_M_start); }
-
- deque(const_iterator __first, const_iterator __last,
- const allocator_type& __a = allocator_type() )
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __last - __first)
- { _STLP_PRIV __ucopy(__first, __last, this->_M_start); }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- deque(__move_source<_Self> src)
- : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__move_source<_Base>(src.get()))
- {}
-#endif
-
- ~deque()
- { _STLP_STD::_Destroy_Range(this->_M_start, this->_M_finish); }
-
- _Self& operator= (const _Self& __x);
-
- void swap(_Self& __x) {
- _STLP_STD::swap(this->_M_start, __x._M_start);
- _STLP_STD::swap(this->_M_finish, __x._M_finish);
- this->_M_map.swap(__x._M_map);
- this->_M_map_size.swap(__x._M_map_size);
- }
-#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
- void _M_swap_workaround(_Self& __x) { swap(__x); }
-#endif
-
-public:
- // 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 _M_fill_assign(size_type __n, const _Tp& __val) {
- if (__n > size()) {
- _STLP_STD::fill(begin(), end(), __val);
- insert(end(), __n - size(), __val);
- }
- else {
- erase(begin() + __n, end());
- _STLP_STD::fill(begin(), end(), __val);
- }
- }
-
- void assign(size_type __n, const _Tp& __val) {
- _M_fill_assign(__n, __val);
- }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
- template <class _InputIterator>
- void assign(_InputIterator __first, _InputIterator __last) {
- typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
- _M_assign_dispatch(__first, __last, _Integral());
- }
-
-private: // helper functions for assign()
-
- template <class _Integer>
- void _M_assign_dispatch(_Integer __n, _Integer __val,
- const __true_type& /*_IsIntegral*/)
- { _M_fill_assign((size_type) __n, (_Tp) __val); }
-
- template <class _InputIterator>
- void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
- const __false_type& /*_IsIntegral*/) {
- _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
- }
-
- template <class _InputIter>
- void _M_assign_aux(_InputIter __first, _InputIter __last, const input_iterator_tag &) {
- iterator __cur = begin();
- for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
- *__cur = *__first;
- if (__first == __last)
- erase(__cur, end());
- else
- insert(end(), __first, __last);
- }
-
- template <class _ForwardIterator>
- void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
- const forward_iterator_tag &) {
-#else
- void assign(const value_type *__first, const value_type *__last) {
- size_type __size = size();
- size_type __len = __last - __first;
- if (__len > __size) {
- const value_type *__mid = __first + __size;
- _STLP_STD::copy(__first, __mid, begin());
- insert(end(), __mid, __last);
- }
- else {
- erase(_STLP_STD::copy(__first, __last, begin()), end());
- }
- }
- void assign(const_iterator __first, const_iterator __last) {
- typedef const_iterator _ForwardIterator;
-#endif /* _STLP_MEMBER_TEMPLATES */
- size_type __len = _STLP_STD::distance(__first, __last);
- if (__len > size()) {
- _ForwardIterator __mid = __first;
- _STLP_STD::advance(__mid, size());
- _STLP_STD::copy(__first, __mid, begin());
- insert(end(), __mid, __last);
- }
- else {
- erase(_STLP_STD::copy(__first, __last, begin()), end());
- }
- }
-
-
-public: // push_* and pop_*
-
-#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
- void push_back(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
-#else
- void push_back(const value_type& __t) {
-#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
- if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) {
- _Copy_Construct(this->_M_finish._M_cur, __t);
- ++this->_M_finish._M_cur;
- }
- else
- _M_push_back_aux_v(__t);
- }
-#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
- void push_front(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
-#else
- void push_front(const value_type& __t) {
-#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
- if (this->_M_start._M_cur != this->_M_start._M_first) {
- _Copy_Construct(this->_M_start._M_cur - 1, __t);
- --this->_M_start._M_cur;
- }
- else
- _M_push_front_aux_v(__t);
- }
-
-#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
- void push_back() {
- if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) {
- _STLP_STD::_Construct(this->_M_finish._M_cur);
- ++this->_M_finish._M_cur;
- }
- else
- _M_push_back_aux();
- }
- void push_front() {
- if (this->_M_start._M_cur != this->_M_start._M_first) {
- _STLP_STD::_Construct(this->_M_start._M_cur - 1);
- --this->_M_start._M_cur;
- }
- else
- _M_push_front_aux();
- }
-#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
-
- void pop_back() {
- if (this->_M_finish._M_cur != this->_M_finish._M_first) {
- --this->_M_finish._M_cur;
- _STLP_STD::_Destroy(this->_M_finish._M_cur);
- }
- else {
- _M_pop_back_aux();
- _STLP_STD::_Destroy(this->_M_finish._M_cur);
- }
- }
-
- void pop_front() {
- _STLP_STD::_Destroy(this->_M_start._M_cur);
- _M_pop_front_aux();
- }
-
-public: // Insert
-
-#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
- iterator insert(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
-#else
- iterator insert(iterator __pos, const value_type& __x) {
-#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- typedef typename __move_traits<_Tp>::implemented _Movable;
-#endif
- if (__pos._M_cur == this->_M_start._M_cur) {
- push_front(__x);
- return this->_M_start;
- }
- else if (__pos._M_cur == this->_M_finish._M_cur) {
- push_back(__x);
- iterator __tmp = this->_M_finish;
- --__tmp;
- return __tmp;
- }
- else {
- return _M_fill_insert_aux(__pos, 1, __x, _Movable());
- }
- }
-
-#if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
- iterator insert(iterator __pos)
- { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
-#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
-
- void insert(iterator __pos, size_type __n, const value_type& __x)
- { _M_fill_insert(__pos, __n, __x); }
-
-protected:
- iterator _M_fill_insert_aux(iterator __pos, size_type __n, const value_type& __x, const __true_type& /*_Movable*/);
- iterator _M_fill_insert_aux(iterator __pos, size_type __n, const value_type& __x, const __false_type& /*_Movable*/);
-
- void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
-
-#if defined (_STLP_MEMBER_TEMPLATES)
- template <class _Integer>
- void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
- const __true_type& /*_IsIntegral*/) {
- _M_fill_insert(__pos, (size_type) __n, (value_type) __x);
- }
-
- template <class _InputIterator>
- void _M_insert_dispatch(iterator __pos,
- _InputIterator __first, _InputIterator __last,
- const __false_type& /*_IsIntegral*/) {
- _M_insert(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
- }
-
-public:
- // Check whether it's an integral type. If so, it's not an iterator.
- template <class _InputIterator>
- void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
- typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
- _M_insert_dispatch(__pos, __first, __last, _Integral());
- }
-
-#else /* _STLP_MEMBER_TEMPLATES */
- void _M_insert_range_aux(iterator __pos,
- const value_type* __first, const value_type* __last,
- size_type __n, const __true_type& /*_Movable*/);
- void _M_insert_range_aux(iterator __pos,
- const value_type* __first, const value_type* __last,
- size_type __n, const __false_type& /*_Movable*/);
- void _M_insert_range_aux(iterator __pos,
- const_iterator __first, const_iterator __last,
- size_type __n, const __true_type& /*_Movable*/);
- void _M_insert_range_aux(iterator __pos,
- const_iterator __first, const_iterator __last,
- size_type __n, const __false_type& /*_Movable*/);
-public:
- void insert(iterator __pos,
- const value_type* __first, const value_type* __last);
- void insert(iterator __pos,
- const_iterator __first, const_iterator __last);
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:
-#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
- void resize(size_type __new_size,
- const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
-#else
- void resize(size_type __new_size, const value_type& __x) {
-#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
- const size_type __len = size();
- if (__new_size < __len)
- erase(this->_M_start + __new_size, this->_M_finish);
- else
- insert(this->_M_finish, __new_size - __len, __x);
- }
-
-#if defined (_STLP_DONT_SUP_DFLT_PARAM)
- void resize(size_type __new_size)
- { resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
-#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
-
-protected:
- iterator _M_erase(iterator __pos, const __true_type& /*_Movable*/);
- iterator _M_erase(iterator __pos, const __false_type& /*_Movable*/);
-
- iterator _M_erase(iterator __first, iterator __last, const __true_type& /*_Movable*/);
- iterator _M_erase(iterator __first, iterator __last, const __false_type& /*_Movable*/);
-public: // Erase
- iterator erase(iterator __pos) {
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- typedef typename __move_traits<_Tp>::implemented _Movable;
-#endif
- return _M_erase(__pos, _Movable());
- }
- iterator erase(iterator __first, iterator __last) {
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- typedef typename __move_traits<_Tp>::implemented _Movable;
-#endif
- if (__first == this->_M_start && __last == this->_M_finish) {
- clear();
- return this->_M_finish;
- }
- else {
- if (__first == __last)
- return __first;
- return _M_erase(__first, __last, _Movable());
- }
- }
- void clear();
-
-protected: // Internal construction/destruction
-
- void _M_fill_initialize(const value_type& __val, const __true_type& /*_TrivialInit*/)
- {}
- void _M_fill_initialize(const value_type& __val, const __false_type& /*_TrivialInit*/);
-
-#if defined (_STLP_MEMBER_TEMPLATES)
- template <class _InputIterator>
- void _M_range_initialize(_InputIterator __first, _InputIterator __last,
- const input_iterator_tag &) {
- this->_M_initialize_map(0);
- _STLP_TRY {
- for ( ; __first != __last; ++__first)
- push_back(*__first);
- }
- _STLP_UNWIND(clear())
- }
- template <class _ForwardIterator>
- void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
- const forward_iterator_tag &) {
- size_type __n = _STLP_STD::distance(__first, __last);
- this->_M_initialize_map(__n);
- _Map_pointer __cur_node = this->_M_start._M_node;
- _STLP_TRY {
- for (; __cur_node < this->_M_finish._M_node; ++__cur_node) {
- _ForwardIterator __mid = __first;
- _STLP_STD::advance(__mid, this->buffer_size());
- _STLP_STD::uninitialized_copy(__first, __mid, *__cur_node);
- __first = __mid;
- }
- _STLP_STD::uninitialized_copy(__first, __last, this->_M_finish._M_first);
- }
- _STLP_UNWIND(_STLP_STD::_Destroy_Range(this->_M_start, iterator(*__cur_node, __cur_node)))
- }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-protected: // Internal push_* and pop_*
-
- void _M_push_back_aux_v(const value_type&);
- void _M_push_front_aux_v(const value_type&);
-#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
- void _M_push_back_aux();
- void _M_push_front_aux();
-#endif /*_STLP_DONT_SUP_DFLT_PARAM !_STLP_NO_ANACHRONISMS*/
- void _M_pop_back_aux();
- void _M_pop_front_aux();
-
-protected: // Internal insert functions
-
-#if defined (_STLP_MEMBER_TEMPLATES)
-
- template <class _InputIterator>
- void _M_insert(iterator __pos,
- _InputIterator __first,
- _InputIterator __last,
- const input_iterator_tag &) {
- _STLP_STD::copy(__first, __last, inserter(*this, __pos));
- }
-
- template <class _ForwardIterator>
- void _M_insert(iterator __pos,
- _ForwardIterator __first, _ForwardIterator __last,
- const forward_iterator_tag &) {
-#if !defined (_STLP_NO_MOVE_SEMANTIC)
- typedef typename __move_traits<_Tp>::implemented _Movable;
-#endif
- size_type __n = _STLP_STD::distance(__first, __last);
- if (__pos._M_cur == this->_M_start._M_cur) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- _STLP_TRY {
- uninitialized_copy(__first, __last, __new_start);
- this->_M_start = __new_start;
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else if (__pos._M_cur == this->_M_finish._M_cur) {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- _STLP_TRY {
- uninitialized_copy(__first, __last, this->_M_finish);
- this->_M_finish = __new_finish;
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
- else
- _M_insert_range_aux(__pos, __first, __last, __n, _Movable());
- }
-
- template <class _ForwardIterator>
- void _M_insert_range_aux(iterator __pos,
- _ForwardIterator __first, _ForwardIterator __last,
- size_type __n, const __true_type& /*_Movable*/) {
- const difference_type __elemsbefore = __pos - this->_M_start;
- size_type __length = size();
- if (__elemsbefore <= difference_type(__length / 2)) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- __pos = this->_M_start + __elemsbefore;
- _STLP_TRY {
- iterator __dst = __new_start;
- iterator __src = this->_M_start;
- for (; __src != __pos; ++__dst, ++__src) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- this->_M_start = __new_start;
- uninitialized_copy(__first, __last, __dst);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- const difference_type __elemsafter = difference_type(__length) - __elemsbefore;
- __pos = this->_M_finish - __elemsafter;
- _STLP_TRY {
- iterator __dst = __new_finish;
- iterator __src = this->_M_finish;
- for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
- _STLP_STD::_Move_Construct(&(*__dst), *__src);
- _STLP_STD::_Destroy_Moved(&(*__src));
- }
- this->_M_finish = __new_finish;
- uninitialized_copy(__first, __last, __pos);
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
- }
-
- template <class _ForwardIterator>
- void _M_insert_range_aux(iterator __pos,
- _ForwardIterator __first, _ForwardIterator __last,
- size_type __n, const __false_type& /*_Movable*/) {
- const difference_type __elemsbefore = __pos - this->_M_start;
- size_type __length = size();
- if (__elemsbefore <= difference_type(__length / 2)) {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- iterator __old_start = this->_M_start;
- __pos = this->_M_start + __elemsbefore;
- _STLP_TRY {
- if (__elemsbefore >= difference_type(__n)) {
- iterator __start_n = this->_M_start + difference_type(__n);
- _STLP_STD::uninitialized_copy(this->_M_start, __start_n, __new_start);
- this->_M_start = __new_start;
- _STLP_STD::copy(__start_n, __pos, __old_start);
- _STLP_STD::copy(__first, __last, __pos - difference_type(__n));
- }
- else {
- _ForwardIterator __mid = __first;
- _STLP_STD::advance(__mid, difference_type(__n) - __elemsbefore);
- _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start);
- this->_M_start = __new_start;
- _STLP_STD::copy(__mid, __last, __old_start);
- }
- }
- _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
- }
- else {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- iterator __old_finish = this->_M_finish;
- const difference_type __elemsafter = difference_type(__length) - __elemsbefore;
- __pos = this->_M_finish - __elemsafter;
- _STLP_TRY {
- if (__elemsafter > difference_type(__n)) {
- iterator __finish_n = this->_M_finish - difference_type(__n);
- _STLP_STD::uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish);
- this->_M_finish = __new_finish;
- _STLP_STD::copy_backward(__pos, __finish_n, __old_finish);
- _STLP_STD::copy(__first, __last, __pos);
- }
- else {
- _ForwardIterator __mid = __first;
- _STLP_STD::advance(__mid, __elemsafter);
- _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish);
- this->_M_finish = __new_finish;
- _STLP_STD::copy(__first, __mid, __pos);
- }
- }
- _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
- }
- }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
- iterator _M_reserve_elements_at_front(size_type __n) {
- size_type __vacancies = this->_M_start._M_cur - this->_M_start._M_first;
- if (__n > __vacancies)
- _M_new_elements_at_front(__n - __vacancies);
- return this->_M_start - difference_type(__n);
- }
-
- iterator _M_reserve_elements_at_back(size_type __n) {
- size_type __vacancies = (this->_M_finish._M_last - this->_M_finish._M_cur) - 1;
- if (__n > __vacancies)
- _M_new_elements_at_back(__n - __vacancies);
- return this->_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);
-
-protected: // Allocation of _M_map and nodes
-
- // 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_map_size._M_data - (this->_M_finish._M_node - this->_M_map._M_data))
- _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_start._M_node - this->_M_map._M_data))
- _M_reallocate_map(__nodes_to_add, true);
- }
-
- void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
-};
-
-#if defined (deque)
-# undef deque
-_STLP_MOVE_TO_STD_NAMESPACE
-#endif
-
-_STLP_END_NAMESPACE
-
-#if !defined (_STLP_LINK_TIME_INSTANTIATION)
-# include <stl/_deque.c>
-#endif
-
-#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
-# include <stl/pointers/_deque.h>
-#endif
-
-#if defined (_STLP_DEBUG)
-# include <stl/debug/_deque.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-#define _STLP_TEMPLATE_CONTAINER deque<_Tp, _Alloc>
-#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
-#include <stl/_relops_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
-template <class _Tp, class _Alloc>
-struct __move_traits<deque<_Tp, _Alloc> > {
- typedef __true_type implemented;
- typedef typename __move_traits<_Alloc>::complete complete;
-};
-#endif
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_DEQUE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/stlport/stlport/stl/_epilog.h b/stlport/stlport/stl/_epilog.h
deleted file mode 100644
index 0747ae3..0000000
--- a/stlport/stlport/stl/_epilog.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* NOTE : this header has no guards and is MEANT for multiple inclusion!
- * If you are using "header protection" option with your compiler,
- * please also find #pragma which disables it and put it here, to
- * allow reentrancy of this header.
- */
-
-#ifndef _STLP_PROLOG_HEADER_INCLUDED
-# error STLport epilog header can not be included as long as prolog has not be included.
-#endif
-
-/* If the platform provides any specific epilog actions,
- * like #pragmas, do include platform-specific prolog file
- */
-#if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG)
-# include <stl/config/_epilog.h>
-#endif
-
-#if !defined (_STLP_NO_POST_COMPATIBLE_SECTION)
-# include <stl/_config_compat_post.h>
-#endif
-
-#if defined (_STLP_USE_OWN_NAMESPACE)
-
-# if !defined (_STLP_DONT_REDEFINE_STD)
-/* We redefine "std" to STLPORT, so that user code may use std:: transparently
- * The STLPORT macro contains the STLport namespace name containing all the std
- * stuff.
- */
-# if defined (std)
-/*
- * Looks like the compiler native library on which STLport rely defined the std macro.
- * This might introduce major incompatibility so report the problem to the STLport
- * forum or comment the following #error at your own risk.
- */
-# error Incompatible native Std library.
-# endif /* std */
-# define std STLPORT
-# endif /* _STLP_DONT_REDEFINE_STD */
-
-#endif
-
-#undef _STLP_PROLOG_HEADER_INCLUDED /* defined in _prolog.h */
diff --git a/stlport/stlport/stl/_exception.h b/stlport/stlport/stl/_exception.h
deleted file mode 100644
index a0bf4ad..0000000
--- a/stlport/stlport/stl/_exception.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- */
-
-// The header <exception> contains low-level functions that interact
-// with a compiler's exception-handling mechanism. It is assumed to
-// be supplied with the compiler, rather than with the library, because
-// it is inherently tied very closely to the compiler itself.
-
-// On platforms where <exception> does not exist, this header defines
-// an exception base class. This is *not* a substitute for everything
-// in <exception>, but it suffices to support a bare minimum of STL
-// functionality.
-
-#ifndef _STLP_INTERNAL_EXCEPTION
-#define _STLP_INTERNAL_EXCEPTION
-
-#if !defined (_STLP_NO_EXCEPTION_HEADER)
-
-# if defined ( _UNCAUGHT_EXCEPTION )
-# undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
-# endif
-
-# if defined (_STLP_BROKEN_EXCEPTION_CLASS)
-# define exception _STLP_NULLIFIED_BROKEN_EXCEPTION_CLASS
-# define bad_exception _STLP_NULLIFIED_BROKEN_BAD_EXCEPTION_CLASS
-# if defined (_STLP_NO_NEW_NEW_HEADER)
-# include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception.h)
-# else
-# include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception)
-# endif
-# undef exception
-# undef bad_exception
-# else
-# if defined (_STLP_NO_NEW_NEW_HEADER)
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <exception.h>
-# else
-# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h)
-# endif
-# else
-# if defined (_STLP_HAS_INCLUDE_NEXT)
-# include_next <exception>
-# else
-# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception)
-# endif
-# endif
-# endif
-
-# if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG) && defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1300)
-// dwa 02/04/00
-// The header <yvals.h> which ships with vc6 and is included by its native <exception>
-// actually turns on warnings, so we have to turn them back off.
-# include <stl/config/_warnings_off.h>
-# endif
-
-# if defined (_STLP_USE_OWN_NAMESPACE)
-
-_STLP_BEGIN_NAMESPACE
-# if !defined (_STLP_BROKEN_EXCEPTION_CLASS)
-# if !defined (_STLP_USING_PLATFORM_SDK_COMPILER) || !defined (_WIN64)
-using _STLP_VENDOR_EXCEPT_STD::exception;
-# else
-using ::exception;
-# endif
-using _STLP_VENDOR_EXCEPT_STD::bad_exception;
-# endif
-
-# if !defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS)
-// fbp : many platforms present strange mix of
-// those in various namespaces
-# if !defined (_STLP_VENDOR_UNEXPECTED_STD)
-# define _STLP_VENDOR_UNEXPECTED_STD _STLP_VENDOR_EXCEPT_STD
-# else
-/* The following definitions are for backward compatibility as _STLP_VENDOR_TERMINATE_STD
- * and _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD has been introduce after _STLP_VENDOR_UNEXPECTED_STD
- * and _STLP_VENDOR_UNEXPECTED_STD was the macro used in their place before that introduction.
- */
-# if !defined (_STLP_VENDOR_TERMINATE_STD)
-# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_UNEXPECTED_STD
-# endif
-# if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
-# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_UNEXPECTED_STD
-# endif
-# endif
-# if !defined (_STLP_VENDOR_TERMINATE_STD)
-# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_EXCEPT_STD
-# endif
-# if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
-# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_EXCEPT_STD
-# endif
-# if !defined (_STLP_VENDOR_TERMINATE_STD)
-# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_EXCEPT_STD
-# endif
-# if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
-# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_EXCEPT_STD
-# endif
-// weird errors
-# if !defined (_STLP_NO_UNEXPECTED_EXCEPT_SUPPORT)
-# if defined (__ICL) && (__ICL >= 900) && (_STLP_MSVC_LIB < 1300)
-//See config/_intel.h for reason about this workaround
-using std::unexpected;
-# else
-using _STLP_VENDOR_UNEXPECTED_STD::unexpected;
-# endif
-using _STLP_VENDOR_UNEXPECTED_STD::unexpected_handler;
-using _STLP_VENDOR_UNEXPECTED_STD::set_unexpected;
-# endif
-using _STLP_VENDOR_TERMINATE_STD::terminate;
-using _STLP_VENDOR_TERMINATE_STD::terminate_handler;
-using _STLP_VENDOR_TERMINATE_STD::set_terminate;
-
-# if !defined (_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)
-using _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD::uncaught_exception;
-# endif
-# endif /* !_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS */
-_STLP_END_NAMESPACE
-# endif /* _STLP_OWN_NAMESPACE */
-#else /* _STLP_NO_EXCEPTION_HEADER */
-
-/* fbp : absence of <exception> usually means that those
- * functions are not going to be called by compiler.
- * Still, define them for the user.
- * dums: Policy modification, if the function do not behave like the Standard
- * defined it we do not grant it in the STLport namespace. We will have
- * compile time error rather than runtime error.
- */
-#if 0
-/*
-typedef void (*unexpected_handler)();
-unexpected_handler set_unexpected(unexpected_handler f) _STLP_NOTHROW_INHERENTLY;
-void unexpected();
-
-typedef void (*terminate_handler)();
-terminate_handler set_terminate(terminate_handler f) _STLP_NOTHROW_INHERENTLY;
-void terminate();
-
-bool uncaught_exception(); // not implemented under mpw as of Jan/1999
-*/
-#endif
-
-#endif /* _STLP_NO_EXCEPTION_HEADER */
-
-#if defined (_STLP_NO_EXCEPTION_HEADER) || defined (_STLP_BROKEN_EXCEPTION_CLASS)
-_STLP_BEGIN_NAMESPACE
-
-// section 18.6.1
-class _STLP_CLASS_DECLSPEC exception {
-public:
-# ifndef _STLP_USE_NO_IOSTREAMS
- exception() _STLP_NOTHROW;
- virtual ~exception() _STLP_NOTHROW;
- virtual const char* what() const _STLP_NOTHROW;
-# else
- exception() _STLP_NOTHROW {}
- virtual ~exception() _STLP_NOTHROW {}
- virtual const char* what() const _STLP_NOTHROW {return "class exception";}
-# endif
-};
-
-// section 18.6.2.1
-class _STLP_CLASS_DECLSPEC bad_exception : public exception {
-public:
-# ifndef _STLP_USE_NO_IOSTREAMS
- bad_exception() _STLP_NOTHROW;
- ~bad_exception() _STLP_NOTHROW;
- const char* what() const _STLP_NOTHROW;
-# else
- bad_exception() _STLP_NOTHROW {}
- ~bad_exception() _STLP_NOTHROW {}
- const char* what() const _STLP_NOTHROW {return "class bad_exception";}
-# endif
-};
-
-// forward declaration
-class __Named_exception;
-_STLP_END_NAMESPACE
-#endif
-
-#endif /* _STLP_INTERNAL_EXCEPTION */
diff --git a/stlport/stlport/stl/_function.h b/stlport/stlport/stl/_function.h
deleted file mode 100644
index bf4ad3e..0000000
--- a/stlport/stlport/stl/_function.h
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_FUNCTION_H
-#define _STLP_INTERNAL_FUNCTION_H
-
-#ifndef _STLP_TYPE_TRAITS_H
-# include <stl/type_traits.h>
-#endif
-
-#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-# include <stl/_function_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Tp>
-struct not_equal_to : public binary_function<_Tp, _Tp, bool> {
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
-};
-
-template <class _Tp>
-struct greater : public binary_function<_Tp, _Tp, bool> {
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
-};
-
-template <class _Tp>
-struct greater_equal : public binary_function<_Tp, _Tp, bool> {
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
-};
-
-template <class _Tp>
-struct less_equal : public binary_function<_Tp, _Tp, bool> {
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
-};
-
-template <class _Tp>
-struct divides : public binary_function<_Tp, _Tp, _Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
-};
-
-template <class _Tp>
-struct modulus : public binary_function<_Tp, _Tp, _Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
-};
-
-template <class _Tp>
-struct negate : public unary_function<_Tp, _Tp> {
- _Tp operator()(const _Tp& __x) const { return -__x; }
-};
-
-template <class _Tp>
-struct logical_and : public binary_function<_Tp, _Tp, bool> {
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
-};
-
-template <class _Tp>
-struct logical_or : public binary_function<_Tp, _Tp,bool> {
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
-};
-
-template <class _Tp>
-struct logical_not : public unary_function<_Tp, bool> {
- bool operator()(const _Tp& __x) const { return !__x; }
-};
-
-#if !defined (_STLP_NO_EXTENSIONS)
-// identity_element (not part of the C++ standard).
-template <class _Tp> inline _Tp identity_element(plus<_Tp>) { return _Tp(0); }
-template <class _Tp> inline _Tp identity_element(multiplies<_Tp>) { return _Tp(1); }
-#endif
-
-#if defined (_STLP_BASE_TYPEDEF_BUG)
-// this workaround is needed for SunPro 4.0.1
-// suggested by "Martin Abernethy" <gma@paston.co.uk>:
-
-// We have to introduce the XXary_predicate_aux structures in order to
-// access the argument and return types of predicate functions supplied
-// as type parameters. SUN C++ 4.0.1 compiler gives errors for template type parameters
-// of the form 'name1::name2', where name1 is itself a type parameter.
-template <class _Pair>
-struct __pair_aux : private _Pair {
- typedef typename _Pair::first_type first_type;
- typedef typename _Pair::second_type second_type;
-};
-
-template <class _Operation>
-struct __unary_fun_aux : private _Operation {
- typedef typename _Operation::argument_type argument_type;
- typedef typename _Operation::result_type result_type;
-};
-
-template <class _Operation>
-struct __binary_fun_aux : private _Operation {
- typedef typename _Operation::first_argument_type first_argument_type;
- typedef typename _Operation::second_argument_type second_argument_type;
- typedef typename _Operation::result_type result_type;
-};
-
-# define __UNARY_ARG(__Operation,__type) __unary_fun_aux<__Operation>::__type
-# define __BINARY_ARG(__Operation,__type) __binary_fun_aux<__Operation>::__type
-# define __PAIR_ARG(__Pair,__type) __pair_aux<__Pair>::__type
-#else
-# define __UNARY_ARG(__Operation,__type) __Operation::__type
-# define __BINARY_ARG(__Operation,__type) __Operation::__type
-# define __PAIR_ARG(__Pair,__type) __Pair::__type
-#endif
-
-template <class _Predicate>
-class unary_negate
- : public unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> {
- typedef unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> _Base;
-public:
- typedef typename _Base::argument_type argument_type;
-private:
- typedef typename __call_traits<argument_type>::const_param_type _ArgParamType;
-protected:
- _Predicate _M_pred;
-public:
- explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {}
- bool operator()(_ArgParamType __x) const {
- return !_M_pred(__x);
- }
-};
-
-template <class _Predicate>
-inline unary_negate<_Predicate>
-not1(const _Predicate& __pred) {
- return unary_negate<_Predicate>(__pred);
-}
-
-template <class _Predicate>
-class binary_negate
- : public binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
- typename __BINARY_ARG(_Predicate, second_argument_type),
- bool> {
- typedef binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
- typename __BINARY_ARG(_Predicate, second_argument_type),
- bool> _Base;
-public:
- typedef typename _Base::first_argument_type first_argument_type;
- typedef typename _Base::second_argument_type second_argument_type;
-private:
- typedef typename __call_traits<first_argument_type>::const_param_type _FstArgParamType;
- typedef typename __call_traits<second_argument_type>::const_param_type _SndArgParamType;
-protected:
- _Predicate _M_pred;
-public:
- explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {}
- bool operator()(_FstArgParamType __x, _SndArgParamType __y) const {
- return !_M_pred(__x, __y);
- }
-};
-
-template <class _Predicate>
-inline binary_negate<_Predicate>
-not2(const _Predicate& __pred) {
- return binary_negate<_Predicate>(__pred);
-}
-
-template <class _Operation>
-class binder1st :
- public unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
- typename __BINARY_ARG(_Operation, result_type) > {
- typedef unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
- typename __BINARY_ARG(_Operation, result_type) > _Base;
-public:
- typedef typename _Base::argument_type argument_type;
- typedef typename _Base::result_type result_type;
-private:
- typedef typename __call_traits<argument_type>::param_type _ArgParamType;
- typedef typename __call_traits<argument_type>::const_param_type _ConstArgParamType;
- typedef typename __call_traits<typename _Operation::first_argument_type>::const_param_type _ValueParamType;
-protected:
- //op is a Standard name (20.3.6.1), do no make it STLport naming convention compliant.
- _Operation op;
- typename _Operation::first_argument_type _M_value;
-public:
- binder1st(const _Operation& __x, _ValueParamType __y)
- : op(__x), _M_value(__y) {}
-
- result_type operator()(_ConstArgParamType __x) const
- { return op(_M_value, __x); }
- // DR 109 Missing binders for non-const sequence elements
- result_type operator()(_ArgParamType __x) const
- { return op(_M_value, __x); }
-};
-
-template <class _Operation, class _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));
-}
-
-template <class _Operation>
-class binder2nd
- : public unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
- typename __BINARY_ARG(_Operation, result_type)> {
- typedef unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
- typename __BINARY_ARG(_Operation, result_type)> _Base;
-public:
- typedef typename _Base::argument_type argument_type;
- typedef typename _Base::result_type result_type;
-private:
- typedef typename __call_traits<argument_type>::param_type _ArgParamType;
- typedef typename __call_traits<argument_type>::const_param_type _ConstArgParamType;
- typedef typename __call_traits<typename _Operation::second_argument_type>::const_param_type _ValueParamType;
-protected:
- //op is a Standard name (20.3.6.3), do no make it STLport naming convention compliant.
- _Operation op;
- typename _Operation::second_argument_type value;
-public:
- binder2nd(const _Operation& __x, _ValueParamType __y)
- : op(__x), value(__y) {}
-
- result_type operator()(_ConstArgParamType __x) const
- { return op(__x, value); }
- // DR 109 Missing binders for non-const sequence elements
- result_type operator()(_ArgParamType __x) const
- { return op(__x, value); }
-};
-
-template <class _Operation, class _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));
-}
-
-#if !defined (_STLP_NO_EXTENSIONS)
-// unary_compose and binary_compose (extensions, not part of the standard).
-
-template <class _Operation1, class _Operation2>
-class unary_compose :
- public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
- typename __UNARY_ARG(_Operation1, result_type)> {
- typedef unary_function<typename __UNARY_ARG(_Operation2, argument_type),
- typename __UNARY_ARG(_Operation1, result_type)> _Base;
-public:
- typedef typename _Base::argument_type argument_type;
- typedef typename _Base::result_type result_type;
-private:
- typedef typename __call_traits<argument_type>::const_param_type _ArgParamType;
-protected:
- _Operation1 _M_fn1;
- _Operation2 _M_fn2;
-public:
- unary_compose(const _Operation1& __x, const _Operation2& __y)
- : _M_fn1(__x), _M_fn2(__y) {}
-
- result_type operator()(_ArgParamType __x) const {
- return _M_fn1(_M_fn2(__x));
- }
-};
-
-template <class _Operation1, class _Operation2>
-inline unary_compose<_Operation1,_Operation2>
-compose1(const _Operation1& __fn1, const _Operation2& __fn2) {
- return unary_compose<_Operation1,_Operation2>(__fn1, __fn2);
-}
-
-template <class _Operation1, class _Operation2, class _Operation3>
-class binary_compose :
- public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
- typename __BINARY_ARG(_Operation1, result_type)> {
- typedef unary_function<typename __UNARY_ARG(_Operation2, argument_type),
- typename __BINARY_ARG(_Operation1, result_type)> _Base;
-public:
- typedef typename _Base::argument_type argument_type;
- typedef typename _Base::result_type result_type;
-private:
- typedef typename __call_traits<argument_type>::const_param_type _ArgParamType;
-protected:
- _Operation1 _M_fn1;
- _Operation2 _M_fn2;
- _Operation3 _M_fn3;
-public:
- binary_compose(const _Operation1& __x, const _Operation2& __y,
- const _Operation3& __z)
- : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { }
-
- result_type operator()(_ArgParamType __x) const {
- return _M_fn1(_M_fn2(__x), _M_fn3(__x));
- }
-};
-
-template <class _Operation1, class _Operation2, class _Operation3>
-inline binary_compose<_Operation1, _Operation2, _Operation3>
-compose2(const _Operation1& __fn1, const _Operation2& __fn2,
- const _Operation3& __fn3) {
- return binary_compose<_Operation1,_Operation2,_Operation3>(__fn1, __fn2, __fn3);
-}
-
-// identity is an extension: it is not part of the standard.
-template <class _Tp> struct identity : public _STLP_PRIV _Identity<_Tp> {};
-// select1st and select2nd are extensions: they are not part of the standard.
-template <class _Pair> struct select1st : public _STLP_PRIV _Select1st<_Pair> {};
-template <class _Pair> struct select2nd : public _STLP_PRIV _Select2nd<_Pair> {};
-
-template <class _Arg1, class _Arg2>
-struct project1st : public _STLP_PRIV _Project1st<_Arg1, _Arg2> {};
-
-template <class _Arg1, class _Arg2>
-struct project2nd : public _STLP_PRIV _Project2nd<_Arg1, _Arg2> {};
-
-
-// constant_void_fun, constant_unary_fun, and constant_binary_fun are
-// extensions: they are not part of the standard. (The same, of course,
-// is true of the helper functions constant0, constant1, and constant2.)
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Result>
-struct _Constant_void_fun {
- typedef _Result result_type;
- result_type _M_val;
-
- _Constant_void_fun(const result_type& __v) : _M_val(__v) {}
- const result_type& operator()() const { return _M_val; }
-};
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _Result>
-struct constant_void_fun : public _STLP_PRIV _Constant_void_fun<_Result> {
- constant_void_fun(const _Result& __v)
- : _STLP_PRIV _Constant_void_fun<_Result>(__v) {}
-};
-
-template <class _Result, _STLP_DFL_TMPL_PARAM( _Argument , _Result) >
-struct constant_unary_fun : public _STLP_PRIV _Constant_unary_fun<_Result, _Argument> {
- constant_unary_fun(const _Result& __v)
- : _STLP_PRIV _Constant_unary_fun<_Result, _Argument>(__v) {}
-};
-
-template <class _Result, _STLP_DFL_TMPL_PARAM( _Arg1 , _Result), _STLP_DFL_TMPL_PARAM( _Arg2 , _Arg1) >
-struct constant_binary_fun
- : public _STLP_PRIV _Constant_binary_fun<_Result, _Arg1, _Arg2> {
- constant_binary_fun(const _Result& __v)
- : _STLP_PRIV _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {}
-};
-
-template <class _Result>
-inline constant_void_fun<_Result> constant0(const _Result& __val) {
- return constant_void_fun<_Result>(__val);
-}
-
-template <class _Result>
-inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val) {
- return constant_unary_fun<_Result,_Result>(__val);
-}
-
-template <class _Result>
-inline constant_binary_fun<_Result,_Result,_Result>
-constant2(const _Result& __val) {
- return constant_binary_fun<_Result,_Result,_Result>(__val);
-}
-
-// subtractive_rng is an extension: it is not part of the standard.
-// Note: this code assumes that int is 32 bits.
-class subtractive_rng : public unary_function<_STLP_UINT32_T, _STLP_UINT32_T> {
-private:
- _STLP_UINT32_T _M_table[55];
- _STLP_UINT32_T _M_index1;
- _STLP_UINT32_T _M_index2;
-public:
- _STLP_UINT32_T operator()(_STLP_UINT32_T __limit) {
- _M_index1 = (_M_index1 + 1) % 55;
- _M_index2 = (_M_index2 + 1) % 55;
- _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2];
- return _M_table[_M_index1] % __limit;
- }
-
- void _M_initialize(_STLP_UINT32_T __seed) {
- _STLP_UINT32_T __k = 1;
- _M_table[54] = __seed;
- _STLP_UINT32_T __i;
- for (__i = 0; __i < 54; __i++) {
- _STLP_UINT32_T __ii = (21 * (__i + 1) % 55) - 1;
- _M_table[__ii] = __k;
- __k = __seed - __k;
- __seed = _M_table[__ii];
- }
- for (int __loop = 0; __loop < 4; __loop++) {
- for (__i = 0; __i < 55; __i++)
- _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55];
- }
- _M_index1 = 0;
- _M_index2 = 31;
- }
-
- subtractive_rng(unsigned int __seed) { _M_initialize(__seed); }
- subtractive_rng() { _M_initialize(161803398ul); }
-};
-
-#endif /* _STLP_NO_EXTENSIONS */
-
-_STLP_END_NAMESPACE
-
-#include <stl/_function_adaptors.h>
-
-#endif /* _STLP_INTERNAL_FUNCTION_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_function_adaptors.h b/stlport/stlport/stl/_function_adaptors.h
deleted file mode 100644
index 0da419b..0000000
--- a/stlport/stlport/stl/_function_adaptors.h
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * Copyright (c) 2000
- * Pavel Kuznetsov
- *
- * Copyright (c) 2001
- * Meridian'93
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-// This file has noo macro protection as it is meant to be included several times
-// from other header.
-// Adaptor function objects: pointers to member functions.
-
-// There are a total of 16 = 2^4 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) Member function with void return type vs member function with
-// non-void return type.
-// (4) Const vs non-const member function.
-
-// Note that choice (3) is nothing more than a workaround: according
-// to the draft, compilers should handle void and non-void the same way.
-// This feature is not yet widely implemented, though. You can only use
-// member functions returning void if your compiler supports partial
-// specialization.
-
-// 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.
-
-_STLP_BEGIN_NAMESPACE
-
-//This implementation will only be used if needed, that is to say when there is the return void bug
-//and when there is no partial template specialization
-#if defined (_STLP_DONT_RETURN_VOID) && defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-
-template<class _Result, class _Tp>
-class _Mem_fun0_ptr : public unary_function<_Tp*, _Result> {
-protected:
- typedef _Result (_Tp::*__fun_type) ();
- explicit _Mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator ()(_Tp* __p) const { return (__p->*_M_f)(); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result, class _Tp, class _Arg>
-class _Mem_fun1_ptr : public binary_function<_Tp*,_Arg,_Result> {
-protected:
- typedef _Result (_Tp::*__fun_type) (_Arg);
- explicit _Mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator ()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result, class _Tp>
-class _Const_mem_fun0_ptr : public unary_function<const _Tp*,_Result> {
-protected:
- typedef _Result (_Tp::*__fun_type) () const;
- explicit _Const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator ()(const _Tp* __p) const { return (__p->*_M_f)(); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result, class _Tp, class _Arg>
-class _Const_mem_fun1_ptr : public binary_function<const _Tp*,_Arg,_Result> {
-protected:
- typedef _Result (_Tp::*__fun_type) (_Arg) const;
- explicit _Const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator ()(const _Tp* __p, _Arg __x) const {
- return (__p->*_M_f)(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result, class _Tp>
-class _Mem_fun0_ref : public unary_function<_Tp,_Result> {
-protected:
- typedef _Result (_Tp::*__fun_type) ();
- explicit _Mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator ()(_Tp& __p) const { return (__p.*_M_f)(); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result, class _Tp, class _Arg>
-class _Mem_fun1_ref : public binary_function<_Tp,_Arg,_Result> {
-protected:
- typedef _Result (_Tp::*__fun_type) (_Arg);
- explicit _Mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator ()(_Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result, class _Tp>
-class _Const_mem_fun0_ref : public unary_function<_Tp,_Result> {
-protected:
- typedef _Result (_Tp::*__fun_type) () const;
- explicit _Const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator ()(const _Tp& __p) const { return (__p.*_M_f)(); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result, class _Tp, class _Arg>
-class _Const_mem_fun1_ref : public binary_function<_Tp,_Arg,_Result> {
-protected:
- typedef _Result (_Tp::*__fun_type) (_Arg) const;
- explicit _Const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator ()(const _Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result>
-struct _Mem_fun_traits {
- template<class _Tp>
- struct _Args0 {
- typedef _Mem_fun0_ptr<_Result,_Tp> _Ptr;
- typedef _Const_mem_fun0_ptr<_Result,_Tp> _Ptr_const;
- typedef _Mem_fun0_ref<_Result,_Tp> _Ref;
- typedef _Const_mem_fun0_ref<_Result,_Tp> _Ref_const;
- };
-
- template<class _Tp, class _Arg>
- struct _Args1 {
- typedef _Mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr;
- typedef _Const_mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr_const;
- typedef _Mem_fun1_ref<_Result,_Tp,_Arg> _Ref;
- typedef _Const_mem_fun1_ref<_Result,_Tp,_Arg> _Ref_const;
- };
-};
-
-template<class _Arg, class _Result>
-class _Ptr_fun1_base : public unary_function<_Arg, _Result> {
-protected:
- typedef _Result (*__fun_type) (_Arg);
- explicit _Ptr_fun1_base(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator()(_Arg __x) const { return _M_f(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template <class _Arg1, class _Arg2, class _Result>
-class _Ptr_fun2_base : public binary_function<_Arg1,_Arg2,_Result> {
-protected:
- typedef _Result (*__fun_type) (_Arg1, _Arg2);
- explicit _Ptr_fun2_base(__fun_type __f) : _M_f(__f) {}
-
-public:
- _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_f(__x, __y); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Result>
-struct _Ptr_fun_traits {
- template<class _Arg> struct _Args1 {
- typedef _Ptr_fun1_base<_Arg,_Result> _Fun;
- };
-
- template<class _Arg1, class _Arg2> struct _Args2 {
- typedef _Ptr_fun2_base<_Arg1,_Arg2,_Result> _Fun;
- };
-};
-
-/* Specializations for void return type */
-template<class _Tp>
-class _Void_mem_fun0_ptr : public unary_function<_Tp*,void> {
-protected:
- typedef void (_Tp::*__fun_type) ();
- explicit _Void_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator ()(_Tp* __p) const { (__p->*_M_f)(); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Tp, class _Arg>
-class _Void_mem_fun1_ptr : public binary_function<_Tp*,_Arg,void> {
-protected:
- typedef void (_Tp::*__fun_type) (_Arg);
- explicit _Void_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator ()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Tp>
-class _Void_const_mem_fun0_ptr : public unary_function<const _Tp*,void> {
-protected:
- typedef void (_Tp::*__fun_type) () const;
- explicit _Void_const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator ()(const _Tp* __p) const { (__p->*_M_f)(); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Tp, class _Arg>
-class _Void_const_mem_fun1_ptr : public binary_function<const _Tp*,_Arg,void> {
-protected:
- typedef void (_Tp::*__fun_type) (_Arg) const;
- explicit _Void_const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator ()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Tp>
-class _Void_mem_fun0_ref : public unary_function<_Tp,void> {
-protected:
- typedef void (_Tp::*__fun_type) ();
- explicit _Void_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator ()(_Tp& __p) const { (__p.*_M_f)(); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Tp, class _Arg>
-class _Void_mem_fun1_ref : public binary_function<_Tp,_Arg,void> {
-protected:
- typedef void (_Tp::*__fun_type) (_Arg);
- explicit _Void_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator ()(_Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Tp>
-class _Void_const_mem_fun0_ref : public unary_function<_Tp,void> {
-protected:
- typedef void (_Tp::*__fun_type) () const;
- explicit _Void_const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator ()(const _Tp& __p) const { (__p.*_M_f)(); }
-
-private:
- __fun_type _M_f;
-};
-
-template<class _Tp, class _Arg>
-class _Void_const_mem_fun1_ref : public binary_function<_Tp,_Arg,void> {
-protected:
- typedef void (_Tp::*__fun_type) (_Arg) const;
- explicit _Void_const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator ()(const _Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-_STLP_TEMPLATE_NULL
-struct _Mem_fun_traits<void> {
- template<class _Tp> struct _Args0 {
- typedef _Void_mem_fun0_ptr<_Tp> _Ptr;
- typedef _Void_const_mem_fun0_ptr<_Tp> _Ptr_const;
- typedef _Void_mem_fun0_ref<_Tp> _Ref;
- typedef _Void_const_mem_fun0_ref<_Tp> _Ref_const;
- };
-
- template<class _Tp, class _Arg> struct _Args1 {
- typedef _Void_mem_fun1_ptr<_Tp,_Arg> _Ptr;
- typedef _Void_const_mem_fun1_ptr<_Tp,_Arg> _Ptr_const;
- typedef _Void_mem_fun1_ref<_Tp,_Arg> _Ref;
- typedef _Void_const_mem_fun1_ref<_Tp,_Arg> _Ref_const;
- };
-};
-
-template<class _Arg>
-class _Ptr_void_fun1_base : public unary_function<_Arg, void> {
-protected:
- typedef void (*__fun_type) (_Arg);
- explicit _Ptr_void_fun1_base(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator()(_Arg __x) const { _M_f(__x); }
-
-private:
- __fun_type _M_f;
-};
-
-template <class _Arg1, class _Arg2>
-class _Ptr_void_fun2_base : public binary_function<_Arg1,_Arg2,void> {
-protected:
- typedef void (*__fun_type) (_Arg1, _Arg2);
- explicit _Ptr_void_fun2_base(__fun_type __f) : _M_f(__f) {}
-
-public:
- void operator()(_Arg1 __x, _Arg2 __y) const { _M_f(__x, __y); }
-
-private:
- __fun_type _M_f;
-};
-
-_STLP_TEMPLATE_NULL
-struct _Ptr_fun_traits<void> {
- template<class _Arg> struct _Args1 {
- typedef _Ptr_void_fun1_base<_Arg> _Fun;
- };
-
- template<class _Arg1, class _Arg2> struct _Args2 {
- typedef _Ptr_void_fun2_base<_Arg1,_Arg2> _Fun;
- };
-};
-
-// pavel: need extra level of inheritance here since MSVC++ does not
-// accept traits-based fake partial specialization for template
-// arguments other than first
-
-template<class _Result, class _Arg>
-class _Ptr_fun1 :
- public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun {
-protected:
- typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun _Base;
- explicit _Ptr_fun1(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template<class _Result, class _Arg1, class _Arg2>
-class _Ptr_fun2 :
- public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun {
-protected:
- typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun _Base;
- explicit _Ptr_fun2(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Result, class _Tp>
-class mem_fun_t :
- public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr {
- typedef typename
- _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr _Base;
-public:
- explicit mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Result, class _Tp>
-class const_mem_fun_t :
- public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const {
- typedef typename
- _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const _Base;
-public:
- explicit const_mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Result, class _Tp>
-class mem_fun_ref_t :
- public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref {
- typedef typename
- _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref _Base;
-public:
- explicit mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Result, class _Tp>
-class const_mem_fun_ref_t :
- public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const {
- typedef typename
- _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const _Base;
-public:
- explicit const_mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Result, class _Tp, class _Arg>
-class mem_fun1_t :
- public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr {
- typedef typename
- _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr _Base;
-public:
- explicit mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Result, class _Tp, class _Arg>
-class const_mem_fun1_t :
- public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const {
- typedef typename
- _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const _Base;
-public:
- explicit const_mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Result, class _Tp, class _Arg>
-class mem_fun1_ref_t :
- public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref {
- typedef typename
- _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref _Base;
-public:
- explicit mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Result, class _Tp, class _Arg>
-class const_mem_fun1_ref_t :
- public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const {
- typedef typename
- _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const _Base;
-public:
- explicit const_mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template <class _Arg, class _Result>
-class pointer_to_unary_function :
- public _Ptr_fun1<_Result,_Arg> {
- typedef typename
- _Ptr_fun1<_Result,_Arg>::__fun_type __fun_type;
-public:
- explicit pointer_to_unary_function(__fun_type __f)
- : _Ptr_fun1<_Result,_Arg>(__f) {}
-};
-
-template <class _Arg1, class _Arg2, class _Result>
-class pointer_to_binary_function :
- public _Ptr_fun2<_Result,_Arg1,_Arg2> {
- typedef typename
- _Ptr_fun2<_Result,_Arg1,_Arg2>::__fun_type __fun_type;
-public:
- explicit pointer_to_binary_function(__fun_type __f)
- : _Ptr_fun2<_Result,_Arg1,_Arg2>(__f) {}
-};
-
-#else
-
-template <class _Ret, class _Tp>
-class mem_fun_t : public unary_function<_Tp*,_Ret> {
- typedef _Ret (_Tp::*__fun_type)(void);
-public:
- explicit mem_fun_t(__fun_type __pf) : _M_f(__pf) {}
- _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp>
-class const_mem_fun_t : public unary_function<const _Tp*,_Ret> {
- typedef _Ret (_Tp::*__fun_type)(void) const;
-public:
- explicit const_mem_fun_t(__fun_type __pf) : _M_f(__pf) {}
- _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp>
-class mem_fun_ref_t : public unary_function<_Tp,_Ret> {
- typedef _Ret (_Tp::*__fun_type)(void);
-public:
- explicit mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {}
- _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp>
-class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> {
- typedef _Ret (_Tp::*__fun_type)(void) const;
-public:
- explicit const_mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {}
- _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp, class _Arg>
-class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> {
- typedef _Ret (_Tp::*__fun_type)(_Arg);
-public:
- explicit mem_fun1_t(__fun_type __pf) : _M_f(__pf) {}
- _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp, class _Arg>
-class const_mem_fun1_t : public binary_function<const _Tp*,_Arg,_Ret> {
- typedef _Ret (_Tp::*__fun_type)(_Arg) const;
-public:
- explicit const_mem_fun1_t(__fun_type __pf) : _M_f(__pf) {}
- _Ret operator()(const _Tp* __p, _Arg __x) const
- { return (__p->*_M_f)(__x); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp, class _Arg>
-class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
- typedef _Ret (_Tp::*__fun_type)(_Arg);
-public:
- explicit mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {}
- _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp, class _Arg>
-class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
- typedef _Ret (_Tp::*__fun_type)(_Arg) const;
-public:
- explicit const_mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {}
- _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Arg, class _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); }
-};
-
-template <class _Arg1, class _Arg2, class _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);
- }
-};
-
-# if defined (_STLP_DONT_RETURN_VOID) && !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION)
-//Partial specializations for the void type
-template <class _Tp>
-class mem_fun_t<void, _Tp> : public unary_function<_Tp*,void> {
- typedef void (_Tp::*__fun_type)(void);
-public:
- explicit mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
- void operator()(_Tp* __p) const { (__p->*_M_f)(); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Tp>
-class const_mem_fun_t<void, _Tp> : public unary_function<const _Tp*,void> {
- typedef void (_Tp::*__fun_type)(void) const;
-public:
- explicit const_mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
- void operator()(const _Tp* __p) const { (__p->*_M_f)(); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Tp>
-class mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
- typedef void (_Tp::*__fun_type)(void);
-public:
- explicit mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
- void operator()(_Tp& __r) const { (__r.*_M_f)(); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Tp>
-class const_mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
- typedef void (_Tp::*__fun_type)(void) const;
-public:
- explicit const_mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
- void operator()(const _Tp& __r) const { (__r.*_M_f)(); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Tp, class _Arg>
-class mem_fun1_t<void, _Tp, _Arg> : public binary_function<_Tp*,_Arg,void> {
- typedef void (_Tp::*__fun_type)(_Arg);
-public:
- explicit mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
- void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Tp, class _Arg>
-class const_mem_fun1_t<void, _Tp, _Arg>
- : public binary_function<const _Tp*,_Arg,void> {
- typedef void (_Tp::*__fun_type)(_Arg) const;
-public:
- explicit const_mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
- void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Tp, class _Arg>
-class mem_fun1_ref_t<void, _Tp, _Arg>
- : public binary_function<_Tp,_Arg,void> {
- typedef void (_Tp::*__fun_type)(_Arg);
-public:
- explicit mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
- void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Tp, class _Arg>
-class const_mem_fun1_ref_t<void, _Tp, _Arg>
- : public binary_function<_Tp,_Arg,void> {
- typedef void (_Tp::*__fun_type)(_Arg) const;
-public:
- explicit const_mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
- void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
-private:
- __fun_type _M_f;
-};
-
-template <class _Arg>
-class pointer_to_unary_function<_Arg, void> : public unary_function<_Arg, void> {
- typedef void (*__fun_type)(_Arg);
- __fun_type _M_ptr;
-public:
- pointer_to_unary_function() {}
- explicit pointer_to_unary_function(__fun_type __x) : _M_ptr(__x) {}
- void operator()(_Arg __x) const { _M_ptr(__x); }
-};
-
-template <class _Arg1, class _Arg2>
-class pointer_to_binary_function<_Arg1, _Arg2, void> : public binary_function<_Arg1,_Arg2,void> {
- typedef void (*__fun_type)(_Arg1, _Arg2);
- __fun_type _M_ptr;
-public:
- pointer_to_binary_function() {}
- explicit pointer_to_binary_function(__fun_type __x) : _M_ptr(__x) {}
- void operator()(_Arg1 __x, _Arg2 __y) const { _M_ptr(__x, __y); }
-};
-
-# endif
-
-#endif
-
-#if !defined (_STLP_MEMBER_POINTER_PARAM_BUG)
-// Mem_fun adaptor helper functions. There are only two:
-// mem_fun and mem_fun_ref. (mem_fun1 and mem_fun1_ref
-// are provided for backward compatibility, but they are no longer
-// part of the C++ standard.)
-
-template <class _Result, class _Tp>
-inline mem_fun_t<_Result,_Tp>
-mem_fun(_Result (_Tp::*__f)()) { return mem_fun_t<_Result,_Tp>(__f); }
-
-template <class _Result, class _Tp>
-inline const_mem_fun_t<_Result,_Tp>
-mem_fun(_Result (_Tp::*__f)() const) { return const_mem_fun_t<_Result,_Tp>(__f); }
-
-template <class _Result, class _Tp>
-inline mem_fun_ref_t<_Result,_Tp>
-mem_fun_ref(_Result (_Tp::*__f)()) { return mem_fun_ref_t<_Result,_Tp>(__f); }
-
-template <class _Result, class _Tp>
-inline const_mem_fun_ref_t<_Result,_Tp>
-mem_fun_ref(_Result (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Result,_Tp>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline mem_fun1_t<_Result,_Tp,_Arg>
-mem_fun(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline const_mem_fun1_t<_Result,_Tp,_Arg>
-mem_fun(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline mem_fun1_ref_t<_Result,_Tp,_Arg>
-mem_fun_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline const_mem_fun1_ref_t<_Result,_Tp,_Arg>
-mem_fun_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
-
-# if !(defined (_STLP_NO_EXTENSIONS) || defined (_STLP_NO_ANACHRONISMS))
-// mem_fun1 and mem_fun1_ref are no longer part of the C++ standard,
-// but they are provided for backward compatibility.
-template <class _Result, class _Tp, class _Arg>
-inline mem_fun1_t<_Result,_Tp,_Arg>
-mem_fun1(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline const_mem_fun1_t<_Result,_Tp,_Arg>
-mem_fun1(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline mem_fun1_ref_t<_Result,_Tp,_Arg>
-mem_fun1_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline const_mem_fun1_ref_t<_Result,_Tp,_Arg>
-mem_fun1_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
-
-# endif
-
-#endif
-
-template <class _Arg, class _Result>
-inline pointer_to_unary_function<_Arg, _Result>
-ptr_fun(_Result (*__f)(_Arg))
-{ return pointer_to_unary_function<_Arg, _Result>(__f); }
-
-template <class _Arg1, class _Arg2, class _Result>
-inline pointer_to_binary_function<_Arg1,_Arg2,_Result>
-ptr_fun(_Result (*__f)(_Arg1, _Arg2))
-{ return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f); }
-
-_STLP_END_NAMESPACE
diff --git a/stlport/stlport/stl/_function_base.h b/stlport/stlport/stl/_function_base.h
deleted file mode 100644
index 1e7f4f5..0000000
--- a/stlport/stlport/stl/_function_base.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-#define _STLP_INTERNAL_FUNCTION_BASE_H
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_TYPE_TRAITS_H)
-# include <stl/type_traits.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Arg, class _Result>
-struct unary_function {
- typedef _Arg argument_type;
- typedef _Result result_type;
-#if !defined (__BORLANDC__) || (__BORLANDC__ < 0x580)
-protected:
- /* This class purpose is to be derived but it is not polymorphic so users should never try
- * to destroy an instance of it directly. The protected non-virtual destructor make this
- * fact obvious at compilation time. */
- ~unary_function() {}
-#endif
-};
-
-template <class _Arg1, class _Arg2, class _Result>
-struct binary_function {
- typedef _Arg1 first_argument_type;
- typedef _Arg2 second_argument_type;
- typedef _Result result_type;
-#if !defined (__BORLANDC__) || (__BORLANDC__ < 0x580)
-protected:
- /* See unary_function comment. */
- ~binary_function() {}
-#endif
-};
-
-template <class _Tp>
-struct equal_to : public binary_function<_Tp, _Tp, bool> {
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; }
-};
-
-template <class _Tp>
-struct less : public binary_function<_Tp,_Tp,bool>
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-/* less is the default template parameter for many STL containers, to fully use
- * the move constructor feature we need to know that the default less is just a
- * functor.
- */
- , public __stlport_class<less<_Tp> >
-#endif
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
-
-#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
- void _M_swap_workaround(less<_Tp>& __x) {}
-#endif
-};
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-template <class _Tp>
-struct __type_traits<less<_Tp> > {
-#if !defined (__BORLANDC__)
- typedef typename _IsSTLportClass<less<_Tp> >::_Ret _STLportLess;
-#else
- enum { _Is = _IsSTLportClass<less<_Tp> >::_Is };
- typedef typename __bool2type<_Is>::_Ret _STLportLess;
-#endif
- typedef _STLportLess has_trivial_default_constructor;
- typedef _STLportLess has_trivial_copy_constructor;
- typedef _STLportLess has_trivial_assignment_operator;
- typedef _STLportLess has_trivial_destructor;
- typedef _STLportLess is_POD_type;
-};
-#endif
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Tp>
-less<_Tp> __less(_Tp* ) { return less<_Tp>(); }
-
-template <class _Tp>
-equal_to<_Tp> __equal_to(_Tp* ) { return equal_to<_Tp>(); }
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _Tp>
-struct plus : public binary_function<_Tp, _Tp, _Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; }
-};
-
-template <class _Tp>
-struct minus : public binary_function<_Tp, _Tp, _Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; }
-};
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Tp>
-plus<_Tp> __plus(_Tp* ) { return plus<_Tp>(); }
-
-template <class _Tp>
-minus<_Tp> __minus(_Tp* ) { return minus<_Tp>(); }
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-template <class _Tp>
-struct multiplies : public binary_function<_Tp, _Tp, _Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
-};
-
-_STLP_MOVE_TO_PRIV_NAMESPACE
-
-template <class _Pair>
-struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> {
- const typename _Pair::first_type& operator()(const _Pair& __x) const {
- return __x.first;
- }
-};
-
-template <class _Pair>
-struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> {
- const typename _Pair::second_type& operator()(const _Pair& __x) const {
- return __x.second;
- }
-};
-
-// project1st and project2nd are extensions: they are not part of the standard
-template <class _Arg1, class _Arg2>
-struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1> {
- _Arg1 operator()(const _Arg1& __x, const _Arg2&) const { return __x; }
-};
-
-template <class _Arg1, class _Arg2>
-struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> {
- _Arg2 operator()(const _Arg1&, const _Arg2& __y) const { return __y; }
-};
-
-#if defined (_STLP_MULTI_CONST_TEMPLATE_ARG_BUG)
-// fbp : sort of select1st just for maps
-template <class _Pair, class _Whatever>
-// JDJ (CW Pro1 doesn't like const when first_type is also const)
-struct __Select1st_hint : public unary_function<_Pair, _Whatever> {
- const _Whatever& operator () (const _Pair& __x) const { return __x.first; }
-};
-# define _STLP_SELECT1ST(__x,__y) _STLP_PRIV __Select1st_hint< __x, __y >
-#else
-# define _STLP_SELECT1ST(__x, __y) _STLP_PRIV _Select1st< __x >
-#endif
-
-template <class _Tp>
-struct _Identity : public unary_function<_Tp,_Tp> {
- const _Tp& operator()(const _Tp& __x) const { return __x; }
-};
-
-template <class _Result, class _Argument>
-struct _Constant_unary_fun {
- typedef _Argument argument_type;
- typedef _Result result_type;
- result_type _M_val;
-
- _Constant_unary_fun(const result_type& __v) : _M_val(__v) {}
- const result_type& operator()(const _Argument&) const { return _M_val; }
-};
-
-template <class _Result, class _Arg1, class _Arg2>
-struct _Constant_binary_fun {
- typedef _Arg1 first_argument_type;
- typedef _Arg2 second_argument_type;
- typedef _Result result_type;
- _Result _M_val;
-
- _Constant_binary_fun(const _Result& __v) : _M_val(__v) {}
- const result_type& operator()(const _Arg1&, const _Arg2&) const {
- return _M_val;
- }
-};
-
-// identity_element (not part of the C++ standard).
-template <class _Tp> inline _Tp __identity_element(plus<_Tp>) { return _Tp(0); }
-template <class _Tp> inline _Tp __identity_element(multiplies<_Tp>) { return _Tp(1); }
-
-_STLP_MOVE_TO_STD_NAMESPACE
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_FUNCTION_BASE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/stlport/stlport/stl/_hash_fun.h b/stlport/stlport/stl/_hash_fun.h
deleted file mode 100644
index 6197d7b..0000000
--- a/stlport/stlport/stl/_hash_fun.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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