Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +3 -0
- cmake/bin/cmake.exe +3 -0
- cmake/bin/cpack.exe +3 -0
- cmake/share/cmake-3.31/Templates/Windows/StoreLogo.png +3 -0
- mingw/bin/as.exe +3 -0
- mingw/lib/gcc/mingw32/4.3.3/include-fixed/README +14 -0
- mingw/lib/gcc/mingw32/4.3.3/include-fixed/limits.h +125 -0
- mingw/lib/gcc/mingw32/4.3.3/include-fixed/syslimits.h +8 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/algorithm +73 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/array +63 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/bitset +1327 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/c++0x_warning.h +41 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cassert +50 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/ccomplex +49 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cctype +106 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cerrno +58 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cfenv +66 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cfloat +65 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cinttypes +76 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/ciso646 +38 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/climits +65 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/clocale +66 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cmath +643 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/complex +1557 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/complex.h +47 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/csetjmp +69 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/csignal +65 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdarg +65 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdbool +49 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cstddef +61 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdint +84 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdio +210 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdlib +247 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cstring +130 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/ctgmath +46 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/ctime +83 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cwchar +299 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cwctype +131 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cxxabi-forced.h +51 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/cxxabi.h +553 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/deque +80 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/exception +135 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/exception_defines.h +51 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/fenv.h +63 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/fstream +786 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/functional +83 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/iomanip +301 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/ios +52 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/iosfwd +165 -0
- mingw/lib/gcc/mingw32/4.3.3/include/c++/iostream +81 -0
.gitattributes
CHANGED
|
@@ -61,3 +61,6 @@ ffmpeg/bin/avdevice-61.dll filter=lfs diff=lfs merge=lfs -text
|
|
| 61 |
cmake/bin/cmcldeps.exe filter=lfs diff=lfs merge=lfs -text
|
| 62 |
ffmpeg/bin/avcodec-61.dll filter=lfs diff=lfs merge=lfs -text
|
| 63 |
cmake/bin/ctest.exe filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
cmake/bin/cmcldeps.exe filter=lfs diff=lfs merge=lfs -text
|
| 62 |
ffmpeg/bin/avcodec-61.dll filter=lfs diff=lfs merge=lfs -text
|
| 63 |
cmake/bin/ctest.exe filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
cmake/bin/cpack.exe filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
cmake/bin/cmake.exe filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
mingw/bin/as.exe filter=lfs diff=lfs merge=lfs -text
|
cmake/bin/cmake.exe
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1985a5d1287ddc6b3b06959ae8c8332a985c8b35a8d90edabe68d68e0699c2b
|
| 3 |
+
size 12078544
|
cmake/bin/cpack.exe
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4ec8dfcb1accb00bb0a0a56684149d178366efc1af2bb83cf41d8449eff50b1
|
| 3 |
+
size 12163024
|
cmake/share/cmake-3.31/Templates/Windows/StoreLogo.png
ADDED
|
Git LFS Details
|
mingw/bin/as.exe
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df17153943762629dbfb2e834a3e4b75cb4151335f0fe428bbd3ea21a700cdaf
|
| 3 |
+
size 1734158
|
mingw/lib/gcc/mingw32/4.3.3/include-fixed/README
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This README file is copied into the directory for GCC-only header files
|
| 2 |
+
when fixincludes is run by the makefile for GCC.
|
| 3 |
+
|
| 4 |
+
Many of the files in this directory were automatically edited from the
|
| 5 |
+
standard system header files by the fixincludes process. They are
|
| 6 |
+
system-specific, and will not work on any other kind of system. They
|
| 7 |
+
are also not part of GCC. The reason we have to do this is because
|
| 8 |
+
GCC requires ANSI C headers and many vendors supply ANSI-incompatible
|
| 9 |
+
headers.
|
| 10 |
+
|
| 11 |
+
Because this is an automated process, sometimes headers get "fixed"
|
| 12 |
+
that do not, strictly speaking, need a fix. As long as nothing is broken
|
| 13 |
+
by the process, it is just an unfortunate collateral inconvenience.
|
| 14 |
+
We would like to rectify it, if it is not "too inconvenient".
|
mingw/lib/gcc/mingw32/4.3.3/include-fixed/limits.h
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This administrivia gets added to the beginning of limits.h
|
| 2 |
+
if the system has its own version of limits.h. */
|
| 3 |
+
|
| 4 |
+
/* We use _GCC_LIMITS_H_ because we want this not to match
|
| 5 |
+
any macros that the system's limits.h uses for its own purposes. */
|
| 6 |
+
#ifndef _GCC_LIMITS_H_ /* Terminated in limity.h. */
|
| 7 |
+
#define _GCC_LIMITS_H_
|
| 8 |
+
|
| 9 |
+
#ifndef _LIBC_LIMITS_H_
|
| 10 |
+
/* Use "..." so that we find syslimits.h only in this same directory. */
|
| 11 |
+
#include "syslimits.h"
|
| 12 |
+
#endif
|
| 13 |
+
#ifndef _LIMITS_H___
|
| 14 |
+
#define _LIMITS_H___
|
| 15 |
+
|
| 16 |
+
/* Number of bits in a `char'. */
|
| 17 |
+
#undef CHAR_BIT
|
| 18 |
+
#define CHAR_BIT __CHAR_BIT__
|
| 19 |
+
|
| 20 |
+
/* Maximum length of a multibyte character. */
|
| 21 |
+
#ifndef MB_LEN_MAX
|
| 22 |
+
#define MB_LEN_MAX 1
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
/* Minimum and maximum values a `signed char' can hold. */
|
| 26 |
+
#undef SCHAR_MIN
|
| 27 |
+
#define SCHAR_MIN (-SCHAR_MAX - 1)
|
| 28 |
+
#undef SCHAR_MAX
|
| 29 |
+
#define SCHAR_MAX __SCHAR_MAX__
|
| 30 |
+
|
| 31 |
+
/* Maximum value an `unsigned char' can hold. (Minimum is 0). */
|
| 32 |
+
#undef UCHAR_MAX
|
| 33 |
+
#if __SCHAR_MAX__ == __INT_MAX__
|
| 34 |
+
# define UCHAR_MAX (SCHAR_MAX * 2U + 1U)
|
| 35 |
+
#else
|
| 36 |
+
# define UCHAR_MAX (SCHAR_MAX * 2 + 1)
|
| 37 |
+
#endif
|
| 38 |
+
|
| 39 |
+
/* Minimum and maximum values a `char' can hold. */
|
| 40 |
+
#ifdef __CHAR_UNSIGNED__
|
| 41 |
+
# undef CHAR_MIN
|
| 42 |
+
# if __SCHAR_MAX__ == __INT_MAX__
|
| 43 |
+
# define CHAR_MIN 0U
|
| 44 |
+
# else
|
| 45 |
+
# define CHAR_MIN 0
|
| 46 |
+
# endif
|
| 47 |
+
# undef CHAR_MAX
|
| 48 |
+
# define CHAR_MAX UCHAR_MAX
|
| 49 |
+
#else
|
| 50 |
+
# undef CHAR_MIN
|
| 51 |
+
# define CHAR_MIN SCHAR_MIN
|
| 52 |
+
# undef CHAR_MAX
|
| 53 |
+
# define CHAR_MAX SCHAR_MAX
|
| 54 |
+
#endif
|
| 55 |
+
|
| 56 |
+
/* Minimum and maximum values a `signed short int' can hold. */
|
| 57 |
+
#undef SHRT_MIN
|
| 58 |
+
#define SHRT_MIN (-SHRT_MAX - 1)
|
| 59 |
+
#undef SHRT_MAX
|
| 60 |
+
#define SHRT_MAX __SHRT_MAX__
|
| 61 |
+
|
| 62 |
+
/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
|
| 63 |
+
#undef USHRT_MAX
|
| 64 |
+
#if __SHRT_MAX__ == __INT_MAX__
|
| 65 |
+
# define USHRT_MAX (SHRT_MAX * 2U + 1U)
|
| 66 |
+
#else
|
| 67 |
+
# define USHRT_MAX (SHRT_MAX * 2 + 1)
|
| 68 |
+
#endif
|
| 69 |
+
|
| 70 |
+
/* Minimum and maximum values a `signed int' can hold. */
|
| 71 |
+
#undef INT_MIN
|
| 72 |
+
#define INT_MIN (-INT_MAX - 1)
|
| 73 |
+
#undef INT_MAX
|
| 74 |
+
#define INT_MAX __INT_MAX__
|
| 75 |
+
|
| 76 |
+
/* Maximum value an `unsigned int' can hold. (Minimum is 0). */
|
| 77 |
+
#undef UINT_MAX
|
| 78 |
+
#define UINT_MAX (INT_MAX * 2U + 1U)
|
| 79 |
+
|
| 80 |
+
/* Minimum and maximum values a `signed long int' can hold.
|
| 81 |
+
(Same as `int'). */
|
| 82 |
+
#undef LONG_MIN
|
| 83 |
+
#define LONG_MIN (-LONG_MAX - 1L)
|
| 84 |
+
#undef LONG_MAX
|
| 85 |
+
#define LONG_MAX __LONG_MAX__
|
| 86 |
+
|
| 87 |
+
/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
|
| 88 |
+
#undef ULONG_MAX
|
| 89 |
+
#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
|
| 90 |
+
|
| 91 |
+
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
| 92 |
+
/* Minimum and maximum values a `signed long long int' can hold. */
|
| 93 |
+
# undef LLONG_MIN
|
| 94 |
+
# define LLONG_MIN (-LLONG_MAX - 1LL)
|
| 95 |
+
# undef LLONG_MAX
|
| 96 |
+
# define LLONG_MAX __LONG_LONG_MAX__
|
| 97 |
+
|
| 98 |
+
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
|
| 99 |
+
# undef ULLONG_MAX
|
| 100 |
+
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
|
| 101 |
+
#endif
|
| 102 |
+
|
| 103 |
+
#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
|
| 104 |
+
/* Minimum and maximum values a `signed long long int' can hold. */
|
| 105 |
+
# undef LONG_LONG_MIN
|
| 106 |
+
# define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
|
| 107 |
+
# undef LONG_LONG_MAX
|
| 108 |
+
# define LONG_LONG_MAX __LONG_LONG_MAX__
|
| 109 |
+
|
| 110 |
+
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
|
| 111 |
+
# undef ULONG_LONG_MAX
|
| 112 |
+
# define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
|
| 113 |
+
#endif
|
| 114 |
+
|
| 115 |
+
#endif /* _LIMITS_H___ */
|
| 116 |
+
/* This administrivia gets added to the end of limits.h
|
| 117 |
+
if the system has its own version of limits.h. */
|
| 118 |
+
|
| 119 |
+
#else /* not _GCC_LIMITS_H_ */
|
| 120 |
+
|
| 121 |
+
#ifdef _GCC_NEXT_LIMITS_H
|
| 122 |
+
#include_next <limits.h> /* recurse down to the real one */
|
| 123 |
+
#endif
|
| 124 |
+
|
| 125 |
+
#endif /* not _GCC_LIMITS_H_ */
|
mingw/lib/gcc/mingw32/4.3.3/include-fixed/syslimits.h
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* syslimits.h stands for the system's own limits.h file.
|
| 2 |
+
If we can use it ok unmodified, then we install this text.
|
| 3 |
+
If fixincludes fixes it, then the fixed version is installed
|
| 4 |
+
instead of this text. */
|
| 5 |
+
|
| 6 |
+
#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */
|
| 7 |
+
#include_next <limits.h>
|
| 8 |
+
#undef _GCC_NEXT_LIMITS_H
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/algorithm
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <algorithm> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
| 4 |
+
// Free Software Foundation, Inc.
|
| 5 |
+
//
|
| 6 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 7 |
+
// software; you can redistribute it and/or modify it under the
|
| 8 |
+
// terms of the GNU General Public License as published by the
|
| 9 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 10 |
+
// any later version.
|
| 11 |
+
|
| 12 |
+
// This library is distributed in the hope that it will be useful,
|
| 13 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 14 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 15 |
+
// GNU General Public License for more details.
|
| 16 |
+
|
| 17 |
+
// You should have received a copy of the GNU General Public License
|
| 18 |
+
// along with this library; see the file COPYING. If not, write to
|
| 19 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 20 |
+
// Boston, MA 02110-1301, USA.
|
| 21 |
+
|
| 22 |
+
// As a special exception, you may use this file as part of a free software
|
| 23 |
+
// library without restriction. Specifically, if other files instantiate
|
| 24 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 25 |
+
// this file and link it with other files to produce an executable, this
|
| 26 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 27 |
+
// the GNU General Public License. This exception does not however
|
| 28 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 29 |
+
// the GNU General Public License.
|
| 30 |
+
|
| 31 |
+
/*
|
| 32 |
+
*
|
| 33 |
+
* Copyright (c) 1994
|
| 34 |
+
* Hewlett-Packard Company
|
| 35 |
+
*
|
| 36 |
+
* Permission to use, copy, modify, distribute and sell this software
|
| 37 |
+
* and its documentation for any purpose is hereby granted without fee,
|
| 38 |
+
* provided that the above copyright notice appear in all copies and
|
| 39 |
+
* that both that copyright notice and this permission notice appear
|
| 40 |
+
* in supporting documentation. Hewlett-Packard Company makes no
|
| 41 |
+
* representations about the suitability of this software for any
|
| 42 |
+
* purpose. It is provided "as is" without express or implied warranty.
|
| 43 |
+
*
|
| 44 |
+
*
|
| 45 |
+
* Copyright (c) 1996,1997
|
| 46 |
+
* Silicon Graphics Computer Systems, Inc.
|
| 47 |
+
*
|
| 48 |
+
* Permission to use, copy, modify, distribute and sell this software
|
| 49 |
+
* and its documentation for any purpose is hereby granted without fee,
|
| 50 |
+
* provided that the above copyright notice appear in all copies and
|
| 51 |
+
* that both that copyright notice and this permission notice appear
|
| 52 |
+
* in supporting documentation. Silicon Graphics makes no
|
| 53 |
+
* representations about the suitability of this software for any
|
| 54 |
+
* purpose. It is provided "as is" without express or implied warranty.
|
| 55 |
+
*/
|
| 56 |
+
|
| 57 |
+
/** @file include/algorithm
|
| 58 |
+
* This is a Standard C++ Library header.
|
| 59 |
+
*/
|
| 60 |
+
|
| 61 |
+
#ifndef _GLIBCXX_ALGORITHM
|
| 62 |
+
#define _GLIBCXX_ALGORITHM 1
|
| 63 |
+
|
| 64 |
+
#pragma GCC system_header
|
| 65 |
+
|
| 66 |
+
#include <bits/stl_algobase.h>
|
| 67 |
+
#include <bits/stl_algo.h>
|
| 68 |
+
|
| 69 |
+
#ifdef _GLIBCXX_PARALLEL
|
| 70 |
+
# include <parallel/algorithm>
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#endif /* _GLIBCXX_ALGORITHM */
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/array
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <array> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file include/array
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#ifndef _GLIBCXX_CXX0X_ARRAY
|
| 35 |
+
#define _GLIBCXX_CXX0X_ARRAY 1
|
| 36 |
+
|
| 37 |
+
#pragma GCC system_header
|
| 38 |
+
|
| 39 |
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
| 40 |
+
# include <c++0x_warning.h>
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 44 |
+
# error C++0x header cannot be included from TR1 header
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#include <bits/stl_algobase.h>
|
| 48 |
+
|
| 49 |
+
#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 50 |
+
# include <tr1_impl/array>
|
| 51 |
+
#else
|
| 52 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 53 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 54 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 55 |
+
# define _GLIBCXX_TR1
|
| 56 |
+
# include <tr1_impl/array>
|
| 57 |
+
# undef _GLIBCXX_TR1
|
| 58 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 59 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 60 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 61 |
+
#endif
|
| 62 |
+
|
| 63 |
+
#endif // _GLIBCXX_CXX0X_ARRAY
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/bitset
ADDED
|
@@ -0,0 +1,1327 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <bitset> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
| 4 |
+
// Free Software Foundation, Inc.
|
| 5 |
+
//
|
| 6 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 7 |
+
// software; you can redistribute it and/or modify it under the
|
| 8 |
+
// terms of the GNU General Public License as published by the
|
| 9 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 10 |
+
// any later version.
|
| 11 |
+
|
| 12 |
+
// This library is distributed in the hope that it will be useful,
|
| 13 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 14 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 15 |
+
// GNU General Public License for more details.
|
| 16 |
+
|
| 17 |
+
// You should have received a copy of the GNU General Public License
|
| 18 |
+
// along with this library; see the file COPYING. If not, write to
|
| 19 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 20 |
+
// Boston, MA 02110-1301, USA.
|
| 21 |
+
|
| 22 |
+
// As a special exception, you may use this file as part of a free software
|
| 23 |
+
// library without restriction. Specifically, if other files instantiate
|
| 24 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 25 |
+
// this file and link it with other files to produce an executable, this
|
| 26 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 27 |
+
// the GNU General Public License. This exception does not however
|
| 28 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 29 |
+
// the GNU General Public License.
|
| 30 |
+
|
| 31 |
+
/*
|
| 32 |
+
* Copyright (c) 1998
|
| 33 |
+
* Silicon Graphics Computer Systems, Inc.
|
| 34 |
+
*
|
| 35 |
+
* Permission to use, copy, modify, distribute and sell this software
|
| 36 |
+
* and its documentation for any purpose is hereby granted without fee,
|
| 37 |
+
* provided that the above copyright notice appear in all copies and
|
| 38 |
+
* that both that copyright notice and this permission notice appear
|
| 39 |
+
* in supporting documentation. Silicon Graphics makes no
|
| 40 |
+
* representations about the suitability of this software for any
|
| 41 |
+
* purpose. It is provided "as is" without express or implied warranty.
|
| 42 |
+
*/
|
| 43 |
+
|
| 44 |
+
/** @file include/bitset
|
| 45 |
+
* This is a Standard C++ Library header.
|
| 46 |
+
*/
|
| 47 |
+
|
| 48 |
+
#ifndef _GLIBCXX_BITSET
|
| 49 |
+
#define _GLIBCXX_BITSET 1
|
| 50 |
+
|
| 51 |
+
#pragma GCC system_header
|
| 52 |
+
|
| 53 |
+
#include <cstddef> // For size_t
|
| 54 |
+
#include <string>
|
| 55 |
+
#include <bits/functexcept.h> // For invalid_argument, out_of_range,
|
| 56 |
+
// overflow_error
|
| 57 |
+
#include <iosfwd>
|
| 58 |
+
#include <cxxabi-forced.h>
|
| 59 |
+
|
| 60 |
+
#define _GLIBCXX_BITSET_BITS_PER_WORD (__CHAR_BIT__ * sizeof(unsigned long))
|
| 61 |
+
#define _GLIBCXX_BITSET_WORDS(__n) \
|
| 62 |
+
((__n) < 1 ? 0 : ((__n) + _GLIBCXX_BITSET_BITS_PER_WORD - 1) \
|
| 63 |
+
/ _GLIBCXX_BITSET_BITS_PER_WORD)
|
| 64 |
+
|
| 65 |
+
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
| 66 |
+
|
| 67 |
+
/**
|
| 68 |
+
* Base class, general case. It is a class invariant that _Nw will be
|
| 69 |
+
* nonnegative.
|
| 70 |
+
*
|
| 71 |
+
* See documentation for bitset.
|
| 72 |
+
*/
|
| 73 |
+
template<size_t _Nw>
|
| 74 |
+
struct _Base_bitset
|
| 75 |
+
{
|
| 76 |
+
typedef unsigned long _WordT;
|
| 77 |
+
|
| 78 |
+
/// 0 is the least significant word.
|
| 79 |
+
_WordT _M_w[_Nw];
|
| 80 |
+
|
| 81 |
+
_Base_bitset()
|
| 82 |
+
{ _M_do_reset(); }
|
| 83 |
+
|
| 84 |
+
_Base_bitset(unsigned long __val)
|
| 85 |
+
{
|
| 86 |
+
_M_do_reset();
|
| 87 |
+
_M_w[0] = __val;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
static size_t
|
| 91 |
+
_S_whichword(size_t __pos )
|
| 92 |
+
{ return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
|
| 93 |
+
|
| 94 |
+
static size_t
|
| 95 |
+
_S_whichbyte(size_t __pos )
|
| 96 |
+
{ return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
|
| 97 |
+
|
| 98 |
+
static size_t
|
| 99 |
+
_S_whichbit(size_t __pos )
|
| 100 |
+
{ return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
|
| 101 |
+
|
| 102 |
+
static _WordT
|
| 103 |
+
_S_maskbit(size_t __pos )
|
| 104 |
+
{ return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
|
| 105 |
+
|
| 106 |
+
_WordT&
|
| 107 |
+
_M_getword(size_t __pos)
|
| 108 |
+
{ return _M_w[_S_whichword(__pos)]; }
|
| 109 |
+
|
| 110 |
+
_WordT
|
| 111 |
+
_M_getword(size_t __pos) const
|
| 112 |
+
{ return _M_w[_S_whichword(__pos)]; }
|
| 113 |
+
|
| 114 |
+
_WordT&
|
| 115 |
+
_M_hiword()
|
| 116 |
+
{ return _M_w[_Nw - 1]; }
|
| 117 |
+
|
| 118 |
+
_WordT
|
| 119 |
+
_M_hiword() const
|
| 120 |
+
{ return _M_w[_Nw - 1]; }
|
| 121 |
+
|
| 122 |
+
void
|
| 123 |
+
_M_do_and(const _Base_bitset<_Nw>& __x)
|
| 124 |
+
{
|
| 125 |
+
for (size_t __i = 0; __i < _Nw; __i++)
|
| 126 |
+
_M_w[__i] &= __x._M_w[__i];
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
void
|
| 130 |
+
_M_do_or(const _Base_bitset<_Nw>& __x)
|
| 131 |
+
{
|
| 132 |
+
for (size_t __i = 0; __i < _Nw; __i++)
|
| 133 |
+
_M_w[__i] |= __x._M_w[__i];
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
void
|
| 137 |
+
_M_do_xor(const _Base_bitset<_Nw>& __x)
|
| 138 |
+
{
|
| 139 |
+
for (size_t __i = 0; __i < _Nw; __i++)
|
| 140 |
+
_M_w[__i] ^= __x._M_w[__i];
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
void
|
| 144 |
+
_M_do_left_shift(size_t __shift);
|
| 145 |
+
|
| 146 |
+
void
|
| 147 |
+
_M_do_right_shift(size_t __shift);
|
| 148 |
+
|
| 149 |
+
void
|
| 150 |
+
_M_do_flip()
|
| 151 |
+
{
|
| 152 |
+
for (size_t __i = 0; __i < _Nw; __i++)
|
| 153 |
+
_M_w[__i] = ~_M_w[__i];
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
void
|
| 157 |
+
_M_do_set()
|
| 158 |
+
{
|
| 159 |
+
for (size_t __i = 0; __i < _Nw; __i++)
|
| 160 |
+
_M_w[__i] = ~static_cast<_WordT>(0);
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
void
|
| 164 |
+
_M_do_reset()
|
| 165 |
+
{ __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); }
|
| 166 |
+
|
| 167 |
+
bool
|
| 168 |
+
_M_is_equal(const _Base_bitset<_Nw>& __x) const
|
| 169 |
+
{
|
| 170 |
+
for (size_t __i = 0; __i < _Nw; ++__i)
|
| 171 |
+
if (_M_w[__i] != __x._M_w[__i])
|
| 172 |
+
return false;
|
| 173 |
+
return true;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
size_t
|
| 177 |
+
_M_are_all_aux() const
|
| 178 |
+
{
|
| 179 |
+
for (size_t __i = 0; __i < _Nw - 1; __i++)
|
| 180 |
+
if (_M_w[__i] != ~static_cast<_WordT>(0))
|
| 181 |
+
return 0;
|
| 182 |
+
return ((_Nw - 1) * _GLIBCXX_BITSET_BITS_PER_WORD
|
| 183 |
+
+ __builtin_popcountl(_M_hiword()));
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
bool
|
| 187 |
+
_M_is_any() const
|
| 188 |
+
{
|
| 189 |
+
for (size_t __i = 0; __i < _Nw; __i++)
|
| 190 |
+
if (_M_w[__i] != static_cast<_WordT>(0))
|
| 191 |
+
return true;
|
| 192 |
+
return false;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
size_t
|
| 196 |
+
_M_do_count() const
|
| 197 |
+
{
|
| 198 |
+
size_t __result = 0;
|
| 199 |
+
for (size_t __i = 0; __i < _Nw; __i++)
|
| 200 |
+
__result += __builtin_popcountl(_M_w[__i]);
|
| 201 |
+
return __result;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
unsigned long
|
| 205 |
+
_M_do_to_ulong() const;
|
| 206 |
+
|
| 207 |
+
// find first "on" bit
|
| 208 |
+
size_t
|
| 209 |
+
_M_do_find_first(size_t __not_found) const;
|
| 210 |
+
|
| 211 |
+
// find the next "on" bit that follows "prev"
|
| 212 |
+
size_t
|
| 213 |
+
_M_do_find_next(size_t __prev, size_t __not_found) const;
|
| 214 |
+
};
|
| 215 |
+
|
| 216 |
+
// Definitions of non-inline functions from _Base_bitset.
|
| 217 |
+
template<size_t _Nw>
|
| 218 |
+
void
|
| 219 |
+
_Base_bitset<_Nw>::_M_do_left_shift(size_t __shift)
|
| 220 |
+
{
|
| 221 |
+
if (__builtin_expect(__shift != 0, 1))
|
| 222 |
+
{
|
| 223 |
+
const size_t __wshift = __shift / _GLIBCXX_BITSET_BITS_PER_WORD;
|
| 224 |
+
const size_t __offset = __shift % _GLIBCXX_BITSET_BITS_PER_WORD;
|
| 225 |
+
|
| 226 |
+
if (__offset == 0)
|
| 227 |
+
for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
|
| 228 |
+
_M_w[__n] = _M_w[__n - __wshift];
|
| 229 |
+
else
|
| 230 |
+
{
|
| 231 |
+
const size_t __sub_offset = (_GLIBCXX_BITSET_BITS_PER_WORD
|
| 232 |
+
- __offset);
|
| 233 |
+
for (size_t __n = _Nw - 1; __n > __wshift; --__n)
|
| 234 |
+
_M_w[__n] = ((_M_w[__n - __wshift] << __offset)
|
| 235 |
+
| (_M_w[__n - __wshift - 1] >> __sub_offset));
|
| 236 |
+
_M_w[__wshift] = _M_w[0] << __offset;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0));
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
template<size_t _Nw>
|
| 244 |
+
void
|
| 245 |
+
_Base_bitset<_Nw>::_M_do_right_shift(size_t __shift)
|
| 246 |
+
{
|
| 247 |
+
if (__builtin_expect(__shift != 0, 1))
|
| 248 |
+
{
|
| 249 |
+
const size_t __wshift = __shift / _GLIBCXX_BITSET_BITS_PER_WORD;
|
| 250 |
+
const size_t __offset = __shift % _GLIBCXX_BITSET_BITS_PER_WORD;
|
| 251 |
+
const size_t __limit = _Nw - __wshift - 1;
|
| 252 |
+
|
| 253 |
+
if (__offset == 0)
|
| 254 |
+
for (size_t __n = 0; __n <= __limit; ++__n)
|
| 255 |
+
_M_w[__n] = _M_w[__n + __wshift];
|
| 256 |
+
else
|
| 257 |
+
{
|
| 258 |
+
const size_t __sub_offset = (_GLIBCXX_BITSET_BITS_PER_WORD
|
| 259 |
+
- __offset);
|
| 260 |
+
for (size_t __n = 0; __n < __limit; ++__n)
|
| 261 |
+
_M_w[__n] = ((_M_w[__n + __wshift] >> __offset)
|
| 262 |
+
| (_M_w[__n + __wshift + 1] << __sub_offset));
|
| 263 |
+
_M_w[__limit] = _M_w[_Nw-1] >> __offset;
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
|
| 267 |
+
}
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
template<size_t _Nw>
|
| 271 |
+
unsigned long
|
| 272 |
+
_Base_bitset<_Nw>::_M_do_to_ulong() const
|
| 273 |
+
{
|
| 274 |
+
for (size_t __i = 1; __i < _Nw; ++__i)
|
| 275 |
+
if (_M_w[__i])
|
| 276 |
+
__throw_overflow_error(__N("_Base_bitset::_M_do_to_ulong"));
|
| 277 |
+
return _M_w[0];
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
template<size_t _Nw>
|
| 281 |
+
size_t
|
| 282 |
+
_Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const
|
| 283 |
+
{
|
| 284 |
+
for (size_t __i = 0; __i < _Nw; __i++)
|
| 285 |
+
{
|
| 286 |
+
_WordT __thisword = _M_w[__i];
|
| 287 |
+
if (__thisword != static_cast<_WordT>(0))
|
| 288 |
+
return (__i * _GLIBCXX_BITSET_BITS_PER_WORD
|
| 289 |
+
+ __builtin_ctzl(__thisword));
|
| 290 |
+
}
|
| 291 |
+
// not found, so return an indication of failure.
|
| 292 |
+
return __not_found;
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
template<size_t _Nw>
|
| 296 |
+
size_t
|
| 297 |
+
_Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const
|
| 298 |
+
{
|
| 299 |
+
// make bound inclusive
|
| 300 |
+
++__prev;
|
| 301 |
+
|
| 302 |
+
// check out of bounds
|
| 303 |
+
if (__prev >= _Nw * _GLIBCXX_BITSET_BITS_PER_WORD)
|
| 304 |
+
return __not_found;
|
| 305 |
+
|
| 306 |
+
// search first word
|
| 307 |
+
size_t __i = _S_whichword(__prev);
|
| 308 |
+
_WordT __thisword = _M_w[__i];
|
| 309 |
+
|
| 310 |
+
// mask off bits below bound
|
| 311 |
+
__thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev);
|
| 312 |
+
|
| 313 |
+
if (__thisword != static_cast<_WordT>(0))
|
| 314 |
+
return (__i * _GLIBCXX_BITSET_BITS_PER_WORD
|
| 315 |
+
+ __builtin_ctzl(__thisword));
|
| 316 |
+
|
| 317 |
+
// check subsequent words
|
| 318 |
+
__i++;
|
| 319 |
+
for (; __i < _Nw; __i++)
|
| 320 |
+
{
|
| 321 |
+
__thisword = _M_w[__i];
|
| 322 |
+
if (__thisword != static_cast<_WordT>(0))
|
| 323 |
+
return (__i * _GLIBCXX_BITSET_BITS_PER_WORD
|
| 324 |
+
+ __builtin_ctzl(__thisword));
|
| 325 |
+
}
|
| 326 |
+
// not found, so return an indication of failure.
|
| 327 |
+
return __not_found;
|
| 328 |
+
} // end _M_do_find_next
|
| 329 |
+
|
| 330 |
+
/**
|
| 331 |
+
* Base class, specialization for a single word.
|
| 332 |
+
*
|
| 333 |
+
* See documentation for bitset.
|
| 334 |
+
*/
|
| 335 |
+
template<>
|
| 336 |
+
struct _Base_bitset<1>
|
| 337 |
+
{
|
| 338 |
+
typedef unsigned long _WordT;
|
| 339 |
+
_WordT _M_w;
|
| 340 |
+
|
| 341 |
+
_Base_bitset(void)
|
| 342 |
+
: _M_w(0)
|
| 343 |
+
{ }
|
| 344 |
+
|
| 345 |
+
_Base_bitset(unsigned long __val)
|
| 346 |
+
: _M_w(__val)
|
| 347 |
+
{ }
|
| 348 |
+
|
| 349 |
+
static size_t
|
| 350 |
+
_S_whichword(size_t __pos )
|
| 351 |
+
{ return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
|
| 352 |
+
|
| 353 |
+
static size_t
|
| 354 |
+
_S_whichbyte(size_t __pos )
|
| 355 |
+
{ return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
|
| 356 |
+
|
| 357 |
+
static size_t
|
| 358 |
+
_S_whichbit(size_t __pos )
|
| 359 |
+
{ return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
|
| 360 |
+
|
| 361 |
+
static _WordT
|
| 362 |
+
_S_maskbit(size_t __pos )
|
| 363 |
+
{ return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
|
| 364 |
+
|
| 365 |
+
_WordT&
|
| 366 |
+
_M_getword(size_t)
|
| 367 |
+
{ return _M_w; }
|
| 368 |
+
|
| 369 |
+
_WordT
|
| 370 |
+
_M_getword(size_t) const
|
| 371 |
+
{ return _M_w; }
|
| 372 |
+
|
| 373 |
+
_WordT&
|
| 374 |
+
_M_hiword()
|
| 375 |
+
{ return _M_w; }
|
| 376 |
+
|
| 377 |
+
_WordT
|
| 378 |
+
_M_hiword() const
|
| 379 |
+
{ return _M_w; }
|
| 380 |
+
|
| 381 |
+
void
|
| 382 |
+
_M_do_and(const _Base_bitset<1>& __x)
|
| 383 |
+
{ _M_w &= __x._M_w; }
|
| 384 |
+
|
| 385 |
+
void
|
| 386 |
+
_M_do_or(const _Base_bitset<1>& __x)
|
| 387 |
+
{ _M_w |= __x._M_w; }
|
| 388 |
+
|
| 389 |
+
void
|
| 390 |
+
_M_do_xor(const _Base_bitset<1>& __x)
|
| 391 |
+
{ _M_w ^= __x._M_w; }
|
| 392 |
+
|
| 393 |
+
void
|
| 394 |
+
_M_do_left_shift(size_t __shift)
|
| 395 |
+
{ _M_w <<= __shift; }
|
| 396 |
+
|
| 397 |
+
void
|
| 398 |
+
_M_do_right_shift(size_t __shift)
|
| 399 |
+
{ _M_w >>= __shift; }
|
| 400 |
+
|
| 401 |
+
void
|
| 402 |
+
_M_do_flip()
|
| 403 |
+
{ _M_w = ~_M_w; }
|
| 404 |
+
|
| 405 |
+
void
|
| 406 |
+
_M_do_set()
|
| 407 |
+
{ _M_w = ~static_cast<_WordT>(0); }
|
| 408 |
+
|
| 409 |
+
void
|
| 410 |
+
_M_do_reset()
|
| 411 |
+
{ _M_w = 0; }
|
| 412 |
+
|
| 413 |
+
bool
|
| 414 |
+
_M_is_equal(const _Base_bitset<1>& __x) const
|
| 415 |
+
{ return _M_w == __x._M_w; }
|
| 416 |
+
|
| 417 |
+
size_t
|
| 418 |
+
_M_are_all_aux() const
|
| 419 |
+
{ return __builtin_popcountl(_M_w); }
|
| 420 |
+
|
| 421 |
+
bool
|
| 422 |
+
_M_is_any() const
|
| 423 |
+
{ return _M_w != 0; }
|
| 424 |
+
|
| 425 |
+
size_t
|
| 426 |
+
_M_do_count() const
|
| 427 |
+
{ return __builtin_popcountl(_M_w); }
|
| 428 |
+
|
| 429 |
+
unsigned long
|
| 430 |
+
_M_do_to_ulong() const
|
| 431 |
+
{ return _M_w; }
|
| 432 |
+
|
| 433 |
+
size_t
|
| 434 |
+
_M_do_find_first(size_t __not_found) const
|
| 435 |
+
{
|
| 436 |
+
if (_M_w != 0)
|
| 437 |
+
return __builtin_ctzl(_M_w);
|
| 438 |
+
else
|
| 439 |
+
return __not_found;
|
| 440 |
+
}
|
| 441 |
+
|
| 442 |
+
// find the next "on" bit that follows "prev"
|
| 443 |
+
size_t
|
| 444 |
+
_M_do_find_next(size_t __prev, size_t __not_found) const
|
| 445 |
+
{
|
| 446 |
+
++__prev;
|
| 447 |
+
if (__prev >= ((size_t) _GLIBCXX_BITSET_BITS_PER_WORD))
|
| 448 |
+
return __not_found;
|
| 449 |
+
|
| 450 |
+
_WordT __x = _M_w >> __prev;
|
| 451 |
+
if (__x != 0)
|
| 452 |
+
return __builtin_ctzl(__x) + __prev;
|
| 453 |
+
else
|
| 454 |
+
return __not_found;
|
| 455 |
+
}
|
| 456 |
+
};
|
| 457 |
+
|
| 458 |
+
/**
|
| 459 |
+
* Base class, specialization for no storage (zero-length %bitset).
|
| 460 |
+
*
|
| 461 |
+
* See documentation for bitset.
|
| 462 |
+
*/
|
| 463 |
+
template<>
|
| 464 |
+
struct _Base_bitset<0>
|
| 465 |
+
{
|
| 466 |
+
typedef unsigned long _WordT;
|
| 467 |
+
|
| 468 |
+
_Base_bitset()
|
| 469 |
+
{ }
|
| 470 |
+
|
| 471 |
+
_Base_bitset(unsigned long)
|
| 472 |
+
{ }
|
| 473 |
+
|
| 474 |
+
static size_t
|
| 475 |
+
_S_whichword(size_t __pos )
|
| 476 |
+
{ return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
|
| 477 |
+
|
| 478 |
+
static size_t
|
| 479 |
+
_S_whichbyte(size_t __pos )
|
| 480 |
+
{ return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
|
| 481 |
+
|
| 482 |
+
static size_t
|
| 483 |
+
_S_whichbit(size_t __pos )
|
| 484 |
+
{ return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
|
| 485 |
+
|
| 486 |
+
static _WordT
|
| 487 |
+
_S_maskbit(size_t __pos )
|
| 488 |
+
{ return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
|
| 489 |
+
|
| 490 |
+
// This would normally give access to the data. The bounds-checking
|
| 491 |
+
// in the bitset class will prevent the user from getting this far,
|
| 492 |
+
// but (1) it must still return an lvalue to compile, and (2) the
|
| 493 |
+
// user might call _Unchecked_set directly, in which case this /needs/
|
| 494 |
+
// to fail. Let's not penalize zero-length users unless they actually
|
| 495 |
+
// make an unchecked call; all the memory ugliness is therefore
|
| 496 |
+
// localized to this single should-never-get-this-far function.
|
| 497 |
+
_WordT&
|
| 498 |
+
_M_getword(size_t) const
|
| 499 |
+
{
|
| 500 |
+
__throw_out_of_range(__N("_Base_bitset::_M_getword"));
|
| 501 |
+
return *new _WordT;
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
_WordT
|
| 505 |
+
_M_hiword() const
|
| 506 |
+
{ return 0; }
|
| 507 |
+
|
| 508 |
+
void
|
| 509 |
+
_M_do_and(const _Base_bitset<0>&)
|
| 510 |
+
{ }
|
| 511 |
+
|
| 512 |
+
void
|
| 513 |
+
_M_do_or(const _Base_bitset<0>&)
|
| 514 |
+
{ }
|
| 515 |
+
|
| 516 |
+
void
|
| 517 |
+
_M_do_xor(const _Base_bitset<0>&)
|
| 518 |
+
{ }
|
| 519 |
+
|
| 520 |
+
void
|
| 521 |
+
_M_do_left_shift(size_t)
|
| 522 |
+
{ }
|
| 523 |
+
|
| 524 |
+
void
|
| 525 |
+
_M_do_right_shift(size_t)
|
| 526 |
+
{ }
|
| 527 |
+
|
| 528 |
+
void
|
| 529 |
+
_M_do_flip()
|
| 530 |
+
{ }
|
| 531 |
+
|
| 532 |
+
void
|
| 533 |
+
_M_do_set()
|
| 534 |
+
{ }
|
| 535 |
+
|
| 536 |
+
void
|
| 537 |
+
_M_do_reset()
|
| 538 |
+
{ }
|
| 539 |
+
|
| 540 |
+
// Are all empty bitsets equal to each other? Are they equal to
|
| 541 |
+
// themselves? How to compare a thing which has no state? What is
|
| 542 |
+
// the sound of one zero-length bitset clapping?
|
| 543 |
+
bool
|
| 544 |
+
_M_is_equal(const _Base_bitset<0>&) const
|
| 545 |
+
{ return true; }
|
| 546 |
+
|
| 547 |
+
size_t
|
| 548 |
+
_M_are_all_aux() const
|
| 549 |
+
{ return 0; }
|
| 550 |
+
|
| 551 |
+
bool
|
| 552 |
+
_M_is_any() const
|
| 553 |
+
{ return false; }
|
| 554 |
+
|
| 555 |
+
size_t
|
| 556 |
+
_M_do_count() const
|
| 557 |
+
{ return 0; }
|
| 558 |
+
|
| 559 |
+
unsigned long
|
| 560 |
+
_M_do_to_ulong() const
|
| 561 |
+
{ return 0; }
|
| 562 |
+
|
| 563 |
+
// Normally "not found" is the size, but that could also be
|
| 564 |
+
// misinterpreted as an index in this corner case. Oh well.
|
| 565 |
+
size_t
|
| 566 |
+
_M_do_find_first(size_t) const
|
| 567 |
+
{ return 0; }
|
| 568 |
+
|
| 569 |
+
size_t
|
| 570 |
+
_M_do_find_next(size_t, size_t) const
|
| 571 |
+
{ return 0; }
|
| 572 |
+
};
|
| 573 |
+
|
| 574 |
+
|
| 575 |
+
// Helper class to zero out the unused high-order bits in the highest word.
|
| 576 |
+
template<size_t _Extrabits>
|
| 577 |
+
struct _Sanitize
|
| 578 |
+
{
|
| 579 |
+
static void _S_do_sanitize(unsigned long& __val)
|
| 580 |
+
{ __val &= ~((~static_cast<unsigned long>(0)) << _Extrabits); }
|
| 581 |
+
};
|
| 582 |
+
|
| 583 |
+
template<>
|
| 584 |
+
struct _Sanitize<0>
|
| 585 |
+
{ static void _S_do_sanitize(unsigned long) {} };
|
| 586 |
+
|
| 587 |
+
/**
|
| 588 |
+
* @brief The %bitset class represents a @e fixed-size sequence of bits.
|
| 589 |
+
*
|
| 590 |
+
* @ingroup Containers
|
| 591 |
+
*
|
| 592 |
+
* (Note that %bitset does @e not meet the formal requirements of a
|
| 593 |
+
* <a href="tables.html#65">container</a>. Mainly, it lacks iterators.)
|
| 594 |
+
*
|
| 595 |
+
* The template argument, @a Nb, may be any non-negative number,
|
| 596 |
+
* specifying the number of bits (e.g., "0", "12", "1024*1024").
|
| 597 |
+
*
|
| 598 |
+
* In the general unoptimized case, storage is allocated in word-sized
|
| 599 |
+
* blocks. Let B be the number of bits in a word, then (Nb+(B-1))/B
|
| 600 |
+
* words will be used for storage. B - Nb%B bits are unused. (They are
|
| 601 |
+
* the high-order bits in the highest word.) It is a class invariant
|
| 602 |
+
* that those unused bits are always zero.
|
| 603 |
+
*
|
| 604 |
+
* If you think of %bitset as "a simple array of bits," be aware that
|
| 605 |
+
* your mental picture is reversed: a %bitset behaves the same way as
|
| 606 |
+
* bits in integers do, with the bit at index 0 in the "least significant
|
| 607 |
+
* / right-hand" position, and the bit at index Nb-1 in the "most
|
| 608 |
+
* significant / left-hand" position. Thus, unlike other containers, a
|
| 609 |
+
* %bitset's index "counts from right to left," to put it very loosely.
|
| 610 |
+
*
|
| 611 |
+
* This behavior is preserved when translating to and from strings. For
|
| 612 |
+
* example, the first line of the following program probably prints
|
| 613 |
+
* "b('a') is 0001100001" on a modern ASCII system.
|
| 614 |
+
*
|
| 615 |
+
* @code
|
| 616 |
+
* #include <bitset>
|
| 617 |
+
* #include <iostream>
|
| 618 |
+
* #include <sstream>
|
| 619 |
+
*
|
| 620 |
+
* using namespace std;
|
| 621 |
+
*
|
| 622 |
+
* int main()
|
| 623 |
+
* {
|
| 624 |
+
* long a = 'a';
|
| 625 |
+
* bitset<10> b(a);
|
| 626 |
+
*
|
| 627 |
+
* cout << "b('a') is " << b << endl;
|
| 628 |
+
*
|
| 629 |
+
* ostringstream s;
|
| 630 |
+
* s << b;
|
| 631 |
+
* string str = s.str();
|
| 632 |
+
* cout << "index 3 in the string is " << str[3] << " but\n"
|
| 633 |
+
* << "index 3 in the bitset is " << b[3] << endl;
|
| 634 |
+
* }
|
| 635 |
+
* @endcode
|
| 636 |
+
*
|
| 637 |
+
* Also see:
|
| 638 |
+
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch33s02.html
|
| 639 |
+
* for a description of extensions.
|
| 640 |
+
*
|
| 641 |
+
* Most of the actual code isn't contained in %bitset<> itself, but in the
|
| 642 |
+
* base class _Base_bitset. The base class works with whole words, not with
|
| 643 |
+
* individual bits. This allows us to specialize _Base_bitset for the
|
| 644 |
+
* important special case where the %bitset is only a single word.
|
| 645 |
+
*
|
| 646 |
+
* Extra confusion can result due to the fact that the storage for
|
| 647 |
+
* _Base_bitset @e is a regular array, and is indexed as such. This is
|
| 648 |
+
* carefully encapsulated.
|
| 649 |
+
*/
|
| 650 |
+
template<size_t _Nb>
|
| 651 |
+
class bitset
|
| 652 |
+
: private _Base_bitset<_GLIBCXX_BITSET_WORDS(_Nb)>
|
| 653 |
+
{
|
| 654 |
+
private:
|
| 655 |
+
typedef _Base_bitset<_GLIBCXX_BITSET_WORDS(_Nb)> _Base;
|
| 656 |
+
typedef unsigned long _WordT;
|
| 657 |
+
|
| 658 |
+
void
|
| 659 |
+
_M_do_sanitize()
|
| 660 |
+
{
|
| 661 |
+
_Sanitize<_Nb % _GLIBCXX_BITSET_BITS_PER_WORD>::
|
| 662 |
+
_S_do_sanitize(this->_M_hiword());
|
| 663 |
+
}
|
| 664 |
+
|
| 665 |
+
public:
|
| 666 |
+
/**
|
| 667 |
+
* This encapsulates the concept of a single bit. An instance of this
|
| 668 |
+
* class is a proxy for an actual bit; this way the individual bit
|
| 669 |
+
* operations are done as faster word-size bitwise instructions.
|
| 670 |
+
*
|
| 671 |
+
* Most users will never need to use this class directly; conversions
|
| 672 |
+
* to and from bool are automatic and should be transparent. Overloaded
|
| 673 |
+
* operators help to preserve the illusion.
|
| 674 |
+
*
|
| 675 |
+
* (On a typical system, this "bit %reference" is 64 times the size of
|
| 676 |
+
* an actual bit. Ha.)
|
| 677 |
+
*/
|
| 678 |
+
class reference
|
| 679 |
+
{
|
| 680 |
+
friend class bitset;
|
| 681 |
+
|
| 682 |
+
_WordT *_M_wp;
|
| 683 |
+
size_t _M_bpos;
|
| 684 |
+
|
| 685 |
+
// left undefined
|
| 686 |
+
reference();
|
| 687 |
+
|
| 688 |
+
public:
|
| 689 |
+
reference(bitset& __b, size_t __pos)
|
| 690 |
+
{
|
| 691 |
+
_M_wp = &__b._M_getword(__pos);
|
| 692 |
+
_M_bpos = _Base::_S_whichbit(__pos);
|
| 693 |
+
}
|
| 694 |
+
|
| 695 |
+
~reference()
|
| 696 |
+
{ }
|
| 697 |
+
|
| 698 |
+
// For b[i] = __x;
|
| 699 |
+
reference&
|
| 700 |
+
operator=(bool __x)
|
| 701 |
+
{
|
| 702 |
+
if (__x)
|
| 703 |
+
*_M_wp |= _Base::_S_maskbit(_M_bpos);
|
| 704 |
+
else
|
| 705 |
+
*_M_wp &= ~_Base::_S_maskbit(_M_bpos);
|
| 706 |
+
return *this;
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
// For b[i] = b[__j];
|
| 710 |
+
reference&
|
| 711 |
+
operator=(const reference& __j)
|
| 712 |
+
{
|
| 713 |
+
if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos)))
|
| 714 |
+
*_M_wp |= _Base::_S_maskbit(_M_bpos);
|
| 715 |
+
else
|
| 716 |
+
*_M_wp &= ~_Base::_S_maskbit(_M_bpos);
|
| 717 |
+
return *this;
|
| 718 |
+
}
|
| 719 |
+
|
| 720 |
+
// Flips the bit
|
| 721 |
+
bool
|
| 722 |
+
operator~() const
|
| 723 |
+
{ return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; }
|
| 724 |
+
|
| 725 |
+
// For __x = b[i];
|
| 726 |
+
operator bool() const
|
| 727 |
+
{ return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; }
|
| 728 |
+
|
| 729 |
+
// For b[i].flip();
|
| 730 |
+
reference&
|
| 731 |
+
flip()
|
| 732 |
+
{
|
| 733 |
+
*_M_wp ^= _Base::_S_maskbit(_M_bpos);
|
| 734 |
+
return *this;
|
| 735 |
+
}
|
| 736 |
+
};
|
| 737 |
+
friend class reference;
|
| 738 |
+
|
| 739 |
+
// 23.3.5.1 constructors:
|
| 740 |
+
/// All bits set to zero.
|
| 741 |
+
bitset()
|
| 742 |
+
{ }
|
| 743 |
+
|
| 744 |
+
/// Initial bits bitwise-copied from a single word (others set to zero).
|
| 745 |
+
bitset(unsigned long __val)
|
| 746 |
+
: _Base(__val)
|
| 747 |
+
{ _M_do_sanitize(); }
|
| 748 |
+
|
| 749 |
+
/**
|
| 750 |
+
* @brief Use a subset of a string.
|
| 751 |
+
* @param s A string of '0' and '1' characters.
|
| 752 |
+
* @param position Index of the first character in @a s to use;
|
| 753 |
+
* defaults to zero.
|
| 754 |
+
* @throw std::out_of_range If @a pos is bigger the size of @a s.
|
| 755 |
+
* @throw std::invalid_argument If a character appears in the string
|
| 756 |
+
* which is neither '0' nor '1'.
|
| 757 |
+
*/
|
| 758 |
+
template<class _CharT, class _Traits, class _Alloc>
|
| 759 |
+
explicit
|
| 760 |
+
bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
|
| 761 |
+
size_t __position = 0)
|
| 762 |
+
: _Base()
|
| 763 |
+
{
|
| 764 |
+
if (__position > __s.size())
|
| 765 |
+
__throw_out_of_range(__N("bitset::bitset initial position "
|
| 766 |
+
"not valid"));
|
| 767 |
+
_M_copy_from_string(__s, __position,
|
| 768 |
+
std::basic_string<_CharT, _Traits, _Alloc>::npos);
|
| 769 |
+
}
|
| 770 |
+
|
| 771 |
+
/**
|
| 772 |
+
* @brief Use a subset of a string.
|
| 773 |
+
* @param s A string of '0' and '1' characters.
|
| 774 |
+
* @param position Index of the first character in @a s to use.
|
| 775 |
+
* @param n The number of characters to copy.
|
| 776 |
+
* @throw std::out_of_range If @a pos is bigger the size of @a s.
|
| 777 |
+
* @throw std::invalid_argument If a character appears in the string
|
| 778 |
+
* which is neither '0' nor '1'.
|
| 779 |
+
*/
|
| 780 |
+
template<class _CharT, class _Traits, class _Alloc>
|
| 781 |
+
bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
|
| 782 |
+
size_t __position, size_t __n)
|
| 783 |
+
: _Base()
|
| 784 |
+
{
|
| 785 |
+
if (__position > __s.size())
|
| 786 |
+
__throw_out_of_range(__N("bitset::bitset initial position "
|
| 787 |
+
"not valid"));
|
| 788 |
+
_M_copy_from_string(__s, __position, __n);
|
| 789 |
+
}
|
| 790 |
+
|
| 791 |
+
// 23.3.5.2 bitset operations:
|
| 792 |
+
//@{
|
| 793 |
+
/**
|
| 794 |
+
* @brief Operations on bitsets.
|
| 795 |
+
* @param rhs A same-sized bitset.
|
| 796 |
+
*
|
| 797 |
+
* These should be self-explanatory.
|
| 798 |
+
*/
|
| 799 |
+
bitset<_Nb>&
|
| 800 |
+
operator&=(const bitset<_Nb>& __rhs)
|
| 801 |
+
{
|
| 802 |
+
this->_M_do_and(__rhs);
|
| 803 |
+
return *this;
|
| 804 |
+
}
|
| 805 |
+
|
| 806 |
+
bitset<_Nb>&
|
| 807 |
+
operator|=(const bitset<_Nb>& __rhs)
|
| 808 |
+
{
|
| 809 |
+
this->_M_do_or(__rhs);
|
| 810 |
+
return *this;
|
| 811 |
+
}
|
| 812 |
+
|
| 813 |
+
bitset<_Nb>&
|
| 814 |
+
operator^=(const bitset<_Nb>& __rhs)
|
| 815 |
+
{
|
| 816 |
+
this->_M_do_xor(__rhs);
|
| 817 |
+
return *this;
|
| 818 |
+
}
|
| 819 |
+
//@}
|
| 820 |
+
|
| 821 |
+
//@{
|
| 822 |
+
/**
|
| 823 |
+
* @brief Operations on bitsets.
|
| 824 |
+
* @param position The number of places to shift.
|
| 825 |
+
*
|
| 826 |
+
* These should be self-explanatory.
|
| 827 |
+
*/
|
| 828 |
+
bitset<_Nb>&
|
| 829 |
+
operator<<=(size_t __position)
|
| 830 |
+
{
|
| 831 |
+
if (__builtin_expect(__position < _Nb, 1))
|
| 832 |
+
{
|
| 833 |
+
this->_M_do_left_shift(__position);
|
| 834 |
+
this->_M_do_sanitize();
|
| 835 |
+
}
|
| 836 |
+
else
|
| 837 |
+
this->_M_do_reset();
|
| 838 |
+
return *this;
|
| 839 |
+
}
|
| 840 |
+
|
| 841 |
+
bitset<_Nb>&
|
| 842 |
+
operator>>=(size_t __position)
|
| 843 |
+
{
|
| 844 |
+
if (__builtin_expect(__position < _Nb, 1))
|
| 845 |
+
{
|
| 846 |
+
this->_M_do_right_shift(__position);
|
| 847 |
+
this->_M_do_sanitize();
|
| 848 |
+
}
|
| 849 |
+
else
|
| 850 |
+
this->_M_do_reset();
|
| 851 |
+
return *this;
|
| 852 |
+
}
|
| 853 |
+
//@}
|
| 854 |
+
|
| 855 |
+
//@{
|
| 856 |
+
/**
|
| 857 |
+
* These versions of single-bit set, reset, flip, and test are
|
| 858 |
+
* extensions from the SGI version. They do no range checking.
|
| 859 |
+
* @ingroup SGIextensions
|
| 860 |
+
*/
|
| 861 |
+
bitset<_Nb>&
|
| 862 |
+
_Unchecked_set(size_t __pos)
|
| 863 |
+
{
|
| 864 |
+
this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
|
| 865 |
+
return *this;
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
bitset<_Nb>&
|
| 869 |
+
_Unchecked_set(size_t __pos, int __val)
|
| 870 |
+
{
|
| 871 |
+
if (__val)
|
| 872 |
+
this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
|
| 873 |
+
else
|
| 874 |
+
this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
|
| 875 |
+
return *this;
|
| 876 |
+
}
|
| 877 |
+
|
| 878 |
+
bitset<_Nb>&
|
| 879 |
+
_Unchecked_reset(size_t __pos)
|
| 880 |
+
{
|
| 881 |
+
this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
|
| 882 |
+
return *this;
|
| 883 |
+
}
|
| 884 |
+
|
| 885 |
+
bitset<_Nb>&
|
| 886 |
+
_Unchecked_flip(size_t __pos)
|
| 887 |
+
{
|
| 888 |
+
this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos);
|
| 889 |
+
return *this;
|
| 890 |
+
}
|
| 891 |
+
|
| 892 |
+
bool
|
| 893 |
+
_Unchecked_test(size_t __pos) const
|
| 894 |
+
{ return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
|
| 895 |
+
!= static_cast<_WordT>(0)); }
|
| 896 |
+
//@}
|
| 897 |
+
|
| 898 |
+
// Set, reset, and flip.
|
| 899 |
+
/**
|
| 900 |
+
* @brief Sets every bit to true.
|
| 901 |
+
*/
|
| 902 |
+
bitset<_Nb>&
|
| 903 |
+
set()
|
| 904 |
+
{
|
| 905 |
+
this->_M_do_set();
|
| 906 |
+
this->_M_do_sanitize();
|
| 907 |
+
return *this;
|
| 908 |
+
}
|
| 909 |
+
|
| 910 |
+
/**
|
| 911 |
+
* @brief Sets a given bit to a particular value.
|
| 912 |
+
* @param position The index of the bit.
|
| 913 |
+
* @param val Either true or false, defaults to true.
|
| 914 |
+
* @throw std::out_of_range If @a pos is bigger the size of the %set.
|
| 915 |
+
*/
|
| 916 |
+
bitset<_Nb>&
|
| 917 |
+
set(size_t __position, bool __val = true)
|
| 918 |
+
{
|
| 919 |
+
if (__position >= _Nb)
|
| 920 |
+
__throw_out_of_range(__N("bitset::set"));
|
| 921 |
+
return _Unchecked_set(__position, __val);
|
| 922 |
+
}
|
| 923 |
+
|
| 924 |
+
/**
|
| 925 |
+
* @brief Sets every bit to false.
|
| 926 |
+
*/
|
| 927 |
+
bitset<_Nb>&
|
| 928 |
+
reset()
|
| 929 |
+
{
|
| 930 |
+
this->_M_do_reset();
|
| 931 |
+
return *this;
|
| 932 |
+
}
|
| 933 |
+
|
| 934 |
+
/**
|
| 935 |
+
* @brief Sets a given bit to false.
|
| 936 |
+
* @param position The index of the bit.
|
| 937 |
+
* @throw std::out_of_range If @a pos is bigger the size of the %set.
|
| 938 |
+
*
|
| 939 |
+
* Same as writing @c set(pos,false).
|
| 940 |
+
*/
|
| 941 |
+
bitset<_Nb>&
|
| 942 |
+
reset(size_t __position)
|
| 943 |
+
{
|
| 944 |
+
if (__position >= _Nb)
|
| 945 |
+
__throw_out_of_range(__N("bitset::reset"));
|
| 946 |
+
return _Unchecked_reset(__position);
|
| 947 |
+
}
|
| 948 |
+
|
| 949 |
+
/**
|
| 950 |
+
* @brief Toggles every bit to its opposite value.
|
| 951 |
+
*/
|
| 952 |
+
bitset<_Nb>&
|
| 953 |
+
flip()
|
| 954 |
+
{
|
| 955 |
+
this->_M_do_flip();
|
| 956 |
+
this->_M_do_sanitize();
|
| 957 |
+
return *this;
|
| 958 |
+
}
|
| 959 |
+
|
| 960 |
+
/**
|
| 961 |
+
* @brief Toggles a given bit to its opposite value.
|
| 962 |
+
* @param position The index of the bit.
|
| 963 |
+
* @throw std::out_of_range If @a pos is bigger the size of the %set.
|
| 964 |
+
*/
|
| 965 |
+
bitset<_Nb>&
|
| 966 |
+
flip(size_t __position)
|
| 967 |
+
{
|
| 968 |
+
if (__position >= _Nb)
|
| 969 |
+
__throw_out_of_range(__N("bitset::flip"));
|
| 970 |
+
return _Unchecked_flip(__position);
|
| 971 |
+
}
|
| 972 |
+
|
| 973 |
+
/// See the no-argument flip().
|
| 974 |
+
bitset<_Nb>
|
| 975 |
+
operator~() const
|
| 976 |
+
{ return bitset<_Nb>(*this).flip(); }
|
| 977 |
+
|
| 978 |
+
//@{
|
| 979 |
+
/**
|
| 980 |
+
* @brief Array-indexing support.
|
| 981 |
+
* @param position Index into the %bitset.
|
| 982 |
+
* @return A bool for a 'const %bitset'. For non-const bitsets, an
|
| 983 |
+
* instance of the reference proxy class.
|
| 984 |
+
* @note These operators do no range checking and throw no exceptions,
|
| 985 |
+
* as required by DR 11 to the standard.
|
| 986 |
+
*
|
| 987 |
+
* _GLIBCXX_RESOLVE_LIB_DEFECTS Note that this implementation already
|
| 988 |
+
* resolves DR 11 (items 1 and 2), but does not do the range-checking
|
| 989 |
+
* required by that DR's resolution. -pme
|
| 990 |
+
* The DR has since been changed: range-checking is a precondition
|
| 991 |
+
* (users' responsibility), and these functions must not throw. -pme
|
| 992 |
+
*/
|
| 993 |
+
reference
|
| 994 |
+
operator[](size_t __position)
|
| 995 |
+
{ return reference(*this,__position); }
|
| 996 |
+
|
| 997 |
+
bool
|
| 998 |
+
operator[](size_t __position) const
|
| 999 |
+
{ return _Unchecked_test(__position); }
|
| 1000 |
+
//@}
|
| 1001 |
+
|
| 1002 |
+
/**
|
| 1003 |
+
* @brief Returns a numerical interpretation of the %bitset.
|
| 1004 |
+
* @return The integral equivalent of the bits.
|
| 1005 |
+
* @throw std::overflow_error If there are too many bits to be
|
| 1006 |
+
* represented in an @c unsigned @c long.
|
| 1007 |
+
*/
|
| 1008 |
+
unsigned long
|
| 1009 |
+
to_ulong() const
|
| 1010 |
+
{ return this->_M_do_to_ulong(); }
|
| 1011 |
+
|
| 1012 |
+
/**
|
| 1013 |
+
* @brief Returns a character interpretation of the %bitset.
|
| 1014 |
+
* @return The string equivalent of the bits.
|
| 1015 |
+
*
|
| 1016 |
+
* Note the ordering of the bits: decreasing character positions
|
| 1017 |
+
* correspond to increasing bit positions (see the main class notes for
|
| 1018 |
+
* an example).
|
| 1019 |
+
*/
|
| 1020 |
+
template<class _CharT, class _Traits, class _Alloc>
|
| 1021 |
+
std::basic_string<_CharT, _Traits, _Alloc>
|
| 1022 |
+
to_string() const
|
| 1023 |
+
{
|
| 1024 |
+
std::basic_string<_CharT, _Traits, _Alloc> __result;
|
| 1025 |
+
_M_copy_to_string(__result);
|
| 1026 |
+
return __result;
|
| 1027 |
+
}
|
| 1028 |
+
|
| 1029 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 1030 |
+
// 434. bitset::to_string() hard to use.
|
| 1031 |
+
template<class _CharT, class _Traits>
|
| 1032 |
+
std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
|
| 1033 |
+
to_string() const
|
| 1034 |
+
{ return to_string<_CharT, _Traits, std::allocator<_CharT> >(); }
|
| 1035 |
+
|
| 1036 |
+
template<class _CharT>
|
| 1037 |
+
std::basic_string<_CharT, std::char_traits<_CharT>,
|
| 1038 |
+
std::allocator<_CharT> >
|
| 1039 |
+
to_string() const
|
| 1040 |
+
{
|
| 1041 |
+
return to_string<_CharT, std::char_traits<_CharT>,
|
| 1042 |
+
std::allocator<_CharT> >();
|
| 1043 |
+
}
|
| 1044 |
+
|
| 1045 |
+
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
|
| 1046 |
+
to_string() const
|
| 1047 |
+
{
|
| 1048 |
+
return to_string<char, std::char_traits<char>,
|
| 1049 |
+
std::allocator<char> >();
|
| 1050 |
+
}
|
| 1051 |
+
|
| 1052 |
+
// Helper functions for string operations.
|
| 1053 |
+
template<class _CharT, class _Traits, class _Alloc>
|
| 1054 |
+
void
|
| 1055 |
+
_M_copy_from_string(const std::basic_string<_CharT,
|
| 1056 |
+
_Traits, _Alloc>& __s,
|
| 1057 |
+
size_t, size_t);
|
| 1058 |
+
|
| 1059 |
+
template<class _CharT, class _Traits, class _Alloc>
|
| 1060 |
+
void
|
| 1061 |
+
_M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&) const;
|
| 1062 |
+
|
| 1063 |
+
/// Returns the number of bits which are set.
|
| 1064 |
+
size_t
|
| 1065 |
+
count() const
|
| 1066 |
+
{ return this->_M_do_count(); }
|
| 1067 |
+
|
| 1068 |
+
/// Returns the total number of bits.
|
| 1069 |
+
size_t
|
| 1070 |
+
size() const
|
| 1071 |
+
{ return _Nb; }
|
| 1072 |
+
|
| 1073 |
+
//@{
|
| 1074 |
+
/// These comparisons for equality/inequality are, well, @e bitwise.
|
| 1075 |
+
bool
|
| 1076 |
+
operator==(const bitset<_Nb>& __rhs) const
|
| 1077 |
+
{ return this->_M_is_equal(__rhs); }
|
| 1078 |
+
|
| 1079 |
+
bool
|
| 1080 |
+
operator!=(const bitset<_Nb>& __rhs) const
|
| 1081 |
+
{ return !this->_M_is_equal(__rhs); }
|
| 1082 |
+
//@}
|
| 1083 |
+
|
| 1084 |
+
/**
|
| 1085 |
+
* @brief Tests the value of a bit.
|
| 1086 |
+
* @param position The index of a bit.
|
| 1087 |
+
* @return The value at @a pos.
|
| 1088 |
+
* @throw std::out_of_range If @a pos is bigger the size of the %set.
|
| 1089 |
+
*/
|
| 1090 |
+
bool
|
| 1091 |
+
test(size_t __position) const
|
| 1092 |
+
{
|
| 1093 |
+
if (__position >= _Nb)
|
| 1094 |
+
__throw_out_of_range(__N("bitset::test"));
|
| 1095 |
+
return _Unchecked_test(__position);
|
| 1096 |
+
}
|
| 1097 |
+
|
| 1098 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 1099 |
+
// DR 693. std::bitset::all() missing.
|
| 1100 |
+
/**
|
| 1101 |
+
* @brief Tests whether all the bits are on.
|
| 1102 |
+
* @return True if all the bits are set.
|
| 1103 |
+
*/
|
| 1104 |
+
bool
|
| 1105 |
+
all() const
|
| 1106 |
+
{ return this->_M_are_all_aux() == _Nb; }
|
| 1107 |
+
|
| 1108 |
+
/**
|
| 1109 |
+
* @brief Tests whether any of the bits are on.
|
| 1110 |
+
* @return True if at least one bit is set.
|
| 1111 |
+
*/
|
| 1112 |
+
bool
|
| 1113 |
+
any() const
|
| 1114 |
+
{ return this->_M_is_any(); }
|
| 1115 |
+
|
| 1116 |
+
/**
|
| 1117 |
+
* @brief Tests whether any of the bits are on.
|
| 1118 |
+
* @return True if none of the bits are set.
|
| 1119 |
+
*/
|
| 1120 |
+
bool
|
| 1121 |
+
none() const
|
| 1122 |
+
{ return !this->_M_is_any(); }
|
| 1123 |
+
|
| 1124 |
+
//@{
|
| 1125 |
+
/// Self-explanatory.
|
| 1126 |
+
bitset<_Nb>
|
| 1127 |
+
operator<<(size_t __position) const
|
| 1128 |
+
{ return bitset<_Nb>(*this) <<= __position; }
|
| 1129 |
+
|
| 1130 |
+
bitset<_Nb>
|
| 1131 |
+
operator>>(size_t __position) const
|
| 1132 |
+
{ return bitset<_Nb>(*this) >>= __position; }
|
| 1133 |
+
//@}
|
| 1134 |
+
|
| 1135 |
+
/**
|
| 1136 |
+
* @brief Finds the index of the first "on" bit.
|
| 1137 |
+
* @return The index of the first bit set, or size() if not found.
|
| 1138 |
+
* @ingroup SGIextensions
|
| 1139 |
+
* @sa _Find_next
|
| 1140 |
+
*/
|
| 1141 |
+
size_t
|
| 1142 |
+
_Find_first() const
|
| 1143 |
+
{ return this->_M_do_find_first(_Nb); }
|
| 1144 |
+
|
| 1145 |
+
/**
|
| 1146 |
+
* @brief Finds the index of the next "on" bit after prev.
|
| 1147 |
+
* @return The index of the next bit set, or size() if not found.
|
| 1148 |
+
* @param prev Where to start searching.
|
| 1149 |
+
* @ingroup SGIextensions
|
| 1150 |
+
* @sa _Find_first
|
| 1151 |
+
*/
|
| 1152 |
+
size_t
|
| 1153 |
+
_Find_next(size_t __prev ) const
|
| 1154 |
+
{ return this->_M_do_find_next(__prev, _Nb); }
|
| 1155 |
+
};
|
| 1156 |
+
|
| 1157 |
+
// Definitions of non-inline member functions.
|
| 1158 |
+
template<size_t _Nb>
|
| 1159 |
+
template<class _CharT, class _Traits, class _Alloc>
|
| 1160 |
+
void
|
| 1161 |
+
bitset<_Nb>::
|
| 1162 |
+
_M_copy_from_string(const std::basic_string<_CharT, _Traits,
|
| 1163 |
+
_Alloc>& __s, size_t __pos, size_t __n)
|
| 1164 |
+
{
|
| 1165 |
+
reset();
|
| 1166 |
+
const size_t __nbits = std::min(_Nb, std::min(__n, __s.size() - __pos));
|
| 1167 |
+
for (size_t __i = __nbits; __i > 0; --__i)
|
| 1168 |
+
{
|
| 1169 |
+
switch(__s[__pos + __nbits - __i])
|
| 1170 |
+
{
|
| 1171 |
+
case '0':
|
| 1172 |
+
break;
|
| 1173 |
+
case '1':
|
| 1174 |
+
_Unchecked_set(__i - 1);
|
| 1175 |
+
break;
|
| 1176 |
+
default:
|
| 1177 |
+
__throw_invalid_argument(__N("bitset::_M_copy_from_string"));
|
| 1178 |
+
}
|
| 1179 |
+
}
|
| 1180 |
+
}
|
| 1181 |
+
|
| 1182 |
+
template<size_t _Nb>
|
| 1183 |
+
template<class _CharT, class _Traits, class _Alloc>
|
| 1184 |
+
void
|
| 1185 |
+
bitset<_Nb>::
|
| 1186 |
+
_M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>& __s) const
|
| 1187 |
+
{
|
| 1188 |
+
__s.assign(_Nb, '0');
|
| 1189 |
+
for (size_t __i = _Nb; __i > 0; --__i)
|
| 1190 |
+
if (_Unchecked_test(__i - 1))
|
| 1191 |
+
__s[_Nb - __i] = '1';
|
| 1192 |
+
}
|
| 1193 |
+
|
| 1194 |
+
// 23.3.5.3 bitset operations:
|
| 1195 |
+
//@{
|
| 1196 |
+
/**
|
| 1197 |
+
* @brief Global bitwise operations on bitsets.
|
| 1198 |
+
* @param x A bitset.
|
| 1199 |
+
* @param y A bitset of the same size as @a x.
|
| 1200 |
+
* @return A new bitset.
|
| 1201 |
+
*
|
| 1202 |
+
* These should be self-explanatory.
|
| 1203 |
+
*/
|
| 1204 |
+
template<size_t _Nb>
|
| 1205 |
+
inline bitset<_Nb>
|
| 1206 |
+
operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
|
| 1207 |
+
{
|
| 1208 |
+
bitset<_Nb> __result(__x);
|
| 1209 |
+
__result &= __y;
|
| 1210 |
+
return __result;
|
| 1211 |
+
}
|
| 1212 |
+
|
| 1213 |
+
template<size_t _Nb>
|
| 1214 |
+
inline bitset<_Nb>
|
| 1215 |
+
operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
|
| 1216 |
+
{
|
| 1217 |
+
bitset<_Nb> __result(__x);
|
| 1218 |
+
__result |= __y;
|
| 1219 |
+
return __result;
|
| 1220 |
+
}
|
| 1221 |
+
|
| 1222 |
+
template <size_t _Nb>
|
| 1223 |
+
inline bitset<_Nb>
|
| 1224 |
+
operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
|
| 1225 |
+
{
|
| 1226 |
+
bitset<_Nb> __result(__x);
|
| 1227 |
+
__result ^= __y;
|
| 1228 |
+
return __result;
|
| 1229 |
+
}
|
| 1230 |
+
//@}
|
| 1231 |
+
|
| 1232 |
+
//@{
|
| 1233 |
+
/**
|
| 1234 |
+
* @brief Global I/O operators for bitsets.
|
| 1235 |
+
*
|
| 1236 |
+
* Direct I/O between streams and bitsets is supported. Output is
|
| 1237 |
+
* straightforward. Input will skip whitespace, only accept '0' and '1'
|
| 1238 |
+
* characters, and will only extract as many digits as the %bitset will
|
| 1239 |
+
* hold.
|
| 1240 |
+
*/
|
| 1241 |
+
template<class _CharT, class _Traits, size_t _Nb>
|
| 1242 |
+
std::basic_istream<_CharT, _Traits>&
|
| 1243 |
+
operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
|
| 1244 |
+
{
|
| 1245 |
+
typedef typename _Traits::char_type char_type;
|
| 1246 |
+
typedef std::basic_istream<_CharT, _Traits> __istream_type;
|
| 1247 |
+
typedef typename __istream_type::ios_base __ios_base;
|
| 1248 |
+
|
| 1249 |
+
std::basic_string<_CharT, _Traits> __tmp;
|
| 1250 |
+
__tmp.reserve(_Nb);
|
| 1251 |
+
|
| 1252 |
+
typename __ios_base::iostate __state = __ios_base::goodbit;
|
| 1253 |
+
typename __istream_type::sentry __sentry(__is);
|
| 1254 |
+
if (__sentry)
|
| 1255 |
+
{
|
| 1256 |
+
try
|
| 1257 |
+
{
|
| 1258 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 1259 |
+
// 303. Bitset input operator underspecified
|
| 1260 |
+
const char_type __zero = __is.widen('0');
|
| 1261 |
+
const char_type __one = __is.widen('1');
|
| 1262 |
+
for (size_t __i = _Nb; __i > 0; --__i)
|
| 1263 |
+
{
|
| 1264 |
+
static typename _Traits::int_type __eof = _Traits::eof();
|
| 1265 |
+
|
| 1266 |
+
typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc();
|
| 1267 |
+
if (_Traits::eq_int_type(__c1, __eof))
|
| 1268 |
+
{
|
| 1269 |
+
__state |= __ios_base::eofbit;
|
| 1270 |
+
break;
|
| 1271 |
+
}
|
| 1272 |
+
else
|
| 1273 |
+
{
|
| 1274 |
+
const char_type __c2 = _Traits::to_char_type(__c1);
|
| 1275 |
+
if (__c2 == __zero)
|
| 1276 |
+
__tmp.push_back('0');
|
| 1277 |
+
else if (__c2 == __one)
|
| 1278 |
+
__tmp.push_back('1');
|
| 1279 |
+
else if (_Traits::
|
| 1280 |
+
eq_int_type(__is.rdbuf()->sputbackc(__c2),
|
| 1281 |
+
__eof))
|
| 1282 |
+
{
|
| 1283 |
+
__state |= __ios_base::failbit;
|
| 1284 |
+
break;
|
| 1285 |
+
}
|
| 1286 |
+
}
|
| 1287 |
+
}
|
| 1288 |
+
}
|
| 1289 |
+
catch(__cxxabiv1::__forced_unwind&)
|
| 1290 |
+
{
|
| 1291 |
+
__is._M_setstate(__ios_base::badbit);
|
| 1292 |
+
__throw_exception_again;
|
| 1293 |
+
}
|
| 1294 |
+
catch(...)
|
| 1295 |
+
{ __is._M_setstate(__ios_base::badbit); }
|
| 1296 |
+
}
|
| 1297 |
+
|
| 1298 |
+
if (__tmp.empty() && _Nb)
|
| 1299 |
+
__state |= __ios_base::failbit;
|
| 1300 |
+
else
|
| 1301 |
+
__x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
|
| 1302 |
+
if (__state)
|
| 1303 |
+
__is.setstate(__state);
|
| 1304 |
+
return __is;
|
| 1305 |
+
}
|
| 1306 |
+
|
| 1307 |
+
template <class _CharT, class _Traits, size_t _Nb>
|
| 1308 |
+
std::basic_ostream<_CharT, _Traits>&
|
| 1309 |
+
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
|
| 1310 |
+
const bitset<_Nb>& __x)
|
| 1311 |
+
{
|
| 1312 |
+
std::basic_string<_CharT, _Traits> __tmp;
|
| 1313 |
+
__x._M_copy_to_string(__tmp);
|
| 1314 |
+
return __os << __tmp;
|
| 1315 |
+
}
|
| 1316 |
+
//@}
|
| 1317 |
+
|
| 1318 |
+
_GLIBCXX_END_NESTED_NAMESPACE
|
| 1319 |
+
|
| 1320 |
+
#undef _GLIBCXX_BITSET_WORDS
|
| 1321 |
+
#undef _GLIBCXX_BITSET_BITS_PER_WORD
|
| 1322 |
+
|
| 1323 |
+
#ifdef _GLIBCXX_DEBUG
|
| 1324 |
+
# include <debug/bitset>
|
| 1325 |
+
#endif
|
| 1326 |
+
|
| 1327 |
+
#endif /* _GLIBCXX_BITSET */
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/c++0x_warning.h
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (C) 2007 Free Software Foundation, Inc.
|
| 2 |
+
//
|
| 3 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 4 |
+
// software; you can redistribute it and/or modify it under the
|
| 5 |
+
// terms of the GNU General Public License as published by the
|
| 6 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 7 |
+
// any later version.
|
| 8 |
+
|
| 9 |
+
// This library is distributed in the hope that it will be useful,
|
| 10 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 12 |
+
// GNU General Public License for more details.
|
| 13 |
+
|
| 14 |
+
// You should have received a copy of the GNU General Public License
|
| 15 |
+
// along with this library; see the file COPYING. If not, write to
|
| 16 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 17 |
+
// Boston, MA 02110-1301, USA.
|
| 18 |
+
|
| 19 |
+
// As a special exception, you may use this file as part of a free software
|
| 20 |
+
// library without restriction. Specifically, if other files instantiate
|
| 21 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 22 |
+
// this file and link it with other files to produce an executable, this
|
| 23 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 24 |
+
// the GNU General Public License. This exception does not however
|
| 25 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 26 |
+
// the GNU General Public License.
|
| 27 |
+
|
| 28 |
+
/** @file include/c++0x_warning.h
|
| 29 |
+
* This is a Standard C++ Library header.
|
| 30 |
+
*/
|
| 31 |
+
|
| 32 |
+
#ifndef _CXX0X_WARNING_H
|
| 33 |
+
#define _CXX0X_WARNING_H 1
|
| 34 |
+
|
| 35 |
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
| 36 |
+
#error This file requires compiler and library support for the upcoming \
|
| 37 |
+
ISO C++ standard, C++0x. This support is currently experimental, and must be \
|
| 38 |
+
enabled with the -std=c++0x or -std=gnu++0x compiler options.
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cassert
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License along
|
| 19 |
+
// with this library; see the file COPYING. If not, write to the Free
|
| 20 |
+
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
| 21 |
+
// USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file cassert
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c assert.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 19.2 Assertions
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
// No include guards on this header...
|
| 47 |
+
|
| 48 |
+
#pragma GCC system_header
|
| 49 |
+
|
| 50 |
+
#include <assert.h>
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/ccomplex
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <ccomplex> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License along
|
| 17 |
+
// with this library; see the file COPYING. If not, write to the Free
|
| 18 |
+
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
| 19 |
+
// USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file include/ccomplex
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#pragma GCC system_header
|
| 35 |
+
|
| 36 |
+
#ifndef _GLIBCXX_CCOMPLEX
|
| 37 |
+
#define _GLIBCXX_CCOMPLEX 1
|
| 38 |
+
|
| 39 |
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
| 40 |
+
# include <c++0x_warning.h>
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 44 |
+
# error C++0x header cannot be included from TR1 header
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#include <complex>
|
| 48 |
+
|
| 49 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cctype
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License along
|
| 19 |
+
// with this library; see the file COPYING. If not, write to the Free
|
| 20 |
+
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
| 21 |
+
// USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/cctype
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c ctype.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: <ccytpe>
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <ctype.h>
|
| 50 |
+
|
| 51 |
+
#ifndef _GLIBCXX_CCTYPE
|
| 52 |
+
#define _GLIBCXX_CCTYPE 1
|
| 53 |
+
|
| 54 |
+
// Get rid of those macros defined in <ctype.h> in lieu of real functions.
|
| 55 |
+
#undef isalnum
|
| 56 |
+
#undef isalpha
|
| 57 |
+
#undef iscntrl
|
| 58 |
+
#undef isdigit
|
| 59 |
+
#undef isgraph
|
| 60 |
+
#undef islower
|
| 61 |
+
#undef isprint
|
| 62 |
+
#undef ispunct
|
| 63 |
+
#undef isspace
|
| 64 |
+
#undef isupper
|
| 65 |
+
#undef isxdigit
|
| 66 |
+
#undef tolower
|
| 67 |
+
#undef toupper
|
| 68 |
+
|
| 69 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 70 |
+
|
| 71 |
+
using ::isalnum;
|
| 72 |
+
using ::isalpha;
|
| 73 |
+
using ::iscntrl;
|
| 74 |
+
using ::isdigit;
|
| 75 |
+
using ::isgraph;
|
| 76 |
+
using ::islower;
|
| 77 |
+
using ::isprint;
|
| 78 |
+
using ::ispunct;
|
| 79 |
+
using ::isspace;
|
| 80 |
+
using ::isupper;
|
| 81 |
+
using ::isxdigit;
|
| 82 |
+
using ::tolower;
|
| 83 |
+
using ::toupper;
|
| 84 |
+
|
| 85 |
+
_GLIBCXX_END_NAMESPACE
|
| 86 |
+
|
| 87 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 88 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 89 |
+
# error C++0x header cannot be included from TR1 header
|
| 90 |
+
# endif
|
| 91 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 92 |
+
# include <tr1_impl/cctype>
|
| 93 |
+
# else
|
| 94 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 95 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 96 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 97 |
+
# define _GLIBCXX_TR1
|
| 98 |
+
# include <tr1_impl/cctype>
|
| 99 |
+
# undef _GLIBCXX_TR1
|
| 100 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 101 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 102 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 103 |
+
# endif
|
| 104 |
+
#endif
|
| 105 |
+
|
| 106 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cerrno
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// The -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file cerrno
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c errno.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 19.3 Error numbers
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <errno.h>
|
| 49 |
+
|
| 50 |
+
#ifndef _GLIBCXX_CERRNO
|
| 51 |
+
#define _GLIBCXX_CERRNO 1
|
| 52 |
+
|
| 53 |
+
// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
|
| 54 |
+
#ifndef errno
|
| 55 |
+
#define errno errno
|
| 56 |
+
#endif
|
| 57 |
+
|
| 58 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cfenv
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <cfenv> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file include/cfenv
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#ifndef _GLIBCXX_CFENV
|
| 35 |
+
#define _GLIBCXX_CFENV 1
|
| 36 |
+
|
| 37 |
+
#pragma GCC system_header
|
| 38 |
+
|
| 39 |
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
| 40 |
+
# include <c++0x_warning.h>
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 44 |
+
# error C++0x header cannot be included from TR1 header
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#include <bits/c++config.h>
|
| 48 |
+
#if _GLIBCXX_HAVE_FENV_H
|
| 49 |
+
# include <fenv.h>
|
| 50 |
+
#endif
|
| 51 |
+
|
| 52 |
+
#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 53 |
+
# include <tr1_impl/cfenv>
|
| 54 |
+
#else
|
| 55 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 56 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 57 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 58 |
+
# define _GLIBCXX_TR1
|
| 59 |
+
# include <tr1_impl/cfenv>
|
| 60 |
+
# undef _GLIBCXX_TR1
|
| 61 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 62 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 63 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
#endif // _GLIBCXX_CFENV
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cfloat
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/cfloat
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c float.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 18.2.2 Implementation properties: C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <float.h>
|
| 49 |
+
|
| 50 |
+
#ifndef _GLIBCXX_CFLOAT
|
| 51 |
+
#define _GLIBCXX_CFLOAT 1
|
| 52 |
+
|
| 53 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 54 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 55 |
+
# error C++0x header cannot be included from TR1 header
|
| 56 |
+
# endif
|
| 57 |
+
# ifndef DECIMAL_DIG
|
| 58 |
+
# define DECIMAL_DIG __DECIMAL_DIG__
|
| 59 |
+
# endif
|
| 60 |
+
# ifndef FLT_EVAL_METHOD
|
| 61 |
+
# define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
|
| 62 |
+
# endif
|
| 63 |
+
#endif
|
| 64 |
+
|
| 65 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cinttypes
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <cinttypes> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file include/cinttypes
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#ifndef _GLIBCXX_CINTTYPES
|
| 35 |
+
#define _GLIBCXX_CINTTYPES 1
|
| 36 |
+
|
| 37 |
+
#pragma GCC system_header
|
| 38 |
+
|
| 39 |
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
| 40 |
+
# include <c++0x_warning.h>
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 44 |
+
# error C++0x header cannot be included from TR1 header
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#include <cstdint>
|
| 48 |
+
|
| 49 |
+
// For 8.11.1/1 (see C99, Note 184)
|
| 50 |
+
#if _GLIBCXX_HAVE_INTTYPES_H
|
| 51 |
+
# ifndef __STDC_FORMAT_MACROS
|
| 52 |
+
# define _UNDEF__STDC_FORMAT_MACROS
|
| 53 |
+
# define __STDC_FORMAT_MACROS
|
| 54 |
+
# endif
|
| 55 |
+
# include <inttypes.h>
|
| 56 |
+
# ifdef _UNDEF__STDC_FORMAT_MACROS
|
| 57 |
+
# undef __STDC_FORMAT_MACROS
|
| 58 |
+
# undef _UNDEF__STDC_FORMAT_MACROS
|
| 59 |
+
# endif
|
| 60 |
+
#endif
|
| 61 |
+
|
| 62 |
+
#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 63 |
+
# include <tr1_impl/cinttypes>
|
| 64 |
+
#else
|
| 65 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 66 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 67 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 68 |
+
# define _GLIBCXX_TR1
|
| 69 |
+
# include <tr1_impl/cinttypes>
|
| 70 |
+
# undef _GLIBCXX_TR1
|
| 71 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 72 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 73 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
#endif // _GLIBCXX_CINTTYPES
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/ciso646
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file ciso646
|
| 31 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 32 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 33 |
+
*
|
| 34 |
+
* This is the C++ version of the Standard C Library header @c iso646.h,
|
| 35 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 36 |
+
* contained in the namespace @c std (except for names which are defined
|
| 37 |
+
* as macros in C).
|
| 38 |
+
*/
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/climits
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/climits
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c limits.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 18.2.2 Implementation properties: C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <limits.h>
|
| 49 |
+
|
| 50 |
+
#ifndef _GLIBCXX_CLIMITS
|
| 51 |
+
#define _GLIBCXX_CLIMITS 1
|
| 52 |
+
|
| 53 |
+
#ifndef LLONG_MIN
|
| 54 |
+
#define LLONG_MIN -__LONG_LONG_MAX__ - 1
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
#ifndef LLONG_MAX
|
| 58 |
+
#define LLONG_MAX __LONG_LONG_MAX__
|
| 59 |
+
#endif
|
| 60 |
+
|
| 61 |
+
#ifndef ULLONG_MAX
|
| 62 |
+
#define ULLONG_MAX __LONG_LONG_MAX__ * 2ULL + 1
|
| 63 |
+
#endif
|
| 64 |
+
|
| 65 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/clocale
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file clocale
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c locale.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 18.2.2 Implementation properties: C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <locale.h>
|
| 50 |
+
|
| 51 |
+
#ifndef _GLIBCXX_CLOCALE
|
| 52 |
+
#define _GLIBCXX_CLOCALE 1
|
| 53 |
+
|
| 54 |
+
// Get rid of those macros defined in <locale.h> in lieu of real functions.
|
| 55 |
+
#undef setlocale
|
| 56 |
+
#undef localeconv
|
| 57 |
+
|
| 58 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 59 |
+
|
| 60 |
+
using ::lconv;
|
| 61 |
+
using ::setlocale;
|
| 62 |
+
using ::localeconv;
|
| 63 |
+
|
| 64 |
+
_GLIBCXX_END_NAMESPACE
|
| 65 |
+
|
| 66 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cmath
ADDED
|
@@ -0,0 +1,643 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- C forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/cmath
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c math.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 26.5 C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <bits/cpp_type_traits.h>
|
| 50 |
+
#include <ext/type_traits.h>
|
| 51 |
+
#include <math.h>
|
| 52 |
+
|
| 53 |
+
#ifndef _GLIBCXX_CMATH
|
| 54 |
+
#define _GLIBCXX_CMATH 1
|
| 55 |
+
|
| 56 |
+
// Get rid of those macros defined in <math.h> in lieu of real functions.
|
| 57 |
+
#undef abs
|
| 58 |
+
#undef div
|
| 59 |
+
#undef acos
|
| 60 |
+
#undef asin
|
| 61 |
+
#undef atan
|
| 62 |
+
#undef atan2
|
| 63 |
+
#undef ceil
|
| 64 |
+
#undef cos
|
| 65 |
+
#undef cosh
|
| 66 |
+
#undef exp
|
| 67 |
+
#undef fabs
|
| 68 |
+
#undef floor
|
| 69 |
+
#undef fmod
|
| 70 |
+
#undef frexp
|
| 71 |
+
#undef ldexp
|
| 72 |
+
#undef log
|
| 73 |
+
#undef log10
|
| 74 |
+
#undef modf
|
| 75 |
+
#undef pow
|
| 76 |
+
#undef sin
|
| 77 |
+
#undef sinh
|
| 78 |
+
#undef sqrt
|
| 79 |
+
#undef tan
|
| 80 |
+
#undef tanh
|
| 81 |
+
|
| 82 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 83 |
+
|
| 84 |
+
// Forward declaration of a helper function. This really should be
|
| 85 |
+
// an `exported' forward declaration.
|
| 86 |
+
template<typename _Tp>
|
| 87 |
+
_Tp __cmath_power(_Tp, unsigned int);
|
| 88 |
+
|
| 89 |
+
template<typename _Tp>
|
| 90 |
+
inline _Tp
|
| 91 |
+
__pow_helper(_Tp __x, int __n)
|
| 92 |
+
{
|
| 93 |
+
return __n < 0
|
| 94 |
+
? _Tp(1)/__cmath_power(__x, -__n)
|
| 95 |
+
: __cmath_power(__x, __n);
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
inline double
|
| 99 |
+
abs(double __x)
|
| 100 |
+
{ return __builtin_fabs(__x); }
|
| 101 |
+
|
| 102 |
+
inline float
|
| 103 |
+
abs(float __x)
|
| 104 |
+
{ return __builtin_fabsf(__x); }
|
| 105 |
+
|
| 106 |
+
inline long double
|
| 107 |
+
abs(long double __x)
|
| 108 |
+
{ return __builtin_fabsl(__x); }
|
| 109 |
+
|
| 110 |
+
using ::acos;
|
| 111 |
+
|
| 112 |
+
inline float
|
| 113 |
+
acos(float __x)
|
| 114 |
+
{ return __builtin_acosf(__x); }
|
| 115 |
+
|
| 116 |
+
inline long double
|
| 117 |
+
acos(long double __x)
|
| 118 |
+
{ return __builtin_acosl(__x); }
|
| 119 |
+
|
| 120 |
+
template<typename _Tp>
|
| 121 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 122 |
+
double>::__type
|
| 123 |
+
acos(_Tp __x)
|
| 124 |
+
{ return __builtin_acos(__x); }
|
| 125 |
+
|
| 126 |
+
using ::asin;
|
| 127 |
+
|
| 128 |
+
inline float
|
| 129 |
+
asin(float __x)
|
| 130 |
+
{ return __builtin_asinf(__x); }
|
| 131 |
+
|
| 132 |
+
inline long double
|
| 133 |
+
asin(long double __x)
|
| 134 |
+
{ return __builtin_asinl(__x); }
|
| 135 |
+
|
| 136 |
+
template<typename _Tp>
|
| 137 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 138 |
+
double>::__type
|
| 139 |
+
asin(_Tp __x)
|
| 140 |
+
{ return __builtin_asin(__x); }
|
| 141 |
+
|
| 142 |
+
using ::atan;
|
| 143 |
+
|
| 144 |
+
inline float
|
| 145 |
+
atan(float __x)
|
| 146 |
+
{ return __builtin_atanf(__x); }
|
| 147 |
+
|
| 148 |
+
inline long double
|
| 149 |
+
atan(long double __x)
|
| 150 |
+
{ return __builtin_atanl(__x); }
|
| 151 |
+
|
| 152 |
+
template<typename _Tp>
|
| 153 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 154 |
+
double>::__type
|
| 155 |
+
atan(_Tp __x)
|
| 156 |
+
{ return __builtin_atan(__x); }
|
| 157 |
+
|
| 158 |
+
using ::atan2;
|
| 159 |
+
|
| 160 |
+
inline float
|
| 161 |
+
atan2(float __y, float __x)
|
| 162 |
+
{ return __builtin_atan2f(__y, __x); }
|
| 163 |
+
|
| 164 |
+
inline long double
|
| 165 |
+
atan2(long double __y, long double __x)
|
| 166 |
+
{ return __builtin_atan2l(__y, __x); }
|
| 167 |
+
|
| 168 |
+
template<typename _Tp, typename _Up>
|
| 169 |
+
inline
|
| 170 |
+
typename __gnu_cxx::__promote_2<
|
| 171 |
+
typename __gnu_cxx::__enable_if<__traitand<__is_arithmetic<_Tp>,
|
| 172 |
+
__is_arithmetic<_Up> >::__value,
|
| 173 |
+
_Tp>::__type, _Up>::__type
|
| 174 |
+
atan2(_Tp __y, _Up __x)
|
| 175 |
+
{
|
| 176 |
+
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
| 177 |
+
return atan2(__type(__y), __type(__x));
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
using ::ceil;
|
| 181 |
+
|
| 182 |
+
inline float
|
| 183 |
+
ceil(float __x)
|
| 184 |
+
{ return __builtin_ceilf(__x); }
|
| 185 |
+
|
| 186 |
+
inline long double
|
| 187 |
+
ceil(long double __x)
|
| 188 |
+
{ return __builtin_ceill(__x); }
|
| 189 |
+
|
| 190 |
+
template<typename _Tp>
|
| 191 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 192 |
+
double>::__type
|
| 193 |
+
ceil(_Tp __x)
|
| 194 |
+
{ return __builtin_ceil(__x); }
|
| 195 |
+
|
| 196 |
+
using ::cos;
|
| 197 |
+
|
| 198 |
+
inline float
|
| 199 |
+
cos(float __x)
|
| 200 |
+
{ return __builtin_cosf(__x); }
|
| 201 |
+
|
| 202 |
+
inline long double
|
| 203 |
+
cos(long double __x)
|
| 204 |
+
{ return __builtin_cosl(__x); }
|
| 205 |
+
|
| 206 |
+
template<typename _Tp>
|
| 207 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 208 |
+
double>::__type
|
| 209 |
+
cos(_Tp __x)
|
| 210 |
+
{ return __builtin_cos(__x); }
|
| 211 |
+
|
| 212 |
+
using ::cosh;
|
| 213 |
+
|
| 214 |
+
inline float
|
| 215 |
+
cosh(float __x)
|
| 216 |
+
{ return __builtin_coshf(__x); }
|
| 217 |
+
|
| 218 |
+
inline long double
|
| 219 |
+
cosh(long double __x)
|
| 220 |
+
{ return __builtin_coshl(__x); }
|
| 221 |
+
|
| 222 |
+
template<typename _Tp>
|
| 223 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 224 |
+
double>::__type
|
| 225 |
+
cosh(_Tp __x)
|
| 226 |
+
{ return __builtin_cosh(__x); }
|
| 227 |
+
|
| 228 |
+
using ::exp;
|
| 229 |
+
|
| 230 |
+
inline float
|
| 231 |
+
exp(float __x)
|
| 232 |
+
{ return __builtin_expf(__x); }
|
| 233 |
+
|
| 234 |
+
inline long double
|
| 235 |
+
exp(long double __x)
|
| 236 |
+
{ return __builtin_expl(__x); }
|
| 237 |
+
|
| 238 |
+
template<typename _Tp>
|
| 239 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 240 |
+
double>::__type
|
| 241 |
+
exp(_Tp __x)
|
| 242 |
+
{ return __builtin_exp(__x); }
|
| 243 |
+
|
| 244 |
+
using ::fabs;
|
| 245 |
+
|
| 246 |
+
inline float
|
| 247 |
+
fabs(float __x)
|
| 248 |
+
{ return __builtin_fabsf(__x); }
|
| 249 |
+
|
| 250 |
+
inline long double
|
| 251 |
+
fabs(long double __x)
|
| 252 |
+
{ return __builtin_fabsl(__x); }
|
| 253 |
+
|
| 254 |
+
template<typename _Tp>
|
| 255 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 256 |
+
double>::__type
|
| 257 |
+
fabs(_Tp __x)
|
| 258 |
+
{ return __builtin_fabs(__x); }
|
| 259 |
+
|
| 260 |
+
using ::floor;
|
| 261 |
+
|
| 262 |
+
inline float
|
| 263 |
+
floor(float __x)
|
| 264 |
+
{ return __builtin_floorf(__x); }
|
| 265 |
+
|
| 266 |
+
inline long double
|
| 267 |
+
floor(long double __x)
|
| 268 |
+
{ return __builtin_floorl(__x); }
|
| 269 |
+
|
| 270 |
+
template<typename _Tp>
|
| 271 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 272 |
+
double>::__type
|
| 273 |
+
floor(_Tp __x)
|
| 274 |
+
{ return __builtin_floor(__x); }
|
| 275 |
+
|
| 276 |
+
using ::fmod;
|
| 277 |
+
|
| 278 |
+
inline float
|
| 279 |
+
fmod(float __x, float __y)
|
| 280 |
+
{ return __builtin_fmodf(__x, __y); }
|
| 281 |
+
|
| 282 |
+
inline long double
|
| 283 |
+
fmod(long double __x, long double __y)
|
| 284 |
+
{ return __builtin_fmodl(__x, __y); }
|
| 285 |
+
|
| 286 |
+
using ::frexp;
|
| 287 |
+
|
| 288 |
+
inline float
|
| 289 |
+
frexp(float __x, int* __exp)
|
| 290 |
+
{ return __builtin_frexpf(__x, __exp); }
|
| 291 |
+
|
| 292 |
+
inline long double
|
| 293 |
+
frexp(long double __x, int* __exp)
|
| 294 |
+
{ return __builtin_frexpl(__x, __exp); }
|
| 295 |
+
|
| 296 |
+
template<typename _Tp>
|
| 297 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 298 |
+
double>::__type
|
| 299 |
+
frexp(_Tp __x, int* __exp)
|
| 300 |
+
{ return __builtin_frexp(__x, __exp); }
|
| 301 |
+
|
| 302 |
+
using ::ldexp;
|
| 303 |
+
|
| 304 |
+
inline float
|
| 305 |
+
ldexp(float __x, int __exp)
|
| 306 |
+
{ return __builtin_ldexpf(__x, __exp); }
|
| 307 |
+
|
| 308 |
+
inline long double
|
| 309 |
+
ldexp(long double __x, int __exp)
|
| 310 |
+
{ return __builtin_ldexpl(__x, __exp); }
|
| 311 |
+
|
| 312 |
+
template<typename _Tp>
|
| 313 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 314 |
+
double>::__type
|
| 315 |
+
ldexp(_Tp __x, int __exp)
|
| 316 |
+
{ return __builtin_ldexp(__x, __exp); }
|
| 317 |
+
|
| 318 |
+
using ::log;
|
| 319 |
+
|
| 320 |
+
inline float
|
| 321 |
+
log(float __x)
|
| 322 |
+
{ return __builtin_logf(__x); }
|
| 323 |
+
|
| 324 |
+
inline long double
|
| 325 |
+
log(long double __x)
|
| 326 |
+
{ return __builtin_logl(__x); }
|
| 327 |
+
|
| 328 |
+
template<typename _Tp>
|
| 329 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 330 |
+
double>::__type
|
| 331 |
+
log(_Tp __x)
|
| 332 |
+
{ return __builtin_log(__x); }
|
| 333 |
+
|
| 334 |
+
using ::log10;
|
| 335 |
+
|
| 336 |
+
inline float
|
| 337 |
+
log10(float __x)
|
| 338 |
+
{ return __builtin_log10f(__x); }
|
| 339 |
+
|
| 340 |
+
inline long double
|
| 341 |
+
log10(long double __x)
|
| 342 |
+
{ return __builtin_log10l(__x); }
|
| 343 |
+
|
| 344 |
+
template<typename _Tp>
|
| 345 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 346 |
+
double>::__type
|
| 347 |
+
log10(_Tp __x)
|
| 348 |
+
{ return __builtin_log10(__x); }
|
| 349 |
+
|
| 350 |
+
using ::modf;
|
| 351 |
+
|
| 352 |
+
inline float
|
| 353 |
+
modf(float __x, float* __iptr)
|
| 354 |
+
{ return __builtin_modff(__x, __iptr); }
|
| 355 |
+
|
| 356 |
+
inline long double
|
| 357 |
+
modf(long double __x, long double* __iptr)
|
| 358 |
+
{ return __builtin_modfl(__x, __iptr); }
|
| 359 |
+
|
| 360 |
+
using ::pow;
|
| 361 |
+
|
| 362 |
+
inline float
|
| 363 |
+
pow(float __x, float __y)
|
| 364 |
+
{ return __builtin_powf(__x, __y); }
|
| 365 |
+
|
| 366 |
+
inline long double
|
| 367 |
+
pow(long double __x, long double __y)
|
| 368 |
+
{ return __builtin_powl(__x, __y); }
|
| 369 |
+
|
| 370 |
+
// DR 550.
|
| 371 |
+
inline double
|
| 372 |
+
pow(double __x, int __i)
|
| 373 |
+
{ return __builtin_powi(__x, __i); }
|
| 374 |
+
|
| 375 |
+
inline float
|
| 376 |
+
pow(float __x, int __n)
|
| 377 |
+
{ return __builtin_powif(__x, __n); }
|
| 378 |
+
|
| 379 |
+
inline long double
|
| 380 |
+
pow(long double __x, int __n)
|
| 381 |
+
{ return __builtin_powil(__x, __n); }
|
| 382 |
+
|
| 383 |
+
template<typename _Tp, typename _Up>
|
| 384 |
+
inline
|
| 385 |
+
typename __gnu_cxx::__promote_2<
|
| 386 |
+
typename __gnu_cxx::__enable_if<__traitand<__is_arithmetic<_Tp>,
|
| 387 |
+
__is_arithmetic<_Up> >::__value,
|
| 388 |
+
_Tp>::__type, _Up>::__type
|
| 389 |
+
pow(_Tp __x, _Up __y)
|
| 390 |
+
{
|
| 391 |
+
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
| 392 |
+
return pow(__type(__x), __type(__y));
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
using ::sin;
|
| 396 |
+
|
| 397 |
+
inline float
|
| 398 |
+
sin(float __x)
|
| 399 |
+
{ return __builtin_sinf(__x); }
|
| 400 |
+
|
| 401 |
+
inline long double
|
| 402 |
+
sin(long double __x)
|
| 403 |
+
{ return __builtin_sinl(__x); }
|
| 404 |
+
|
| 405 |
+
template<typename _Tp>
|
| 406 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 407 |
+
double>::__type
|
| 408 |
+
sin(_Tp __x)
|
| 409 |
+
{ return __builtin_sin(__x); }
|
| 410 |
+
|
| 411 |
+
using ::sinh;
|
| 412 |
+
|
| 413 |
+
inline float
|
| 414 |
+
sinh(float __x)
|
| 415 |
+
{ return __builtin_sinhf(__x); }
|
| 416 |
+
|
| 417 |
+
inline long double
|
| 418 |
+
sinh(long double __x)
|
| 419 |
+
{ return __builtin_sinhl(__x); }
|
| 420 |
+
|
| 421 |
+
template<typename _Tp>
|
| 422 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 423 |
+
double>::__type
|
| 424 |
+
sinh(_Tp __x)
|
| 425 |
+
{ return __builtin_sinh(__x); }
|
| 426 |
+
|
| 427 |
+
using ::sqrt;
|
| 428 |
+
|
| 429 |
+
inline float
|
| 430 |
+
sqrt(float __x)
|
| 431 |
+
{ return __builtin_sqrtf(__x); }
|
| 432 |
+
|
| 433 |
+
inline long double
|
| 434 |
+
sqrt(long double __x)
|
| 435 |
+
{ return __builtin_sqrtl(__x); }
|
| 436 |
+
|
| 437 |
+
template<typename _Tp>
|
| 438 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 439 |
+
double>::__type
|
| 440 |
+
sqrt(_Tp __x)
|
| 441 |
+
{ return __builtin_sqrt(__x); }
|
| 442 |
+
|
| 443 |
+
using ::tan;
|
| 444 |
+
|
| 445 |
+
inline float
|
| 446 |
+
tan(float __x)
|
| 447 |
+
{ return __builtin_tanf(__x); }
|
| 448 |
+
|
| 449 |
+
inline long double
|
| 450 |
+
tan(long double __x)
|
| 451 |
+
{ return __builtin_tanl(__x); }
|
| 452 |
+
|
| 453 |
+
template<typename _Tp>
|
| 454 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 455 |
+
double>::__type
|
| 456 |
+
tan(_Tp __x)
|
| 457 |
+
{ return __builtin_tan(__x); }
|
| 458 |
+
|
| 459 |
+
using ::tanh;
|
| 460 |
+
|
| 461 |
+
inline float
|
| 462 |
+
tanh(float __x)
|
| 463 |
+
{ return __builtin_tanhf(__x); }
|
| 464 |
+
|
| 465 |
+
inline long double
|
| 466 |
+
tanh(long double __x)
|
| 467 |
+
{ return __builtin_tanhl(__x); }
|
| 468 |
+
|
| 469 |
+
template<typename _Tp>
|
| 470 |
+
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
| 471 |
+
double>::__type
|
| 472 |
+
tanh(_Tp __x)
|
| 473 |
+
{ return __builtin_tanh(__x); }
|
| 474 |
+
|
| 475 |
+
_GLIBCXX_END_NAMESPACE
|
| 476 |
+
|
| 477 |
+
#if _GLIBCXX_USE_C99_MATH
|
| 478 |
+
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
|
| 479 |
+
// These are possible macros imported from C99-land. For strict
|
| 480 |
+
// conformance, remove possible C99-injected names from the global
|
| 481 |
+
// namespace, and sequester them in the __gnu_cxx extension namespace.
|
| 482 |
+
|
| 483 |
+
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
| 484 |
+
|
| 485 |
+
template<typename _Tp>
|
| 486 |
+
inline int
|
| 487 |
+
__capture_fpclassify(_Tp __f) { return fpclassify(__f); }
|
| 488 |
+
|
| 489 |
+
_GLIBCXX_END_NAMESPACE
|
| 490 |
+
|
| 491 |
+
// Only undefine the C99 FP macros, if actually captured for namespace movement
|
| 492 |
+
#undef fpclassify
|
| 493 |
+
#undef isfinite
|
| 494 |
+
#undef isinf
|
| 495 |
+
#undef isnan
|
| 496 |
+
#undef isnormal
|
| 497 |
+
#undef signbit
|
| 498 |
+
#undef isgreater
|
| 499 |
+
#undef isgreaterequal
|
| 500 |
+
#undef isless
|
| 501 |
+
#undef islessequal
|
| 502 |
+
#undef islessgreater
|
| 503 |
+
#undef isunordered
|
| 504 |
+
|
| 505 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 506 |
+
|
| 507 |
+
template<typename _Tp>
|
| 508 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 509 |
+
int>::__type
|
| 510 |
+
fpclassify(_Tp __f)
|
| 511 |
+
{
|
| 512 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 513 |
+
return ::__gnu_cxx::__capture_fpclassify(__type(__f));
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
template<typename _Tp>
|
| 517 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 518 |
+
int>::__type
|
| 519 |
+
isfinite(_Tp __f)
|
| 520 |
+
{
|
| 521 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 522 |
+
return __builtin_isfinite(__type(__f));
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
template<typename _Tp>
|
| 526 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 527 |
+
int>::__type
|
| 528 |
+
isinf(_Tp __f)
|
| 529 |
+
{
|
| 530 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 531 |
+
return __builtin_isinf(__type(__f));
|
| 532 |
+
}
|
| 533 |
+
|
| 534 |
+
template<typename _Tp>
|
| 535 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 536 |
+
int>::__type
|
| 537 |
+
isnan(_Tp __f)
|
| 538 |
+
{
|
| 539 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 540 |
+
return __builtin_isnan(__type(__f));
|
| 541 |
+
}
|
| 542 |
+
|
| 543 |
+
template<typename _Tp>
|
| 544 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 545 |
+
int>::__type
|
| 546 |
+
isnormal(_Tp __f)
|
| 547 |
+
{
|
| 548 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 549 |
+
return __builtin_isnormal(__type(__f));
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
template<typename _Tp>
|
| 553 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 554 |
+
int>::__type
|
| 555 |
+
signbit(_Tp __f)
|
| 556 |
+
{
|
| 557 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 558 |
+
return __builtin_signbit(__type(__f));
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
template<typename _Tp>
|
| 562 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 563 |
+
int>::__type
|
| 564 |
+
isgreater(_Tp __f1, _Tp __f2)
|
| 565 |
+
{
|
| 566 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 567 |
+
return __builtin_isgreater(__type(__f1), __type(__f2));
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
+
template<typename _Tp>
|
| 571 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 572 |
+
int>::__type
|
| 573 |
+
isgreaterequal(_Tp __f1, _Tp __f2)
|
| 574 |
+
{
|
| 575 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 576 |
+
return __builtin_isgreaterequal(__type(__f1), __type(__f2));
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
template<typename _Tp>
|
| 580 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 581 |
+
int>::__type
|
| 582 |
+
isless(_Tp __f1, _Tp __f2)
|
| 583 |
+
{
|
| 584 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 585 |
+
return __builtin_isless(__type(__f1), __type(__f2));
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
template<typename _Tp>
|
| 589 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 590 |
+
int>::__type
|
| 591 |
+
islessequal(_Tp __f1, _Tp __f2)
|
| 592 |
+
{
|
| 593 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 594 |
+
return __builtin_islessequal(__type(__f1), __type(__f2));
|
| 595 |
+
}
|
| 596 |
+
|
| 597 |
+
template<typename _Tp>
|
| 598 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 599 |
+
int>::__type
|
| 600 |
+
islessgreater(_Tp __f1, _Tp __f2)
|
| 601 |
+
{
|
| 602 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 603 |
+
return __builtin_islessgreater(__type(__f1), __type(__f2));
|
| 604 |
+
}
|
| 605 |
+
|
| 606 |
+
template<typename _Tp>
|
| 607 |
+
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
| 608 |
+
int>::__type
|
| 609 |
+
isunordered(_Tp __f1, _Tp __f2)
|
| 610 |
+
{
|
| 611 |
+
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
| 612 |
+
return __builtin_isunordered(__type(__f1), __type(__f2));
|
| 613 |
+
}
|
| 614 |
+
|
| 615 |
+
_GLIBCXX_END_NAMESPACE
|
| 616 |
+
|
| 617 |
+
#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
|
| 618 |
+
#endif
|
| 619 |
+
|
| 620 |
+
#ifndef _GLIBCXX_EXPORT_TEMPLATE
|
| 621 |
+
# include <bits/cmath.tcc>
|
| 622 |
+
#endif
|
| 623 |
+
|
| 624 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 625 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 626 |
+
# error C++0x header cannot be included from TR1 header
|
| 627 |
+
# endif
|
| 628 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 629 |
+
# include <tr1_impl/cmath>
|
| 630 |
+
# else
|
| 631 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 632 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 633 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 634 |
+
# define _GLIBCXX_TR1
|
| 635 |
+
# include <tr1_impl/cmath>
|
| 636 |
+
# undef _GLIBCXX_TR1
|
| 637 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 638 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 639 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 640 |
+
# endif
|
| 641 |
+
#endif
|
| 642 |
+
|
| 643 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/complex
ADDED
|
@@ -0,0 +1,1557 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file complex
|
| 33 |
+
* This is a Standard C++ Library header.
|
| 34 |
+
*/
|
| 35 |
+
|
| 36 |
+
//
|
| 37 |
+
// ISO C++ 14882: 26.2 Complex Numbers
|
| 38 |
+
// Note: this is not a conforming implementation.
|
| 39 |
+
// Initially implemented by Ulrich Drepper <drepper@cygnus.com>
|
| 40 |
+
// Improved by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
|
| 41 |
+
//
|
| 42 |
+
|
| 43 |
+
#ifndef _GLIBCXX_COMPLEX
|
| 44 |
+
#define _GLIBCXX_COMPLEX 1
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <bits/cpp_type_traits.h>
|
| 50 |
+
#include <ext/type_traits.h>
|
| 51 |
+
#include <cmath>
|
| 52 |
+
#include <sstream>
|
| 53 |
+
|
| 54 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 55 |
+
|
| 56 |
+
// Forward declarations.
|
| 57 |
+
template<typename _Tp> class complex;
|
| 58 |
+
template<> class complex<float>;
|
| 59 |
+
template<> class complex<double>;
|
| 60 |
+
template<> class complex<long double>;
|
| 61 |
+
|
| 62 |
+
/// Return magnitude of @a z.
|
| 63 |
+
template<typename _Tp> _Tp abs(const complex<_Tp>&);
|
| 64 |
+
/// Return phase angle of @a z.
|
| 65 |
+
template<typename _Tp> _Tp arg(const complex<_Tp>&);
|
| 66 |
+
/// Return @a z magnitude squared.
|
| 67 |
+
template<typename _Tp> _Tp norm(const complex<_Tp>&);
|
| 68 |
+
|
| 69 |
+
/// Return complex conjugate of @a z.
|
| 70 |
+
template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
|
| 71 |
+
/// Return complex with magnitude @a rho and angle @a theta.
|
| 72 |
+
template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
|
| 73 |
+
|
| 74 |
+
// Transcendentals:
|
| 75 |
+
/// Return complex cosine of @a z.
|
| 76 |
+
template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&);
|
| 77 |
+
/// Return complex hyperbolic cosine of @a z.
|
| 78 |
+
template<typename _Tp> complex<_Tp> cosh(const complex<_Tp>&);
|
| 79 |
+
/// Return complex base e exponential of @a z.
|
| 80 |
+
template<typename _Tp> complex<_Tp> exp(const complex<_Tp>&);
|
| 81 |
+
/// Return complex natural logarithm of @a z.
|
| 82 |
+
template<typename _Tp> complex<_Tp> log(const complex<_Tp>&);
|
| 83 |
+
/// Return complex base 10 logarithm of @a z.
|
| 84 |
+
template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&);
|
| 85 |
+
/// Return complex cosine of @a z.
|
| 86 |
+
template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int);
|
| 87 |
+
/// Return @a x to the @a y'th power.
|
| 88 |
+
template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&);
|
| 89 |
+
/// Return @a x to the @a y'th power.
|
| 90 |
+
template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&,
|
| 91 |
+
const complex<_Tp>&);
|
| 92 |
+
/// Return @a x to the @a y'th power.
|
| 93 |
+
template<typename _Tp> complex<_Tp> pow(const _Tp&, const complex<_Tp>&);
|
| 94 |
+
/// Return complex sine of @a z.
|
| 95 |
+
template<typename _Tp> complex<_Tp> sin(const complex<_Tp>&);
|
| 96 |
+
/// Return complex hyperbolic sine of @a z.
|
| 97 |
+
template<typename _Tp> complex<_Tp> sinh(const complex<_Tp>&);
|
| 98 |
+
/// Return complex square root of @a z.
|
| 99 |
+
template<typename _Tp> complex<_Tp> sqrt(const complex<_Tp>&);
|
| 100 |
+
/// Return complex tangent of @a z.
|
| 101 |
+
template<typename _Tp> complex<_Tp> tan(const complex<_Tp>&);
|
| 102 |
+
/// Return complex hyperbolic tangent of @a z.
|
| 103 |
+
template<typename _Tp> complex<_Tp> tanh(const complex<_Tp>&);
|
| 104 |
+
//@}
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
// 26.2.2 Primary template class complex
|
| 108 |
+
/**
|
| 109 |
+
* Template to represent complex numbers.
|
| 110 |
+
*
|
| 111 |
+
* Specializations for float, double, and long double are part of the
|
| 112 |
+
* library. Results with any other type are not guaranteed.
|
| 113 |
+
*
|
| 114 |
+
* @param Tp Type of real and imaginary values.
|
| 115 |
+
*/
|
| 116 |
+
template<typename _Tp>
|
| 117 |
+
struct complex
|
| 118 |
+
{
|
| 119 |
+
/// Value typedef.
|
| 120 |
+
typedef _Tp value_type;
|
| 121 |
+
|
| 122 |
+
/// Default constructor. First parameter is x, second parameter is y.
|
| 123 |
+
/// Unspecified parameters default to 0.
|
| 124 |
+
complex(const _Tp& = _Tp(), const _Tp & = _Tp());
|
| 125 |
+
|
| 126 |
+
// Lets the compiler synthesize the copy constructor
|
| 127 |
+
// complex (const complex<_Tp>&);
|
| 128 |
+
/// Copy constructor.
|
| 129 |
+
template<typename _Up>
|
| 130 |
+
complex(const complex<_Up>&);
|
| 131 |
+
|
| 132 |
+
/// Return real part of complex number.
|
| 133 |
+
_Tp& real();
|
| 134 |
+
/// Return real part of complex number.
|
| 135 |
+
const _Tp& real() const;
|
| 136 |
+
/// Return imaginary part of complex number.
|
| 137 |
+
_Tp& imag();
|
| 138 |
+
/// Return imaginary part of complex number.
|
| 139 |
+
const _Tp& imag() const;
|
| 140 |
+
|
| 141 |
+
/// Assign this complex number to scalar @a t.
|
| 142 |
+
complex<_Tp>& operator=(const _Tp&);
|
| 143 |
+
/// Add @a t to this complex number.
|
| 144 |
+
complex<_Tp>& operator+=(const _Tp&);
|
| 145 |
+
/// Subtract @a t from this complex number.
|
| 146 |
+
complex<_Tp>& operator-=(const _Tp&);
|
| 147 |
+
/// Multiply this complex number by @a t.
|
| 148 |
+
complex<_Tp>& operator*=(const _Tp&);
|
| 149 |
+
/// Divide this complex number by @a t.
|
| 150 |
+
complex<_Tp>& operator/=(const _Tp&);
|
| 151 |
+
|
| 152 |
+
// Lets the compiler synthesize the
|
| 153 |
+
// copy and assignment operator
|
| 154 |
+
// complex<_Tp>& operator= (const complex<_Tp>&);
|
| 155 |
+
/// Assign this complex number to complex @a z.
|
| 156 |
+
template<typename _Up>
|
| 157 |
+
complex<_Tp>& operator=(const complex<_Up>&);
|
| 158 |
+
/// Add @a z to this complex number.
|
| 159 |
+
template<typename _Up>
|
| 160 |
+
complex<_Tp>& operator+=(const complex<_Up>&);
|
| 161 |
+
/// Subtract @a z from this complex number.
|
| 162 |
+
template<typename _Up>
|
| 163 |
+
complex<_Tp>& operator-=(const complex<_Up>&);
|
| 164 |
+
/// Multiply this complex number by @a z.
|
| 165 |
+
template<typename _Up>
|
| 166 |
+
complex<_Tp>& operator*=(const complex<_Up>&);
|
| 167 |
+
/// Divide this complex number by @a z.
|
| 168 |
+
template<typename _Up>
|
| 169 |
+
complex<_Tp>& operator/=(const complex<_Up>&);
|
| 170 |
+
|
| 171 |
+
const complex& __rep() const;
|
| 172 |
+
|
| 173 |
+
private:
|
| 174 |
+
_Tp _M_real;
|
| 175 |
+
_Tp _M_imag;
|
| 176 |
+
};
|
| 177 |
+
|
| 178 |
+
template<typename _Tp>
|
| 179 |
+
inline _Tp&
|
| 180 |
+
complex<_Tp>::real() { return _M_real; }
|
| 181 |
+
|
| 182 |
+
template<typename _Tp>
|
| 183 |
+
inline const _Tp&
|
| 184 |
+
complex<_Tp>::real() const { return _M_real; }
|
| 185 |
+
|
| 186 |
+
template<typename _Tp>
|
| 187 |
+
inline _Tp&
|
| 188 |
+
complex<_Tp>::imag() { return _M_imag; }
|
| 189 |
+
|
| 190 |
+
template<typename _Tp>
|
| 191 |
+
inline const _Tp&
|
| 192 |
+
complex<_Tp>::imag() const { return _M_imag; }
|
| 193 |
+
|
| 194 |
+
template<typename _Tp>
|
| 195 |
+
inline
|
| 196 |
+
complex<_Tp>::complex(const _Tp& __r, const _Tp& __i)
|
| 197 |
+
: _M_real(__r), _M_imag(__i) { }
|
| 198 |
+
|
| 199 |
+
template<typename _Tp>
|
| 200 |
+
template<typename _Up>
|
| 201 |
+
inline
|
| 202 |
+
complex<_Tp>::complex(const complex<_Up>& __z)
|
| 203 |
+
: _M_real(__z.real()), _M_imag(__z.imag()) { }
|
| 204 |
+
|
| 205 |
+
template<typename _Tp>
|
| 206 |
+
complex<_Tp>&
|
| 207 |
+
complex<_Tp>::operator=(const _Tp& __t)
|
| 208 |
+
{
|
| 209 |
+
_M_real = __t;
|
| 210 |
+
_M_imag = _Tp();
|
| 211 |
+
return *this;
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
// 26.2.5/1
|
| 215 |
+
template<typename _Tp>
|
| 216 |
+
inline complex<_Tp>&
|
| 217 |
+
complex<_Tp>::operator+=(const _Tp& __t)
|
| 218 |
+
{
|
| 219 |
+
_M_real += __t;
|
| 220 |
+
return *this;
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
// 26.2.5/3
|
| 224 |
+
template<typename _Tp>
|
| 225 |
+
inline complex<_Tp>&
|
| 226 |
+
complex<_Tp>::operator-=(const _Tp& __t)
|
| 227 |
+
{
|
| 228 |
+
_M_real -= __t;
|
| 229 |
+
return *this;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
// 26.2.5/5
|
| 233 |
+
template<typename _Tp>
|
| 234 |
+
complex<_Tp>&
|
| 235 |
+
complex<_Tp>::operator*=(const _Tp& __t)
|
| 236 |
+
{
|
| 237 |
+
_M_real *= __t;
|
| 238 |
+
_M_imag *= __t;
|
| 239 |
+
return *this;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
// 26.2.5/7
|
| 243 |
+
template<typename _Tp>
|
| 244 |
+
complex<_Tp>&
|
| 245 |
+
complex<_Tp>::operator/=(const _Tp& __t)
|
| 246 |
+
{
|
| 247 |
+
_M_real /= __t;
|
| 248 |
+
_M_imag /= __t;
|
| 249 |
+
return *this;
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
template<typename _Tp>
|
| 253 |
+
template<typename _Up>
|
| 254 |
+
complex<_Tp>&
|
| 255 |
+
complex<_Tp>::operator=(const complex<_Up>& __z)
|
| 256 |
+
{
|
| 257 |
+
_M_real = __z.real();
|
| 258 |
+
_M_imag = __z.imag();
|
| 259 |
+
return *this;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
// 26.2.5/9
|
| 263 |
+
template<typename _Tp>
|
| 264 |
+
template<typename _Up>
|
| 265 |
+
complex<_Tp>&
|
| 266 |
+
complex<_Tp>::operator+=(const complex<_Up>& __z)
|
| 267 |
+
{
|
| 268 |
+
_M_real += __z.real();
|
| 269 |
+
_M_imag += __z.imag();
|
| 270 |
+
return *this;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
// 26.2.5/11
|
| 274 |
+
template<typename _Tp>
|
| 275 |
+
template<typename _Up>
|
| 276 |
+
complex<_Tp>&
|
| 277 |
+
complex<_Tp>::operator-=(const complex<_Up>& __z)
|
| 278 |
+
{
|
| 279 |
+
_M_real -= __z.real();
|
| 280 |
+
_M_imag -= __z.imag();
|
| 281 |
+
return *this;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
// 26.2.5/13
|
| 285 |
+
// XXX: This is a grammar school implementation.
|
| 286 |
+
template<typename _Tp>
|
| 287 |
+
template<typename _Up>
|
| 288 |
+
complex<_Tp>&
|
| 289 |
+
complex<_Tp>::operator*=(const complex<_Up>& __z)
|
| 290 |
+
{
|
| 291 |
+
const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag();
|
| 292 |
+
_M_imag = _M_real * __z.imag() + _M_imag * __z.real();
|
| 293 |
+
_M_real = __r;
|
| 294 |
+
return *this;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
// 26.2.5/15
|
| 298 |
+
// XXX: This is a grammar school implementation.
|
| 299 |
+
template<typename _Tp>
|
| 300 |
+
template<typename _Up>
|
| 301 |
+
complex<_Tp>&
|
| 302 |
+
complex<_Tp>::operator/=(const complex<_Up>& __z)
|
| 303 |
+
{
|
| 304 |
+
const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag();
|
| 305 |
+
const _Tp __n = std::norm(__z);
|
| 306 |
+
_M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
|
| 307 |
+
_M_real = __r / __n;
|
| 308 |
+
return *this;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
template<typename _Tp>
|
| 312 |
+
inline const complex<_Tp>&
|
| 313 |
+
complex<_Tp>::__rep() const { return *this; }
|
| 314 |
+
|
| 315 |
+
// Operators:
|
| 316 |
+
//@{
|
| 317 |
+
/// Return new complex value @a x plus @a y.
|
| 318 |
+
template<typename _Tp>
|
| 319 |
+
inline complex<_Tp>
|
| 320 |
+
operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 321 |
+
{
|
| 322 |
+
complex<_Tp> __r = __x;
|
| 323 |
+
__r += __y;
|
| 324 |
+
return __r;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
template<typename _Tp>
|
| 328 |
+
inline complex<_Tp>
|
| 329 |
+
operator+(const complex<_Tp>& __x, const _Tp& __y)
|
| 330 |
+
{
|
| 331 |
+
complex<_Tp> __r = __x;
|
| 332 |
+
__r.real() += __y;
|
| 333 |
+
return __r;
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
template<typename _Tp>
|
| 337 |
+
inline complex<_Tp>
|
| 338 |
+
operator+(const _Tp& __x, const complex<_Tp>& __y)
|
| 339 |
+
{
|
| 340 |
+
complex<_Tp> __r = __y;
|
| 341 |
+
__r.real() += __x;
|
| 342 |
+
return __r;
|
| 343 |
+
}
|
| 344 |
+
//@}
|
| 345 |
+
|
| 346 |
+
//@{
|
| 347 |
+
/// Return new complex value @a x minus @a y.
|
| 348 |
+
template<typename _Tp>
|
| 349 |
+
inline complex<_Tp>
|
| 350 |
+
operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 351 |
+
{
|
| 352 |
+
complex<_Tp> __r = __x;
|
| 353 |
+
__r -= __y;
|
| 354 |
+
return __r;
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
template<typename _Tp>
|
| 358 |
+
inline complex<_Tp>
|
| 359 |
+
operator-(const complex<_Tp>& __x, const _Tp& __y)
|
| 360 |
+
{
|
| 361 |
+
complex<_Tp> __r = __x;
|
| 362 |
+
__r.real() -= __y;
|
| 363 |
+
return __r;
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
template<typename _Tp>
|
| 367 |
+
inline complex<_Tp>
|
| 368 |
+
operator-(const _Tp& __x, const complex<_Tp>& __y)
|
| 369 |
+
{
|
| 370 |
+
complex<_Tp> __r(__x, -__y.imag());
|
| 371 |
+
__r.real() -= __y.real();
|
| 372 |
+
return __r;
|
| 373 |
+
}
|
| 374 |
+
//@}
|
| 375 |
+
|
| 376 |
+
//@{
|
| 377 |
+
/// Return new complex value @a x times @a y.
|
| 378 |
+
template<typename _Tp>
|
| 379 |
+
inline complex<_Tp>
|
| 380 |
+
operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 381 |
+
{
|
| 382 |
+
complex<_Tp> __r = __x;
|
| 383 |
+
__r *= __y;
|
| 384 |
+
return __r;
|
| 385 |
+
}
|
| 386 |
+
|
| 387 |
+
template<typename _Tp>
|
| 388 |
+
inline complex<_Tp>
|
| 389 |
+
operator*(const complex<_Tp>& __x, const _Tp& __y)
|
| 390 |
+
{
|
| 391 |
+
complex<_Tp> __r = __x;
|
| 392 |
+
__r *= __y;
|
| 393 |
+
return __r;
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
template<typename _Tp>
|
| 397 |
+
inline complex<_Tp>
|
| 398 |
+
operator*(const _Tp& __x, const complex<_Tp>& __y)
|
| 399 |
+
{
|
| 400 |
+
complex<_Tp> __r = __y;
|
| 401 |
+
__r *= __x;
|
| 402 |
+
return __r;
|
| 403 |
+
}
|
| 404 |
+
//@}
|
| 405 |
+
|
| 406 |
+
//@{
|
| 407 |
+
/// Return new complex value @a x divided by @a y.
|
| 408 |
+
template<typename _Tp>
|
| 409 |
+
inline complex<_Tp>
|
| 410 |
+
operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 411 |
+
{
|
| 412 |
+
complex<_Tp> __r = __x;
|
| 413 |
+
__r /= __y;
|
| 414 |
+
return __r;
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
template<typename _Tp>
|
| 418 |
+
inline complex<_Tp>
|
| 419 |
+
operator/(const complex<_Tp>& __x, const _Tp& __y)
|
| 420 |
+
{
|
| 421 |
+
complex<_Tp> __r = __x;
|
| 422 |
+
__r /= __y;
|
| 423 |
+
return __r;
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
template<typename _Tp>
|
| 427 |
+
inline complex<_Tp>
|
| 428 |
+
operator/(const _Tp& __x, const complex<_Tp>& __y)
|
| 429 |
+
{
|
| 430 |
+
complex<_Tp> __r = __x;
|
| 431 |
+
__r /= __y;
|
| 432 |
+
return __r;
|
| 433 |
+
}
|
| 434 |
+
//@}
|
| 435 |
+
|
| 436 |
+
/// Return @a x.
|
| 437 |
+
template<typename _Tp>
|
| 438 |
+
inline complex<_Tp>
|
| 439 |
+
operator+(const complex<_Tp>& __x)
|
| 440 |
+
{ return __x; }
|
| 441 |
+
|
| 442 |
+
/// Return complex negation of @a x.
|
| 443 |
+
template<typename _Tp>
|
| 444 |
+
inline complex<_Tp>
|
| 445 |
+
operator-(const complex<_Tp>& __x)
|
| 446 |
+
{ return complex<_Tp>(-__x.real(), -__x.imag()); }
|
| 447 |
+
|
| 448 |
+
//@{
|
| 449 |
+
/// Return true if @a x is equal to @a y.
|
| 450 |
+
template<typename _Tp>
|
| 451 |
+
inline bool
|
| 452 |
+
operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 453 |
+
{ return __x.real() == __y.real() && __x.imag() == __y.imag(); }
|
| 454 |
+
|
| 455 |
+
template<typename _Tp>
|
| 456 |
+
inline bool
|
| 457 |
+
operator==(const complex<_Tp>& __x, const _Tp& __y)
|
| 458 |
+
{ return __x.real() == __y && __x.imag() == _Tp(); }
|
| 459 |
+
|
| 460 |
+
template<typename _Tp>
|
| 461 |
+
inline bool
|
| 462 |
+
operator==(const _Tp& __x, const complex<_Tp>& __y)
|
| 463 |
+
{ return __x == __y.real() && _Tp() == __y.imag(); }
|
| 464 |
+
//@}
|
| 465 |
+
|
| 466 |
+
//@{
|
| 467 |
+
/// Return false if @a x is equal to @a y.
|
| 468 |
+
template<typename _Tp>
|
| 469 |
+
inline bool
|
| 470 |
+
operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 471 |
+
{ return __x.real() != __y.real() || __x.imag() != __y.imag(); }
|
| 472 |
+
|
| 473 |
+
template<typename _Tp>
|
| 474 |
+
inline bool
|
| 475 |
+
operator!=(const complex<_Tp>& __x, const _Tp& __y)
|
| 476 |
+
{ return __x.real() != __y || __x.imag() != _Tp(); }
|
| 477 |
+
|
| 478 |
+
template<typename _Tp>
|
| 479 |
+
inline bool
|
| 480 |
+
operator!=(const _Tp& __x, const complex<_Tp>& __y)
|
| 481 |
+
{ return __x != __y.real() || _Tp() != __y.imag(); }
|
| 482 |
+
//@}
|
| 483 |
+
|
| 484 |
+
/// Extraction operator for complex values.
|
| 485 |
+
template<typename _Tp, typename _CharT, class _Traits>
|
| 486 |
+
basic_istream<_CharT, _Traits>&
|
| 487 |
+
operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
|
| 488 |
+
{
|
| 489 |
+
_Tp __re_x, __im_x;
|
| 490 |
+
_CharT __ch;
|
| 491 |
+
__is >> __ch;
|
| 492 |
+
if (__ch == '(')
|
| 493 |
+
{
|
| 494 |
+
__is >> __re_x >> __ch;
|
| 495 |
+
if (__ch == ',')
|
| 496 |
+
{
|
| 497 |
+
__is >> __im_x >> __ch;
|
| 498 |
+
if (__ch == ')')
|
| 499 |
+
__x = complex<_Tp>(__re_x, __im_x);
|
| 500 |
+
else
|
| 501 |
+
__is.setstate(ios_base::failbit);
|
| 502 |
+
}
|
| 503 |
+
else if (__ch == ')')
|
| 504 |
+
__x = __re_x;
|
| 505 |
+
else
|
| 506 |
+
__is.setstate(ios_base::failbit);
|
| 507 |
+
}
|
| 508 |
+
else
|
| 509 |
+
{
|
| 510 |
+
__is.putback(__ch);
|
| 511 |
+
__is >> __re_x;
|
| 512 |
+
__x = __re_x;
|
| 513 |
+
}
|
| 514 |
+
return __is;
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
/// Insertion operator for complex values.
|
| 518 |
+
template<typename _Tp, typename _CharT, class _Traits>
|
| 519 |
+
basic_ostream<_CharT, _Traits>&
|
| 520 |
+
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
|
| 521 |
+
{
|
| 522 |
+
basic_ostringstream<_CharT, _Traits> __s;
|
| 523 |
+
__s.flags(__os.flags());
|
| 524 |
+
__s.imbue(__os.getloc());
|
| 525 |
+
__s.precision(__os.precision());
|
| 526 |
+
__s << '(' << __x.real() << ',' << __x.imag() << ')';
|
| 527 |
+
return __os << __s.str();
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
// Values
|
| 531 |
+
template<typename _Tp>
|
| 532 |
+
inline _Tp&
|
| 533 |
+
real(complex<_Tp>& __z)
|
| 534 |
+
{ return __z.real(); }
|
| 535 |
+
|
| 536 |
+
template<typename _Tp>
|
| 537 |
+
inline const _Tp&
|
| 538 |
+
real(const complex<_Tp>& __z)
|
| 539 |
+
{ return __z.real(); }
|
| 540 |
+
|
| 541 |
+
template<typename _Tp>
|
| 542 |
+
inline _Tp&
|
| 543 |
+
imag(complex<_Tp>& __z)
|
| 544 |
+
{ return __z.imag(); }
|
| 545 |
+
|
| 546 |
+
template<typename _Tp>
|
| 547 |
+
inline const _Tp&
|
| 548 |
+
imag(const complex<_Tp>& __z)
|
| 549 |
+
{ return __z.imag(); }
|
| 550 |
+
|
| 551 |
+
// 26.2.7/3 abs(__z): Returns the magnitude of __z.
|
| 552 |
+
template<typename _Tp>
|
| 553 |
+
inline _Tp
|
| 554 |
+
__complex_abs(const complex<_Tp>& __z)
|
| 555 |
+
{
|
| 556 |
+
_Tp __x = __z.real();
|
| 557 |
+
_Tp __y = __z.imag();
|
| 558 |
+
const _Tp __s = std::max(abs(__x), abs(__y));
|
| 559 |
+
if (__s == _Tp()) // well ...
|
| 560 |
+
return __s;
|
| 561 |
+
__x /= __s;
|
| 562 |
+
__y /= __s;
|
| 563 |
+
return __s * sqrt(__x * __x + __y * __y);
|
| 564 |
+
}
|
| 565 |
+
|
| 566 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 567 |
+
inline float
|
| 568 |
+
__complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); }
|
| 569 |
+
|
| 570 |
+
inline double
|
| 571 |
+
__complex_abs(__complex__ double __z) { return __builtin_cabs(__z); }
|
| 572 |
+
|
| 573 |
+
inline long double
|
| 574 |
+
__complex_abs(const __complex__ long double& __z)
|
| 575 |
+
{ return __builtin_cabsl(__z); }
|
| 576 |
+
|
| 577 |
+
template<typename _Tp>
|
| 578 |
+
inline _Tp
|
| 579 |
+
abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); }
|
| 580 |
+
#else
|
| 581 |
+
template<typename _Tp>
|
| 582 |
+
inline _Tp
|
| 583 |
+
abs(const complex<_Tp>& __z) { return __complex_abs(__z); }
|
| 584 |
+
#endif
|
| 585 |
+
|
| 586 |
+
|
| 587 |
+
// 26.2.7/4: arg(__z): Returns the phase angle of __z.
|
| 588 |
+
template<typename _Tp>
|
| 589 |
+
inline _Tp
|
| 590 |
+
__complex_arg(const complex<_Tp>& __z)
|
| 591 |
+
{ return atan2(__z.imag(), __z.real()); }
|
| 592 |
+
|
| 593 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 594 |
+
inline float
|
| 595 |
+
__complex_arg(__complex__ float __z) { return __builtin_cargf(__z); }
|
| 596 |
+
|
| 597 |
+
inline double
|
| 598 |
+
__complex_arg(__complex__ double __z) { return __builtin_carg(__z); }
|
| 599 |
+
|
| 600 |
+
inline long double
|
| 601 |
+
__complex_arg(const __complex__ long double& __z)
|
| 602 |
+
{ return __builtin_cargl(__z); }
|
| 603 |
+
|
| 604 |
+
template<typename _Tp>
|
| 605 |
+
inline _Tp
|
| 606 |
+
arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); }
|
| 607 |
+
#else
|
| 608 |
+
template<typename _Tp>
|
| 609 |
+
inline _Tp
|
| 610 |
+
arg(const complex<_Tp>& __z) { return __complex_arg(__z); }
|
| 611 |
+
#endif
|
| 612 |
+
|
| 613 |
+
// 26.2.7/5: norm(__z) returns the squared magnitude of __z.
|
| 614 |
+
// As defined, norm() is -not- a norm is the common mathematical
|
| 615 |
+
// sens used in numerics. The helper class _Norm_helper<> tries to
|
| 616 |
+
// distinguish between builtin floating point and the rest, so as
|
| 617 |
+
// to deliver an answer as close as possible to the real value.
|
| 618 |
+
template<bool>
|
| 619 |
+
struct _Norm_helper
|
| 620 |
+
{
|
| 621 |
+
template<typename _Tp>
|
| 622 |
+
static inline _Tp _S_do_it(const complex<_Tp>& __z)
|
| 623 |
+
{
|
| 624 |
+
const _Tp __x = __z.real();
|
| 625 |
+
const _Tp __y = __z.imag();
|
| 626 |
+
return __x * __x + __y * __y;
|
| 627 |
+
}
|
| 628 |
+
};
|
| 629 |
+
|
| 630 |
+
template<>
|
| 631 |
+
struct _Norm_helper<true>
|
| 632 |
+
{
|
| 633 |
+
template<typename _Tp>
|
| 634 |
+
static inline _Tp _S_do_it(const complex<_Tp>& __z)
|
| 635 |
+
{
|
| 636 |
+
_Tp __res = std::abs(__z);
|
| 637 |
+
return __res * __res;
|
| 638 |
+
}
|
| 639 |
+
};
|
| 640 |
+
|
| 641 |
+
template<typename _Tp>
|
| 642 |
+
inline _Tp
|
| 643 |
+
norm(const complex<_Tp>& __z)
|
| 644 |
+
{
|
| 645 |
+
return _Norm_helper<__is_floating<_Tp>::__value
|
| 646 |
+
&& !_GLIBCXX_FAST_MATH>::_S_do_it(__z);
|
| 647 |
+
}
|
| 648 |
+
|
| 649 |
+
template<typename _Tp>
|
| 650 |
+
inline complex<_Tp>
|
| 651 |
+
polar(const _Tp& __rho, const _Tp& __theta)
|
| 652 |
+
{ return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
|
| 653 |
+
|
| 654 |
+
template<typename _Tp>
|
| 655 |
+
inline complex<_Tp>
|
| 656 |
+
conj(const complex<_Tp>& __z)
|
| 657 |
+
{ return complex<_Tp>(__z.real(), -__z.imag()); }
|
| 658 |
+
|
| 659 |
+
// Transcendentals
|
| 660 |
+
|
| 661 |
+
// 26.2.8/1 cos(__z): Returns the cosine of __z.
|
| 662 |
+
template<typename _Tp>
|
| 663 |
+
inline complex<_Tp>
|
| 664 |
+
__complex_cos(const complex<_Tp>& __z)
|
| 665 |
+
{
|
| 666 |
+
const _Tp __x = __z.real();
|
| 667 |
+
const _Tp __y = __z.imag();
|
| 668 |
+
return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
|
| 669 |
+
}
|
| 670 |
+
|
| 671 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 672 |
+
inline __complex__ float
|
| 673 |
+
__complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); }
|
| 674 |
+
|
| 675 |
+
inline __complex__ double
|
| 676 |
+
__complex_cos(__complex__ double __z) { return __builtin_ccos(__z); }
|
| 677 |
+
|
| 678 |
+
inline __complex__ long double
|
| 679 |
+
__complex_cos(const __complex__ long double& __z)
|
| 680 |
+
{ return __builtin_ccosl(__z); }
|
| 681 |
+
|
| 682 |
+
template<typename _Tp>
|
| 683 |
+
inline complex<_Tp>
|
| 684 |
+
cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); }
|
| 685 |
+
#else
|
| 686 |
+
template<typename _Tp>
|
| 687 |
+
inline complex<_Tp>
|
| 688 |
+
cos(const complex<_Tp>& __z) { return __complex_cos(__z); }
|
| 689 |
+
#endif
|
| 690 |
+
|
| 691 |
+
// 26.2.8/2 cosh(__z): Returns the hyperbolic cosine of __z.
|
| 692 |
+
template<typename _Tp>
|
| 693 |
+
inline complex<_Tp>
|
| 694 |
+
__complex_cosh(const complex<_Tp>& __z)
|
| 695 |
+
{
|
| 696 |
+
const _Tp __x = __z.real();
|
| 697 |
+
const _Tp __y = __z.imag();
|
| 698 |
+
return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
|
| 699 |
+
}
|
| 700 |
+
|
| 701 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 702 |
+
inline __complex__ float
|
| 703 |
+
__complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); }
|
| 704 |
+
|
| 705 |
+
inline __complex__ double
|
| 706 |
+
__complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); }
|
| 707 |
+
|
| 708 |
+
inline __complex__ long double
|
| 709 |
+
__complex_cosh(const __complex__ long double& __z)
|
| 710 |
+
{ return __builtin_ccoshl(__z); }
|
| 711 |
+
|
| 712 |
+
template<typename _Tp>
|
| 713 |
+
inline complex<_Tp>
|
| 714 |
+
cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); }
|
| 715 |
+
#else
|
| 716 |
+
template<typename _Tp>
|
| 717 |
+
inline complex<_Tp>
|
| 718 |
+
cosh(const complex<_Tp>& __z) { return __complex_cosh(__z); }
|
| 719 |
+
#endif
|
| 720 |
+
|
| 721 |
+
// 26.2.8/3 exp(__z): Returns the complex base e exponential of x
|
| 722 |
+
template<typename _Tp>
|
| 723 |
+
inline complex<_Tp>
|
| 724 |
+
__complex_exp(const complex<_Tp>& __z)
|
| 725 |
+
{ return std::polar(exp(__z.real()), __z.imag()); }
|
| 726 |
+
|
| 727 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 728 |
+
inline __complex__ float
|
| 729 |
+
__complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); }
|
| 730 |
+
|
| 731 |
+
inline __complex__ double
|
| 732 |
+
__complex_exp(__complex__ double __z) { return __builtin_cexp(__z); }
|
| 733 |
+
|
| 734 |
+
inline __complex__ long double
|
| 735 |
+
__complex_exp(const __complex__ long double& __z)
|
| 736 |
+
{ return __builtin_cexpl(__z); }
|
| 737 |
+
|
| 738 |
+
template<typename _Tp>
|
| 739 |
+
inline complex<_Tp>
|
| 740 |
+
exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); }
|
| 741 |
+
#else
|
| 742 |
+
template<typename _Tp>
|
| 743 |
+
inline complex<_Tp>
|
| 744 |
+
exp(const complex<_Tp>& __z) { return __complex_exp(__z); }
|
| 745 |
+
#endif
|
| 746 |
+
|
| 747 |
+
// 26.2.8/5 log(__z): Returns the natural complex logarithm of __z.
|
| 748 |
+
// The branch cut is along the negative axis.
|
| 749 |
+
template<typename _Tp>
|
| 750 |
+
inline complex<_Tp>
|
| 751 |
+
__complex_log(const complex<_Tp>& __z)
|
| 752 |
+
{ return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); }
|
| 753 |
+
|
| 754 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 755 |
+
inline __complex__ float
|
| 756 |
+
__complex_log(__complex__ float __z) { return __builtin_clogf(__z); }
|
| 757 |
+
|
| 758 |
+
inline __complex__ double
|
| 759 |
+
__complex_log(__complex__ double __z) { return __builtin_clog(__z); }
|
| 760 |
+
|
| 761 |
+
inline __complex__ long double
|
| 762 |
+
__complex_log(const __complex__ long double& __z)
|
| 763 |
+
{ return __builtin_clogl(__z); }
|
| 764 |
+
|
| 765 |
+
template<typename _Tp>
|
| 766 |
+
inline complex<_Tp>
|
| 767 |
+
log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); }
|
| 768 |
+
#else
|
| 769 |
+
template<typename _Tp>
|
| 770 |
+
inline complex<_Tp>
|
| 771 |
+
log(const complex<_Tp>& __z) { return __complex_log(__z); }
|
| 772 |
+
#endif
|
| 773 |
+
|
| 774 |
+
template<typename _Tp>
|
| 775 |
+
inline complex<_Tp>
|
| 776 |
+
log10(const complex<_Tp>& __z)
|
| 777 |
+
{ return std::log(__z) / log(_Tp(10.0)); }
|
| 778 |
+
|
| 779 |
+
// 26.2.8/10 sin(__z): Returns the sine of __z.
|
| 780 |
+
template<typename _Tp>
|
| 781 |
+
inline complex<_Tp>
|
| 782 |
+
__complex_sin(const complex<_Tp>& __z)
|
| 783 |
+
{
|
| 784 |
+
const _Tp __x = __z.real();
|
| 785 |
+
const _Tp __y = __z.imag();
|
| 786 |
+
return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y));
|
| 787 |
+
}
|
| 788 |
+
|
| 789 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 790 |
+
inline __complex__ float
|
| 791 |
+
__complex_sin(__complex__ float __z) { return __builtin_csinf(__z); }
|
| 792 |
+
|
| 793 |
+
inline __complex__ double
|
| 794 |
+
__complex_sin(__complex__ double __z) { return __builtin_csin(__z); }
|
| 795 |
+
|
| 796 |
+
inline __complex__ long double
|
| 797 |
+
__complex_sin(const __complex__ long double& __z)
|
| 798 |
+
{ return __builtin_csinl(__z); }
|
| 799 |
+
|
| 800 |
+
template<typename _Tp>
|
| 801 |
+
inline complex<_Tp>
|
| 802 |
+
sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); }
|
| 803 |
+
#else
|
| 804 |
+
template<typename _Tp>
|
| 805 |
+
inline complex<_Tp>
|
| 806 |
+
sin(const complex<_Tp>& __z) { return __complex_sin(__z); }
|
| 807 |
+
#endif
|
| 808 |
+
|
| 809 |
+
// 26.2.8/11 sinh(__z): Returns the hyperbolic sine of __z.
|
| 810 |
+
template<typename _Tp>
|
| 811 |
+
inline complex<_Tp>
|
| 812 |
+
__complex_sinh(const complex<_Tp>& __z)
|
| 813 |
+
{
|
| 814 |
+
const _Tp __x = __z.real();
|
| 815 |
+
const _Tp __y = __z.imag();
|
| 816 |
+
return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
|
| 817 |
+
}
|
| 818 |
+
|
| 819 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 820 |
+
inline __complex__ float
|
| 821 |
+
__complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); }
|
| 822 |
+
|
| 823 |
+
inline __complex__ double
|
| 824 |
+
__complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); }
|
| 825 |
+
|
| 826 |
+
inline __complex__ long double
|
| 827 |
+
__complex_sinh(const __complex__ long double& __z)
|
| 828 |
+
{ return __builtin_csinhl(__z); }
|
| 829 |
+
|
| 830 |
+
template<typename _Tp>
|
| 831 |
+
inline complex<_Tp>
|
| 832 |
+
sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); }
|
| 833 |
+
#else
|
| 834 |
+
template<typename _Tp>
|
| 835 |
+
inline complex<_Tp>
|
| 836 |
+
sinh(const complex<_Tp>& __z) { return __complex_sinh(__z); }
|
| 837 |
+
#endif
|
| 838 |
+
|
| 839 |
+
// 26.2.8/13 sqrt(__z): Returns the complex square root of __z.
|
| 840 |
+
// The branch cut is on the negative axis.
|
| 841 |
+
template<typename _Tp>
|
| 842 |
+
complex<_Tp>
|
| 843 |
+
__complex_sqrt(const complex<_Tp>& __z)
|
| 844 |
+
{
|
| 845 |
+
_Tp __x = __z.real();
|
| 846 |
+
_Tp __y = __z.imag();
|
| 847 |
+
|
| 848 |
+
if (__x == _Tp())
|
| 849 |
+
{
|
| 850 |
+
_Tp __t = sqrt(abs(__y) / 2);
|
| 851 |
+
return complex<_Tp>(__t, __y < _Tp() ? -__t : __t);
|
| 852 |
+
}
|
| 853 |
+
else
|
| 854 |
+
{
|
| 855 |
+
_Tp __t = sqrt(2 * (std::abs(__z) + abs(__x)));
|
| 856 |
+
_Tp __u = __t / 2;
|
| 857 |
+
return __x > _Tp()
|
| 858 |
+
? complex<_Tp>(__u, __y / __t)
|
| 859 |
+
: complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u);
|
| 860 |
+
}
|
| 861 |
+
}
|
| 862 |
+
|
| 863 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 864 |
+
inline __complex__ float
|
| 865 |
+
__complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); }
|
| 866 |
+
|
| 867 |
+
inline __complex__ double
|
| 868 |
+
__complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); }
|
| 869 |
+
|
| 870 |
+
inline __complex__ long double
|
| 871 |
+
__complex_sqrt(const __complex__ long double& __z)
|
| 872 |
+
{ return __builtin_csqrtl(__z); }
|
| 873 |
+
|
| 874 |
+
template<typename _Tp>
|
| 875 |
+
inline complex<_Tp>
|
| 876 |
+
sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
|
| 877 |
+
#else
|
| 878 |
+
template<typename _Tp>
|
| 879 |
+
inline complex<_Tp>
|
| 880 |
+
sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z); }
|
| 881 |
+
#endif
|
| 882 |
+
|
| 883 |
+
// 26.2.8/14 tan(__z): Return the complex tangent of __z.
|
| 884 |
+
|
| 885 |
+
template<typename _Tp>
|
| 886 |
+
inline complex<_Tp>
|
| 887 |
+
__complex_tan(const complex<_Tp>& __z)
|
| 888 |
+
{ return std::sin(__z) / std::cos(__z); }
|
| 889 |
+
|
| 890 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 891 |
+
inline __complex__ float
|
| 892 |
+
__complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); }
|
| 893 |
+
|
| 894 |
+
inline __complex__ double
|
| 895 |
+
__complex_tan(__complex__ double __z) { return __builtin_ctan(__z); }
|
| 896 |
+
|
| 897 |
+
inline __complex__ long double
|
| 898 |
+
__complex_tan(const __complex__ long double& __z)
|
| 899 |
+
{ return __builtin_ctanl(__z); }
|
| 900 |
+
|
| 901 |
+
template<typename _Tp>
|
| 902 |
+
inline complex<_Tp>
|
| 903 |
+
tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); }
|
| 904 |
+
#else
|
| 905 |
+
template<typename _Tp>
|
| 906 |
+
inline complex<_Tp>
|
| 907 |
+
tan(const complex<_Tp>& __z) { return __complex_tan(__z); }
|
| 908 |
+
#endif
|
| 909 |
+
|
| 910 |
+
|
| 911 |
+
// 26.2.8/15 tanh(__z): Returns the hyperbolic tangent of __z.
|
| 912 |
+
|
| 913 |
+
template<typename _Tp>
|
| 914 |
+
inline complex<_Tp>
|
| 915 |
+
__complex_tanh(const complex<_Tp>& __z)
|
| 916 |
+
{ return std::sinh(__z) / std::cosh(__z); }
|
| 917 |
+
|
| 918 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 919 |
+
inline __complex__ float
|
| 920 |
+
__complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); }
|
| 921 |
+
|
| 922 |
+
inline __complex__ double
|
| 923 |
+
__complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); }
|
| 924 |
+
|
| 925 |
+
inline __complex__ long double
|
| 926 |
+
__complex_tanh(const __complex__ long double& __z)
|
| 927 |
+
{ return __builtin_ctanhl(__z); }
|
| 928 |
+
|
| 929 |
+
template<typename _Tp>
|
| 930 |
+
inline complex<_Tp>
|
| 931 |
+
tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); }
|
| 932 |
+
#else
|
| 933 |
+
template<typename _Tp>
|
| 934 |
+
inline complex<_Tp>
|
| 935 |
+
tanh(const complex<_Tp>& __z) { return __complex_tanh(__z); }
|
| 936 |
+
#endif
|
| 937 |
+
|
| 938 |
+
|
| 939 |
+
// 26.2.8/9 pow(__x, __y): Returns the complex power base of __x
|
| 940 |
+
// raised to the __y-th power. The branch
|
| 941 |
+
// cut is on the negative axis.
|
| 942 |
+
template<typename _Tp>
|
| 943 |
+
inline complex<_Tp>
|
| 944 |
+
pow(const complex<_Tp>& __z, int __n)
|
| 945 |
+
{ return std::__pow_helper(__z, __n); }
|
| 946 |
+
|
| 947 |
+
template<typename _Tp>
|
| 948 |
+
complex<_Tp>
|
| 949 |
+
pow(const complex<_Tp>& __x, const _Tp& __y)
|
| 950 |
+
{
|
| 951 |
+
#ifndef _GLIBCXX_USE_C99_COMPLEX
|
| 952 |
+
if (__x == _Tp())
|
| 953 |
+
return _Tp();
|
| 954 |
+
#endif
|
| 955 |
+
if (__x.imag() == _Tp() && __x.real() > _Tp())
|
| 956 |
+
return pow(__x.real(), __y);
|
| 957 |
+
|
| 958 |
+
complex<_Tp> __t = std::log(__x);
|
| 959 |
+
return std::polar(exp(__y * __t.real()), __y * __t.imag());
|
| 960 |
+
}
|
| 961 |
+
|
| 962 |
+
template<typename _Tp>
|
| 963 |
+
inline complex<_Tp>
|
| 964 |
+
__complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 965 |
+
{ return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); }
|
| 966 |
+
|
| 967 |
+
#if _GLIBCXX_USE_C99_COMPLEX
|
| 968 |
+
inline __complex__ float
|
| 969 |
+
__complex_pow(__complex__ float __x, __complex__ float __y)
|
| 970 |
+
{ return __builtin_cpowf(__x, __y); }
|
| 971 |
+
|
| 972 |
+
inline __complex__ double
|
| 973 |
+
__complex_pow(__complex__ double __x, __complex__ double __y)
|
| 974 |
+
{ return __builtin_cpow(__x, __y); }
|
| 975 |
+
|
| 976 |
+
inline __complex__ long double
|
| 977 |
+
__complex_pow(const __complex__ long double& __x,
|
| 978 |
+
const __complex__ long double& __y)
|
| 979 |
+
{ return __builtin_cpowl(__x, __y); }
|
| 980 |
+
|
| 981 |
+
template<typename _Tp>
|
| 982 |
+
inline complex<_Tp>
|
| 983 |
+
pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 984 |
+
{ return __complex_pow(__x.__rep(), __y.__rep()); }
|
| 985 |
+
#else
|
| 986 |
+
template<typename _Tp>
|
| 987 |
+
inline complex<_Tp>
|
| 988 |
+
pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
|
| 989 |
+
{ return __complex_pow(__x, __y); }
|
| 990 |
+
#endif
|
| 991 |
+
|
| 992 |
+
template<typename _Tp>
|
| 993 |
+
inline complex<_Tp>
|
| 994 |
+
pow(const _Tp& __x, const complex<_Tp>& __y)
|
| 995 |
+
{
|
| 996 |
+
return __x > _Tp() ? std::polar(pow(__x, __y.real()),
|
| 997 |
+
__y.imag() * log(__x))
|
| 998 |
+
: std::pow(complex<_Tp>(__x, _Tp()), __y);
|
| 999 |
+
}
|
| 1000 |
+
|
| 1001 |
+
// 26.2.3 complex specializations
|
| 1002 |
+
// complex<float> specialization
|
| 1003 |
+
template<>
|
| 1004 |
+
struct complex<float>
|
| 1005 |
+
{
|
| 1006 |
+
typedef float value_type;
|
| 1007 |
+
typedef __complex__ float _ComplexT;
|
| 1008 |
+
|
| 1009 |
+
complex(_ComplexT __z) : _M_value(__z) { }
|
| 1010 |
+
|
| 1011 |
+
complex(float = 0.0f, float = 0.0f);
|
| 1012 |
+
|
| 1013 |
+
explicit complex(const complex<double>&);
|
| 1014 |
+
explicit complex(const complex<long double>&);
|
| 1015 |
+
|
| 1016 |
+
float& real();
|
| 1017 |
+
const float& real() const;
|
| 1018 |
+
float& imag();
|
| 1019 |
+
const float& imag() const;
|
| 1020 |
+
|
| 1021 |
+
complex<float>& operator=(float);
|
| 1022 |
+
complex<float>& operator+=(float);
|
| 1023 |
+
complex<float>& operator-=(float);
|
| 1024 |
+
complex<float>& operator*=(float);
|
| 1025 |
+
complex<float>& operator/=(float);
|
| 1026 |
+
|
| 1027 |
+
// Let the compiler synthesize the copy and assignment
|
| 1028 |
+
// operator. It always does a pretty good job.
|
| 1029 |
+
// complex& operator= (const complex&);
|
| 1030 |
+
template<typename _Tp>
|
| 1031 |
+
complex<float>&operator=(const complex<_Tp>&);
|
| 1032 |
+
template<typename _Tp>
|
| 1033 |
+
complex<float>& operator+=(const complex<_Tp>&);
|
| 1034 |
+
template<class _Tp>
|
| 1035 |
+
complex<float>& operator-=(const complex<_Tp>&);
|
| 1036 |
+
template<class _Tp>
|
| 1037 |
+
complex<float>& operator*=(const complex<_Tp>&);
|
| 1038 |
+
template<class _Tp>
|
| 1039 |
+
complex<float>&operator/=(const complex<_Tp>&);
|
| 1040 |
+
|
| 1041 |
+
const _ComplexT& __rep() const { return _M_value; }
|
| 1042 |
+
|
| 1043 |
+
private:
|
| 1044 |
+
_ComplexT _M_value;
|
| 1045 |
+
};
|
| 1046 |
+
|
| 1047 |
+
inline float&
|
| 1048 |
+
complex<float>::real()
|
| 1049 |
+
{ return __real__ _M_value; }
|
| 1050 |
+
|
| 1051 |
+
inline const float&
|
| 1052 |
+
complex<float>::real() const
|
| 1053 |
+
{ return __real__ _M_value; }
|
| 1054 |
+
|
| 1055 |
+
inline float&
|
| 1056 |
+
complex<float>::imag()
|
| 1057 |
+
{ return __imag__ _M_value; }
|
| 1058 |
+
|
| 1059 |
+
inline const float&
|
| 1060 |
+
complex<float>::imag() const
|
| 1061 |
+
{ return __imag__ _M_value; }
|
| 1062 |
+
|
| 1063 |
+
inline
|
| 1064 |
+
complex<float>::complex(float __r, float __i)
|
| 1065 |
+
{
|
| 1066 |
+
__real__ _M_value = __r;
|
| 1067 |
+
__imag__ _M_value = __i;
|
| 1068 |
+
}
|
| 1069 |
+
|
| 1070 |
+
inline complex<float>&
|
| 1071 |
+
complex<float>::operator=(float __f)
|
| 1072 |
+
{
|
| 1073 |
+
__real__ _M_value = __f;
|
| 1074 |
+
__imag__ _M_value = 0.0f;
|
| 1075 |
+
return *this;
|
| 1076 |
+
}
|
| 1077 |
+
|
| 1078 |
+
inline complex<float>&
|
| 1079 |
+
complex<float>::operator+=(float __f)
|
| 1080 |
+
{
|
| 1081 |
+
__real__ _M_value += __f;
|
| 1082 |
+
return *this;
|
| 1083 |
+
}
|
| 1084 |
+
|
| 1085 |
+
inline complex<float>&
|
| 1086 |
+
complex<float>::operator-=(float __f)
|
| 1087 |
+
{
|
| 1088 |
+
__real__ _M_value -= __f;
|
| 1089 |
+
return *this;
|
| 1090 |
+
}
|
| 1091 |
+
|
| 1092 |
+
inline complex<float>&
|
| 1093 |
+
complex<float>::operator*=(float __f)
|
| 1094 |
+
{
|
| 1095 |
+
_M_value *= __f;
|
| 1096 |
+
return *this;
|
| 1097 |
+
}
|
| 1098 |
+
|
| 1099 |
+
inline complex<float>&
|
| 1100 |
+
complex<float>::operator/=(float __f)
|
| 1101 |
+
{
|
| 1102 |
+
_M_value /= __f;
|
| 1103 |
+
return *this;
|
| 1104 |
+
}
|
| 1105 |
+
|
| 1106 |
+
template<typename _Tp>
|
| 1107 |
+
inline complex<float>&
|
| 1108 |
+
complex<float>::operator=(const complex<_Tp>& __z)
|
| 1109 |
+
{
|
| 1110 |
+
__real__ _M_value = __z.real();
|
| 1111 |
+
__imag__ _M_value = __z.imag();
|
| 1112 |
+
return *this;
|
| 1113 |
+
}
|
| 1114 |
+
|
| 1115 |
+
template<typename _Tp>
|
| 1116 |
+
inline complex<float>&
|
| 1117 |
+
complex<float>::operator+=(const complex<_Tp>& __z)
|
| 1118 |
+
{
|
| 1119 |
+
__real__ _M_value += __z.real();
|
| 1120 |
+
__imag__ _M_value += __z.imag();
|
| 1121 |
+
return *this;
|
| 1122 |
+
}
|
| 1123 |
+
|
| 1124 |
+
template<typename _Tp>
|
| 1125 |
+
inline complex<float>&
|
| 1126 |
+
complex<float>::operator-=(const complex<_Tp>& __z)
|
| 1127 |
+
{
|
| 1128 |
+
__real__ _M_value -= __z.real();
|
| 1129 |
+
__imag__ _M_value -= __z.imag();
|
| 1130 |
+
return *this;
|
| 1131 |
+
}
|
| 1132 |
+
|
| 1133 |
+
template<typename _Tp>
|
| 1134 |
+
inline complex<float>&
|
| 1135 |
+
complex<float>::operator*=(const complex<_Tp>& __z)
|
| 1136 |
+
{
|
| 1137 |
+
_ComplexT __t;
|
| 1138 |
+
__real__ __t = __z.real();
|
| 1139 |
+
__imag__ __t = __z.imag();
|
| 1140 |
+
_M_value *= __t;
|
| 1141 |
+
return *this;
|
| 1142 |
+
}
|
| 1143 |
+
|
| 1144 |
+
template<typename _Tp>
|
| 1145 |
+
inline complex<float>&
|
| 1146 |
+
complex<float>::operator/=(const complex<_Tp>& __z)
|
| 1147 |
+
{
|
| 1148 |
+
_ComplexT __t;
|
| 1149 |
+
__real__ __t = __z.real();
|
| 1150 |
+
__imag__ __t = __z.imag();
|
| 1151 |
+
_M_value /= __t;
|
| 1152 |
+
return *this;
|
| 1153 |
+
}
|
| 1154 |
+
|
| 1155 |
+
// 26.2.3 complex specializations
|
| 1156 |
+
// complex<double> specialization
|
| 1157 |
+
template<>
|
| 1158 |
+
struct complex<double>
|
| 1159 |
+
{
|
| 1160 |
+
typedef double value_type;
|
| 1161 |
+
typedef __complex__ double _ComplexT;
|
| 1162 |
+
|
| 1163 |
+
complex(_ComplexT __z) : _M_value(__z) { }
|
| 1164 |
+
|
| 1165 |
+
complex(double = 0.0, double = 0.0);
|
| 1166 |
+
|
| 1167 |
+
complex(const complex<float>&);
|
| 1168 |
+
explicit complex(const complex<long double>&);
|
| 1169 |
+
|
| 1170 |
+
double& real();
|
| 1171 |
+
const double& real() const;
|
| 1172 |
+
double& imag();
|
| 1173 |
+
const double& imag() const;
|
| 1174 |
+
|
| 1175 |
+
complex<double>& operator=(double);
|
| 1176 |
+
complex<double>& operator+=(double);
|
| 1177 |
+
complex<double>& operator-=(double);
|
| 1178 |
+
complex<double>& operator*=(double);
|
| 1179 |
+
complex<double>& operator/=(double);
|
| 1180 |
+
|
| 1181 |
+
// The compiler will synthesize this, efficiently.
|
| 1182 |
+
// complex& operator= (const complex&);
|
| 1183 |
+
template<typename _Tp>
|
| 1184 |
+
complex<double>& operator=(const complex<_Tp>&);
|
| 1185 |
+
template<typename _Tp>
|
| 1186 |
+
complex<double>& operator+=(const complex<_Tp>&);
|
| 1187 |
+
template<typename _Tp>
|
| 1188 |
+
complex<double>& operator-=(const complex<_Tp>&);
|
| 1189 |
+
template<typename _Tp>
|
| 1190 |
+
complex<double>& operator*=(const complex<_Tp>&);
|
| 1191 |
+
template<typename _Tp>
|
| 1192 |
+
complex<double>& operator/=(const complex<_Tp>&);
|
| 1193 |
+
|
| 1194 |
+
const _ComplexT& __rep() const { return _M_value; }
|
| 1195 |
+
|
| 1196 |
+
private:
|
| 1197 |
+
_ComplexT _M_value;
|
| 1198 |
+
};
|
| 1199 |
+
|
| 1200 |
+
inline double&
|
| 1201 |
+
complex<double>::real()
|
| 1202 |
+
{ return __real__ _M_value; }
|
| 1203 |
+
|
| 1204 |
+
inline const double&
|
| 1205 |
+
complex<double>::real() const
|
| 1206 |
+
{ return __real__ _M_value; }
|
| 1207 |
+
|
| 1208 |
+
inline double&
|
| 1209 |
+
complex<double>::imag()
|
| 1210 |
+
{ return __imag__ _M_value; }
|
| 1211 |
+
|
| 1212 |
+
inline const double&
|
| 1213 |
+
complex<double>::imag() const
|
| 1214 |
+
{ return __imag__ _M_value; }
|
| 1215 |
+
|
| 1216 |
+
inline
|
| 1217 |
+
complex<double>::complex(double __r, double __i)
|
| 1218 |
+
{
|
| 1219 |
+
__real__ _M_value = __r;
|
| 1220 |
+
__imag__ _M_value = __i;
|
| 1221 |
+
}
|
| 1222 |
+
|
| 1223 |
+
inline complex<double>&
|
| 1224 |
+
complex<double>::operator=(double __d)
|
| 1225 |
+
{
|
| 1226 |
+
__real__ _M_value = __d;
|
| 1227 |
+
__imag__ _M_value = 0.0;
|
| 1228 |
+
return *this;
|
| 1229 |
+
}
|
| 1230 |
+
|
| 1231 |
+
inline complex<double>&
|
| 1232 |
+
complex<double>::operator+=(double __d)
|
| 1233 |
+
{
|
| 1234 |
+
__real__ _M_value += __d;
|
| 1235 |
+
return *this;
|
| 1236 |
+
}
|
| 1237 |
+
|
| 1238 |
+
inline complex<double>&
|
| 1239 |
+
complex<double>::operator-=(double __d)
|
| 1240 |
+
{
|
| 1241 |
+
__real__ _M_value -= __d;
|
| 1242 |
+
return *this;
|
| 1243 |
+
}
|
| 1244 |
+
|
| 1245 |
+
inline complex<double>&
|
| 1246 |
+
complex<double>::operator*=(double __d)
|
| 1247 |
+
{
|
| 1248 |
+
_M_value *= __d;
|
| 1249 |
+
return *this;
|
| 1250 |
+
}
|
| 1251 |
+
|
| 1252 |
+
inline complex<double>&
|
| 1253 |
+
complex<double>::operator/=(double __d)
|
| 1254 |
+
{
|
| 1255 |
+
_M_value /= __d;
|
| 1256 |
+
return *this;
|
| 1257 |
+
}
|
| 1258 |
+
|
| 1259 |
+
template<typename _Tp>
|
| 1260 |
+
inline complex<double>&
|
| 1261 |
+
complex<double>::operator=(const complex<_Tp>& __z)
|
| 1262 |
+
{
|
| 1263 |
+
__real__ _M_value = __z.real();
|
| 1264 |
+
__imag__ _M_value = __z.imag();
|
| 1265 |
+
return *this;
|
| 1266 |
+
}
|
| 1267 |
+
|
| 1268 |
+
template<typename _Tp>
|
| 1269 |
+
inline complex<double>&
|
| 1270 |
+
complex<double>::operator+=(const complex<_Tp>& __z)
|
| 1271 |
+
{
|
| 1272 |
+
__real__ _M_value += __z.real();
|
| 1273 |
+
__imag__ _M_value += __z.imag();
|
| 1274 |
+
return *this;
|
| 1275 |
+
}
|
| 1276 |
+
|
| 1277 |
+
template<typename _Tp>
|
| 1278 |
+
inline complex<double>&
|
| 1279 |
+
complex<double>::operator-=(const complex<_Tp>& __z)
|
| 1280 |
+
{
|
| 1281 |
+
__real__ _M_value -= __z.real();
|
| 1282 |
+
__imag__ _M_value -= __z.imag();
|
| 1283 |
+
return *this;
|
| 1284 |
+
}
|
| 1285 |
+
|
| 1286 |
+
template<typename _Tp>
|
| 1287 |
+
inline complex<double>&
|
| 1288 |
+
complex<double>::operator*=(const complex<_Tp>& __z)
|
| 1289 |
+
{
|
| 1290 |
+
_ComplexT __t;
|
| 1291 |
+
__real__ __t = __z.real();
|
| 1292 |
+
__imag__ __t = __z.imag();
|
| 1293 |
+
_M_value *= __t;
|
| 1294 |
+
return *this;
|
| 1295 |
+
}
|
| 1296 |
+
|
| 1297 |
+
template<typename _Tp>
|
| 1298 |
+
inline complex<double>&
|
| 1299 |
+
complex<double>::operator/=(const complex<_Tp>& __z)
|
| 1300 |
+
{
|
| 1301 |
+
_ComplexT __t;
|
| 1302 |
+
__real__ __t = __z.real();
|
| 1303 |
+
__imag__ __t = __z.imag();
|
| 1304 |
+
_M_value /= __t;
|
| 1305 |
+
return *this;
|
| 1306 |
+
}
|
| 1307 |
+
|
| 1308 |
+
// 26.2.3 complex specializations
|
| 1309 |
+
// complex<long double> specialization
|
| 1310 |
+
template<>
|
| 1311 |
+
struct complex<long double>
|
| 1312 |
+
{
|
| 1313 |
+
typedef long double value_type;
|
| 1314 |
+
typedef __complex__ long double _ComplexT;
|
| 1315 |
+
|
| 1316 |
+
complex(_ComplexT __z) : _M_value(__z) { }
|
| 1317 |
+
|
| 1318 |
+
complex(long double = 0.0L, long double = 0.0L);
|
| 1319 |
+
|
| 1320 |
+
complex(const complex<float>&);
|
| 1321 |
+
complex(const complex<double>&);
|
| 1322 |
+
|
| 1323 |
+
long double& real();
|
| 1324 |
+
const long double& real() const;
|
| 1325 |
+
long double& imag();
|
| 1326 |
+
const long double& imag() const;
|
| 1327 |
+
|
| 1328 |
+
complex<long double>& operator= (long double);
|
| 1329 |
+
complex<long double>& operator+= (long double);
|
| 1330 |
+
complex<long double>& operator-= (long double);
|
| 1331 |
+
complex<long double>& operator*= (long double);
|
| 1332 |
+
complex<long double>& operator/= (long double);
|
| 1333 |
+
|
| 1334 |
+
// The compiler knows how to do this efficiently
|
| 1335 |
+
// complex& operator= (const complex&);
|
| 1336 |
+
template<typename _Tp>
|
| 1337 |
+
complex<long double>& operator=(const complex<_Tp>&);
|
| 1338 |
+
template<typename _Tp>
|
| 1339 |
+
complex<long double>& operator+=(const complex<_Tp>&);
|
| 1340 |
+
template<typename _Tp>
|
| 1341 |
+
complex<long double>& operator-=(const complex<_Tp>&);
|
| 1342 |
+
template<typename _Tp>
|
| 1343 |
+
complex<long double>& operator*=(const complex<_Tp>&);
|
| 1344 |
+
template<typename _Tp>
|
| 1345 |
+
complex<long double>& operator/=(const complex<_Tp>&);
|
| 1346 |
+
|
| 1347 |
+
const _ComplexT& __rep() const { return _M_value; }
|
| 1348 |
+
|
| 1349 |
+
private:
|
| 1350 |
+
_ComplexT _M_value;
|
| 1351 |
+
};
|
| 1352 |
+
|
| 1353 |
+
inline
|
| 1354 |
+
complex<long double>::complex(long double __r, long double __i)
|
| 1355 |
+
{
|
| 1356 |
+
__real__ _M_value = __r;
|
| 1357 |
+
__imag__ _M_value = __i;
|
| 1358 |
+
}
|
| 1359 |
+
|
| 1360 |
+
inline long double&
|
| 1361 |
+
complex<long double>::real()
|
| 1362 |
+
{ return __real__ _M_value; }
|
| 1363 |
+
|
| 1364 |
+
inline const long double&
|
| 1365 |
+
complex<long double>::real() const
|
| 1366 |
+
{ return __real__ _M_value; }
|
| 1367 |
+
|
| 1368 |
+
inline long double&
|
| 1369 |
+
complex<long double>::imag()
|
| 1370 |
+
{ return __imag__ _M_value; }
|
| 1371 |
+
|
| 1372 |
+
inline const long double&
|
| 1373 |
+
complex<long double>::imag() const
|
| 1374 |
+
{ return __imag__ _M_value; }
|
| 1375 |
+
|
| 1376 |
+
inline complex<long double>&
|
| 1377 |
+
complex<long double>::operator=(long double __r)
|
| 1378 |
+
{
|
| 1379 |
+
__real__ _M_value = __r;
|
| 1380 |
+
__imag__ _M_value = 0.0L;
|
| 1381 |
+
return *this;
|
| 1382 |
+
}
|
| 1383 |
+
|
| 1384 |
+
inline complex<long double>&
|
| 1385 |
+
complex<long double>::operator+=(long double __r)
|
| 1386 |
+
{
|
| 1387 |
+
__real__ _M_value += __r;
|
| 1388 |
+
return *this;
|
| 1389 |
+
}
|
| 1390 |
+
|
| 1391 |
+
inline complex<long double>&
|
| 1392 |
+
complex<long double>::operator-=(long double __r)
|
| 1393 |
+
{
|
| 1394 |
+
__real__ _M_value -= __r;
|
| 1395 |
+
return *this;
|
| 1396 |
+
}
|
| 1397 |
+
|
| 1398 |
+
inline complex<long double>&
|
| 1399 |
+
complex<long double>::operator*=(long double __r)
|
| 1400 |
+
{
|
| 1401 |
+
_M_value *= __r;
|
| 1402 |
+
return *this;
|
| 1403 |
+
}
|
| 1404 |
+
|
| 1405 |
+
inline complex<long double>&
|
| 1406 |
+
complex<long double>::operator/=(long double __r)
|
| 1407 |
+
{
|
| 1408 |
+
_M_value /= __r;
|
| 1409 |
+
return *this;
|
| 1410 |
+
}
|
| 1411 |
+
|
| 1412 |
+
template<typename _Tp>
|
| 1413 |
+
inline complex<long double>&
|
| 1414 |
+
complex<long double>::operator=(const complex<_Tp>& __z)
|
| 1415 |
+
{
|
| 1416 |
+
__real__ _M_value = __z.real();
|
| 1417 |
+
__imag__ _M_value = __z.imag();
|
| 1418 |
+
return *this;
|
| 1419 |
+
}
|
| 1420 |
+
|
| 1421 |
+
template<typename _Tp>
|
| 1422 |
+
inline complex<long double>&
|
| 1423 |
+
complex<long double>::operator+=(const complex<_Tp>& __z)
|
| 1424 |
+
{
|
| 1425 |
+
__real__ _M_value += __z.real();
|
| 1426 |
+
__imag__ _M_value += __z.imag();
|
| 1427 |
+
return *this;
|
| 1428 |
+
}
|
| 1429 |
+
|
| 1430 |
+
template<typename _Tp>
|
| 1431 |
+
inline complex<long double>&
|
| 1432 |
+
complex<long double>::operator-=(const complex<_Tp>& __z)
|
| 1433 |
+
{
|
| 1434 |
+
__real__ _M_value -= __z.real();
|
| 1435 |
+
__imag__ _M_value -= __z.imag();
|
| 1436 |
+
return *this;
|
| 1437 |
+
}
|
| 1438 |
+
|
| 1439 |
+
template<typename _Tp>
|
| 1440 |
+
inline complex<long double>&
|
| 1441 |
+
complex<long double>::operator*=(const complex<_Tp>& __z)
|
| 1442 |
+
{
|
| 1443 |
+
_ComplexT __t;
|
| 1444 |
+
__real__ __t = __z.real();
|
| 1445 |
+
__imag__ __t = __z.imag();
|
| 1446 |
+
_M_value *= __t;
|
| 1447 |
+
return *this;
|
| 1448 |
+
}
|
| 1449 |
+
|
| 1450 |
+
template<typename _Tp>
|
| 1451 |
+
inline complex<long double>&
|
| 1452 |
+
complex<long double>::operator/=(const complex<_Tp>& __z)
|
| 1453 |
+
{
|
| 1454 |
+
_ComplexT __t;
|
| 1455 |
+
__real__ __t = __z.real();
|
| 1456 |
+
__imag__ __t = __z.imag();
|
| 1457 |
+
_M_value /= __t;
|
| 1458 |
+
return *this;
|
| 1459 |
+
}
|
| 1460 |
+
|
| 1461 |
+
// These bits have to be at the end of this file, so that the
|
| 1462 |
+
// specializations have all been defined.
|
| 1463 |
+
// ??? No, they have to be there because of compiler limitation at
|
| 1464 |
+
// inlining. It suffices that class specializations be defined.
|
| 1465 |
+
inline
|
| 1466 |
+
complex<float>::complex(const complex<double>& __z)
|
| 1467 |
+
: _M_value(__z.__rep()) { }
|
| 1468 |
+
|
| 1469 |
+
inline
|
| 1470 |
+
complex<float>::complex(const complex<long double>& __z)
|
| 1471 |
+
: _M_value(__z.__rep()) { }
|
| 1472 |
+
|
| 1473 |
+
inline
|
| 1474 |
+
complex<double>::complex(const complex<float>& __z)
|
| 1475 |
+
: _M_value(__z.__rep()) { }
|
| 1476 |
+
|
| 1477 |
+
inline
|
| 1478 |
+
complex<double>::complex(const complex<long double>& __z)
|
| 1479 |
+
: _M_value(__z.__rep()) { }
|
| 1480 |
+
|
| 1481 |
+
inline
|
| 1482 |
+
complex<long double>::complex(const complex<float>& __z)
|
| 1483 |
+
: _M_value(__z.__rep()) { }
|
| 1484 |
+
|
| 1485 |
+
inline
|
| 1486 |
+
complex<long double>::complex(const complex<double>& __z)
|
| 1487 |
+
: _M_value(__z.__rep()) { }
|
| 1488 |
+
|
| 1489 |
+
// Inhibit implicit instantiations for required instantiations,
|
| 1490 |
+
// which are defined via explicit instantiations elsewhere.
|
| 1491 |
+
// NB: This syntax is a GNU extension.
|
| 1492 |
+
#if _GLIBCXX_EXTERN_TEMPLATE
|
| 1493 |
+
extern template istream& operator>>(istream&, complex<float>&);
|
| 1494 |
+
extern template ostream& operator<<(ostream&, const complex<float>&);
|
| 1495 |
+
extern template istream& operator>>(istream&, complex<double>&);
|
| 1496 |
+
extern template ostream& operator<<(ostream&, const complex<double>&);
|
| 1497 |
+
extern template istream& operator>>(istream&, complex<long double>&);
|
| 1498 |
+
extern template ostream& operator<<(ostream&, const complex<long double>&);
|
| 1499 |
+
|
| 1500 |
+
#ifdef _GLIBCXX_USE_WCHAR_T
|
| 1501 |
+
extern template wistream& operator>>(wistream&, complex<float>&);
|
| 1502 |
+
extern template wostream& operator<<(wostream&, const complex<float>&);
|
| 1503 |
+
extern template wistream& operator>>(wistream&, complex<double>&);
|
| 1504 |
+
extern template wostream& operator<<(wostream&, const complex<double>&);
|
| 1505 |
+
extern template wistream& operator>>(wistream&, complex<long double>&);
|
| 1506 |
+
extern template wostream& operator<<(wostream&, const complex<long double>&);
|
| 1507 |
+
#endif
|
| 1508 |
+
#endif
|
| 1509 |
+
|
| 1510 |
+
_GLIBCXX_END_NAMESPACE
|
| 1511 |
+
|
| 1512 |
+
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
| 1513 |
+
|
| 1514 |
+
// See ext/type_traits.h for the primary template.
|
| 1515 |
+
template<typename _Tp, typename _Up>
|
| 1516 |
+
struct __promote_2<std::complex<_Tp>, _Up>
|
| 1517 |
+
{
|
| 1518 |
+
public:
|
| 1519 |
+
typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
|
| 1520 |
+
};
|
| 1521 |
+
|
| 1522 |
+
template<typename _Tp, typename _Up>
|
| 1523 |
+
struct __promote_2<_Tp, std::complex<_Up> >
|
| 1524 |
+
{
|
| 1525 |
+
public:
|
| 1526 |
+
typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
|
| 1527 |
+
};
|
| 1528 |
+
|
| 1529 |
+
template<typename _Tp, typename _Up>
|
| 1530 |
+
struct __promote_2<std::complex<_Tp>, std::complex<_Up> >
|
| 1531 |
+
{
|
| 1532 |
+
public:
|
| 1533 |
+
typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
|
| 1534 |
+
};
|
| 1535 |
+
|
| 1536 |
+
_GLIBCXX_END_NAMESPACE
|
| 1537 |
+
|
| 1538 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 1539 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 1540 |
+
# error C++0x header cannot be included from TR1 header
|
| 1541 |
+
# endif
|
| 1542 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 1543 |
+
# include <tr1_impl/complex>
|
| 1544 |
+
# else
|
| 1545 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 1546 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 1547 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 1548 |
+
# define _GLIBCXX_TR1
|
| 1549 |
+
# include <tr1_impl/complex>
|
| 1550 |
+
# undef _GLIBCXX_TR1
|
| 1551 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 1552 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 1553 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 1554 |
+
# endif
|
| 1555 |
+
#endif
|
| 1556 |
+
|
| 1557 |
+
#endif /* _GLIBCXX_COMPLEX */
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/complex.h
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- compatibility header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file complex.h
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#include <bits/c++config.h>
|
| 35 |
+
|
| 36 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 37 |
+
# include <ccomplex>
|
| 38 |
+
#else
|
| 39 |
+
# if _GLIBCXX_HAVE_COMPLEX_H
|
| 40 |
+
# include_next <complex.h>
|
| 41 |
+
# endif
|
| 42 |
+
#endif
|
| 43 |
+
|
| 44 |
+
#ifndef _GLIBCXX_COMPLEX_H
|
| 45 |
+
#define _GLIBCXX_COMPLEX_H 1
|
| 46 |
+
|
| 47 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/csetjmp
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file csetjmp
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c setjmp.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 20.4.6 C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <setjmp.h>
|
| 50 |
+
|
| 51 |
+
#ifndef _GLIBCXX_CSETJMP
|
| 52 |
+
#define _GLIBCXX_CSETJMP 1
|
| 53 |
+
|
| 54 |
+
// Get rid of those macros defined in <setjmp.h> in lieu of real functions.
|
| 55 |
+
#undef longjmp
|
| 56 |
+
|
| 57 |
+
// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
|
| 58 |
+
#ifndef setjmp
|
| 59 |
+
#define setjmp(env) setjmp (env)
|
| 60 |
+
#endif
|
| 61 |
+
|
| 62 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 63 |
+
|
| 64 |
+
using ::jmp_buf;
|
| 65 |
+
using ::longjmp;
|
| 66 |
+
|
| 67 |
+
_GLIBCXX_END_NAMESPACE
|
| 68 |
+
|
| 69 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/csignal
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file csignal
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c signal.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 20.4.6 C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <signal.h>
|
| 50 |
+
|
| 51 |
+
#ifndef _GLIBCXX_CSIGNAL
|
| 52 |
+
#define _GLIBCXX_CSIGNAL 1
|
| 53 |
+
|
| 54 |
+
// Get rid of those macros defined in <signal.h> in lieu of real functions.
|
| 55 |
+
#undef raise
|
| 56 |
+
|
| 57 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 58 |
+
|
| 59 |
+
using ::sig_atomic_t;
|
| 60 |
+
using ::signal;
|
| 61 |
+
using ::raise;
|
| 62 |
+
|
| 63 |
+
_GLIBCXX_END_NAMESPACE
|
| 64 |
+
|
| 65 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdarg
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/cstdarg
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c stdarg.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 20.4.6 C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <stdarg.h>
|
| 50 |
+
|
| 51 |
+
#ifndef _GLIBCXX_CSTDARG
|
| 52 |
+
#define _GLIBCXX_CSTDARG 1
|
| 53 |
+
|
| 54 |
+
// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
|
| 55 |
+
#ifndef va_end
|
| 56 |
+
#define va_end(ap) va_end (ap)
|
| 57 |
+
#endif
|
| 58 |
+
|
| 59 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 60 |
+
|
| 61 |
+
using ::va_list;
|
| 62 |
+
|
| 63 |
+
_GLIBCXX_END_NAMESPACE
|
| 64 |
+
|
| 65 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdbool
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <cstdbool> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file include/cstdbool
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#pragma GCC system_header
|
| 35 |
+
|
| 36 |
+
#ifndef _GLIBCXX_CSTDBOOL
|
| 37 |
+
#define _GLIBCXX_CSTDBOOL 1
|
| 38 |
+
|
| 39 |
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
| 40 |
+
# include <c++0x_warning.h>
|
| 41 |
+
#else
|
| 42 |
+
# include <bits/c++config.h>
|
| 43 |
+
# if _GLIBCXX_HAVE_STDBOOL_H
|
| 44 |
+
# include <stdbool.h>
|
| 45 |
+
# endif
|
| 46 |
+
#endif
|
| 47 |
+
|
| 48 |
+
#endif
|
| 49 |
+
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cstddef
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file cstddef
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c stddef.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 18.1 Types
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <stddef.h>
|
| 50 |
+
|
| 51 |
+
#ifndef _GLIBCXX_CSTDDEF
|
| 52 |
+
#define _GLIBCXX_CSTDDEF 1
|
| 53 |
+
|
| 54 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 55 |
+
|
| 56 |
+
using ::ptrdiff_t;
|
| 57 |
+
using ::size_t;
|
| 58 |
+
|
| 59 |
+
_GLIBCXX_END_NAMESPACE
|
| 60 |
+
|
| 61 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdint
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <cstdint> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file include/cstdint
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#ifndef _GLIBCXX_CSTDINT
|
| 35 |
+
#define _GLIBCXX_CSTDINT 1
|
| 36 |
+
|
| 37 |
+
#pragma GCC system_header
|
| 38 |
+
|
| 39 |
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
| 40 |
+
# include <c++0x_warning.h>
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 44 |
+
# error C++0x header cannot be included from TR1 header
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#include <bits/c++config.h>
|
| 48 |
+
|
| 49 |
+
// For 8.22.1/1 (see C99, Notes 219, 220, 222)
|
| 50 |
+
#if _GLIBCXX_HAVE_STDINT_H
|
| 51 |
+
# ifndef __STDC_LIMIT_MACROS
|
| 52 |
+
# define _UNDEF__STDC_LIMIT_MACROS
|
| 53 |
+
# define __STDC_LIMIT_MACROS
|
| 54 |
+
# endif
|
| 55 |
+
# ifndef __STDC_CONSTANT_MACROS
|
| 56 |
+
# define _UNDEF__STDC_CONSTANT_MACROS
|
| 57 |
+
# define __STDC_CONSTANT_MACROS
|
| 58 |
+
# endif
|
| 59 |
+
# include <stdint.h>
|
| 60 |
+
# ifdef _UNDEF__STDC_LIMIT_MACROS
|
| 61 |
+
# undef __STDC_LIMIT_MACROS
|
| 62 |
+
# undef _UNDEF__STDC_LIMIT_MACROS
|
| 63 |
+
# endif
|
| 64 |
+
# ifdef _UNDEF__STDC_CONSTANT_MACROS
|
| 65 |
+
# undef __STDC_CONSTANT_MACROS
|
| 66 |
+
# undef _UNDEF__STDC_CONSTANT_MACROS
|
| 67 |
+
# endif
|
| 68 |
+
#endif
|
| 69 |
+
|
| 70 |
+
#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 71 |
+
# include <tr1_impl/cstdint>
|
| 72 |
+
#else
|
| 73 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 74 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 75 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 76 |
+
# define _GLIBCXX_TR1
|
| 77 |
+
# include <tr1_impl/cstdint>
|
| 78 |
+
# undef _GLIBCXX_TR1
|
| 79 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 80 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 81 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 82 |
+
#endif
|
| 83 |
+
|
| 84 |
+
#endif // _GLIBCXX_CSTDINT
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdio
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/cstdio
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c stdio.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 27.8.2 C Library files
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <cstddef>
|
| 50 |
+
#include <stdio.h>
|
| 51 |
+
|
| 52 |
+
#ifndef _GLIBCXX_CSTDIO
|
| 53 |
+
#define _GLIBCXX_CSTDIO 1
|
| 54 |
+
|
| 55 |
+
// Get rid of those macros defined in <stdio.h> in lieu of real functions.
|
| 56 |
+
#undef clearerr
|
| 57 |
+
#undef fclose
|
| 58 |
+
#undef feof
|
| 59 |
+
#undef ferror
|
| 60 |
+
#undef fflush
|
| 61 |
+
#undef fgetc
|
| 62 |
+
#undef fgetpos
|
| 63 |
+
#undef fgets
|
| 64 |
+
#undef fopen
|
| 65 |
+
#undef fprintf
|
| 66 |
+
#undef fputc
|
| 67 |
+
#undef fputs
|
| 68 |
+
#undef fread
|
| 69 |
+
#undef freopen
|
| 70 |
+
#undef fscanf
|
| 71 |
+
#undef fseek
|
| 72 |
+
#undef fsetpos
|
| 73 |
+
#undef ftell
|
| 74 |
+
#undef fwrite
|
| 75 |
+
#undef getc
|
| 76 |
+
#undef getchar
|
| 77 |
+
#undef gets
|
| 78 |
+
#undef perror
|
| 79 |
+
#undef printf
|
| 80 |
+
#undef putc
|
| 81 |
+
#undef putchar
|
| 82 |
+
#undef puts
|
| 83 |
+
#undef remove
|
| 84 |
+
#undef rename
|
| 85 |
+
#undef rewind
|
| 86 |
+
#undef scanf
|
| 87 |
+
#undef setbuf
|
| 88 |
+
#undef setvbuf
|
| 89 |
+
#undef sprintf
|
| 90 |
+
#undef sscanf
|
| 91 |
+
#undef tmpfile
|
| 92 |
+
#undef tmpnam
|
| 93 |
+
#undef ungetc
|
| 94 |
+
#undef vfprintf
|
| 95 |
+
#undef vprintf
|
| 96 |
+
#undef vsprintf
|
| 97 |
+
|
| 98 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 99 |
+
|
| 100 |
+
using ::FILE;
|
| 101 |
+
using ::fpos_t;
|
| 102 |
+
|
| 103 |
+
using ::clearerr;
|
| 104 |
+
using ::fclose;
|
| 105 |
+
using ::feof;
|
| 106 |
+
using ::ferror;
|
| 107 |
+
using ::fflush;
|
| 108 |
+
using ::fgetc;
|
| 109 |
+
using ::fgetpos;
|
| 110 |
+
using ::fgets;
|
| 111 |
+
using ::fopen;
|
| 112 |
+
using ::fprintf;
|
| 113 |
+
using ::fputc;
|
| 114 |
+
using ::fputs;
|
| 115 |
+
using ::fread;
|
| 116 |
+
using ::freopen;
|
| 117 |
+
using ::fscanf;
|
| 118 |
+
using ::fseek;
|
| 119 |
+
using ::fsetpos;
|
| 120 |
+
using ::ftell;
|
| 121 |
+
using ::fwrite;
|
| 122 |
+
using ::getc;
|
| 123 |
+
using ::getchar;
|
| 124 |
+
using ::gets;
|
| 125 |
+
using ::perror;
|
| 126 |
+
using ::printf;
|
| 127 |
+
using ::putc;
|
| 128 |
+
using ::putchar;
|
| 129 |
+
using ::puts;
|
| 130 |
+
using ::remove;
|
| 131 |
+
using ::rename;
|
| 132 |
+
using ::rewind;
|
| 133 |
+
using ::scanf;
|
| 134 |
+
using ::setbuf;
|
| 135 |
+
using ::setvbuf;
|
| 136 |
+
using ::sprintf;
|
| 137 |
+
using ::sscanf;
|
| 138 |
+
using ::tmpfile;
|
| 139 |
+
using ::tmpnam;
|
| 140 |
+
using ::ungetc;
|
| 141 |
+
using ::vfprintf;
|
| 142 |
+
using ::vprintf;
|
| 143 |
+
using ::vsprintf;
|
| 144 |
+
|
| 145 |
+
_GLIBCXX_END_NAMESPACE
|
| 146 |
+
|
| 147 |
+
#if _GLIBCXX_USE_C99
|
| 148 |
+
|
| 149 |
+
#undef snprintf
|
| 150 |
+
#undef vfscanf
|
| 151 |
+
#undef vscanf
|
| 152 |
+
#undef vsnprintf
|
| 153 |
+
#undef vsscanf
|
| 154 |
+
|
| 155 |
+
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
| 156 |
+
|
| 157 |
+
#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
|
| 158 |
+
extern "C" int
|
| 159 |
+
(snprintf)(char * restrict, size_t, const char * restrict, ...);
|
| 160 |
+
extern "C" int
|
| 161 |
+
(vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
|
| 162 |
+
extern "C" int (vscanf)(const char * restrict, __gnuc_va_list);
|
| 163 |
+
extern "C" int
|
| 164 |
+
(vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
|
| 165 |
+
extern "C" int
|
| 166 |
+
(vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
|
| 167 |
+
#endif
|
| 168 |
+
|
| 169 |
+
#if !_GLIBCXX_USE_C99_DYNAMIC
|
| 170 |
+
using ::snprintf;
|
| 171 |
+
using ::vfscanf;
|
| 172 |
+
using ::vscanf;
|
| 173 |
+
using ::vsnprintf;
|
| 174 |
+
using ::vsscanf;
|
| 175 |
+
#endif
|
| 176 |
+
|
| 177 |
+
_GLIBCXX_END_NAMESPACE
|
| 178 |
+
|
| 179 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 180 |
+
|
| 181 |
+
using ::__gnu_cxx::snprintf;
|
| 182 |
+
using ::__gnu_cxx::vfscanf;
|
| 183 |
+
using ::__gnu_cxx::vscanf;
|
| 184 |
+
using ::__gnu_cxx::vsnprintf;
|
| 185 |
+
using ::__gnu_cxx::vsscanf;
|
| 186 |
+
|
| 187 |
+
_GLIBCXX_END_NAMESPACE
|
| 188 |
+
|
| 189 |
+
#endif // _GLIBCXX_USE_C99
|
| 190 |
+
|
| 191 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 192 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 193 |
+
# error C++0x header cannot be included from TR1 header
|
| 194 |
+
# endif
|
| 195 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 196 |
+
# include <tr1_impl/cstdio>
|
| 197 |
+
# else
|
| 198 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 199 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 200 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 201 |
+
# define _GLIBCXX_TR1
|
| 202 |
+
# include <tr1_impl/cstdio>
|
| 203 |
+
# undef _GLIBCXX_TR1
|
| 204 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 205 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 206 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 207 |
+
# endif
|
| 208 |
+
#endif
|
| 209 |
+
|
| 210 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cstdlib
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/cstdlib
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c stdlib.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 20.4.6 C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <cstddef>
|
| 50 |
+
|
| 51 |
+
#ifndef _GLIBCXX_CSTDLIB
|
| 52 |
+
#define _GLIBCXX_CSTDLIB 1
|
| 53 |
+
|
| 54 |
+
#if !_GLIBCXX_HOSTED
|
| 55 |
+
// The C standard does not require a freestanding implementation to
|
| 56 |
+
// provide <stdlib.h>. However, the C++ standard does still require
|
| 57 |
+
// <cstdlib> -- but only the functionality mentioned in
|
| 58 |
+
// [lib.support.start.term].
|
| 59 |
+
|
| 60 |
+
#define EXIT_SUCCESS 0
|
| 61 |
+
#define EXIT_FAILURE 1
|
| 62 |
+
|
| 63 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 64 |
+
|
| 65 |
+
extern "C" void abort(void);
|
| 66 |
+
extern "C" int atexit(void (*)());
|
| 67 |
+
extern "C" void exit(int);
|
| 68 |
+
|
| 69 |
+
_GLIBCXX_END_NAMESPACE
|
| 70 |
+
|
| 71 |
+
#else
|
| 72 |
+
|
| 73 |
+
#include <stdlib.h>
|
| 74 |
+
|
| 75 |
+
// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
|
| 76 |
+
#undef abort
|
| 77 |
+
#undef abs
|
| 78 |
+
#undef atexit
|
| 79 |
+
#undef atof
|
| 80 |
+
#undef atoi
|
| 81 |
+
#undef atol
|
| 82 |
+
#undef bsearch
|
| 83 |
+
#undef calloc
|
| 84 |
+
#undef div
|
| 85 |
+
#undef exit
|
| 86 |
+
#undef free
|
| 87 |
+
#undef getenv
|
| 88 |
+
#undef labs
|
| 89 |
+
#undef ldiv
|
| 90 |
+
#undef malloc
|
| 91 |
+
#undef mblen
|
| 92 |
+
#undef mbstowcs
|
| 93 |
+
#undef mbtowc
|
| 94 |
+
#undef qsort
|
| 95 |
+
#undef rand
|
| 96 |
+
#undef realloc
|
| 97 |
+
#undef srand
|
| 98 |
+
#undef strtod
|
| 99 |
+
#undef strtol
|
| 100 |
+
#undef strtoul
|
| 101 |
+
#undef system
|
| 102 |
+
#undef wcstombs
|
| 103 |
+
#undef wctomb
|
| 104 |
+
|
| 105 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 106 |
+
|
| 107 |
+
using ::div_t;
|
| 108 |
+
using ::ldiv_t;
|
| 109 |
+
|
| 110 |
+
using ::abort;
|
| 111 |
+
using ::abs;
|
| 112 |
+
using ::atexit;
|
| 113 |
+
using ::atof;
|
| 114 |
+
using ::atoi;
|
| 115 |
+
using ::atol;
|
| 116 |
+
using ::bsearch;
|
| 117 |
+
using ::calloc;
|
| 118 |
+
using ::div;
|
| 119 |
+
using ::exit;
|
| 120 |
+
using ::free;
|
| 121 |
+
using ::getenv;
|
| 122 |
+
using ::labs;
|
| 123 |
+
using ::ldiv;
|
| 124 |
+
using ::malloc;
|
| 125 |
+
#ifdef _GLIBCXX_HAVE_MBSTATE_T
|
| 126 |
+
using ::mblen;
|
| 127 |
+
using ::mbstowcs;
|
| 128 |
+
using ::mbtowc;
|
| 129 |
+
#endif // _GLIBCXX_HAVE_MBSTATE_T
|
| 130 |
+
using ::qsort;
|
| 131 |
+
using ::rand;
|
| 132 |
+
using ::realloc;
|
| 133 |
+
using ::srand;
|
| 134 |
+
using ::strtod;
|
| 135 |
+
using ::strtol;
|
| 136 |
+
using ::strtoul;
|
| 137 |
+
using ::system;
|
| 138 |
+
#ifdef _GLIBCXX_USE_WCHAR_T
|
| 139 |
+
using ::wcstombs;
|
| 140 |
+
using ::wctomb;
|
| 141 |
+
#endif // _GLIBCXX_USE_WCHAR_T
|
| 142 |
+
|
| 143 |
+
inline long
|
| 144 |
+
abs(long __i) { return labs(__i); }
|
| 145 |
+
|
| 146 |
+
inline ldiv_t
|
| 147 |
+
div(long __i, long __j) { return ldiv(__i, __j); }
|
| 148 |
+
|
| 149 |
+
_GLIBCXX_END_NAMESPACE
|
| 150 |
+
|
| 151 |
+
#if _GLIBCXX_USE_C99
|
| 152 |
+
|
| 153 |
+
#undef _Exit
|
| 154 |
+
#undef llabs
|
| 155 |
+
#undef lldiv
|
| 156 |
+
#undef atoll
|
| 157 |
+
#undef strtoll
|
| 158 |
+
#undef strtoull
|
| 159 |
+
#undef strtof
|
| 160 |
+
#undef strtold
|
| 161 |
+
|
| 162 |
+
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
| 163 |
+
|
| 164 |
+
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
| 165 |
+
using ::lldiv_t;
|
| 166 |
+
#endif
|
| 167 |
+
#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
|
| 168 |
+
extern "C" void (_Exit)(int);
|
| 169 |
+
#endif
|
| 170 |
+
#if !_GLIBCXX_USE_C99_DYNAMIC
|
| 171 |
+
using ::_Exit;
|
| 172 |
+
#endif
|
| 173 |
+
|
| 174 |
+
inline long long
|
| 175 |
+
abs(long long __x) { return __x >= 0 ? __x : -__x; }
|
| 176 |
+
|
| 177 |
+
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
| 178 |
+
using ::llabs;
|
| 179 |
+
|
| 180 |
+
inline lldiv_t
|
| 181 |
+
div(long long __n, long long __d)
|
| 182 |
+
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
|
| 183 |
+
|
| 184 |
+
using ::lldiv;
|
| 185 |
+
#endif
|
| 186 |
+
|
| 187 |
+
#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
| 188 |
+
extern "C" long long int (atoll)(const char *);
|
| 189 |
+
extern "C" long long int
|
| 190 |
+
(strtoll)(const char * restrict, char ** restrict, int);
|
| 191 |
+
extern "C" unsigned long long int
|
| 192 |
+
(strtoull)(const char * restrict, char ** restrict, int);
|
| 193 |
+
#endif
|
| 194 |
+
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
| 195 |
+
using ::atoll;
|
| 196 |
+
using ::strtoll;
|
| 197 |
+
using ::strtoull;
|
| 198 |
+
#endif
|
| 199 |
+
using ::strtof;
|
| 200 |
+
using ::strtold;
|
| 201 |
+
|
| 202 |
+
_GLIBCXX_END_NAMESPACE
|
| 203 |
+
|
| 204 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 205 |
+
|
| 206 |
+
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
| 207 |
+
using ::__gnu_cxx::lldiv_t;
|
| 208 |
+
#endif
|
| 209 |
+
using ::__gnu_cxx::_Exit;
|
| 210 |
+
using ::__gnu_cxx::abs;
|
| 211 |
+
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
| 212 |
+
using ::__gnu_cxx::llabs;
|
| 213 |
+
using ::__gnu_cxx::div;
|
| 214 |
+
using ::__gnu_cxx::lldiv;
|
| 215 |
+
#endif
|
| 216 |
+
using ::__gnu_cxx::atoll;
|
| 217 |
+
using ::__gnu_cxx::strtof;
|
| 218 |
+
using ::__gnu_cxx::strtoll;
|
| 219 |
+
using ::__gnu_cxx::strtoull;
|
| 220 |
+
using ::__gnu_cxx::strtold;
|
| 221 |
+
|
| 222 |
+
_GLIBCXX_END_NAMESPACE
|
| 223 |
+
|
| 224 |
+
#endif // _GLIBCXX_USE_C99
|
| 225 |
+
|
| 226 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 227 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 228 |
+
# error C++0x header cannot be included from TR1 header
|
| 229 |
+
# endif
|
| 230 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 231 |
+
# include <tr1_impl/cstdlib>
|
| 232 |
+
# else
|
| 233 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 234 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 235 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 236 |
+
# define _GLIBCXX_TR1
|
| 237 |
+
# include <tr1_impl/cstdlib>
|
| 238 |
+
# undef _GLIBCXX_TR1
|
| 239 |
+
# undef _GLIBCX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|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file cstring
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c string.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 20.4.6 C library
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <cstddef>
|
| 50 |
+
#include <string.h>
|
| 51 |
+
|
| 52 |
+
#ifndef _GLIBCXX_CSTRING
|
| 53 |
+
#define _GLIBCXX_CSTRING 1
|
| 54 |
+
|
| 55 |
+
// Get rid of those macros defined in <string.h> in lieu of real functions.
|
| 56 |
+
#undef memchr
|
| 57 |
+
#undef memcmp
|
| 58 |
+
#undef memcpy
|
| 59 |
+
#undef memmove
|
| 60 |
+
#undef memset
|
| 61 |
+
#undef strcat
|
| 62 |
+
#undef strchr
|
| 63 |
+
#undef strcmp
|
| 64 |
+
#undef strcoll
|
| 65 |
+
#undef strcpy
|
| 66 |
+
#undef strcspn
|
| 67 |
+
#undef strerror
|
| 68 |
+
#undef strlen
|
| 69 |
+
#undef strncat
|
| 70 |
+
#undef strncmp
|
| 71 |
+
#undef strncpy
|
| 72 |
+
#undef strpbrk
|
| 73 |
+
#undef strrchr
|
| 74 |
+
#undef strspn
|
| 75 |
+
#undef strstr
|
| 76 |
+
#undef strtok
|
| 77 |
+
#undef strxfrm
|
| 78 |
+
|
| 79 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 80 |
+
|
| 81 |
+
using ::memchr;
|
| 82 |
+
using ::memcmp;
|
| 83 |
+
using ::memcpy;
|
| 84 |
+
using ::memmove;
|
| 85 |
+
using ::memset;
|
| 86 |
+
using ::strcat;
|
| 87 |
+
using ::strcmp;
|
| 88 |
+
using ::strcoll;
|
| 89 |
+
using ::strcpy;
|
| 90 |
+
using ::strcspn;
|
| 91 |
+
using ::strerror;
|
| 92 |
+
using ::strlen;
|
| 93 |
+
using ::strncat;
|
| 94 |
+
using ::strncmp;
|
| 95 |
+
using ::strncpy;
|
| 96 |
+
using ::strspn;
|
| 97 |
+
using ::strtok;
|
| 98 |
+
using ::strxfrm;
|
| 99 |
+
|
| 100 |
+
inline void*
|
| 101 |
+
memchr(void* __p, int __c, size_t __n)
|
| 102 |
+
{ return memchr(const_cast<const void*>(__p), __c, __n); }
|
| 103 |
+
|
| 104 |
+
using ::strchr;
|
| 105 |
+
|
| 106 |
+
inline char*
|
| 107 |
+
strchr(char* __s1, int __n)
|
| 108 |
+
{ return __builtin_strchr(const_cast<const char*>(__s1), __n); }
|
| 109 |
+
|
| 110 |
+
using ::strpbrk;
|
| 111 |
+
|
| 112 |
+
inline char*
|
| 113 |
+
strpbrk(char* __s1, const char* __s2)
|
| 114 |
+
{ return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); }
|
| 115 |
+
|
| 116 |
+
using ::strrchr;
|
| 117 |
+
|
| 118 |
+
inline char*
|
| 119 |
+
strrchr(char* __s1, int __n)
|
| 120 |
+
{ return __builtin_strrchr(const_cast<const char*>(__s1), __n); }
|
| 121 |
+
|
| 122 |
+
using ::strstr;
|
| 123 |
+
|
| 124 |
+
inline char*
|
| 125 |
+
strstr(char* __s1, const char* __s2)
|
| 126 |
+
{ return __builtin_strstr(const_cast<const char*>(__s1), __s2); }
|
| 127 |
+
|
| 128 |
+
_GLIBCXX_END_NAMESPACE
|
| 129 |
+
|
| 130 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/ctgmath
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <ctgmath> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file include/ctgmath
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#pragma GCC system_header
|
| 35 |
+
|
| 36 |
+
#ifndef _GLIBCXX_CTGMATH
|
| 37 |
+
#define _GLIBCXX_CTGMATH 1
|
| 38 |
+
|
| 39 |
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
| 40 |
+
# include <c++0x_warning.h>
|
| 41 |
+
#else
|
| 42 |
+
# include <cmath>
|
| 43 |
+
#endif
|
| 44 |
+
|
| 45 |
+
#endif
|
| 46 |
+
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/ctime
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/ctime
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c time.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 20.5 Date and time
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <cstddef>
|
| 49 |
+
#include <time.h>
|
| 50 |
+
|
| 51 |
+
#ifndef _GLIBCXX_CTIME
|
| 52 |
+
#define _GLIBCXX_CTIME 1
|
| 53 |
+
|
| 54 |
+
// Get rid of those macros defined in <time.h> in lieu of real functions.
|
| 55 |
+
#undef clock
|
| 56 |
+
#undef difftime
|
| 57 |
+
#undef mktime
|
| 58 |
+
#undef time
|
| 59 |
+
#undef asctime
|
| 60 |
+
#undef ctime
|
| 61 |
+
#undef gmtime
|
| 62 |
+
#undef localtime
|
| 63 |
+
#undef strftime
|
| 64 |
+
|
| 65 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 66 |
+
|
| 67 |
+
using ::clock_t;
|
| 68 |
+
using ::time_t;
|
| 69 |
+
using ::tm;
|
| 70 |
+
|
| 71 |
+
using ::clock;
|
| 72 |
+
using ::difftime;
|
| 73 |
+
using ::mktime;
|
| 74 |
+
using ::time;
|
| 75 |
+
using ::asctime;
|
| 76 |
+
using ::ctime;
|
| 77 |
+
using ::gmtime;
|
| 78 |
+
using ::localtime;
|
| 79 |
+
using ::strftime;
|
| 80 |
+
|
| 81 |
+
_GLIBCXX_END_NAMESPACE
|
| 82 |
+
|
| 83 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cwchar
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/cwchar
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c wchar.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: 21.4
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
#include <cstddef>
|
| 50 |
+
|
| 51 |
+
#if _GLIBCXX_HAVE_WCHAR_H
|
| 52 |
+
#include <wchar.h>
|
| 53 |
+
#endif
|
| 54 |
+
|
| 55 |
+
#ifndef _GLIBCXX_CWCHAR
|
| 56 |
+
#define _GLIBCXX_CWCHAR 1
|
| 57 |
+
|
| 58 |
+
// Need to do a bit of trickery here with mbstate_t as char_traits
|
| 59 |
+
// assumes it is in wchar.h, regardless of wchar_t specializations.
|
| 60 |
+
#ifndef _GLIBCXX_HAVE_MBSTATE_T
|
| 61 |
+
extern "C"
|
| 62 |
+
{
|
| 63 |
+
typedef struct
|
| 64 |
+
{
|
| 65 |
+
int __fill[6];
|
| 66 |
+
} mbstate_t;
|
| 67 |
+
}
|
| 68 |
+
#endif
|
| 69 |
+
|
| 70 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 71 |
+
|
| 72 |
+
using ::mbstate_t;
|
| 73 |
+
|
| 74 |
+
_GLIBCXX_END_NAMESPACE
|
| 75 |
+
|
| 76 |
+
// Get rid of those macros defined in <wchar.h> in lieu of real functions.
|
| 77 |
+
#undef btowc
|
| 78 |
+
#undef fgetwc
|
| 79 |
+
#undef fgetws
|
| 80 |
+
#undef fputwc
|
| 81 |
+
#undef fputws
|
| 82 |
+
#undef fwide
|
| 83 |
+
#undef fwprintf
|
| 84 |
+
#undef fwscanf
|
| 85 |
+
#undef getwc
|
| 86 |
+
#undef getwchar
|
| 87 |
+
#undef mbrlen
|
| 88 |
+
#undef mbrtowc
|
| 89 |
+
#undef mbsinit
|
| 90 |
+
#undef mbsrtowcs
|
| 91 |
+
#undef putwc
|
| 92 |
+
#undef putwchar
|
| 93 |
+
#undef swprintf
|
| 94 |
+
#undef swscanf
|
| 95 |
+
#undef ungetwc
|
| 96 |
+
#undef vfwprintf
|
| 97 |
+
#if _GLIBCXX_HAVE_VFWSCANF
|
| 98 |
+
# undef vfwscanf
|
| 99 |
+
#endif
|
| 100 |
+
#undef vswprintf
|
| 101 |
+
#if _GLIBCXX_HAVE_VSWSCANF
|
| 102 |
+
# undef vswscanf
|
| 103 |
+
#endif
|
| 104 |
+
#undef vwprintf
|
| 105 |
+
#if _GLIBCXX_HAVE_VWSCANF
|
| 106 |
+
# undef vwscanf
|
| 107 |
+
#endif
|
| 108 |
+
#undef wcrtomb
|
| 109 |
+
#undef wcscat
|
| 110 |
+
#undef wcschr
|
| 111 |
+
#undef wcscmp
|
| 112 |
+
#undef wcscoll
|
| 113 |
+
#undef wcscpy
|
| 114 |
+
#undef wcscspn
|
| 115 |
+
#undef wcsftime
|
| 116 |
+
#undef wcslen
|
| 117 |
+
#undef wcsncat
|
| 118 |
+
#undef wcsncmp
|
| 119 |
+
#undef wcsncpy
|
| 120 |
+
#undef wcspbrk
|
| 121 |
+
#undef wcsrchr
|
| 122 |
+
#undef wcsrtombs
|
| 123 |
+
#undef wcsspn
|
| 124 |
+
#undef wcsstr
|
| 125 |
+
#undef wcstod
|
| 126 |
+
#if _GLIBCXX_HAVE_WCSTOF
|
| 127 |
+
# undef wcstof
|
| 128 |
+
#endif
|
| 129 |
+
#undef wcstok
|
| 130 |
+
#undef wcstol
|
| 131 |
+
#undef wcstoul
|
| 132 |
+
#undef wcsxfrm
|
| 133 |
+
#undef wctob
|
| 134 |
+
#undef wmemchr
|
| 135 |
+
#undef wmemcmp
|
| 136 |
+
#undef wmemcpy
|
| 137 |
+
#undef wmemmove
|
| 138 |
+
#undef wmemset
|
| 139 |
+
#undef wprintf
|
| 140 |
+
#undef wscanf
|
| 141 |
+
|
| 142 |
+
#if _GLIBCXX_USE_WCHAR_T
|
| 143 |
+
|
| 144 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 145 |
+
|
| 146 |
+
using ::wint_t;
|
| 147 |
+
|
| 148 |
+
using ::btowc;
|
| 149 |
+
using ::fgetwc;
|
| 150 |
+
using ::fgetws;
|
| 151 |
+
using ::fputwc;
|
| 152 |
+
using ::fputws;
|
| 153 |
+
using ::fwide;
|
| 154 |
+
using ::fwprintf;
|
| 155 |
+
using ::fwscanf;
|
| 156 |
+
using ::getwc;
|
| 157 |
+
using ::getwchar;
|
| 158 |
+
using ::mbrlen;
|
| 159 |
+
using ::mbrtowc;
|
| 160 |
+
using ::mbsinit;
|
| 161 |
+
using ::mbsrtowcs;
|
| 162 |
+
using ::putwc;
|
| 163 |
+
using ::putwchar;
|
| 164 |
+
using ::swprintf;
|
| 165 |
+
using ::swscanf;
|
| 166 |
+
using ::ungetwc;
|
| 167 |
+
using ::vfwprintf;
|
| 168 |
+
#if _GLIBCXX_HAVE_VFWSCANF
|
| 169 |
+
using ::vfwscanf;
|
| 170 |
+
#endif
|
| 171 |
+
using ::vswprintf;
|
| 172 |
+
#if _GLIBCXX_HAVE_VSWSCANF
|
| 173 |
+
using ::vswscanf;
|
| 174 |
+
#endif
|
| 175 |
+
using ::vwprintf;
|
| 176 |
+
#if _GLIBCXX_HAVE_VWSCANF
|
| 177 |
+
using ::vwscanf;
|
| 178 |
+
#endif
|
| 179 |
+
using ::wcrtomb;
|
| 180 |
+
using ::wcscat;
|
| 181 |
+
using ::wcscmp;
|
| 182 |
+
using ::wcscoll;
|
| 183 |
+
using ::wcscpy;
|
| 184 |
+
using ::wcscspn;
|
| 185 |
+
using ::wcsftime;
|
| 186 |
+
using ::wcslen;
|
| 187 |
+
using ::wcsncat;
|
| 188 |
+
using ::wcsncmp;
|
| 189 |
+
using ::wcsncpy;
|
| 190 |
+
using ::wcsrtombs;
|
| 191 |
+
using ::wcsspn;
|
| 192 |
+
using ::wcstod;
|
| 193 |
+
#if _GLIBCXX_HAVE_WCSTOF
|
| 194 |
+
using ::wcstof;
|
| 195 |
+
#endif
|
| 196 |
+
using ::wcstok;
|
| 197 |
+
using ::wcstol;
|
| 198 |
+
using ::wcstoul;
|
| 199 |
+
using ::wcsxfrm;
|
| 200 |
+
using ::wctob;
|
| 201 |
+
using ::wmemcmp;
|
| 202 |
+
using ::wmemcpy;
|
| 203 |
+
using ::wmemmove;
|
| 204 |
+
using ::wmemset;
|
| 205 |
+
using ::wprintf;
|
| 206 |
+
using ::wscanf;
|
| 207 |
+
|
| 208 |
+
using ::wcschr;
|
| 209 |
+
|
| 210 |
+
inline wchar_t*
|
| 211 |
+
wcschr(wchar_t* __p, wchar_t __c)
|
| 212 |
+
{ return wcschr(const_cast<const wchar_t*>(__p), __c); }
|
| 213 |
+
|
| 214 |
+
using ::wcspbrk;
|
| 215 |
+
|
| 216 |
+
inline wchar_t*
|
| 217 |
+
wcspbrk(wchar_t* __s1, const wchar_t* __s2)
|
| 218 |
+
{ return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
|
| 219 |
+
|
| 220 |
+
using ::wcsrchr;
|
| 221 |
+
|
| 222 |
+
inline wchar_t*
|
| 223 |
+
wcsrchr(wchar_t* __p, wchar_t __c)
|
| 224 |
+
{ return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
|
| 225 |
+
|
| 226 |
+
using ::wcsstr;
|
| 227 |
+
|
| 228 |
+
inline wchar_t*
|
| 229 |
+
wcsstr(wchar_t* __s1, const wchar_t* __s2)
|
| 230 |
+
{ return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
|
| 231 |
+
|
| 232 |
+
using ::wmemchr;
|
| 233 |
+
|
| 234 |
+
inline wchar_t*
|
| 235 |
+
wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
|
| 236 |
+
{ return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
|
| 237 |
+
|
| 238 |
+
_GLIBCXX_END_NAMESPACE
|
| 239 |
+
|
| 240 |
+
#if _GLIBCXX_USE_C99
|
| 241 |
+
|
| 242 |
+
#undef wcstold
|
| 243 |
+
#undef wcstoll
|
| 244 |
+
#undef wcstoull
|
| 245 |
+
|
| 246 |
+
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
| 247 |
+
|
| 248 |
+
#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
|
| 249 |
+
extern "C" long double
|
| 250 |
+
(wcstold)(const wchar_t * restrict, wchar_t ** restrict);
|
| 251 |
+
#endif
|
| 252 |
+
#if !_GLIBCXX_USE_C99_DYNAMIC
|
| 253 |
+
using ::wcstold;
|
| 254 |
+
#endif
|
| 255 |
+
#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
| 256 |
+
extern "C" long long int
|
| 257 |
+
(wcstoll)(const wchar_t * restrict, wchar_t ** restrict, int);
|
| 258 |
+
extern "C" unsigned long long int
|
| 259 |
+
(wcstoull)(const wchar_t * restrict, wchar_t ** restrict, int);
|
| 260 |
+
#endif
|
| 261 |
+
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
| 262 |
+
using ::wcstoll;
|
| 263 |
+
using ::wcstoull;
|
| 264 |
+
#endif
|
| 265 |
+
|
| 266 |
+
_GLIBCXX_END_NAMESPACE
|
| 267 |
+
|
| 268 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 269 |
+
|
| 270 |
+
using ::__gnu_cxx::wcstold;
|
| 271 |
+
using ::__gnu_cxx::wcstoll;
|
| 272 |
+
using ::__gnu_cxx::wcstoull;
|
| 273 |
+
|
| 274 |
+
_GLIBCXX_END_NAMESPACE
|
| 275 |
+
|
| 276 |
+
#endif
|
| 277 |
+
|
| 278 |
+
#endif //_GLIBCXX_USE_WCHAR_T
|
| 279 |
+
|
| 280 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 281 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 282 |
+
# error C++0x header cannot be included from TR1 header
|
| 283 |
+
# endif
|
| 284 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 285 |
+
# include <tr1_impl/cwchar>
|
| 286 |
+
# else
|
| 287 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 288 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 289 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 290 |
+
# define _GLIBCXX_TR1
|
| 291 |
+
# include <tr1_impl/cwchar>
|
| 292 |
+
# undef _GLIBCXX_TR1
|
| 293 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 294 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 295 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 296 |
+
# endif
|
| 297 |
+
#endif
|
| 298 |
+
|
| 299 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cwctype
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- forwarding header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file include/cwctype
|
| 33 |
+
* This is a Standard C++ Library file. You should @c #include this file
|
| 34 |
+
* in your programs, rather than any of the "*.h" implementation files.
|
| 35 |
+
*
|
| 36 |
+
* This is the C++ version of the Standard C Library header @c wctype.h,
|
| 37 |
+
* and its contents are (mostly) the same as that header, but are all
|
| 38 |
+
* contained in the namespace @c std (except for names which are defined
|
| 39 |
+
* as macros in C).
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
//
|
| 43 |
+
// ISO C++ 14882: <cwctype>
|
| 44 |
+
//
|
| 45 |
+
|
| 46 |
+
#pragma GCC system_header
|
| 47 |
+
|
| 48 |
+
#include <bits/c++config.h>
|
| 49 |
+
|
| 50 |
+
#if _GLIBCXX_HAVE_WCTYPE_H
|
| 51 |
+
#include <wctype.h>
|
| 52 |
+
#endif
|
| 53 |
+
|
| 54 |
+
#ifndef _GLIBCXX_CWCTYPE
|
| 55 |
+
#define _GLIBCXX_CWCTYPE 1
|
| 56 |
+
|
| 57 |
+
// Get rid of those macros defined in <wctype.h> in lieu of real functions.
|
| 58 |
+
#undef iswalnum
|
| 59 |
+
#undef iswalpha
|
| 60 |
+
#if _GLIBCXX_HAVE_ISWBLANK
|
| 61 |
+
# undef iswblank
|
| 62 |
+
#endif
|
| 63 |
+
#undef iswcntrl
|
| 64 |
+
#undef iswctype
|
| 65 |
+
#undef iswdigit
|
| 66 |
+
#undef iswgraph
|
| 67 |
+
#undef iswlower
|
| 68 |
+
#undef iswprint
|
| 69 |
+
#undef iswpunct
|
| 70 |
+
#undef iswspace
|
| 71 |
+
#undef iswupper
|
| 72 |
+
#undef iswxdigit
|
| 73 |
+
#undef towctrans
|
| 74 |
+
#undef towlower
|
| 75 |
+
#undef towupper
|
| 76 |
+
#undef wctrans
|
| 77 |
+
#undef wctype
|
| 78 |
+
|
| 79 |
+
#if _GLIBCXX_USE_WCHAR_T
|
| 80 |
+
|
| 81 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 82 |
+
|
| 83 |
+
using ::wctrans_t;
|
| 84 |
+
using ::wctype_t;
|
| 85 |
+
using ::wint_t;
|
| 86 |
+
|
| 87 |
+
using ::iswalnum;
|
| 88 |
+
using ::iswalpha;
|
| 89 |
+
#if _GLIBCXX_HAVE_ISWBLANK
|
| 90 |
+
using ::iswblank;
|
| 91 |
+
#endif
|
| 92 |
+
using ::iswcntrl;
|
| 93 |
+
using ::iswctype;
|
| 94 |
+
using ::iswdigit;
|
| 95 |
+
using ::iswgraph;
|
| 96 |
+
using ::iswlower;
|
| 97 |
+
using ::iswprint;
|
| 98 |
+
using ::iswpunct;
|
| 99 |
+
using ::iswspace;
|
| 100 |
+
using ::iswupper;
|
| 101 |
+
using ::iswxdigit;
|
| 102 |
+
using ::towctrans;
|
| 103 |
+
using ::towlower;
|
| 104 |
+
using ::towupper;
|
| 105 |
+
using ::wctrans;
|
| 106 |
+
using ::wctype;
|
| 107 |
+
|
| 108 |
+
_GLIBCXX_END_NAMESPACE
|
| 109 |
+
|
| 110 |
+
#endif //_GLIBCXX_USE_WCHAR_T
|
| 111 |
+
|
| 112 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 113 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 114 |
+
# error C++0x header cannot be included from TR1 header
|
| 115 |
+
# endif
|
| 116 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 117 |
+
# include <tr1_impl/cwctype>
|
| 118 |
+
# else
|
| 119 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 120 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 121 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 122 |
+
# define _GLIBCXX_TR1
|
| 123 |
+
# include <tr1_impl/cwctype>
|
| 124 |
+
# undef _GLIBCXX_TR1
|
| 125 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 126 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 127 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 128 |
+
# endif
|
| 129 |
+
#endif
|
| 130 |
+
|
| 131 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cxxabi-forced.h
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// cxxabi.h subset for inclusion by other library headers -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of GCC.
|
| 6 |
+
//
|
| 7 |
+
// GCC is free software; you can redistribute it and/or modify
|
| 8 |
+
// it under the terms of the GNU General Public License as published by
|
| 9 |
+
// the Free Software Foundation; either version 2, or (at your option)
|
| 10 |
+
// any later version.
|
| 11 |
+
//
|
| 12 |
+
// GCC is distributed in the hope that it will be useful,
|
| 13 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 14 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 15 |
+
// GNU General Public License for more details.
|
| 16 |
+
//
|
| 17 |
+
// You should have received a copy of the GNU General Public License
|
| 18 |
+
// along with GCC; see the file COPYING. If not, write to
|
| 19 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 20 |
+
// Boston, MA 02110-1301, USA.
|
| 21 |
+
|
| 22 |
+
// As a special exception, you may use this file as part of a free software
|
| 23 |
+
// library without restriction. Specifically, if other files instantiate
|
| 24 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 25 |
+
// this file and link it with other files to produce an executable, this
|
| 26 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 27 |
+
// the GNU General Public License. This exception does not however
|
| 28 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 29 |
+
// the GNU General Public License.
|
| 30 |
+
|
| 31 |
+
#ifndef _CXXABI_FORCED_H
|
| 32 |
+
#define _CXXABI_FORCED_H 1
|
| 33 |
+
|
| 34 |
+
#pragma GCC visibility push(default)
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
namespace __cxxabiv1
|
| 38 |
+
{
|
| 39 |
+
// A magic placeholder class that can be caught by reference
|
| 40 |
+
// to recognize forced unwinding.
|
| 41 |
+
class __forced_unwind
|
| 42 |
+
{
|
| 43 |
+
virtual ~__forced_unwind() throw();
|
| 44 |
+
virtual void __pure_dummy() = 0; // prevent catch by value
|
| 45 |
+
};
|
| 46 |
+
}
|
| 47 |
+
#endif // __cplusplus
|
| 48 |
+
|
| 49 |
+
#pragma GCC visibility pop
|
| 50 |
+
|
| 51 |
+
#endif // __CXXABI_FORCED_H
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/cxxabi.h
ADDED
|
@@ -0,0 +1,553 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// new abi support -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of GCC.
|
| 6 |
+
//
|
| 7 |
+
// GCC is free software; you can redistribute it and/or modify
|
| 8 |
+
// it under the terms of the GNU General Public License as published by
|
| 9 |
+
// the Free Software Foundation; either version 2, or (at your option)
|
| 10 |
+
// any later version.
|
| 11 |
+
//
|
| 12 |
+
// GCC is distributed in the hope that it will be useful,
|
| 13 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 14 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 15 |
+
// GNU General Public License for more details.
|
| 16 |
+
//
|
| 17 |
+
// You should have received a copy of the GNU General Public License
|
| 18 |
+
// along with GCC; see the file COPYING. If not, write to
|
| 19 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 20 |
+
// Boston, MA 02110-1301, USA.
|
| 21 |
+
|
| 22 |
+
// As a special exception, you may use this file as part of a free software
|
| 23 |
+
// library without restriction. Specifically, if other files instantiate
|
| 24 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 25 |
+
// this file and link it with other files to produce an executable, this
|
| 26 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 27 |
+
// the GNU General Public License. This exception does not however
|
| 28 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 29 |
+
// the GNU General Public License.
|
| 30 |
+
|
| 31 |
+
// Written by Nathan Sidwell, Codesourcery LLC, <nathan@codesourcery.com>
|
| 32 |
+
|
| 33 |
+
/* This file declares the new abi entry points into the runtime. It is not
|
| 34 |
+
normally necessary for user programs to include this header, or use the
|
| 35 |
+
entry points directly. However, this header is available should that be
|
| 36 |
+
needed.
|
| 37 |
+
|
| 38 |
+
Some of the entry points are intended for both C and C++, thus this header
|
| 39 |
+
is includable from both C and C++. Though the C++ specific parts are not
|
| 40 |
+
available in C, naturally enough. */
|
| 41 |
+
|
| 42 |
+
/** @file cxxabi.h
|
| 43 |
+
* The header provides an interface to the C++ ABI.
|
| 44 |
+
*/
|
| 45 |
+
|
| 46 |
+
#ifndef _CXXABI_H
|
| 47 |
+
#define _CXXABI_H 1
|
| 48 |
+
|
| 49 |
+
#pragma GCC visibility push(default)
|
| 50 |
+
|
| 51 |
+
#include <stddef.h>
|
| 52 |
+
#include <bits/cxxabi_tweaks.h>
|
| 53 |
+
#include <cxxabi-forced.h>
|
| 54 |
+
|
| 55 |
+
#ifdef __cplusplus
|
| 56 |
+
#define _GLIBCXX_NOTHROW throw()
|
| 57 |
+
#else
|
| 58 |
+
#define _GLIBCXX_NOTHROW __attribute__((nothrow))
|
| 59 |
+
#endif
|
| 60 |
+
|
| 61 |
+
#ifdef __cplusplus
|
| 62 |
+
namespace __cxxabiv1
|
| 63 |
+
{
|
| 64 |
+
extern "C"
|
| 65 |
+
{
|
| 66 |
+
#endif
|
| 67 |
+
|
| 68 |
+
typedef __cxa_cdtor_return_type (*__cxa_cdtor_type)(void *);
|
| 69 |
+
|
| 70 |
+
// Allocate array.
|
| 71 |
+
void*
|
| 72 |
+
__cxa_vec_new(size_t __element_count, size_t __element_size,
|
| 73 |
+
size_t __padding_size, __cxa_cdtor_type constructor,
|
| 74 |
+
__cxa_cdtor_type destructor);
|
| 75 |
+
|
| 76 |
+
void*
|
| 77 |
+
__cxa_vec_new2(size_t __element_count, size_t __element_size,
|
| 78 |
+
size_t __padding_size, __cxa_cdtor_type constructor,
|
| 79 |
+
__cxa_cdtor_type destructor, void *(*__alloc) (size_t),
|
| 80 |
+
void (*__dealloc) (void*));
|
| 81 |
+
|
| 82 |
+
void*
|
| 83 |
+
__cxa_vec_new3(size_t __element_count, size_t __element_size,
|
| 84 |
+
size_t __padding_size, __cxa_cdtor_type constructor,
|
| 85 |
+
__cxa_cdtor_type destructor, void *(*__alloc) (size_t),
|
| 86 |
+
void (*__dealloc) (void*, size_t));
|
| 87 |
+
|
| 88 |
+
// Construct array.
|
| 89 |
+
__cxa_vec_ctor_return_type
|
| 90 |
+
__cxa_vec_ctor(void* __array_address, size_t __element_count,
|
| 91 |
+
size_t __element_size, __cxa_cdtor_type constructor,
|
| 92 |
+
__cxa_cdtor_type destructor);
|
| 93 |
+
|
| 94 |
+
__cxa_vec_ctor_return_type
|
| 95 |
+
__cxa_vec_cctor(void* dest_array, void* src_array, size_t element_count,
|
| 96 |
+
size_t element_size,
|
| 97 |
+
__cxa_cdtor_return_type (*constructor) (void*, void*),
|
| 98 |
+
__cxa_cdtor_type destructor);
|
| 99 |
+
|
| 100 |
+
// Destruct array.
|
| 101 |
+
void
|
| 102 |
+
__cxa_vec_dtor(void* __array_address, size_t __element_count,
|
| 103 |
+
size_t __element_size, __cxa_cdtor_type destructor);
|
| 104 |
+
|
| 105 |
+
void
|
| 106 |
+
__cxa_vec_cleanup(void* __array_address, size_t __element_count,
|
| 107 |
+
size_t __element_size, __cxa_cdtor_type destructor);
|
| 108 |
+
|
| 109 |
+
// Destruct and release array.
|
| 110 |
+
void
|
| 111 |
+
__cxa_vec_delete(void* __array_address, size_t __element_size,
|
| 112 |
+
size_t __padding_size, __cxa_cdtor_type destructor);
|
| 113 |
+
|
| 114 |
+
void
|
| 115 |
+
__cxa_vec_delete2(void* __array_address, size_t __element_size,
|
| 116 |
+
size_t __padding_size, __cxa_cdtor_type destructor,
|
| 117 |
+
void (*__dealloc) (void*));
|
| 118 |
+
|
| 119 |
+
void
|
| 120 |
+
__cxa_vec_delete3(void* __array_address, size_t __element_size,
|
| 121 |
+
size_t __padding_size, __cxa_cdtor_type destructor,
|
| 122 |
+
void (*__dealloc) (void*, size_t));
|
| 123 |
+
|
| 124 |
+
int
|
| 125 |
+
__cxa_guard_acquire(__guard*);
|
| 126 |
+
|
| 127 |
+
void
|
| 128 |
+
__cxa_guard_release(__guard*);
|
| 129 |
+
|
| 130 |
+
void
|
| 131 |
+
__cxa_guard_abort(__guard*);
|
| 132 |
+
|
| 133 |
+
// Pure virtual functions.
|
| 134 |
+
void
|
| 135 |
+
__cxa_pure_virtual(void);
|
| 136 |
+
|
| 137 |
+
// Exception handling.
|
| 138 |
+
void
|
| 139 |
+
__cxa_bad_cast();
|
| 140 |
+
|
| 141 |
+
void
|
| 142 |
+
__cxa_bad_typeid();
|
| 143 |
+
|
| 144 |
+
// DSO destruction.
|
| 145 |
+
int
|
| 146 |
+
__cxa_atexit(void (*)(void*), void*, void*) _GLIBCXX_NOTHROW;
|
| 147 |
+
|
| 148 |
+
int
|
| 149 |
+
__cxa_finalize(void*);
|
| 150 |
+
|
| 151 |
+
// Demangling routines.
|
| 152 |
+
char*
|
| 153 |
+
__cxa_demangle(const char* __mangled_name, char* __output_buffer,
|
| 154 |
+
size_t* __length, int* __status);
|
| 155 |
+
#ifdef __cplusplus
|
| 156 |
+
}
|
| 157 |
+
} // namespace __cxxabiv1
|
| 158 |
+
#endif
|
| 159 |
+
|
| 160 |
+
#ifdef __cplusplus
|
| 161 |
+
|
| 162 |
+
#include <typeinfo>
|
| 163 |
+
|
| 164 |
+
namespace __cxxabiv1
|
| 165 |
+
{
|
| 166 |
+
// Type information for int, float etc.
|
| 167 |
+
class __fundamental_type_info : public std::type_info
|
| 168 |
+
{
|
| 169 |
+
public:
|
| 170 |
+
explicit
|
| 171 |
+
__fundamental_type_info(const char* __n) : std::type_info(__n) { }
|
| 172 |
+
|
| 173 |
+
virtual
|
| 174 |
+
~__fundamental_type_info();
|
| 175 |
+
};
|
| 176 |
+
|
| 177 |
+
// Type information for array objects.
|
| 178 |
+
class __array_type_info : public std::type_info
|
| 179 |
+
{
|
| 180 |
+
public:
|
| 181 |
+
explicit
|
| 182 |
+
__array_type_info(const char* __n) : std::type_info(__n) { }
|
| 183 |
+
|
| 184 |
+
virtual
|
| 185 |
+
~__array_type_info();
|
| 186 |
+
};
|
| 187 |
+
|
| 188 |
+
// Type information for functions (both member and non-member).
|
| 189 |
+
class __function_type_info : public std::type_info
|
| 190 |
+
{
|
| 191 |
+
public:
|
| 192 |
+
explicit
|
| 193 |
+
__function_type_info(const char* __n) : std::type_info(__n) { }
|
| 194 |
+
|
| 195 |
+
virtual
|
| 196 |
+
~__function_type_info();
|
| 197 |
+
|
| 198 |
+
protected:
|
| 199 |
+
// Implementation defined member function.
|
| 200 |
+
virtual bool
|
| 201 |
+
__is_function_p() const;
|
| 202 |
+
};
|
| 203 |
+
|
| 204 |
+
// Type information for enumerations.
|
| 205 |
+
class __enum_type_info : public std::type_info
|
| 206 |
+
{
|
| 207 |
+
public:
|
| 208 |
+
explicit
|
| 209 |
+
__enum_type_info(const char* __n) : std::type_info(__n) { }
|
| 210 |
+
|
| 211 |
+
virtual
|
| 212 |
+
~__enum_type_info();
|
| 213 |
+
};
|
| 214 |
+
|
| 215 |
+
// Common type information for simple pointers and pointers to member.
|
| 216 |
+
class __pbase_type_info : public std::type_info
|
| 217 |
+
{
|
| 218 |
+
public:
|
| 219 |
+
unsigned int __flags; // Qualification of the target object.
|
| 220 |
+
const std::type_info* __pointee; // Type of pointed to object.
|
| 221 |
+
|
| 222 |
+
explicit
|
| 223 |
+
__pbase_type_info(const char* __n, int __quals,
|
| 224 |
+
const std::type_info* __type)
|
| 225 |
+
: std::type_info(__n), __flags(__quals), __pointee(__type)
|
| 226 |
+
{ }
|
| 227 |
+
|
| 228 |
+
virtual
|
| 229 |
+
~__pbase_type_info();
|
| 230 |
+
|
| 231 |
+
// Implementation defined type.
|
| 232 |
+
enum __masks
|
| 233 |
+
{
|
| 234 |
+
__const_mask = 0x1,
|
| 235 |
+
__volatile_mask = 0x2,
|
| 236 |
+
__restrict_mask = 0x4,
|
| 237 |
+
__incomplete_mask = 0x8,
|
| 238 |
+
__incomplete_class_mask = 0x10
|
| 239 |
+
};
|
| 240 |
+
|
| 241 |
+
protected:
|
| 242 |
+
__pbase_type_info(const __pbase_type_info&);
|
| 243 |
+
|
| 244 |
+
__pbase_type_info&
|
| 245 |
+
operator=(const __pbase_type_info&);
|
| 246 |
+
|
| 247 |
+
// Implementation defined member functions.
|
| 248 |
+
virtual bool
|
| 249 |
+
__do_catch(const std::type_info* __thr_type, void** __thr_obj,
|
| 250 |
+
unsigned int __outer) const;
|
| 251 |
+
|
| 252 |
+
inline virtual bool
|
| 253 |
+
__pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
|
| 254 |
+
unsigned __outer) const;
|
| 255 |
+
};
|
| 256 |
+
|
| 257 |
+
// Type information for simple pointers.
|
| 258 |
+
class __pointer_type_info : public __pbase_type_info
|
| 259 |
+
{
|
| 260 |
+
public:
|
| 261 |
+
explicit
|
| 262 |
+
__pointer_type_info(const char* __n, int __quals,
|
| 263 |
+
const std::type_info* __type)
|
| 264 |
+
: __pbase_type_info (__n, __quals, __type) { }
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
virtual
|
| 268 |
+
~__pointer_type_info();
|
| 269 |
+
|
| 270 |
+
protected:
|
| 271 |
+
// Implementation defined member functions.
|
| 272 |
+
virtual bool
|
| 273 |
+
__is_pointer_p() const;
|
| 274 |
+
|
| 275 |
+
virtual bool
|
| 276 |
+
__pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
|
| 277 |
+
unsigned __outer) const;
|
| 278 |
+
};
|
| 279 |
+
|
| 280 |
+
class __class_type_info;
|
| 281 |
+
|
| 282 |
+
// Type information for a pointer to member variable.
|
| 283 |
+
class __pointer_to_member_type_info : public __pbase_type_info
|
| 284 |
+
{
|
| 285 |
+
public:
|
| 286 |
+
__class_type_info* __context; // Class of the member.
|
| 287 |
+
|
| 288 |
+
explicit
|
| 289 |
+
__pointer_to_member_type_info(const char* __n, int __quals,
|
| 290 |
+
const std::type_info* __type,
|
| 291 |
+
__class_type_info* __klass)
|
| 292 |
+
: __pbase_type_info(__n, __quals, __type), __context(__klass) { }
|
| 293 |
+
|
| 294 |
+
virtual
|
| 295 |
+
~__pointer_to_member_type_info();
|
| 296 |
+
|
| 297 |
+
protected:
|
| 298 |
+
__pointer_to_member_type_info(const __pointer_to_member_type_info&);
|
| 299 |
+
|
| 300 |
+
__pointer_to_member_type_info&
|
| 301 |
+
operator=(const __pointer_to_member_type_info&);
|
| 302 |
+
|
| 303 |
+
// Implementation defined member function.
|
| 304 |
+
virtual bool
|
| 305 |
+
__pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
|
| 306 |
+
unsigned __outer) const;
|
| 307 |
+
};
|
| 308 |
+
|
| 309 |
+
// Helper class for __vmi_class_type.
|
| 310 |
+
class __base_class_type_info
|
| 311 |
+
{
|
| 312 |
+
public:
|
| 313 |
+
const __class_type_info* __base_type; // Base class type.
|
| 314 |
+
long __offset_flags; // Offset and info.
|
| 315 |
+
|
| 316 |
+
enum __offset_flags_masks
|
| 317 |
+
{
|
| 318 |
+
__virtual_mask = 0x1,
|
| 319 |
+
__public_mask = 0x2,
|
| 320 |
+
__hwm_bit = 2,
|
| 321 |
+
__offset_shift = 8 // Bits to shift offset.
|
| 322 |
+
};
|
| 323 |
+
|
| 324 |
+
// Implementation defined member functions.
|
| 325 |
+
bool
|
| 326 |
+
__is_virtual_p() const
|
| 327 |
+
{ return __offset_flags & __virtual_mask; }
|
| 328 |
+
|
| 329 |
+
bool
|
| 330 |
+
__is_public_p() const
|
| 331 |
+
{ return __offset_flags & __public_mask; }
|
| 332 |
+
|
| 333 |
+
ptrdiff_t
|
| 334 |
+
__offset() const
|
| 335 |
+
{
|
| 336 |
+
// This shift, being of a signed type, is implementation
|
| 337 |
+
// defined. GCC implements such shifts as arithmetic, which is
|
| 338 |
+
// what we want.
|
| 339 |
+
return static_cast<ptrdiff_t>(__offset_flags) >> __offset_shift;
|
| 340 |
+
}
|
| 341 |
+
};
|
| 342 |
+
|
| 343 |
+
// Type information for a class.
|
| 344 |
+
class __class_type_info : public std::type_info
|
| 345 |
+
{
|
| 346 |
+
public:
|
| 347 |
+
explicit
|
| 348 |
+
__class_type_info (const char *__n) : type_info(__n) { }
|
| 349 |
+
|
| 350 |
+
virtual
|
| 351 |
+
~__class_type_info ();
|
| 352 |
+
|
| 353 |
+
// Implementation defined types.
|
| 354 |
+
// The type sub_kind tells us about how a base object is contained
|
| 355 |
+
// within a derived object. We often do this lazily, hence the
|
| 356 |
+
// UNKNOWN value. At other times we may use NOT_CONTAINED to mean
|
| 357 |
+
// not publicly contained.
|
| 358 |
+
enum __sub_kind
|
| 359 |
+
{
|
| 360 |
+
// We have no idea.
|
| 361 |
+
__unknown = 0,
|
| 362 |
+
|
| 363 |
+
// Not contained within us (in some circumstances this might
|
| 364 |
+
// mean not contained publicly)
|
| 365 |
+
__not_contained,
|
| 366 |
+
|
| 367 |
+
// Contained ambiguously.
|
| 368 |
+
__contained_ambig,
|
| 369 |
+
|
| 370 |
+
// Via a virtual path.
|
| 371 |
+
__contained_virtual_mask = __base_class_type_info::__virtual_mask,
|
| 372 |
+
|
| 373 |
+
// Via a public path.
|
| 374 |
+
__contained_public_mask = __base_class_type_info::__public_mask,
|
| 375 |
+
|
| 376 |
+
// Contained within us.
|
| 377 |
+
__contained_mask = 1 << __base_class_type_info::__hwm_bit,
|
| 378 |
+
|
| 379 |
+
__contained_private = __contained_mask,
|
| 380 |
+
__contained_public = __contained_mask | __contained_public_mask
|
| 381 |
+
};
|
| 382 |
+
|
| 383 |
+
struct __upcast_result;
|
| 384 |
+
struct __dyncast_result;
|
| 385 |
+
|
| 386 |
+
protected:
|
| 387 |
+
// Implementation defined member functions.
|
| 388 |
+
virtual bool
|
| 389 |
+
__do_upcast(const __class_type_info* __dst_type, void**__obj_ptr) const;
|
| 390 |
+
|
| 391 |
+
virtual bool
|
| 392 |
+
__do_catch(const type_info* __thr_type, void** __thr_obj,
|
| 393 |
+
unsigned __outer) const;
|
| 394 |
+
|
| 395 |
+
public:
|
| 396 |
+
// Helper for upcast. See if DST is us, or one of our bases.
|
| 397 |
+
// Return false if not found, true if found.
|
| 398 |
+
virtual bool
|
| 399 |
+
__do_upcast(const __class_type_info* __dst, const void* __obj,
|
| 400 |
+
__upcast_result& __restrict __result) const;
|
| 401 |
+
|
| 402 |
+
// Indicate whether SRC_PTR of type SRC_TYPE is contained publicly
|
| 403 |
+
// within OBJ_PTR. OBJ_PTR points to a base object of our type,
|
| 404 |
+
// which is the destination type. SRC2DST indicates how SRC
|
| 405 |
+
// objects might be contained within this type. If SRC_PTR is one
|
| 406 |
+
// of our SRC_TYPE bases, indicate the virtuality. Returns
|
| 407 |
+
// not_contained for non containment or private containment.
|
| 408 |
+
inline __sub_kind
|
| 409 |
+
__find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
|
| 410 |
+
const __class_type_info* __src_type,
|
| 411 |
+
const void* __src_ptr) const;
|
| 412 |
+
|
| 413 |
+
// Helper for dynamic cast. ACCESS_PATH gives the access from the
|
| 414 |
+
// most derived object to this base. DST_TYPE indicates the
|
| 415 |
+
// desired type we want. OBJ_PTR points to a base of our type
|
| 416 |
+
// within the complete object. SRC_TYPE indicates the static type
|
| 417 |
+
// started from and SRC_PTR points to that base within the most
|
| 418 |
+
// derived object. Fill in RESULT with what we find. Return true
|
| 419 |
+
// if we have located an ambiguous match.
|
| 420 |
+
virtual bool
|
| 421 |
+
__do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
|
| 422 |
+
const __class_type_info* __dst_type, const void* __obj_ptr,
|
| 423 |
+
const __class_type_info* __src_type, const void* __src_ptr,
|
| 424 |
+
__dyncast_result& __result) const;
|
| 425 |
+
|
| 426 |
+
// Helper for find_public_subobj. SRC2DST indicates how SRC_TYPE
|
| 427 |
+
// bases are inherited by the type started from -- which is not
|
| 428 |
+
// necessarily the current type. The current type will be a base
|
| 429 |
+
// of the destination type. OBJ_PTR points to the current base.
|
| 430 |
+
virtual __sub_kind
|
| 431 |
+
__do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
|
| 432 |
+
const __class_type_info* __src_type,
|
| 433 |
+
const void* __src_ptr) const;
|
| 434 |
+
};
|
| 435 |
+
|
| 436 |
+
// Type information for a class with a single non-virtual base.
|
| 437 |
+
class __si_class_type_info : public __class_type_info
|
| 438 |
+
{
|
| 439 |
+
public:
|
| 440 |
+
const __class_type_info* __base_type;
|
| 441 |
+
|
| 442 |
+
explicit
|
| 443 |
+
__si_class_type_info(const char *__n, const __class_type_info *__base)
|
| 444 |
+
: __class_type_info(__n), __base_type(__base) { }
|
| 445 |
+
|
| 446 |
+
virtual
|
| 447 |
+
~__si_class_type_info();
|
| 448 |
+
|
| 449 |
+
protected:
|
| 450 |
+
__si_class_type_info(const __si_class_type_info&);
|
| 451 |
+
|
| 452 |
+
__si_class_type_info&
|
| 453 |
+
operator=(const __si_class_type_info&);
|
| 454 |
+
|
| 455 |
+
// Implementation defined member functions.
|
| 456 |
+
virtual bool
|
| 457 |
+
__do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
|
| 458 |
+
const __class_type_info* __dst_type, const void* __obj_ptr,
|
| 459 |
+
const __class_type_info* __src_type, const void* __src_ptr,
|
| 460 |
+
__dyncast_result& __result) const;
|
| 461 |
+
|
| 462 |
+
virtual __sub_kind
|
| 463 |
+
__do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
|
| 464 |
+
const __class_type_info* __src_type,
|
| 465 |
+
const void* __sub_ptr) const;
|
| 466 |
+
|
| 467 |
+
virtual bool
|
| 468 |
+
__do_upcast(const __class_type_info*__dst, const void*__obj,
|
| 469 |
+
__upcast_result& __restrict __result) const;
|
| 470 |
+
};
|
| 471 |
+
|
| 472 |
+
// Type information for a class with multiple and/or virtual bases.
|
| 473 |
+
class __vmi_class_type_info : public __class_type_info
|
| 474 |
+
{
|
| 475 |
+
public:
|
| 476 |
+
unsigned int __flags; // Details about the class hierarchy.
|
| 477 |
+
unsigned int __base_count; // Number of direct bases.
|
| 478 |
+
|
| 479 |
+
// The array of bases uses the trailing array struct hack so this
|
| 480 |
+
// class is not constructable with a normal constructor. It is
|
| 481 |
+
// internally generated by the compiler.
|
| 482 |
+
__base_class_type_info __base_info[1]; // Array of bases.
|
| 483 |
+
|
| 484 |
+
explicit
|
| 485 |
+
__vmi_class_type_info(const char* __n, int ___flags)
|
| 486 |
+
: __class_type_info(__n), __flags(___flags), __base_count(0) { }
|
| 487 |
+
|
| 488 |
+
virtual
|
| 489 |
+
~__vmi_class_type_info();
|
| 490 |
+
|
| 491 |
+
// Implementation defined types.
|
| 492 |
+
enum __flags_masks
|
| 493 |
+
{
|
| 494 |
+
__non_diamond_repeat_mask = 0x1, // Distinct instance of repeated base.
|
| 495 |
+
__diamond_shaped_mask = 0x2, // Diamond shaped multiple inheritance.
|
| 496 |
+
__flags_unknown_mask = 0x10
|
| 497 |
+
};
|
| 498 |
+
|
| 499 |
+
protected:
|
| 500 |
+
// Implementation defined member functions.
|
| 501 |
+
virtual bool
|
| 502 |
+
__do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
|
| 503 |
+
const __class_type_info* __dst_type, const void* __obj_ptr,
|
| 504 |
+
const __class_type_info* __src_type, const void* __src_ptr,
|
| 505 |
+
__dyncast_result& __result) const;
|
| 506 |
+
|
| 507 |
+
virtual __sub_kind
|
| 508 |
+
__do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
|
| 509 |
+
const __class_type_info* __src_type,
|
| 510 |
+
const void* __src_ptr) const;
|
| 511 |
+
|
| 512 |
+
virtual bool
|
| 513 |
+
__do_upcast(const __class_type_info* __dst, const void* __obj,
|
| 514 |
+
__upcast_result& __restrict __result) const;
|
| 515 |
+
};
|
| 516 |
+
|
| 517 |
+
// Dynamic cast runtime.
|
| 518 |
+
// src2dst has the following possible values
|
| 519 |
+
// >-1: src_type is a unique public non-virtual base of dst_type
|
| 520 |
+
// dst_ptr + src2dst == src_ptr
|
| 521 |
+
// -1: unspecified relationship
|
| 522 |
+
// -2: src_type is not a public base of dst_type
|
| 523 |
+
// -3: src_type is a multiple public non-virtual base of dst_type
|
| 524 |
+
extern "C" void*
|
| 525 |
+
__dynamic_cast(const void* __src_ptr, // Starting object.
|
| 526 |
+
const __class_type_info* __src_type, // Static type of object.
|
| 527 |
+
const __class_type_info* __dst_type, // Desired target type.
|
| 528 |
+
ptrdiff_t __src2dst); // How src and dst are related.
|
| 529 |
+
|
| 530 |
+
|
| 531 |
+
// Returns the type_info for the currently handled exception [15.3/8], or
|
| 532 |
+
// null if there is none.
|
| 533 |
+
extern "C" std::type_info*
|
| 534 |
+
__cxa_current_exception_type();
|
| 535 |
+
|
| 536 |
+
// A magic placeholder class that can be caught by reference
|
| 537 |
+
// to recognize foreign exceptions.
|
| 538 |
+
class __foreign_exception
|
| 539 |
+
{
|
| 540 |
+
virtual ~__foreign_exception() throw();
|
| 541 |
+
virtual void __pure_dummy() = 0; // prevent catch by value
|
| 542 |
+
};
|
| 543 |
+
|
| 544 |
+
} // namespace __cxxabiv1
|
| 545 |
+
|
| 546 |
+
// User programs should use the alias `abi'.
|
| 547 |
+
namespace abi = __cxxabiv1;
|
| 548 |
+
|
| 549 |
+
#endif // __cplusplus
|
| 550 |
+
|
| 551 |
+
#pragma GCC visibility pop
|
| 552 |
+
|
| 553 |
+
#endif // __CXXABI_H
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/deque
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <deque> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
| 4 |
+
// Free Software Foundation, Inc.
|
| 5 |
+
//
|
| 6 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 7 |
+
// software; you can redistribute it and/or modify it under the
|
| 8 |
+
// terms of the GNU General Public License as published by the
|
| 9 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 10 |
+
// any later version.
|
| 11 |
+
|
| 12 |
+
// This library is distributed in the hope that it will be useful,
|
| 13 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 14 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 15 |
+
// GNU General Public License for more details.
|
| 16 |
+
|
| 17 |
+
// You should have received a copy of the GNU General Public License
|
| 18 |
+
// along with this library; see the file COPYING. If not, write to
|
| 19 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 20 |
+
// Boston, MA 02110-1301, USA.
|
| 21 |
+
|
| 22 |
+
// As a special exception, you may use this file as part of a free software
|
| 23 |
+
// library without restriction. Specifically, if other files instantiate
|
| 24 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 25 |
+
// this file and link it with other files to produce an executable, this
|
| 26 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 27 |
+
// the GNU General Public License. This exception does not however
|
| 28 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 29 |
+
// the GNU General Public License.
|
| 30 |
+
|
| 31 |
+
/*
|
| 32 |
+
*
|
| 33 |
+
* Copyright (c) 1994
|
| 34 |
+
* Hewlett-Packard Company
|
| 35 |
+
*
|
| 36 |
+
* Permission to use, copy, modify, distribute and sell this software
|
| 37 |
+
* and its documentation for any purpose is hereby granted without fee,
|
| 38 |
+
* provided that the above copyright notice appear in all copies and
|
| 39 |
+
* that both that copyright notice and this permission notice appear
|
| 40 |
+
* in supporting documentation. Hewlett-Packard Company makes no
|
| 41 |
+
* representations about the suitability of this software for any
|
| 42 |
+
* purpose. It is provided "as is" without express or implied warranty.
|
| 43 |
+
*
|
| 44 |
+
*
|
| 45 |
+
* Copyright (c) 1997
|
| 46 |
+
* Silicon Graphics Computer Systems, Inc.
|
| 47 |
+
*
|
| 48 |
+
* Permission to use, copy, modify, distribute and sell this software
|
| 49 |
+
* and its documentation for any purpose is hereby granted without fee,
|
| 50 |
+
* provided that the above copyright notice appear in all copies and
|
| 51 |
+
* that both that copyright notice and this permission notice appear
|
| 52 |
+
* in supporting documentation. Silicon Graphics makes no
|
| 53 |
+
* representations about the suitability of this software for any
|
| 54 |
+
* purpose. It is provided "as is" without express or implied warranty.
|
| 55 |
+
*/
|
| 56 |
+
|
| 57 |
+
/** @file include/deque
|
| 58 |
+
* This is a Standard C++ Library header.
|
| 59 |
+
*/
|
| 60 |
+
|
| 61 |
+
#ifndef _GLIBCXX_DEQUE
|
| 62 |
+
#define _GLIBCXX_DEQUE 1
|
| 63 |
+
|
| 64 |
+
#pragma GCC system_header
|
| 65 |
+
|
| 66 |
+
#include <bits/stl_algobase.h>
|
| 67 |
+
#include <bits/allocator.h>
|
| 68 |
+
#include <bits/stl_construct.h>
|
| 69 |
+
#include <bits/stl_uninitialized.h>
|
| 70 |
+
#include <bits/stl_deque.h>
|
| 71 |
+
|
| 72 |
+
#ifndef _GLIBCXX_EXPORT_TEMPLATE
|
| 73 |
+
# include <bits/deque.tcc>
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
#ifdef _GLIBC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, 1998, 1999, 2000, 2001, 2002, 2003,
|
| 4 |
+
// 2004, 2005, 2006, 2007
|
| 5 |
+
// Free Software Foundation
|
| 6 |
+
//
|
| 7 |
+
// This file is part of GCC.
|
| 8 |
+
//
|
| 9 |
+
// GCC is free software; you can redistribute it and/or modify
|
| 10 |
+
// it under the terms of the GNU General Public License as published by
|
| 11 |
+
// the Free Software Foundation; either version 2, or (at your option)
|
| 12 |
+
// any later version.
|
| 13 |
+
//
|
| 14 |
+
// GCC is distributed in the hope that it will be useful,
|
| 15 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 16 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 17 |
+
// GNU General Public License for more details.
|
| 18 |
+
//
|
| 19 |
+
// You should have received a copy of the GNU General Public License
|
| 20 |
+
// along with GCC; see the file COPYING. If not, write to
|
| 21 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 22 |
+
// Boston, MA 02110-1301, USA.
|
| 23 |
+
|
| 24 |
+
// As a special exception, you may use this file as part of a free software
|
| 25 |
+
// library without restriction. Specifically, if other files instantiate
|
| 26 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 27 |
+
// this file and link it with other files to produce an executable, this
|
| 28 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 29 |
+
// the GNU General Public License. This exception does not however
|
| 30 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 31 |
+
// the GNU General Public License.
|
| 32 |
+
|
| 33 |
+
/** @file exception
|
| 34 |
+
* This is a Standard C++ Library header.
|
| 35 |
+
*/
|
| 36 |
+
|
| 37 |
+
#ifndef __EXCEPTION__
|
| 38 |
+
#define __EXCEPTION__
|
| 39 |
+
|
| 40 |
+
#pragma GCC visibility push(default)
|
| 41 |
+
|
| 42 |
+
#include <bits/c++config.h>
|
| 43 |
+
|
| 44 |
+
extern "C++" {
|
| 45 |
+
|
| 46 |
+
namespace std
|
| 47 |
+
{
|
| 48 |
+
/**
|
| 49 |
+
* @brief Base class for all library exceptions.
|
| 50 |
+
*
|
| 51 |
+
* This is the base class for all exceptions thrown by the standard
|
| 52 |
+
* library, and by certain language expressions. You are free to derive
|
| 53 |
+
* your own %exception classes, or use a different hierarchy, or to
|
| 54 |
+
* throw non-class data (e.g., fundamental types).
|
| 55 |
+
*/
|
| 56 |
+
class exception
|
| 57 |
+
{
|
| 58 |
+
public:
|
| 59 |
+
exception() throw() { }
|
| 60 |
+
virtual ~exception() throw();
|
| 61 |
+
|
| 62 |
+
/** Returns a C-style character string describing the general cause
|
| 63 |
+
* of the current error. */
|
| 64 |
+
virtual const char* what() const throw();
|
| 65 |
+
};
|
| 66 |
+
|
| 67 |
+
/** If an %exception is thrown which is not listed in a function's
|
| 68 |
+
* %exception specification, one of these may be thrown. */
|
| 69 |
+
class bad_exception : public exception
|
| 70 |
+
{
|
| 71 |
+
public:
|
| 72 |
+
bad_exception() throw() { }
|
| 73 |
+
|
| 74 |
+
// This declaration is not useless:
|
| 75 |
+
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
|
| 76 |
+
virtual ~bad_exception() throw();
|
| 77 |
+
|
| 78 |
+
// See comment in eh_exception.cc.
|
| 79 |
+
virtual const char* what() const throw();
|
| 80 |
+
};
|
| 81 |
+
|
| 82 |
+
/// If you write a replacement %terminate handler, it must be of this type.
|
| 83 |
+
typedef void (*terminate_handler) ();
|
| 84 |
+
|
| 85 |
+
/// If you write a replacement %unexpected handler, it must be of this type.
|
| 86 |
+
typedef void (*unexpected_handler) ();
|
| 87 |
+
|
| 88 |
+
/// Takes a new handler function as an argument, returns the old function.
|
| 89 |
+
terminate_handler set_terminate(terminate_handler) throw();
|
| 90 |
+
|
| 91 |
+
/** The runtime will call this function if %exception handling must be
|
| 92 |
+
* abandoned for any reason. It can also be called by the user. */
|
| 93 |
+
void terminate() __attribute__ ((__noreturn__));
|
| 94 |
+
|
| 95 |
+
/// Takes a new handler function as an argument, returns the old function.
|
| 96 |
+
unexpected_handler set_unexpected(unexpected_handler) throw();
|
| 97 |
+
|
| 98 |
+
/** The runtime will call this function if an %exception is thrown which
|
| 99 |
+
* violates the function's %exception specification. */
|
| 100 |
+
void unexpected() __attribute__ ((__noreturn__));
|
| 101 |
+
|
| 102 |
+
/** [18.6.4]/1: "Returns true after completing evaluation of a
|
| 103 |
+
* throw-expression until either completing initialization of the
|
| 104 |
+
* exception-declaration in the matching handler or entering @c unexpected()
|
| 105 |
+
* due to the throw; or after entering @c terminate() for any reason
|
| 106 |
+
* other than an explicit call to @c terminate(). [Note: This includes
|
| 107 |
+
* stack unwinding [15.2]. end note]"
|
| 108 |
+
*
|
| 109 |
+
* 2: "When @c uncaught_exception() is true, throwing an %exception can
|
| 110 |
+
* result in a call of @c terminate() (15.5.1)."
|
| 111 |
+
*/
|
| 112 |
+
bool uncaught_exception() throw();
|
| 113 |
+
} // namespace std
|
| 114 |
+
|
| 115 |
+
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
| 116 |
+
|
| 117 |
+
/** A replacement for the standard terminate_handler which prints more
|
| 118 |
+
information about the terminating exception (if any) on stderr. Call
|
| 119 |
+
@code
|
| 120 |
+
std::set_terminate (__gnu_cxx::__verbose_terminate_handler)
|
| 121 |
+
@endcode
|
| 122 |
+
to use. For more info, see
|
| 123 |
+
http://gcc.gnu.org/onlinedocs/libstdc++/19_diagnostics/howto.html#4
|
| 124 |
+
|
| 125 |
+
In 3.4 and later, this is on by default.
|
| 126 |
+
*/
|
| 127 |
+
void __verbose_terminate_handler ();
|
| 128 |
+
|
| 129 |
+
_GLIBCXX_END_NAMESPACE
|
| 130 |
+
|
| 131 |
+
} // extern "C++"
|
| 132 |
+
|
| 133 |
+
#pragma GCC visibility pop
|
| 134 |
+
|
| 135 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/exception_defines.h
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -fno-exceptions Support -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License along
|
| 17 |
+
// with this library; see the file COPYING. If not, write to the Free
|
| 18 |
+
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
| 19 |
+
// USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
//
|
| 31 |
+
// ISO C++ 14882: 19.1 Exception classes
|
| 32 |
+
//
|
| 33 |
+
|
| 34 |
+
/** @file exception_defines.h
|
| 35 |
+
* This is a Standard C++ Library header.
|
| 36 |
+
*/
|
| 37 |
+
|
| 38 |
+
#ifndef _EXCEPTION_DEFINES_H
|
| 39 |
+
#define _EXCEPTION_DEFINES_H 1
|
| 40 |
+
|
| 41 |
+
#ifndef __EXCEPTIONS
|
| 42 |
+
// Iff -fno-exceptions, transform error handling code to work without it.
|
| 43 |
+
# define try if (true)
|
| 44 |
+
# define catch(X) if (false)
|
| 45 |
+
# define __throw_exception_again
|
| 46 |
+
#else
|
| 47 |
+
// Else proceed normally.
|
| 48 |
+
# define __throw_exception_again throw
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
#endif
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/fenv.h
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// -*- C++ -*- compatibility header.
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
| 4 |
+
//
|
| 5 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 6 |
+
// software; you can redistribute it and/or modify it under the
|
| 7 |
+
// terms of the GNU General Public License as published by the
|
| 8 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 9 |
+
// any later version.
|
| 10 |
+
|
| 11 |
+
// This library is distributed in the hope that it will be useful,
|
| 12 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
// GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
// You should have received a copy of the GNU General Public License
|
| 17 |
+
// along with this library; see the file COPYING. If not, write to
|
| 18 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 19 |
+
// Boston, MA 02110-1301, USA.
|
| 20 |
+
|
| 21 |
+
// As a special exception, you may use this file as part of a free software
|
| 22 |
+
// library without restriction. Specifically, if other files instantiate
|
| 23 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 24 |
+
// this file and link it with other files to produce an executable, this
|
| 25 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 26 |
+
// the GNU General Public License. This exception does not however
|
| 27 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 28 |
+
// the GNU General Public License.
|
| 29 |
+
|
| 30 |
+
/** @file fenv.h
|
| 31 |
+
* This is a Standard C++ Library header.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
#ifndef _GLIBCXX_FENV_H
|
| 35 |
+
#define _GLIBCXX_FENV_H 1
|
| 36 |
+
|
| 37 |
+
#pragma GCC system_header
|
| 38 |
+
|
| 39 |
+
#include <bits/c++config.h>
|
| 40 |
+
#if _GLIBCXX_HAVE_FENV_H
|
| 41 |
+
# include_next <fenv.h>
|
| 42 |
+
#endif
|
| 43 |
+
|
| 44 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 45 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 46 |
+
# error C++0x header cannot be included from TR1 header
|
| 47 |
+
# endif
|
| 48 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 49 |
+
# include <tr1_impl/cfenv>
|
| 50 |
+
# else
|
| 51 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 52 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 53 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 54 |
+
# define _GLIBCXX_TR1
|
| 55 |
+
# include <tr1_impl/cfenv>
|
| 56 |
+
# undef _GLIBCXX_TR1
|
| 57 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 58 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 59 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 60 |
+
# endif
|
| 61 |
+
#endif
|
| 62 |
+
|
| 63 |
+
#endif // _GLIBCXX_FENV_H
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/fstream
ADDED
|
@@ -0,0 +1,786 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// File based streams -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007, 2008
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file fstream
|
| 33 |
+
* This is a Standard C++ Library header.
|
| 34 |
+
*/
|
| 35 |
+
|
| 36 |
+
//
|
| 37 |
+
// ISO C++ 14882: 27.8 File-based streams
|
| 38 |
+
//
|
| 39 |
+
|
| 40 |
+
#ifndef _GLIBCXX_FSTREAM
|
| 41 |
+
#define _GLIBCXX_FSTREAM 1
|
| 42 |
+
|
| 43 |
+
#pragma GCC system_header
|
| 44 |
+
|
| 45 |
+
#include <istream>
|
| 46 |
+
#include <ostream>
|
| 47 |
+
#include <bits/codecvt.h>
|
| 48 |
+
#include <cstdio> // For BUFSIZ
|
| 49 |
+
#include <bits/basic_file.h> // For __basic_file, __c_lock
|
| 50 |
+
|
| 51 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 52 |
+
|
| 53 |
+
// [27.8.1.1] template class basic_filebuf
|
| 54 |
+
/**
|
| 55 |
+
* @brief The actual work of input and output (for files).
|
| 56 |
+
*
|
| 57 |
+
* This class associates both its input and output sequence with an
|
| 58 |
+
* external disk file, and maintains a joint file position for both
|
| 59 |
+
* sequences. Many of its semantics are described in terms of similar
|
| 60 |
+
* behavior in the Standard C Library's @c FILE streams.
|
| 61 |
+
*/
|
| 62 |
+
// Requirements on traits_type, specific to this class:
|
| 63 |
+
// traits_type::pos_type must be fpos<traits_type::state_type>
|
| 64 |
+
// traits_type::off_type must be streamoff
|
| 65 |
+
// traits_type::state_type must be Assignable and DefaultConstructible,
|
| 66 |
+
// and traits_type::state_type() must be the initial state for codecvt.
|
| 67 |
+
template<typename _CharT, typename _Traits>
|
| 68 |
+
class basic_filebuf : public basic_streambuf<_CharT, _Traits>
|
| 69 |
+
{
|
| 70 |
+
public:
|
| 71 |
+
// Types:
|
| 72 |
+
typedef _CharT char_type;
|
| 73 |
+
typedef _Traits traits_type;
|
| 74 |
+
typedef typename traits_type::int_type int_type;
|
| 75 |
+
typedef typename traits_type::pos_type pos_type;
|
| 76 |
+
typedef typename traits_type::off_type off_type;
|
| 77 |
+
|
| 78 |
+
typedef basic_streambuf<char_type, traits_type> __streambuf_type;
|
| 79 |
+
typedef basic_filebuf<char_type, traits_type> __filebuf_type;
|
| 80 |
+
typedef __basic_file<char> __file_type;
|
| 81 |
+
typedef typename traits_type::state_type __state_type;
|
| 82 |
+
typedef codecvt<char_type, char, __state_type> __codecvt_type;
|
| 83 |
+
|
| 84 |
+
friend class ios_base; // For sync_with_stdio.
|
| 85 |
+
|
| 86 |
+
protected:
|
| 87 |
+
// Data Members:
|
| 88 |
+
// MT lock inherited from libio or other low-level io library.
|
| 89 |
+
__c_lock _M_lock;
|
| 90 |
+
|
| 91 |
+
// External buffer.
|
| 92 |
+
__file_type _M_file;
|
| 93 |
+
|
| 94 |
+
/// Place to stash in || out || in | out settings for current filebuf.
|
| 95 |
+
ios_base::openmode _M_mode;
|
| 96 |
+
|
| 97 |
+
// Beginning state type for codecvt.
|
| 98 |
+
__state_type _M_state_beg;
|
| 99 |
+
|
| 100 |
+
// During output, the state that corresponds to pptr(),
|
| 101 |
+
// during input, the state that corresponds to egptr() and
|
| 102 |
+
// _M_ext_next.
|
| 103 |
+
__state_type _M_state_cur;
|
| 104 |
+
|
| 105 |
+
// Not used for output. During input, the state that corresponds
|
| 106 |
+
// to eback() and _M_ext_buf.
|
| 107 |
+
__state_type _M_state_last;
|
| 108 |
+
|
| 109 |
+
/// Pointer to the beginning of internal buffer.
|
| 110 |
+
char_type* _M_buf;
|
| 111 |
+
|
| 112 |
+
/**
|
| 113 |
+
* Actual size of internal buffer. This number is equal to the size
|
| 114 |
+
* of the put area + 1 position, reserved for the overflow char of
|
| 115 |
+
* a full area.
|
| 116 |
+
*/
|
| 117 |
+
size_t _M_buf_size;
|
| 118 |
+
|
| 119 |
+
// Set iff _M_buf is allocated memory from _M_allocate_internal_buffer.
|
| 120 |
+
bool _M_buf_allocated;
|
| 121 |
+
|
| 122 |
+
/**
|
| 123 |
+
* _M_reading == false && _M_writing == false for 'uncommitted' mode;
|
| 124 |
+
* _M_reading == true for 'read' mode;
|
| 125 |
+
* _M_writing == true for 'write' mode;
|
| 126 |
+
*
|
| 127 |
+
* NB: _M_reading == true && _M_writing == true is unused.
|
| 128 |
+
*/
|
| 129 |
+
bool _M_reading;
|
| 130 |
+
bool _M_writing;
|
| 131 |
+
|
| 132 |
+
//@{
|
| 133 |
+
/**
|
| 134 |
+
* Necessary bits for putback buffer management.
|
| 135 |
+
*
|
| 136 |
+
* @note pbacks of over one character are not currently supported.
|
| 137 |
+
*/
|
| 138 |
+
char_type _M_pback;
|
| 139 |
+
char_type* _M_pback_cur_save;
|
| 140 |
+
char_type* _M_pback_end_save;
|
| 141 |
+
bool _M_pback_init;
|
| 142 |
+
//@}
|
| 143 |
+
|
| 144 |
+
// Cached codecvt facet.
|
| 145 |
+
const __codecvt_type* _M_codecvt;
|
| 146 |
+
|
| 147 |
+
/**
|
| 148 |
+
* Buffer for external characters. Used for input when
|
| 149 |
+
* codecvt::always_noconv() == false. When valid, this corresponds
|
| 150 |
+
* to eback().
|
| 151 |
+
*/
|
| 152 |
+
char* _M_ext_buf;
|
| 153 |
+
|
| 154 |
+
/**
|
| 155 |
+
* Size of buffer held by _M_ext_buf.
|
| 156 |
+
*/
|
| 157 |
+
streamsize _M_ext_buf_size;
|
| 158 |
+
|
| 159 |
+
/**
|
| 160 |
+
* Pointers into the buffer held by _M_ext_buf that delimit a
|
| 161 |
+
* subsequence of bytes that have been read but not yet converted.
|
| 162 |
+
* When valid, _M_ext_next corresponds to egptr().
|
| 163 |
+
*/
|
| 164 |
+
const char* _M_ext_next;
|
| 165 |
+
char* _M_ext_end;
|
| 166 |
+
|
| 167 |
+
/**
|
| 168 |
+
* Initializes pback buffers, and moves normal buffers to safety.
|
| 169 |
+
* Assumptions:
|
| 170 |
+
* _M_in_cur has already been moved back
|
| 171 |
+
*/
|
| 172 |
+
void
|
| 173 |
+
_M_create_pback()
|
| 174 |
+
{
|
| 175 |
+
if (!_M_pback_init)
|
| 176 |
+
{
|
| 177 |
+
_M_pback_cur_save = this->gptr();
|
| 178 |
+
_M_pback_end_save = this->egptr();
|
| 179 |
+
this->setg(&_M_pback, &_M_pback, &_M_pback + 1);
|
| 180 |
+
_M_pback_init = true;
|
| 181 |
+
}
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
/**
|
| 185 |
+
* Deactivates pback buffer contents, and restores normal buffer.
|
| 186 |
+
* Assumptions:
|
| 187 |
+
* The pback buffer has only moved forward.
|
| 188 |
+
*/
|
| 189 |
+
void
|
| 190 |
+
_M_destroy_pback() throw()
|
| 191 |
+
{
|
| 192 |
+
if (_M_pback_init)
|
| 193 |
+
{
|
| 194 |
+
// Length _M_in_cur moved in the pback buffer.
|
| 195 |
+
_M_pback_cur_save += this->gptr() != this->eback();
|
| 196 |
+
this->setg(_M_buf, _M_pback_cur_save, _M_pback_end_save);
|
| 197 |
+
_M_pback_init = false;
|
| 198 |
+
}
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
public:
|
| 202 |
+
// Constructors/destructor:
|
| 203 |
+
/**
|
| 204 |
+
* @brief Does not open any files.
|
| 205 |
+
*
|
| 206 |
+
* The default constructor initializes the parent class using its
|
| 207 |
+
* own default ctor.
|
| 208 |
+
*/
|
| 209 |
+
basic_filebuf();
|
| 210 |
+
|
| 211 |
+
/**
|
| 212 |
+
* @brief The destructor closes the file first.
|
| 213 |
+
*/
|
| 214 |
+
virtual
|
| 215 |
+
~basic_filebuf()
|
| 216 |
+
{ this->close(); }
|
| 217 |
+
|
| 218 |
+
// Members:
|
| 219 |
+
/**
|
| 220 |
+
* @brief Returns true if the external file is open.
|
| 221 |
+
*/
|
| 222 |
+
bool
|
| 223 |
+
is_open() const throw()
|
| 224 |
+
{ return _M_file.is_open(); }
|
| 225 |
+
|
| 226 |
+
/**
|
| 227 |
+
* @brief Opens an external file.
|
| 228 |
+
* @param s The name of the file.
|
| 229 |
+
* @param mode The open mode flags.
|
| 230 |
+
* @return @c this on success, NULL on failure
|
| 231 |
+
*
|
| 232 |
+
* If a file is already open, this function immediately fails.
|
| 233 |
+
* Otherwise it tries to open the file named @a s using the flags
|
| 234 |
+
* given in @a mode.
|
| 235 |
+
*
|
| 236 |
+
* Table 92, adapted here, gives the relation between openmode
|
| 237 |
+
* combinations and the equivalent fopen() flags.
|
| 238 |
+
* (NB: lines app, in|out|app, in|app, binary|app, binary|in|out|app,
|
| 239 |
+
* and binary|in|app per DR 596)
|
| 240 |
+
* +---------------------------------------------------------+
|
| 241 |
+
* | ios_base Flag combination stdio equivalent |
|
| 242 |
+
* |binary in out trunc app |
|
| 243 |
+
* +---------------------------------------------------------+
|
| 244 |
+
* | + "w" |
|
| 245 |
+
* | + + "a" |
|
| 246 |
+
* | + "a" |
|
| 247 |
+
* | + + "w" |
|
| 248 |
+
* | + "r" |
|
| 249 |
+
* | + + "r+" |
|
| 250 |
+
* | + + + "w+" |
|
| 251 |
+
* | + + + "a+" |
|
| 252 |
+
* | + + "a+" |
|
| 253 |
+
* +---------------------------------------------------------+
|
| 254 |
+
* | + + "wb" |
|
| 255 |
+
* | + + + "ab" |
|
| 256 |
+
* | + + "ab" |
|
| 257 |
+
* | + + + "wb" |
|
| 258 |
+
* | + + "rb" |
|
| 259 |
+
* | + + + "r+b" |
|
| 260 |
+
* | + + + + "w+b" |
|
| 261 |
+
* | + + + + "a+b" |
|
| 262 |
+
* | + + + "a+b" |
|
| 263 |
+
* +---------------------------------------------------------+
|
| 264 |
+
*/
|
| 265 |
+
__filebuf_type*
|
| 266 |
+
open(const char* __s, ios_base::openmode __mode);
|
| 267 |
+
|
| 268 |
+
/**
|
| 269 |
+
* @brief Closes the currently associated file.
|
| 270 |
+
* @return @c this on success, NULL on failure
|
| 271 |
+
*
|
| 272 |
+
* If no file is currently open, this function immediately fails.
|
| 273 |
+
*
|
| 274 |
+
* If a "put buffer area" exists, @c overflow(eof) is called to flush
|
| 275 |
+
* all the characters. The file is then closed.
|
| 276 |
+
*
|
| 277 |
+
* If any operations fail, this function also fails.
|
| 278 |
+
*/
|
| 279 |
+
__filebuf_type*
|
| 280 |
+
close();
|
| 281 |
+
|
| 282 |
+
protected:
|
| 283 |
+
void
|
| 284 |
+
_M_allocate_internal_buffer();
|
| 285 |
+
|
| 286 |
+
void
|
| 287 |
+
_M_destroy_internal_buffer() throw();
|
| 288 |
+
|
| 289 |
+
// [27.8.1.4] overridden virtual functions
|
| 290 |
+
virtual streamsize
|
| 291 |
+
showmanyc();
|
| 292 |
+
|
| 293 |
+
// Stroustrup, 1998, p. 628
|
| 294 |
+
// underflow() and uflow() functions are called to get the next
|
| 295 |
+
// character from the real input source when the buffer is empty.
|
| 296 |
+
// Buffered input uses underflow()
|
| 297 |
+
|
| 298 |
+
virtual int_type
|
| 299 |
+
underflow();
|
| 300 |
+
|
| 301 |
+
virtual int_type
|
| 302 |
+
pbackfail(int_type __c = _Traits::eof());
|
| 303 |
+
|
| 304 |
+
// Stroustrup, 1998, p 648
|
| 305 |
+
// The overflow() function is called to transfer characters to the
|
| 306 |
+
// real output destination when the buffer is full. A call to
|
| 307 |
+
// overflow(c) outputs the contents of the buffer plus the
|
| 308 |
+
// character c.
|
| 309 |
+
// 27.5.2.4.5
|
| 310 |
+
// Consume some sequence of the characters in the pending sequence.
|
| 311 |
+
virtual int_type
|
| 312 |
+
overflow(int_type __c = _Traits::eof());
|
| 313 |
+
|
| 314 |
+
// Convert internal byte sequence to external, char-based
|
| 315 |
+
// sequence via codecvt.
|
| 316 |
+
bool
|
| 317 |
+
_M_convert_to_external(char_type*, streamsize);
|
| 318 |
+
|
| 319 |
+
/**
|
| 320 |
+
* @brief Manipulates the buffer.
|
| 321 |
+
* @param s Pointer to a buffer area.
|
| 322 |
+
* @param n Size of @a s.
|
| 323 |
+
* @return @c this
|
| 324 |
+
*
|
| 325 |
+
* If no file has been opened, and both @a s and @a n are zero, then
|
| 326 |
+
* the stream becomes unbuffered. Otherwise, @c s is used as a
|
| 327 |
+
* buffer; see
|
| 328 |
+
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25s02.html
|
| 329 |
+
* for more.
|
| 330 |
+
*/
|
| 331 |
+
virtual __streambuf_type*
|
| 332 |
+
setbuf(char_type* __s, streamsize __n);
|
| 333 |
+
|
| 334 |
+
virtual pos_type
|
| 335 |
+
seekoff(off_type __off, ios_base::seekdir __way,
|
| 336 |
+
ios_base::openmode __mode = ios_base::in | ios_base::out);
|
| 337 |
+
|
| 338 |
+
virtual pos_type
|
| 339 |
+
seekpos(pos_type __pos,
|
| 340 |
+
ios_base::openmode __mode = ios_base::in | ios_base::out);
|
| 341 |
+
|
| 342 |
+
// Common code for seekoff and seekpos
|
| 343 |
+
pos_type
|
| 344 |
+
_M_seek(off_type __off, ios_base::seekdir __way, __state_type __state);
|
| 345 |
+
|
| 346 |
+
virtual int
|
| 347 |
+
sync();
|
| 348 |
+
|
| 349 |
+
virtual void
|
| 350 |
+
imbue(const locale& __loc);
|
| 351 |
+
|
| 352 |
+
virtual streamsize
|
| 353 |
+
xsgetn(char_type* __s, streamsize __n);
|
| 354 |
+
|
| 355 |
+
virtual streamsize
|
| 356 |
+
xsputn(const char_type* __s, streamsize __n);
|
| 357 |
+
|
| 358 |
+
// Flushes output buffer, then writes unshift sequence.
|
| 359 |
+
bool
|
| 360 |
+
_M_terminate_output();
|
| 361 |
+
|
| 362 |
+
/**
|
| 363 |
+
* This function sets the pointers of the internal buffer, both get
|
| 364 |
+
* and put areas. Typically:
|
| 365 |
+
*
|
| 366 |
+
* __off == egptr() - eback() upon underflow/uflow ('read' mode);
|
| 367 |
+
* __off == 0 upon overflow ('write' mode);
|
| 368 |
+
* __off == -1 upon open, setbuf, seekoff/pos ('uncommitted' mode).
|
| 369 |
+
*
|
| 370 |
+
* NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size
|
| 371 |
+
* reflects the actual allocated memory and the last cell is reserved
|
| 372 |
+
* for the overflow char of a full put area.
|
| 373 |
+
*/
|
| 374 |
+
void
|
| 375 |
+
_M_set_buffer(streamsize __off)
|
| 376 |
+
{
|
| 377 |
+
const bool __testin = _M_mode & ios_base::in;
|
| 378 |
+
const bool __testout = _M_mode & ios_base::out;
|
| 379 |
+
|
| 380 |
+
if (__testin && __off > 0)
|
| 381 |
+
this->setg(_M_buf, _M_buf, _M_buf + __off);
|
| 382 |
+
else
|
| 383 |
+
this->setg(_M_buf, _M_buf, _M_buf);
|
| 384 |
+
|
| 385 |
+
if (__testout && __off == 0 && _M_buf_size > 1 )
|
| 386 |
+
this->setp(_M_buf, _M_buf + _M_buf_size - 1);
|
| 387 |
+
else
|
| 388 |
+
this->setp(NULL, NULL);
|
| 389 |
+
}
|
| 390 |
+
};
|
| 391 |
+
|
| 392 |
+
// [27.8.1.5] Template class basic_ifstream
|
| 393 |
+
/**
|
| 394 |
+
* @brief Controlling input for files.
|
| 395 |
+
*
|
| 396 |
+
* This class supports reading from named files, using the inherited
|
| 397 |
+
* functions from std::basic_istream. To control the associated
|
| 398 |
+
* sequence, an instance of std::basic_filebuf is used, which this page
|
| 399 |
+
* refers to as @c sb.
|
| 400 |
+
*/
|
| 401 |
+
template<typename _CharT, typename _Traits>
|
| 402 |
+
class basic_ifstream : public basic_istream<_CharT, _Traits>
|
| 403 |
+
{
|
| 404 |
+
public:
|
| 405 |
+
// Types:
|
| 406 |
+
typedef _CharT char_type;
|
| 407 |
+
typedef _Traits traits_type;
|
| 408 |
+
typedef typename traits_type::int_type int_type;
|
| 409 |
+
typedef typename traits_type::pos_type pos_type;
|
| 410 |
+
typedef typename traits_type::off_type off_type;
|
| 411 |
+
|
| 412 |
+
// Non-standard types:
|
| 413 |
+
typedef basic_filebuf<char_type, traits_type> __filebuf_type;
|
| 414 |
+
typedef basic_istream<char_type, traits_type> __istream_type;
|
| 415 |
+
|
| 416 |
+
private:
|
| 417 |
+
__filebuf_type _M_filebuf;
|
| 418 |
+
|
| 419 |
+
public:
|
| 420 |
+
// Constructors/Destructors:
|
| 421 |
+
/**
|
| 422 |
+
* @brief Default constructor.
|
| 423 |
+
*
|
| 424 |
+
* Initializes @c sb using its default constructor, and passes
|
| 425 |
+
* @c &sb to the base class initializer. Does not open any files
|
| 426 |
+
* (you haven't given it a filename to open).
|
| 427 |
+
*/
|
| 428 |
+
basic_ifstream() : __istream_type(), _M_filebuf()
|
| 429 |
+
{ this->init(&_M_filebuf); }
|
| 430 |
+
|
| 431 |
+
/**
|
| 432 |
+
* @brief Create an input file stream.
|
| 433 |
+
* @param s Null terminated string specifying the filename.
|
| 434 |
+
* @param mode Open file in specified mode (see std::ios_base).
|
| 435 |
+
*
|
| 436 |
+
* @c ios_base::in is automatically included in @a mode.
|
| 437 |
+
*
|
| 438 |
+
* Tip: When using std::string to hold the filename, you must use
|
| 439 |
+
* .c_str() before passing it to this constructor.
|
| 440 |
+
*/
|
| 441 |
+
explicit
|
| 442 |
+
basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
|
| 443 |
+
: __istream_type(), _M_filebuf()
|
| 444 |
+
{
|
| 445 |
+
this->init(&_M_filebuf);
|
| 446 |
+
this->open(__s, __mode);
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
/**
|
| 450 |
+
* @brief The destructor does nothing.
|
| 451 |
+
*
|
| 452 |
+
* The file is closed by the filebuf object, not the formatting
|
| 453 |
+
* stream.
|
| 454 |
+
*/
|
| 455 |
+
~basic_ifstream()
|
| 456 |
+
{ }
|
| 457 |
+
|
| 458 |
+
// Members:
|
| 459 |
+
/**
|
| 460 |
+
* @brief Accessing the underlying buffer.
|
| 461 |
+
* @return The current basic_filebuf buffer.
|
| 462 |
+
*
|
| 463 |
+
* This hides both signatures of std::basic_ios::rdbuf().
|
| 464 |
+
*/
|
| 465 |
+
__filebuf_type*
|
| 466 |
+
rdbuf() const
|
| 467 |
+
{ return const_cast<__filebuf_type*>(&_M_filebuf); }
|
| 468 |
+
|
| 469 |
+
/**
|
| 470 |
+
* @brief Wrapper to test for an open file.
|
| 471 |
+
* @return @c rdbuf()->is_open()
|
| 472 |
+
*/
|
| 473 |
+
bool
|
| 474 |
+
is_open()
|
| 475 |
+
{ return _M_filebuf.is_open(); }
|
| 476 |
+
|
| 477 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 478 |
+
// 365. Lack of const-qualification in clause 27
|
| 479 |
+
bool
|
| 480 |
+
is_open() const
|
| 481 |
+
{ return _M_filebuf.is_open(); }
|
| 482 |
+
|
| 483 |
+
/**
|
| 484 |
+
* @brief Opens an external file.
|
| 485 |
+
* @param s The name of the file.
|
| 486 |
+
* @param mode The open mode flags.
|
| 487 |
+
*
|
| 488 |
+
* Calls @c std::basic_filebuf::open(s,mode|in). If that function
|
| 489 |
+
* fails, @c failbit is set in the stream's error state.
|
| 490 |
+
*
|
| 491 |
+
* Tip: When using std::string to hold the filename, you must use
|
| 492 |
+
* .c_str() before passing it to this constructor.
|
| 493 |
+
*/
|
| 494 |
+
void
|
| 495 |
+
open(const char* __s, ios_base::openmode __mode = ios_base::in)
|
| 496 |
+
{
|
| 497 |
+
if (!_M_filebuf.open(__s, __mode | ios_base::in))
|
| 498 |
+
this->setstate(ios_base::failbit);
|
| 499 |
+
else
|
| 500 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 501 |
+
// 409. Closing an fstream should clear error state
|
| 502 |
+
this->clear();
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
/**
|
| 506 |
+
* @brief Close the file.
|
| 507 |
+
*
|
| 508 |
+
* Calls @c std::basic_filebuf::close(). If that function
|
| 509 |
+
* fails, @c failbit is set in the stream's error state.
|
| 510 |
+
*/
|
| 511 |
+
void
|
| 512 |
+
close()
|
| 513 |
+
{
|
| 514 |
+
if (!_M_filebuf.close())
|
| 515 |
+
this->setstate(ios_base::failbit);
|
| 516 |
+
}
|
| 517 |
+
};
|
| 518 |
+
|
| 519 |
+
|
| 520 |
+
// [27.8.1.8] Template class basic_ofstream
|
| 521 |
+
/**
|
| 522 |
+
* @brief Controlling output for files.
|
| 523 |
+
*
|
| 524 |
+
* This class supports reading from named files, using the inherited
|
| 525 |
+
* functions from std::basic_ostream. To control the associated
|
| 526 |
+
* sequence, an instance of std::basic_filebuf is used, which this page
|
| 527 |
+
* refers to as @c sb.
|
| 528 |
+
*/
|
| 529 |
+
template<typename _CharT, typename _Traits>
|
| 530 |
+
class basic_ofstream : public basic_ostream<_CharT,_Traits>
|
| 531 |
+
{
|
| 532 |
+
public:
|
| 533 |
+
// Types:
|
| 534 |
+
typedef _CharT char_type;
|
| 535 |
+
typedef _Traits traits_type;
|
| 536 |
+
typedef typename traits_type::int_type int_type;
|
| 537 |
+
typedef typename traits_type::pos_type pos_type;
|
| 538 |
+
typedef typename traits_type::off_type off_type;
|
| 539 |
+
|
| 540 |
+
// Non-standard types:
|
| 541 |
+
typedef basic_filebuf<char_type, traits_type> __filebuf_type;
|
| 542 |
+
typedef basic_ostream<char_type, traits_type> __ostream_type;
|
| 543 |
+
|
| 544 |
+
private:
|
| 545 |
+
__filebuf_type _M_filebuf;
|
| 546 |
+
|
| 547 |
+
public:
|
| 548 |
+
// Constructors:
|
| 549 |
+
/**
|
| 550 |
+
* @brief Default constructor.
|
| 551 |
+
*
|
| 552 |
+
* Initializes @c sb using its default constructor, and passes
|
| 553 |
+
* @c &sb to the base class initializer. Does not open any files
|
| 554 |
+
* (you haven't given it a filename to open).
|
| 555 |
+
*/
|
| 556 |
+
basic_ofstream(): __ostream_type(), _M_filebuf()
|
| 557 |
+
{ this->init(&_M_filebuf); }
|
| 558 |
+
|
| 559 |
+
/**
|
| 560 |
+
* @brief Create an output file stream.
|
| 561 |
+
* @param s Null terminated string specifying the filename.
|
| 562 |
+
* @param mode Open file in specified mode (see std::ios_base).
|
| 563 |
+
*
|
| 564 |
+
* @c ios_base::out|ios_base::trunc is automatically included in
|
| 565 |
+
* @a mode.
|
| 566 |
+
*
|
| 567 |
+
* Tip: When using std::string to hold the filename, you must use
|
| 568 |
+
* .c_str() before passing it to this constructor.
|
| 569 |
+
*/
|
| 570 |
+
explicit
|
| 571 |
+
basic_ofstream(const char* __s,
|
| 572 |
+
ios_base::openmode __mode = ios_base::out|ios_base::trunc)
|
| 573 |
+
: __ostream_type(), _M_filebuf()
|
| 574 |
+
{
|
| 575 |
+
this->init(&_M_filebuf);
|
| 576 |
+
this->open(__s, __mode);
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
/**
|
| 580 |
+
* @brief The destructor does nothing.
|
| 581 |
+
*
|
| 582 |
+
* The file is closed by the filebuf object, not the formatting
|
| 583 |
+
* stream.
|
| 584 |
+
*/
|
| 585 |
+
~basic_ofstream()
|
| 586 |
+
{ }
|
| 587 |
+
|
| 588 |
+
// Members:
|
| 589 |
+
/**
|
| 590 |
+
* @brief Accessing the underlying buffer.
|
| 591 |
+
* @return The current basic_filebuf buffer.
|
| 592 |
+
*
|
| 593 |
+
* This hides both signatures of std::basic_ios::rdbuf().
|
| 594 |
+
*/
|
| 595 |
+
__filebuf_type*
|
| 596 |
+
rdbuf() const
|
| 597 |
+
{ return const_cast<__filebuf_type*>(&_M_filebuf); }
|
| 598 |
+
|
| 599 |
+
/**
|
| 600 |
+
* @brief Wrapper to test for an open file.
|
| 601 |
+
* @return @c rdbuf()->is_open()
|
| 602 |
+
*/
|
| 603 |
+
bool
|
| 604 |
+
is_open()
|
| 605 |
+
{ return _M_filebuf.is_open(); }
|
| 606 |
+
|
| 607 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 608 |
+
// 365. Lack of const-qualification in clause 27
|
| 609 |
+
bool
|
| 610 |
+
is_open() const
|
| 611 |
+
{ return _M_filebuf.is_open(); }
|
| 612 |
+
|
| 613 |
+
/**
|
| 614 |
+
* @brief Opens an external file.
|
| 615 |
+
* @param s The name of the file.
|
| 616 |
+
* @param mode The open mode flags.
|
| 617 |
+
*
|
| 618 |
+
* Calls @c std::basic_filebuf::open(s,mode|out|trunc). If that
|
| 619 |
+
* function fails, @c failbit is set in the stream's error state.
|
| 620 |
+
*
|
| 621 |
+
* Tip: When using std::string to hold the filename, you must use
|
| 622 |
+
* .c_str() before passing it to this constructor.
|
| 623 |
+
*/
|
| 624 |
+
void
|
| 625 |
+
open(const char* __s,
|
| 626 |
+
ios_base::openmode __mode = ios_base::out | ios_base::trunc)
|
| 627 |
+
{
|
| 628 |
+
if (!_M_filebuf.open(__s, __mode | ios_base::out))
|
| 629 |
+
this->setstate(ios_base::failbit);
|
| 630 |
+
else
|
| 631 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 632 |
+
// 409. Closing an fstream should clear error state
|
| 633 |
+
this->clear();
|
| 634 |
+
}
|
| 635 |
+
|
| 636 |
+
/**
|
| 637 |
+
* @brief Close the file.
|
| 638 |
+
*
|
| 639 |
+
* Calls @c std::basic_filebuf::close(). If that function
|
| 640 |
+
* fails, @c failbit is set in the stream's error state.
|
| 641 |
+
*/
|
| 642 |
+
void
|
| 643 |
+
close()
|
| 644 |
+
{
|
| 645 |
+
if (!_M_filebuf.close())
|
| 646 |
+
this->setstate(ios_base::failbit);
|
| 647 |
+
}
|
| 648 |
+
};
|
| 649 |
+
|
| 650 |
+
|
| 651 |
+
// [27.8.1.11] Template class basic_fstream
|
| 652 |
+
/**
|
| 653 |
+
* @brief Controlling input and output for files.
|
| 654 |
+
*
|
| 655 |
+
* This class supports reading from and writing to named files, using
|
| 656 |
+
* the inherited functions from std::basic_iostream. To control the
|
| 657 |
+
* associated sequence, an instance of std::basic_filebuf is used, which
|
| 658 |
+
* this page refers to as @c sb.
|
| 659 |
+
*/
|
| 660 |
+
template<typename _CharT, typename _Traits>
|
| 661 |
+
class basic_fstream : public basic_iostream<_CharT, _Traits>
|
| 662 |
+
{
|
| 663 |
+
public:
|
| 664 |
+
// Types:
|
| 665 |
+
typedef _CharT char_type;
|
| 666 |
+
typedef _Traits traits_type;
|
| 667 |
+
typedef typename traits_type::int_type int_type;
|
| 668 |
+
typedef typename traits_type::pos_type pos_type;
|
| 669 |
+
typedef typename traits_type::off_type off_type;
|
| 670 |
+
|
| 671 |
+
// Non-standard types:
|
| 672 |
+
typedef basic_filebuf<char_type, traits_type> __filebuf_type;
|
| 673 |
+
typedef basic_ios<char_type, traits_type> __ios_type;
|
| 674 |
+
typedef basic_iostream<char_type, traits_type> __iostream_type;
|
| 675 |
+
|
| 676 |
+
private:
|
| 677 |
+
__filebuf_type _M_filebuf;
|
| 678 |
+
|
| 679 |
+
public:
|
| 680 |
+
// Constructors/destructor:
|
| 681 |
+
/**
|
| 682 |
+
* @brief Default constructor.
|
| 683 |
+
*
|
| 684 |
+
* Initializes @c sb using its default constructor, and passes
|
| 685 |
+
* @c &sb to the base class initializer. Does not open any files
|
| 686 |
+
* (you haven't given it a filename to open).
|
| 687 |
+
*/
|
| 688 |
+
basic_fstream()
|
| 689 |
+
: __iostream_type(), _M_filebuf()
|
| 690 |
+
{ this->init(&_M_filebuf); }
|
| 691 |
+
|
| 692 |
+
/**
|
| 693 |
+
* @brief Create an input/output file stream.
|
| 694 |
+
* @param s Null terminated string specifying the filename.
|
| 695 |
+
* @param mode Open file in specified mode (see std::ios_base).
|
| 696 |
+
*
|
| 697 |
+
* Tip: When using std::string to hold the filename, you must use
|
| 698 |
+
* .c_str() before passing it to this constructor.
|
| 699 |
+
*/
|
| 700 |
+
explicit
|
| 701 |
+
basic_fstream(const char* __s,
|
| 702 |
+
ios_base::openmode __mode = ios_base::in | ios_base::out)
|
| 703 |
+
: __iostream_type(NULL), _M_filebuf()
|
| 704 |
+
{
|
| 705 |
+
this->init(&_M_filebuf);
|
| 706 |
+
this->open(__s, __mode);
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
/**
|
| 710 |
+
* @brief The destructor does nothing.
|
| 711 |
+
*
|
| 712 |
+
* The file is closed by the filebuf object, not the formatting
|
| 713 |
+
* stream.
|
| 714 |
+
*/
|
| 715 |
+
~basic_fstream()
|
| 716 |
+
{ }
|
| 717 |
+
|
| 718 |
+
// Members:
|
| 719 |
+
/**
|
| 720 |
+
* @brief Accessing the underlying buffer.
|
| 721 |
+
* @return The current basic_filebuf buffer.
|
| 722 |
+
*
|
| 723 |
+
* This hides both signatures of std::basic_ios::rdbuf().
|
| 724 |
+
*/
|
| 725 |
+
__filebuf_type*
|
| 726 |
+
rdbuf() const
|
| 727 |
+
{ return const_cast<__filebuf_type*>(&_M_filebuf); }
|
| 728 |
+
|
| 729 |
+
/**
|
| 730 |
+
* @brief Wrapper to test for an open file.
|
| 731 |
+
* @return @c rdbuf()->is_open()
|
| 732 |
+
*/
|
| 733 |
+
bool
|
| 734 |
+
is_open()
|
| 735 |
+
{ return _M_filebuf.is_open(); }
|
| 736 |
+
|
| 737 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 738 |
+
// 365. Lack of const-qualification in clause 27
|
| 739 |
+
bool
|
| 740 |
+
is_open() const
|
| 741 |
+
{ return _M_filebuf.is_open(); }
|
| 742 |
+
|
| 743 |
+
/**
|
| 744 |
+
* @brief Opens an external file.
|
| 745 |
+
* @param s The name of the file.
|
| 746 |
+
* @param mode The open mode flags.
|
| 747 |
+
*
|
| 748 |
+
* Calls @c std::basic_filebuf::open(s,mode). If that
|
| 749 |
+
* function fails, @c failbit is set in the stream's error state.
|
| 750 |
+
*
|
| 751 |
+
* Tip: When using std::string to hold the filename, you must use
|
| 752 |
+
* .c_str() before passing it to this constructor.
|
| 753 |
+
*/
|
| 754 |
+
void
|
| 755 |
+
open(const char* __s,
|
| 756 |
+
ios_base::openmode __mode = ios_base::in | ios_base::out)
|
| 757 |
+
{
|
| 758 |
+
if (!_M_filebuf.open(__s, __mode))
|
| 759 |
+
this->setstate(ios_base::failbit);
|
| 760 |
+
else
|
| 761 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 762 |
+
// 409. Closing an fstream should clear error state
|
| 763 |
+
this->clear();
|
| 764 |
+
}
|
| 765 |
+
|
| 766 |
+
/**
|
| 767 |
+
* @brief Close the file.
|
| 768 |
+
*
|
| 769 |
+
* Calls @c std::basic_filebuf::close(). If that function
|
| 770 |
+
* fails, @c failbit is set in the stream's error state.
|
| 771 |
+
*/
|
| 772 |
+
void
|
| 773 |
+
close()
|
| 774 |
+
{
|
| 775 |
+
if (!_M_filebuf.close())
|
| 776 |
+
this->setstate(ios_base::failbit);
|
| 777 |
+
}
|
| 778 |
+
};
|
| 779 |
+
|
| 780 |
+
_GLIBCXX_END_NAMESPACE
|
| 781 |
+
|
| 782 |
+
#ifndef _GLIBCXX_EXPORT_TEMPLATE
|
| 783 |
+
# include <bits/fstream.tcc>
|
| 784 |
+
#endif
|
| 785 |
+
|
| 786 |
+
#endif /* _GLIBCXX_FSTREAM */
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/functional
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// <functional> -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
| 4 |
+
// Free Software Foundation, Inc.
|
| 5 |
+
//
|
| 6 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 7 |
+
// software; you can redistribute it and/or modify it under the
|
| 8 |
+
// terms of the GNU General Public License as published by the
|
| 9 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 10 |
+
// any later version.
|
| 11 |
+
|
| 12 |
+
// This library is distributed in the hope that it will be useful,
|
| 13 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 14 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 15 |
+
// GNU General Public License for more details.
|
| 16 |
+
|
| 17 |
+
// You should have received a copy of the GNU General Public License
|
| 18 |
+
// along with this library; see the file COPYING. If not, write to
|
| 19 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 20 |
+
// Boston, MA 02110-1301, USA.
|
| 21 |
+
|
| 22 |
+
// As a special exception, you may use this file as part of a free software
|
| 23 |
+
// library without restriction. Specifically, if other files instantiate
|
| 24 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 25 |
+
// this file and link it with other files to produce an executable, this
|
| 26 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 27 |
+
// the GNU General Public License. This exception does not however
|
| 28 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 29 |
+
// the GNU General Public License.
|
| 30 |
+
|
| 31 |
+
/*
|
| 32 |
+
* Copyright (c) 1997
|
| 33 |
+
* Silicon Graphics Computer Systems, Inc.
|
| 34 |
+
*
|
| 35 |
+
* Permission to use, copy, modify, distribute and sell this software
|
| 36 |
+
* and its documentation for any purpose is hereby granted without fee,
|
| 37 |
+
* provided that the above copyright notice appear in all copies and
|
| 38 |
+
* that both that copyright notice and this permission notice appear
|
| 39 |
+
* in supporting documentation. Silicon Graphics makes no
|
| 40 |
+
* representations about the suitability of this software for any
|
| 41 |
+
* purpose. It is provided "as is" without express or implied warranty.
|
| 42 |
+
*
|
| 43 |
+
*/
|
| 44 |
+
|
| 45 |
+
/** @file include/functional
|
| 46 |
+
* This is a Standard C++ Library header.
|
| 47 |
+
*/
|
| 48 |
+
|
| 49 |
+
#ifndef _GLIBCXX_FUNCTIONAL
|
| 50 |
+
#define _GLIBCXX_FUNCTIONAL 1
|
| 51 |
+
|
| 52 |
+
#pragma GCC system_header
|
| 53 |
+
|
| 54 |
+
#include <bits/c++config.h>
|
| 55 |
+
#include <bits/stl_function.h>
|
| 56 |
+
|
| 57 |
+
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
| 58 |
+
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
|
| 59 |
+
# error C++0x header cannot be included from TR1 header
|
| 60 |
+
# endif
|
| 61 |
+
# include <typeinfo>
|
| 62 |
+
# include <new>
|
| 63 |
+
# include <tuple>
|
| 64 |
+
# include <type_traits>
|
| 65 |
+
# include <bits/stringfwd.h>
|
| 66 |
+
# include <bits/functional_hash.h>
|
| 67 |
+
# include <ext/type_traits.h>
|
| 68 |
+
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
|
| 69 |
+
# include <tr1_impl/functional>
|
| 70 |
+
# else
|
| 71 |
+
# define _GLIBCXX_INCLUDE_AS_CXX0X
|
| 72 |
+
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 73 |
+
# define _GLIBCXX_END_NAMESPACE_TR1
|
| 74 |
+
# define _GLIBCXX_TR1
|
| 75 |
+
# include <tr1_impl/functional>
|
| 76 |
+
# undef _GLIBCXX_TR1
|
| 77 |
+
# undef _GLIBCXX_END_NAMESPACE_TR1
|
| 78 |
+
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
|
| 79 |
+
# undef _GLIBCXX_INCLUDE_AS_CXX0X
|
| 80 |
+
# endif
|
| 81 |
+
#endif
|
| 82 |
+
|
| 83 |
+
#endif // _GLIBCXX_FUNCTIONAL
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/iomanip
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Standard stream manipulators -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
| 4 |
+
// 2006, 2007
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file iomanip
|
| 33 |
+
* This is a Standard C++ Library header.
|
| 34 |
+
*/
|
| 35 |
+
|
| 36 |
+
//
|
| 37 |
+
// ISO C++ 14882: 27.6.3 Standard manipulators
|
| 38 |
+
//
|
| 39 |
+
|
| 40 |
+
#ifndef _GLIBCXX_IOMANIP
|
| 41 |
+
#define _GLIBCXX_IOMANIP 1
|
| 42 |
+
|
| 43 |
+
#pragma GCC system_header
|
| 44 |
+
|
| 45 |
+
#include <bits/c++config.h>
|
| 46 |
+
#include <iosfwd>
|
| 47 |
+
#include <bits/ios_base.h>
|
| 48 |
+
|
| 49 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 50 |
+
|
| 51 |
+
// [27.6.3] standard manipulators
|
| 52 |
+
// Also see DR 183.
|
| 53 |
+
|
| 54 |
+
struct _Resetiosflags { ios_base::fmtflags _M_mask; };
|
| 55 |
+
|
| 56 |
+
/**
|
| 57 |
+
* @brief Manipulator for @c setf.
|
| 58 |
+
* @param mask A format flags mask.
|
| 59 |
+
*
|
| 60 |
+
* Sent to a stream object, this manipulator resets the specified flags,
|
| 61 |
+
* via @e stream.setf(0,mask).
|
| 62 |
+
*/
|
| 63 |
+
inline _Resetiosflags
|
| 64 |
+
resetiosflags(ios_base::fmtflags __mask)
|
| 65 |
+
{
|
| 66 |
+
_Resetiosflags __x;
|
| 67 |
+
__x._M_mask = __mask;
|
| 68 |
+
return __x;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
template<typename _CharT, typename _Traits>
|
| 72 |
+
inline basic_istream<_CharT, _Traits>&
|
| 73 |
+
operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
|
| 74 |
+
{
|
| 75 |
+
__is.setf(ios_base::fmtflags(0), __f._M_mask);
|
| 76 |
+
return __is;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
template<typename _CharT, typename _Traits>
|
| 80 |
+
inline basic_ostream<_CharT, _Traits>&
|
| 81 |
+
operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
|
| 82 |
+
{
|
| 83 |
+
__os.setf(ios_base::fmtflags(0), __f._M_mask);
|
| 84 |
+
return __os;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
struct _Setiosflags { ios_base::fmtflags _M_mask; };
|
| 89 |
+
|
| 90 |
+
/**
|
| 91 |
+
* @brief Manipulator for @c setf.
|
| 92 |
+
* @param mask A format flags mask.
|
| 93 |
+
*
|
| 94 |
+
* Sent to a stream object, this manipulator sets the format flags
|
| 95 |
+
* to @a mask.
|
| 96 |
+
*/
|
| 97 |
+
inline _Setiosflags
|
| 98 |
+
setiosflags(ios_base::fmtflags __mask)
|
| 99 |
+
{
|
| 100 |
+
_Setiosflags __x;
|
| 101 |
+
__x._M_mask = __mask;
|
| 102 |
+
return __x;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
template<typename _CharT, typename _Traits>
|
| 106 |
+
inline basic_istream<_CharT, _Traits>&
|
| 107 |
+
operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
|
| 108 |
+
{
|
| 109 |
+
__is.setf(__f._M_mask);
|
| 110 |
+
return __is;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
template<typename _CharT, typename _Traits>
|
| 114 |
+
inline basic_ostream<_CharT, _Traits>&
|
| 115 |
+
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
|
| 116 |
+
{
|
| 117 |
+
__os.setf(__f._M_mask);
|
| 118 |
+
return __os;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
struct _Setbase { int _M_base; };
|
| 123 |
+
|
| 124 |
+
/**
|
| 125 |
+
* @brief Manipulator for @c setf.
|
| 126 |
+
* @param base A numeric base.
|
| 127 |
+
*
|
| 128 |
+
* Sent to a stream object, this manipulator changes the
|
| 129 |
+
* @c ios_base::basefield flags to @c oct, @c dec, or @c hex when @a base
|
| 130 |
+
* is 8, 10, or 16, accordingly, and to 0 if @a base is any other value.
|
| 131 |
+
*/
|
| 132 |
+
inline _Setbase
|
| 133 |
+
setbase(int __base)
|
| 134 |
+
{
|
| 135 |
+
_Setbase __x;
|
| 136 |
+
__x._M_base = __base;
|
| 137 |
+
return __x;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
template<typename _CharT, typename _Traits>
|
| 141 |
+
inline basic_istream<_CharT, _Traits>&
|
| 142 |
+
operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
|
| 143 |
+
{
|
| 144 |
+
__is.setf(__f._M_base == 8 ? ios_base::oct :
|
| 145 |
+
__f._M_base == 10 ? ios_base::dec :
|
| 146 |
+
__f._M_base == 16 ? ios_base::hex :
|
| 147 |
+
ios_base::fmtflags(0), ios_base::basefield);
|
| 148 |
+
return __is;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
template<typename _CharT, typename _Traits>
|
| 152 |
+
inline basic_ostream<_CharT, _Traits>&
|
| 153 |
+
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
|
| 154 |
+
{
|
| 155 |
+
__os.setf(__f._M_base == 8 ? ios_base::oct :
|
| 156 |
+
__f._M_base == 10 ? ios_base::dec :
|
| 157 |
+
__f._M_base == 16 ? ios_base::hex :
|
| 158 |
+
ios_base::fmtflags(0), ios_base::basefield);
|
| 159 |
+
return __os;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
template<typename _CharT>
|
| 164 |
+
struct _Setfill { _CharT _M_c; };
|
| 165 |
+
|
| 166 |
+
/**
|
| 167 |
+
* @brief Manipulator for @c fill.
|
| 168 |
+
* @param c The new fill character.
|
| 169 |
+
*
|
| 170 |
+
* Sent to a stream object, this manipulator calls @c fill(c) for that
|
| 171 |
+
* object.
|
| 172 |
+
*/
|
| 173 |
+
template<typename _CharT>
|
| 174 |
+
inline _Setfill<_CharT>
|
| 175 |
+
setfill(_CharT __c)
|
| 176 |
+
{
|
| 177 |
+
_Setfill<_CharT> __x;
|
| 178 |
+
__x._M_c = __c;
|
| 179 |
+
return __x;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
template<typename _CharT, typename _Traits>
|
| 183 |
+
inline basic_istream<_CharT, _Traits>&
|
| 184 |
+
operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
|
| 185 |
+
{
|
| 186 |
+
__is.fill(__f._M_c);
|
| 187 |
+
return __is;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
template<typename _CharT, typename _Traits>
|
| 191 |
+
inline basic_ostream<_CharT, _Traits>&
|
| 192 |
+
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
|
| 193 |
+
{
|
| 194 |
+
__os.fill(__f._M_c);
|
| 195 |
+
return __os;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
struct _Setprecision { int _M_n; };
|
| 200 |
+
|
| 201 |
+
/**
|
| 202 |
+
* @brief Manipulator for @c precision.
|
| 203 |
+
* @param n The new precision.
|
| 204 |
+
*
|
| 205 |
+
* Sent to a stream object, this manipulator calls @c precision(n) for
|
| 206 |
+
* that object.
|
| 207 |
+
*/
|
| 208 |
+
inline _Setprecision
|
| 209 |
+
setprecision(int __n)
|
| 210 |
+
{
|
| 211 |
+
_Setprecision __x;
|
| 212 |
+
__x._M_n = __n;
|
| 213 |
+
return __x;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
template<typename _CharT, typename _Traits>
|
| 217 |
+
inline basic_istream<_CharT, _Traits>&
|
| 218 |
+
operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
|
| 219 |
+
{
|
| 220 |
+
__is.precision(__f._M_n);
|
| 221 |
+
return __is;
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
template<typename _CharT, typename _Traits>
|
| 225 |
+
inline basic_ostream<_CharT, _Traits>&
|
| 226 |
+
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
|
| 227 |
+
{
|
| 228 |
+
__os.precision(__f._M_n);
|
| 229 |
+
return __os;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
struct _Setw { int _M_n; };
|
| 234 |
+
|
| 235 |
+
/**
|
| 236 |
+
* @brief Manipulator for @c width.
|
| 237 |
+
* @param n The new width.
|
| 238 |
+
*
|
| 239 |
+
* Sent to a stream object, this manipulator calls @c width(n) for
|
| 240 |
+
* that object.
|
| 241 |
+
*/
|
| 242 |
+
inline _Setw
|
| 243 |
+
setw(int __n)
|
| 244 |
+
{
|
| 245 |
+
_Setw __x;
|
| 246 |
+
__x._M_n = __n;
|
| 247 |
+
return __x;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
template<typename _CharT, typename _Traits>
|
| 251 |
+
inline basic_istream<_CharT, _Traits>&
|
| 252 |
+
operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
|
| 253 |
+
{
|
| 254 |
+
__is.width(__f._M_n);
|
| 255 |
+
return __is;
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
template<typename _CharT, typename _Traits>
|
| 259 |
+
inline basic_ostream<_CharT, _Traits>&
|
| 260 |
+
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
|
| 261 |
+
{
|
| 262 |
+
__os.width(__f._M_n);
|
| 263 |
+
return __os;
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
// Inhibit implicit instantiations for required instantiations,
|
| 267 |
+
// which are defined via explicit instantiations elsewhere.
|
| 268 |
+
// NB: This syntax is a GNU extension.
|
| 269 |
+
#if _GLIBCXX_EXTERN_TEMPLATE
|
| 270 |
+
extern template ostream& operator<<(ostream&, _Setfill<char>);
|
| 271 |
+
extern template ostream& operator<<(ostream&, _Setiosflags);
|
| 272 |
+
extern template ostream& operator<<(ostream&, _Resetiosflags);
|
| 273 |
+
extern template ostream& operator<<(ostream&, _Setbase);
|
| 274 |
+
extern template ostream& operator<<(ostream&, _Setprecision);
|
| 275 |
+
extern template ostream& operator<<(ostream&, _Setw);
|
| 276 |
+
extern template istream& operator>>(istream&, _Setfill<char>);
|
| 277 |
+
extern template istream& operator>>(istream&, _Setiosflags);
|
| 278 |
+
extern template istream& operator>>(istream&, _Resetiosflags);
|
| 279 |
+
extern template istream& operator>>(istream&, _Setbase);
|
| 280 |
+
extern template istream& operator>>(istream&, _Setprecision);
|
| 281 |
+
extern template istream& operator>>(istream&, _Setw);
|
| 282 |
+
|
| 283 |
+
#ifdef _GLIBCXX_USE_WCHAR_T
|
| 284 |
+
extern template wostream& operator<<(wostream&, _Setfill<wchar_t>);
|
| 285 |
+
extern template wostream& operator<<(wostream&, _Setiosflags);
|
| 286 |
+
extern template wostream& operator<<(wostream&, _Resetiosflags);
|
| 287 |
+
extern template wostream& operator<<(wostream&, _Setbase);
|
| 288 |
+
extern template wostream& operator<<(wostream&, _Setprecision);
|
| 289 |
+
extern template wostream& operator<<(wostream&, _Setw);
|
| 290 |
+
extern template wistream& operator>>(wistream&, _Setfill<wchar_t>);
|
| 291 |
+
extern template wistream& operator>>(wistream&, _Setiosflags);
|
| 292 |
+
extern template wistream& operator>>(wistream&, _Resetiosflags);
|
| 293 |
+
extern template wistream& operator>>(wistream&, _Setbase);
|
| 294 |
+
extern template wistream& operator>>(wistream&, _Setprecision);
|
| 295 |
+
extern template wistream& operator>>(wistream&, _Setw);
|
| 296 |
+
#endif
|
| 297 |
+
#endif
|
| 298 |
+
|
| 299 |
+
_GLIBCXX_END_NAMESPACE
|
| 300 |
+
|
| 301 |
+
#endif /* _GLIBCXX_IOMANIP */
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/ios
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Iostreams base classes -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
| 4 |
+
// 2005, 2006, 2007 Free Software Foundation, Inc.
|
| 5 |
+
//
|
| 6 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 7 |
+
// software; you can redistribute it and/or modify it under the
|
| 8 |
+
// terms of the GNU General Public License as published by the
|
| 9 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 10 |
+
// any later version.
|
| 11 |
+
|
| 12 |
+
// This library is distributed in the hope that it will be useful,
|
| 13 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 14 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 15 |
+
// GNU General Public License for more details.
|
| 16 |
+
|
| 17 |
+
// You should have received a copy of the GNU General Public License
|
| 18 |
+
// along with this library; see the file COPYING. If not, write to
|
| 19 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 20 |
+
// Boston, MA 02110-1301, USA.
|
| 21 |
+
|
| 22 |
+
// As a special exception, you may use this file as part of a free software
|
| 23 |
+
// library without restriction. Specifically, if other files instantiate
|
| 24 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 25 |
+
// this file and link it with other files to produce an executable, this
|
| 26 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 27 |
+
// the GNU General Public License. This exception does not however
|
| 28 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 29 |
+
// the GNU General Public License.
|
| 30 |
+
|
| 31 |
+
/** @file ios
|
| 32 |
+
* This is a Standard C++ Library header.
|
| 33 |
+
*/
|
| 34 |
+
|
| 35 |
+
//
|
| 36 |
+
// ISO C++ 14882: 27.4 Iostreams base classes
|
| 37 |
+
//
|
| 38 |
+
|
| 39 |
+
#ifndef _GLIBCXX_IOS
|
| 40 |
+
#define _GLIBCXX_IOS 1
|
| 41 |
+
|
| 42 |
+
#pragma GCC system_header
|
| 43 |
+
|
| 44 |
+
#include <iosfwd>
|
| 45 |
+
#include <exception> // For ios_base::failure
|
| 46 |
+
#include <bits/char_traits.h> // For char_traits, streamoff, streamsize, fpos
|
| 47 |
+
#include <bits/localefwd.h> // For class locale
|
| 48 |
+
#include <bits/ios_base.h> // For ios_base declarations.
|
| 49 |
+
#include <streambuf>
|
| 50 |
+
#include <bits/basic_ios.h>
|
| 51 |
+
|
| 52 |
+
#endif /* _GLIBCXX_IOS */
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/iosfwd
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Forwarding declarations -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
| 4 |
+
// 2006, 2007
|
| 5 |
+
// Free Software Foundation, Inc.
|
| 6 |
+
//
|
| 7 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 8 |
+
// software; you can redistribute it and/or modify it under the
|
| 9 |
+
// terms of the GNU General Public License as published by the
|
| 10 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 11 |
+
// any later version.
|
| 12 |
+
|
| 13 |
+
// This library is distributed in the hope that it will be useful,
|
| 14 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
// GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
// You should have received a copy of the GNU General Public License
|
| 19 |
+
// along with this library; see the file COPYING. If not, write to
|
| 20 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 21 |
+
// Boston, MA 02110-1301, USA.
|
| 22 |
+
|
| 23 |
+
// As a special exception, you may use this file as part of a free software
|
| 24 |
+
// library without restriction. Specifically, if other files instantiate
|
| 25 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 26 |
+
// this file and link it with other files to produce an executable, this
|
| 27 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 28 |
+
// the GNU General Public License. This exception does not however
|
| 29 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 30 |
+
// the GNU General Public License.
|
| 31 |
+
|
| 32 |
+
/** @file iosfwd
|
| 33 |
+
* This is a Standard C++ Library header.
|
| 34 |
+
*/
|
| 35 |
+
|
| 36 |
+
//
|
| 37 |
+
// ISO C++ 14882: 27.2 Forward declarations
|
| 38 |
+
//
|
| 39 |
+
|
| 40 |
+
#ifndef _GLIBCXX_IOSFWD
|
| 41 |
+
#define _GLIBCXX_IOSFWD 1
|
| 42 |
+
|
| 43 |
+
#pragma GCC system_header
|
| 44 |
+
|
| 45 |
+
#include <bits/c++config.h>
|
| 46 |
+
#include <bits/stringfwd.h> // For string forward declarations.
|
| 47 |
+
#include <bits/postypes.h>
|
| 48 |
+
|
| 49 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 50 |
+
|
| 51 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 52 |
+
class basic_ios;
|
| 53 |
+
|
| 54 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 55 |
+
class basic_streambuf;
|
| 56 |
+
|
| 57 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 58 |
+
class basic_istream;
|
| 59 |
+
|
| 60 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 61 |
+
class basic_ostream;
|
| 62 |
+
|
| 63 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 64 |
+
class basic_iostream;
|
| 65 |
+
|
| 66 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT>,
|
| 67 |
+
typename _Alloc = allocator<_CharT> >
|
| 68 |
+
class basic_stringbuf;
|
| 69 |
+
|
| 70 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT>,
|
| 71 |
+
typename _Alloc = allocator<_CharT> >
|
| 72 |
+
class basic_istringstream;
|
| 73 |
+
|
| 74 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT>,
|
| 75 |
+
typename _Alloc = allocator<_CharT> >
|
| 76 |
+
class basic_ostringstream;
|
| 77 |
+
|
| 78 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT>,
|
| 79 |
+
typename _Alloc = allocator<_CharT> >
|
| 80 |
+
class basic_stringstream;
|
| 81 |
+
|
| 82 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 83 |
+
class basic_filebuf;
|
| 84 |
+
|
| 85 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 86 |
+
class basic_ifstream;
|
| 87 |
+
|
| 88 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 89 |
+
class basic_ofstream;
|
| 90 |
+
|
| 91 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 92 |
+
class basic_fstream;
|
| 93 |
+
|
| 94 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 95 |
+
class istreambuf_iterator;
|
| 96 |
+
|
| 97 |
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
|
| 98 |
+
class ostreambuf_iterator;
|
| 99 |
+
|
| 100 |
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
| 101 |
+
// Not included. (??? Apparently no LWG number?)
|
| 102 |
+
class ios_base;
|
| 103 |
+
|
| 104 |
+
/**
|
| 105 |
+
* @defgroup s27_2_iosfwd I/O Forward Declarations
|
| 106 |
+
*
|
| 107 |
+
* Nearly all of the I/O classes are parameterized on the type of
|
| 108 |
+
* characters they read and write. (The major exception is ios_base at
|
| 109 |
+
* the top of the hierarchy.) This is a change from pre-Standard
|
| 110 |
+
* streams, which were not templates.
|
| 111 |
+
*
|
| 112 |
+
* For ease of use and compatibility, all of the basic_* I/O-related
|
| 113 |
+
* classes are given typedef names for both of the builtin character
|
| 114 |
+
* widths (wide and narrow). The typedefs are the same as the
|
| 115 |
+
* pre-Standard names, for example:
|
| 116 |
+
*
|
| 117 |
+
* @code
|
| 118 |
+
* typedef basic_ifstream<char> ifstream;
|
| 119 |
+
* @endcode
|
| 120 |
+
*
|
| 121 |
+
* Because properly forward-declaring these classes can be difficult, you
|
| 122 |
+
* should not do it yourself. Instead, include the <iosfwd>
|
| 123 |
+
* header, which contains only declarations of all the I/O classes as
|
| 124 |
+
* well as the typedefs. Trying to forward-declare the typedefs
|
| 125 |
+
* themselves (e.g., "class ostream;") is not valid ISO C++.
|
| 126 |
+
*
|
| 127 |
+
* For more specific declarations, see
|
| 128 |
+
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
|
| 129 |
+
*
|
| 130 |
+
* @{
|
| 131 |
+
*/
|
| 132 |
+
typedef basic_ios<char> ios; ///< @isiosfwd
|
| 133 |
+
typedef basic_streambuf<char> streambuf; ///< @isiosfwd
|
| 134 |
+
typedef basic_istream<char> istream; ///< @isiosfwd
|
| 135 |
+
typedef basic_ostream<char> ostream; ///< @isiosfwd
|
| 136 |
+
typedef basic_iostream<char> iostream; ///< @isiosfwd
|
| 137 |
+
typedef basic_stringbuf<char> stringbuf; ///< @isiosfwd
|
| 138 |
+
typedef basic_istringstream<char> istringstream; ///< @isiosfwd
|
| 139 |
+
typedef basic_ostringstream<char> ostringstream; ///< @isiosfwd
|
| 140 |
+
typedef basic_stringstream<char> stringstream; ///< @isiosfwd
|
| 141 |
+
typedef basic_filebuf<char> filebuf; ///< @isiosfwd
|
| 142 |
+
typedef basic_ifstream<char> ifstream; ///< @isiosfwd
|
| 143 |
+
typedef basic_ofstream<char> ofstream; ///< @isiosfwd
|
| 144 |
+
typedef basic_fstream<char> fstream; ///< @isiosfwd
|
| 145 |
+
|
| 146 |
+
#ifdef _GLIBCXX_USE_WCHAR_T
|
| 147 |
+
typedef basic_ios<wchar_t> wios; ///< @isiosfwd
|
| 148 |
+
typedef basic_streambuf<wchar_t> wstreambuf; ///< @isiosfwd
|
| 149 |
+
typedef basic_istream<wchar_t> wistream; ///< @isiosfwd
|
| 150 |
+
typedef basic_ostream<wchar_t> wostream; ///< @isiosfwd
|
| 151 |
+
typedef basic_iostream<wchar_t> wiostream; ///< @isiosfwd
|
| 152 |
+
typedef basic_stringbuf<wchar_t> wstringbuf; ///< @isiosfwd
|
| 153 |
+
typedef basic_istringstream<wchar_t> wistringstream; ///< @isiosfwd
|
| 154 |
+
typedef basic_ostringstream<wchar_t> wostringstream; ///< @isiosfwd
|
| 155 |
+
typedef basic_stringstream<wchar_t> wstringstream; ///< @isiosfwd
|
| 156 |
+
typedef basic_filebuf<wchar_t> wfilebuf; ///< @isiosfwd
|
| 157 |
+
typedef basic_ifstream<wchar_t> wifstream; ///< @isiosfwd
|
| 158 |
+
typedef basic_ofstream<wchar_t> wofstream; ///< @isiosfwd
|
| 159 |
+
typedef basic_fstream<wchar_t> wfstream; ///< @isiosfwd
|
| 160 |
+
#endif
|
| 161 |
+
/** @} */
|
| 162 |
+
|
| 163 |
+
_GLIBCXX_END_NAMESPACE
|
| 164 |
+
|
| 165 |
+
#endif /* _GLIBCXX_IOSFWD */
|
mingw/lib/gcc/mingw32/4.3.3/include/c++/iostream
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Standard iostream objects -*- C++ -*-
|
| 2 |
+
|
| 3 |
+
// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2005, 2008
|
| 4 |
+
// Free Software Foundation, Inc.
|
| 5 |
+
//
|
| 6 |
+
// This file is part of the GNU ISO C++ Library. This library is free
|
| 7 |
+
// software; you can redistribute it and/or modify it under the
|
| 8 |
+
// terms of the GNU General Public License as published by the
|
| 9 |
+
// Free Software Foundation; either version 2, or (at your option)
|
| 10 |
+
// any later version.
|
| 11 |
+
|
| 12 |
+
// This library is distributed in the hope that it will be useful,
|
| 13 |
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 14 |
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 15 |
+
// GNU General Public License for more details.
|
| 16 |
+
|
| 17 |
+
// You should have received a copy of the GNU General Public License
|
| 18 |
+
// along with this library; see the file COPYING. If not, write to
|
| 19 |
+
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
| 20 |
+
// Boston, MA 02110-1301, USA.
|
| 21 |
+
|
| 22 |
+
// As a special exception, you may use this file as part of a free software
|
| 23 |
+
// library without restriction. Specifically, if other files instantiate
|
| 24 |
+
// templates or use macros or inline functions from this file, or you compile
|
| 25 |
+
// this file and link it with other files to produce an executable, this
|
| 26 |
+
// file does not by itself cause the resulting executable to be covered by
|
| 27 |
+
// the GNU General Public License. This exception does not however
|
| 28 |
+
// invalidate any other reasons why the executable file might be covered by
|
| 29 |
+
// the GNU General Public License.
|
| 30 |
+
|
| 31 |
+
/** @file iostream
|
| 32 |
+
* This is a Standard C++ Library header.
|
| 33 |
+
*/
|
| 34 |
+
|
| 35 |
+
//
|
| 36 |
+
// ISO C++ 14882: 27.3 Standard iostream objects
|
| 37 |
+
//
|
| 38 |
+
|
| 39 |
+
#ifndef _GLIBCXX_IOSTREAM
|
| 40 |
+
#define _GLIBCXX_IOSTREAM 1
|
| 41 |
+
|
| 42 |
+
#pragma GCC system_header
|
| 43 |
+
|
| 44 |
+
#include <bits/c++config.h>
|
| 45 |
+
#include <ostream>
|
| 46 |
+
#include <istream>
|
| 47 |
+
|
| 48 |
+
_GLIBCXX_BEGIN_NAMESPACE(std)
|
| 49 |
+
|
| 50 |
+
/**
|
| 51 |
+
* @name Standard Stream Objects
|
| 52 |
+
*
|
| 53 |
+
* The <iostream> header declares the eight <em>standard stream
|
| 54 |
+
* objects</em>. For other declarations, see
|
| 55 |
+
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
|
| 56 |
+
* and the @link s27_2_iosfwd I/O forward declarations @endlink
|
| 57 |
+
*
|
| 58 |
+
* They are required by default to cooperate with the global C library's
|
| 59 |
+
* @c FILE streams, and to be available during program startup and
|
| 60 |
+
* termination. For more information, see the HOWTO linked to above.
|
| 61 |
+
*/
|
| 62 |
+
//@{
|
| 63 |
+
extern istream cin; ///< Linked to standard input
|
| 64 |
+
extern ostream cout; ///< Linked to standard output
|
| 65 |
+
extern ostream cerr; ///< Linked to standard error (unbuffered)
|
| 66 |
+
extern ostream clog; ///< Linked to standard error (buffered)
|
| 67 |
+
|
| 68 |
+
#ifdef _GLIBCXX_USE_WCHAR_T
|
| 69 |
+
extern wistream wcin; ///< Linked to standard input
|
| 70 |
+
extern wostream wcout; ///< Linked to standard output
|
| 71 |
+
extern wostream wcerr; ///< Linked to standard error (unbuffered)
|
| 72 |
+
extern wostream wclog; ///< Linked to standard error (buffered)
|
| 73 |
+
#endif
|
| 74 |
+
//@}
|
| 75 |
+
|
| 76 |
+
// For construction of filebuffers for cout, cin, cerr, clog et. al.
|
| 77 |
+
static ios_base::Init __ioinit;
|
| 78 |
+
|
| 79 |
+
_GLIBCXX_END_NAMESPACE
|
| 80 |
+
|
| 81 |
+
#endif /* _GLIBCXX_IOSTREAM */
|