mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-29 00:27:52 +01:00
working vector
This commit is contained in:
5
.idea/codeStyles/Project.xml
generated
5
.idea/codeStyles/Project.xml
generated
@@ -1,5 +1,10 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="DO_NOT_FORMAT">
|
||||
<list>
|
||||
<fileSet type="globPattern" pattern="stl/*" />
|
||||
</list>
|
||||
</option>
|
||||
<clangFormatSettings>
|
||||
<option name="ENABLED" value="true" />
|
||||
</clangFormatSettings>
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
|
||||
#include "TtyManager.hpp"
|
||||
|
||||
#include "map"
|
||||
#include "stl/pair.h"
|
||||
#include "stl/vector.h"
|
||||
|
||||
class SharedPtrTester {
|
||||
private:
|
||||
@@ -282,5 +283,10 @@ int test_templates() {
|
||||
cowTester.test();
|
||||
test_unique_ptr();
|
||||
test_list();
|
||||
|
||||
cgistd::vector<int> test;
|
||||
test.push_back(1);
|
||||
test.push_back(2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
target_include_directories(kernel.elf PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
#target_include_directories(kernel.elf PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
@@ -27,10 +27,10 @@
|
||||
#ifndef __SGI_STL_ALGO_H
|
||||
#define __SGI_STL_ALGO_H
|
||||
|
||||
#include <algobase.h>
|
||||
#include <tempbuf.h>
|
||||
#include <stl_algo.h>
|
||||
#include <stl_numeric.h>
|
||||
#include "algobase.h"
|
||||
#include "tempbuf.h"
|
||||
#include "stl_algo.h"
|
||||
#include "stl_numeric.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
|
||||
@@ -27,16 +27,16 @@
|
||||
#define __SGI_STL_ALGOBASE_H
|
||||
|
||||
#ifndef __SGI_STL_PAIR_H
|
||||
#include <pair.h>
|
||||
#include "pair.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_ITERATOR_H
|
||||
#include <iterator.h>
|
||||
#include "iterator.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_ALGOBASE_H
|
||||
#include <stl_algobase.h>
|
||||
#include "stl_algobase.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_UNINITIALIZED_H
|
||||
#include <stl_uninitialized.h>
|
||||
#include "stl_uninitialized.h"
|
||||
#endif
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
#ifndef __SGI_STL_ALGORITHM
|
||||
#define __SGI_STL_ALGORITHM
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_tempbuf.h>
|
||||
#include <stl_algo.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_tempbuf.h"
|
||||
#include "stl_algo.h"
|
||||
|
||||
#endif /* __SGI_STL_ALGORITHM */
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
#define __SGI_STL_ALLOC_H
|
||||
|
||||
#ifndef __STL_CONFIG_H
|
||||
#include <stl_config.h>
|
||||
#include "stl_config.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_ALLOC_H
|
||||
#include <stl_alloc.h>
|
||||
#include "stl_alloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
@@ -30,16 +30,16 @@
|
||||
// returns a reference to a bit, again without doing any range checking.
|
||||
|
||||
|
||||
#include <stddef.h> // for size_t
|
||||
#include <string.h> // for memset
|
||||
#include <string>
|
||||
#include <stdexcept> // for invalid_argument, out_of_range, overflow_error
|
||||
#include "stddef.h" // for size_t
|
||||
#include "string.h" // for memset
|
||||
#include "string"
|
||||
#include "stdexcept" // for invalid_argument, out_of_range, overflow_error
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
#include <iostream>
|
||||
#else
|
||||
#include <iostream.h> // for istream, ostream
|
||||
#endif
|
||||
//#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
//#include "iostream"
|
||||
//#else
|
||||
//#include "iostream.h" // for istream, ostream
|
||||
//#endif
|
||||
|
||||
#define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
|
||||
#define __BITSET_WORDS(__n) \
|
||||
@@ -841,104 +841,104 @@ inline bitset<_Nb> operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) {
|
||||
return __result;
|
||||
}
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
|
||||
template <class _CharT, class _Traits, size_t _Nb>
|
||||
basic_istream<_CharT, _Traits>&
|
||||
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
|
||||
{
|
||||
basic_string<_CharT, _Traits> __tmp;
|
||||
__tmp.reserve(_Nb);
|
||||
|
||||
// Skip whitespace
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
|
||||
if (__sentry) {
|
||||
basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
|
||||
for (size_t __i = 0; __i < _Nb; ++__i) {
|
||||
static _Traits::int_type __eof = _Traits::eof();
|
||||
|
||||
typename _Traits::int_type __c1 = __buf->sbumpc();
|
||||
if (_Traits::eq_int_type(__c1, __eof)) {
|
||||
__is.setstate(ios_base::eofbit);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
char __c2 = _Traits::to_char_type(__c1);
|
||||
char __c = __is.narrow(__c2, '*');
|
||||
|
||||
if (__c == '0' || __c == '1')
|
||||
__tmp.push_back(__c);
|
||||
else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
|
||||
__is.setstate(ios_base::failbit);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (__tmp.empty())
|
||||
__is.setstate(ios_base::failbit);
|
||||
else
|
||||
__x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
|
||||
}
|
||||
|
||||
return __is;
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, size_t _Nb>
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x)
|
||||
{
|
||||
basic_string<_CharT, _Traits> __tmp;
|
||||
__x._M_copy_to_string(__tmp);
|
||||
return __os << __tmp;
|
||||
}
|
||||
|
||||
#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
template <size_t _Nb>
|
||||
istream& operator>>(istream& __is, bitset<_Nb>& __x) {
|
||||
string __tmp;
|
||||
__tmp.reserve(_Nb);
|
||||
|
||||
if (__is.flags() & ios::skipws) {
|
||||
char __c;
|
||||
do
|
||||
__is.get(__c);
|
||||
while (__is && isspace(__c));
|
||||
if (__is)
|
||||
__is.putback(__c);
|
||||
}
|
||||
|
||||
for (size_t __i = 0; __i < _Nb; ++__i) {
|
||||
char __c;
|
||||
__is.get(__c);
|
||||
|
||||
if (!__is)
|
||||
break;
|
||||
else if (__c != '0' && __c != '1') {
|
||||
__is.putback(__c);
|
||||
break;
|
||||
}
|
||||
else
|
||||
__tmp.push_back(__c);
|
||||
}
|
||||
|
||||
if (__tmp.empty())
|
||||
__is.clear(__is.rdstate() | ios::failbit);
|
||||
else
|
||||
__x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
|
||||
|
||||
return __is;
|
||||
}
|
||||
|
||||
template <size_t _Nb>
|
||||
ostream& operator<<(ostream& __os, const bitset<_Nb>& __x) {
|
||||
string __tmp;
|
||||
__x._M_copy_to_string(__tmp);
|
||||
return __os << __tmp;
|
||||
}
|
||||
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
//
|
||||
//template <class _CharT, class _Traits, size_t _Nb>
|
||||
//basic_istream<_CharT, _Traits>&
|
||||
//operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
|
||||
//{
|
||||
// basic_string<_CharT, _Traits> __tmp;
|
||||
// __tmp.reserve(_Nb);
|
||||
//
|
||||
// // Skip whitespace
|
||||
// typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
|
||||
// if (__sentry) {
|
||||
// basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
|
||||
// for (size_t __i = 0; __i < _Nb; ++__i) {
|
||||
// static _Traits::int_type __eof = _Traits::eof();
|
||||
//
|
||||
// typename _Traits::int_type __c1 = __buf->sbumpc();
|
||||
// if (_Traits::eq_int_type(__c1, __eof)) {
|
||||
// __is.setstate(ios_base::eofbit);
|
||||
// break;
|
||||
// }
|
||||
// else {
|
||||
// char __c2 = _Traits::to_char_type(__c1);
|
||||
// char __c = __is.narrow(__c2, '*');
|
||||
//
|
||||
// if (__c == '0' || __c == '1')
|
||||
// __tmp.push_back(__c);
|
||||
// else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
|
||||
// __is.setstate(ios_base::failbit);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (__tmp.empty())
|
||||
// __is.setstate(ios_base::failbit);
|
||||
// else
|
||||
// __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
|
||||
// }
|
||||
//
|
||||
// return __is;
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, size_t _Nb>
|
||||
//basic_ostream<_CharT, _Traits>&
|
||||
//operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x)
|
||||
//{
|
||||
// basic_string<_CharT, _Traits> __tmp;
|
||||
// __x._M_copy_to_string(__tmp);
|
||||
// return __os << __tmp;
|
||||
//}
|
||||
//
|
||||
//#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
//
|
||||
//template <size_t _Nb>
|
||||
//istream& operator>>(istream& __is, bitset<_Nb>& __x) {
|
||||
// string __tmp;
|
||||
// __tmp.reserve(_Nb);
|
||||
//
|
||||
// if (__is.flags() & ios::skipws) {
|
||||
// char __c;
|
||||
// do
|
||||
// __is.get(__c);
|
||||
// while (__is && isspace(__c));
|
||||
// if (__is)
|
||||
// __is.putback(__c);
|
||||
// }
|
||||
//
|
||||
// for (size_t __i = 0; __i < _Nb; ++__i) {
|
||||
// char __c;
|
||||
// __is.get(__c);
|
||||
//
|
||||
// if (!__is)
|
||||
// break;
|
||||
// else if (__c != '0' && __c != '1') {
|
||||
// __is.putback(__c);
|
||||
// break;
|
||||
// }
|
||||
// else
|
||||
// __tmp.push_back(__c);
|
||||
// }
|
||||
//
|
||||
// if (__tmp.empty())
|
||||
// __is.clear(__is.rdstate() | ios::failbit);
|
||||
// else
|
||||
// __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
|
||||
//
|
||||
// return __is;
|
||||
//}
|
||||
//
|
||||
//template <size_t _Nb>
|
||||
//ostream& operator<<(ostream& __os, const bitset<_Nb>& __x) {
|
||||
// string __tmp;
|
||||
// __x._M_copy_to_string(__tmp);
|
||||
// return __os << __tmp;
|
||||
//}
|
||||
//
|
||||
//#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Lookup tables for find and count operations.
|
||||
|
||||
@@ -27,15 +27,15 @@
|
||||
#ifndef __SGI_STL_BVECTOR_H
|
||||
#define __SGI_STL_BVECTOR_H
|
||||
|
||||
#include <stl_range_errors.h>
|
||||
#include "stl_range_errors.h"
|
||||
#ifdef __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
#include <vector.h>
|
||||
#include "vector.h"
|
||||
#else
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#endif
|
||||
|
||||
#include <stl_bvector.h>
|
||||
#include "stl_bvector.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
#ifndef __SGI_STL_CHAR_TRAITS_H
|
||||
#define __SGI_STL_CHAR_TRAITS_H
|
||||
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "string.h"
|
||||
#include "wchar.h"
|
||||
|
||||
#if defined(__STL_USE_NEW_IOSTREAMS) && !defined(__SGI_STL_IOSFWD)
|
||||
#include <iosfwd>
|
||||
#include "iosfwd"
|
||||
#endif /* use new iostreams */
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define __STL_CONTAINER_CONCEPTS_H
|
||||
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
#ifdef __STL_USE_CONCEPT_CHECKS
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
#ifndef DEFALLOC_H
|
||||
#define DEFALLOC_H
|
||||
|
||||
#include <new.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <iostream.h>
|
||||
#include <algobase.h>
|
||||
#include "new"
|
||||
#include "stddef.h"
|
||||
#include "stdlib.h"
|
||||
#include "limits.h"
|
||||
//#include "iostream.h"
|
||||
#include "algobase.h"
|
||||
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
#ifndef __SGI_STL_DEQUE
|
||||
#define __SGI_STL_DEQUE
|
||||
|
||||
#include <stl_range_errors.h>
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_deque.h>
|
||||
#include "stl_range_errors.h"
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_deque.h"
|
||||
|
||||
#endif /* __SGI_STL_DEQUE */
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
#ifndef __SGI_STL_DEQUE_H
|
||||
#define __SGI_STL_DEQUE_H
|
||||
|
||||
#include <stl_range_errors.h>
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include <stl_deque.h>
|
||||
#include "stl_range_errors.h"
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include "stl_deque.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::deque;
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
#define __SGI_STL_FUNCTION_H
|
||||
|
||||
#ifndef __STL_CONFIG_H
|
||||
#include <stl_config.h>
|
||||
#include "stl_config.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_RELOPS
|
||||
#include <stl_relops.h>
|
||||
#include "stl_relops.h"
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include "stddef.h"
|
||||
#ifndef __SGI_STL_INTERNAL_FUNCTION_H
|
||||
#include <stl_function.h>
|
||||
#include "stl_function.h"
|
||||
#endif
|
||||
|
||||
#ifdef __STL_USE_NAMESPACE_FOR_RELOPS
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
#ifndef __SGI_STL_FUNCTIONAL
|
||||
#define __SGI_STL_FUNCTIONAL
|
||||
|
||||
#include <stl_config.h>
|
||||
#include <stddef.h>
|
||||
#include <stl_function.h>
|
||||
#include "stl_config.h"
|
||||
#include "stddef.h"
|
||||
#include "stl_function.h"
|
||||
|
||||
#endif /* __SGI_STL_FUNCTIONAL */
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
#define __SGI_STL_HASH_MAP
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_HASHTABLE_H
|
||||
#include <stl_hashtable.h>
|
||||
#include "stl_hashtable.h"
|
||||
#endif
|
||||
|
||||
#include <stl_hash_map.h>
|
||||
#include "stl_hash_map.h"
|
||||
|
||||
#endif /* __SGI_STL_HASH_MAP */
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#define __SGI_STL_HASH_MAP_H
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_HASHTABLE_H
|
||||
#include <stl_hashtable.h>
|
||||
#include "stl_hashtable.h"
|
||||
#endif
|
||||
|
||||
#include <algobase.h>
|
||||
#include <stl_hash_map.h>
|
||||
#include "algobase.h"
|
||||
#include "stl_hash_map.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::hash;
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
#define __SGI_STL_HASH_SET
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_HASHTABLE_H
|
||||
#include <stl_hashtable.h>
|
||||
#include "stl_hashtable.h"
|
||||
#endif
|
||||
|
||||
#include <stl_hash_set.h>
|
||||
#include "stl_hash_set.h"
|
||||
|
||||
#endif /* __SGI_STL_HASH_SET */
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#define __SGI_STL_HASH_SET_H
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_HASHTABLE_H
|
||||
#include <stl_hashtable.h>
|
||||
#include "stl_hashtable.h"
|
||||
#endif
|
||||
|
||||
#include <algobase.h>
|
||||
#include <stl_hash_set.h>
|
||||
#include "algobase.h"
|
||||
#include "stl_hash_set.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::hash;
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
#ifndef __SGI_STL_HASHTABLE_H
|
||||
#define __SGI_STL_HASHTABLE_H
|
||||
|
||||
#include <stl_hashtable.h>
|
||||
#include <algo.h>
|
||||
#include <alloc.h>
|
||||
#include <vector.h>
|
||||
#include "stl_hashtable.h"
|
||||
#include "algo.h"
|
||||
#include "alloc.h"
|
||||
#include "vector.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::hash;
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#ifndef __SGI_STL_HEAP_H
|
||||
#define __SGI_STL_HEAP_H
|
||||
|
||||
#include <stl_config.h>
|
||||
#include <stl_heap.h>
|
||||
#include "stl_config.h"
|
||||
#include "stl_heap.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
|
||||
@@ -27,18 +27,18 @@
|
||||
#ifndef __SGI_STL_ITERATOR
|
||||
#define __SGI_STL_ITERATOR
|
||||
|
||||
#include <stl_config.h>
|
||||
#include <stl_relops.h>
|
||||
#include <stddef.h>
|
||||
#include "stl_config.h"
|
||||
#include "stl_relops.h"
|
||||
#include "stddef.h"
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
#include <iosfwd>
|
||||
#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
#include <iostream.h>
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
//#include "iosfwd"
|
||||
//#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#include "iostream.h"
|
||||
//#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
#include <stl_iterator_base.h>
|
||||
#include <stl_iterator.h>
|
||||
#include "stl_iterator_base.h"
|
||||
#include "stl_iterator.h"
|
||||
|
||||
#endif /* __SGI_STL_ITERATOR */
|
||||
|
||||
|
||||
@@ -28,30 +28,30 @@
|
||||
#define __SGI_STL_ITERATOR_H
|
||||
|
||||
#ifndef __SGI_STL_FUNCTION_H
|
||||
#include <function.h>
|
||||
#include "function.h"
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include "stddef.h"
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
#include <iosfwd>
|
||||
#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
#include <iostream.h>
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
//#include "iosfwd"
|
||||
//#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#include "iostream.h"
|
||||
//#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_H
|
||||
#include <stl_iterator_base.h>
|
||||
#include "stl_iterator_base.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_ITERATOR_H
|
||||
#include <stl_iterator.h>
|
||||
#include "stl_iterator.h"
|
||||
#endif
|
||||
#ifndef __TYPE_TRAITS_H
|
||||
#include <type_traits.h>
|
||||
#include "type_traits.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_CONSTRUCT_H
|
||||
#include <stl_construct.h>
|
||||
#include "stl_construct.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H
|
||||
#include <stl_raw_storage_iter.h>
|
||||
#include "stl_raw_storage_iter.h"
|
||||
#endif
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
@@ -94,8 +94,8 @@ using __STD::back_inserter;
|
||||
using __STD::reverse_iterator;
|
||||
using __STD::reverse_bidirectional_iterator;
|
||||
|
||||
using __STD::istream_iterator;
|
||||
using __STD::ostream_iterator;
|
||||
//using __STD::istream_iterator;
|
||||
//using __STD::ostream_iterator;
|
||||
|
||||
// Names from stl_construct.h
|
||||
using __STD::construct;
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
#ifndef __SGI_CPP_LIMITS
|
||||
#define __SGI_CPP_LIMITS
|
||||
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
#include <stl_config.h>
|
||||
#include "limits.h"
|
||||
#include "float.h"
|
||||
#include "stl_config.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
#ifndef __SGI_STL_LIST
|
||||
#define __SGI_STL_LIST
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_list.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_list.h"
|
||||
|
||||
#endif /* __SGI_STL_LIST */
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#ifndef __SGI_STL_LIST_H
|
||||
#define __SGI_STL_LIST_H
|
||||
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include <stl_list.h>
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include "stl_list.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::list;
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
#define __SGI_STL_MAP
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_TREE_H
|
||||
#include <stl_tree.h>
|
||||
#include "stl_tree.h"
|
||||
#endif
|
||||
#include <stl_map.h>
|
||||
#include <stl_multimap.h>
|
||||
#include "stl_map.h"
|
||||
#include "stl_multimap.h"
|
||||
|
||||
#endif /* __SGI_STL_MAP */
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#define __SGI_STL_MAP_H
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_TREE_H
|
||||
#include <stl_tree.h>
|
||||
#include "stl_tree.h"
|
||||
#endif
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include <stl_map.h>
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include "stl_map.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::rb_tree;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
#ifndef __SGI_STL_MEMORY
|
||||
#define __SGI_STL_MEMORY
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_tempbuf.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_raw_storage_iter.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_tempbuf.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_raw_storage_iter.h"
|
||||
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#define __SGI_STL_MULTIMAP_H
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_TREE_H
|
||||
#include <stl_tree.h>
|
||||
#include "stl_tree.h"
|
||||
#endif
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include <stl_multimap.h>
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include "stl_multimap.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::rb_tree;
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#define __SGI_STL_MULTISET_H
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_TREE_H
|
||||
#include <stl_tree.h>
|
||||
#include "stl_tree.h"
|
||||
#endif
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include <stl_multiset.h>
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include "stl_multiset.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::rb_tree;
|
||||
|
||||
@@ -27,20 +27,20 @@
|
||||
#ifndef __SGI_STL_NUMERIC
|
||||
#define __SGI_STL_NUMERIC
|
||||
|
||||
#include <stl_config.h>
|
||||
#include <stl_relops.h>
|
||||
#include <stddef.h>
|
||||
#include "stl_config.h"
|
||||
#include "stl_relops.h"
|
||||
#include "stddef.h"
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
#include <iostream>
|
||||
#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
#include <iostream.h>
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
//#include "iostream"
|
||||
//#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#include "iostream.h"
|
||||
//#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
#include <stl_iterator_base.h>
|
||||
#include <stl_iterator.h>
|
||||
#include <stl_function.h>
|
||||
#include <stl_numeric.h>
|
||||
#include "stl_iterator_base.h"
|
||||
#include "stl_iterator.h"
|
||||
#include "stl_function.h"
|
||||
#include "stl_numeric.h"
|
||||
|
||||
#endif /* __SGI_STL_NUMERIC */
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
#define __SGI_STL_PAIR_H
|
||||
|
||||
#ifndef __STL_CONFIG_H
|
||||
#include <stl_config.h>
|
||||
#include "stl_config.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_RELOPS
|
||||
#include <stl_relops.h>
|
||||
#include "stl_relops.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_PAIR_H
|
||||
#include <stl_pair.h>
|
||||
#include "stl_pair.h"
|
||||
#endif
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
// cache lines among processors, with potentially serious performance
|
||||
// consequences.
|
||||
|
||||
#include <errno.h>
|
||||
#include <stl_config.h>
|
||||
#include <stl_alloc.h>
|
||||
#include "errno.h"
|
||||
#include "stl_config.h"
|
||||
#include "stl_alloc.h"
|
||||
#ifndef __RESTRICT
|
||||
# define __RESTRICT
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef __SGI_STL_PTHREAD_ALLOC_H
|
||||
#define __SGI_STL_PTHREAD_ALLOC_H
|
||||
|
||||
#include <pthread_alloc>
|
||||
#include "pthread_alloc"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
|
||||
@@ -27,16 +27,16 @@
|
||||
#ifndef __SGI_STL_QUEUE
|
||||
#define __SGI_STL_QUEUE
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_vector.h>
|
||||
#include <stl_bvector.h>
|
||||
#include <stl_heap.h>
|
||||
#include <stl_deque.h>
|
||||
#include <stl_function.h>
|
||||
#include <stl_queue.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_vector.h"
|
||||
#include "stl_bvector.h"
|
||||
#include "stl_heap.h"
|
||||
#include "stl_deque.h"
|
||||
#include "stl_function.h"
|
||||
#include "stl_queue.h"
|
||||
|
||||
#endif /* __SGI_STL_QUEUE */
|
||||
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
#ifndef __SGI_STL_ROPE
|
||||
#define __SGI_STL_ROPE
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_tempbuf.h>
|
||||
#include <stl_algo.h>
|
||||
#include <stl_function.h>
|
||||
#include <stl_numeric.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_hash_fun.h>
|
||||
#include <stl_rope.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_tempbuf.h"
|
||||
#include "stl_algo.h"
|
||||
#include "stl_function.h"
|
||||
#include "stl_numeric.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_hash_fun.h"
|
||||
#include "stl_rope.h"
|
||||
|
||||
#endif /* __SGI_STL_ROPE */
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#ifndef __SGI_STL_ROPE_H
|
||||
#define __SGI_STL_ROPE_H
|
||||
|
||||
#include <hashtable.h>
|
||||
#include <stl_rope.h>
|
||||
#include "hashtable.h"
|
||||
#include "stl_rope.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef STL_SEQUENCE_CONCEPTS_H
|
||||
#define STL_SEQUENCE_CONCEPTS_H
|
||||
|
||||
#include <container_concepts.h>
|
||||
#include "container_concepts.h"
|
||||
|
||||
#ifdef __STL_USE_CONCEPT_CHECKS
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
#define __SGI_STL_SET
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_TREE_H
|
||||
#include <stl_tree.h>
|
||||
#include "stl_tree.h"
|
||||
#endif
|
||||
#include <stl_set.h>
|
||||
#include <stl_multiset.h>
|
||||
#include "stl_set.h"
|
||||
#include "stl_multiset.h"
|
||||
|
||||
#endif /* __SGI_STL_SET */
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#define __SGI_STL_SET_H
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_TREE_H
|
||||
#include <stl_tree.h>
|
||||
#include "stl_tree.h"
|
||||
#endif
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include <stl_set.h>
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include "stl_set.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::rb_tree;
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
#ifndef __SGI_STL_SLIST
|
||||
#define __SGI_STL_SLIST
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_slist.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_slist.h"
|
||||
|
||||
#endif /* __SGI_STL_SLIST */
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
#ifndef __SGI_STL_SLIST_H
|
||||
#define __SGI_STL_SLIST_H
|
||||
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include <stl_slist.h>
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include "stl_slist.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::slist;
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
#ifndef __SGI_STL_STACK
|
||||
#define __SGI_STL_STACK
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_deque.h>
|
||||
#include <stl_stack.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_deque.h"
|
||||
#include "stl_stack.h"
|
||||
|
||||
#endif /* __SGI_STL_STACK */
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
#ifndef __SGI_STL_STACK_H
|
||||
#define __SGI_STL_STACK_H
|
||||
|
||||
#include <vector.h>
|
||||
#include <deque.h>
|
||||
#include <heap.h>
|
||||
#include <stl_stack.h>
|
||||
#include <stl_queue.h>
|
||||
#include "vector.h"
|
||||
#include "deque.h"
|
||||
#include "heap.h"
|
||||
#include "stl_stack.h"
|
||||
#include "stl_queue.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::stack;
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
#ifndef __SGI_STDEXCEPT
|
||||
#define __SGI_STDEXCEPT
|
||||
|
||||
#include <stl_exception.h>
|
||||
#include "stl_exception.h"
|
||||
|
||||
#if defined(__STL_USE_EXCEPTIONS) || \
|
||||
!(defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32)
|
||||
|
||||
#include <stl_string_fwd.h>
|
||||
#include "stl_string_fwd.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
__STL_END_NAMESPACE
|
||||
|
||||
#ifndef __SGI_STL_STRING
|
||||
#include <string>
|
||||
#include "string"
|
||||
#endif
|
||||
|
||||
#endif /* Not o32, and no exceptions */
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_ALGO_H
|
||||
#define __SGI_STL_INTERNAL_ALGO_H
|
||||
|
||||
#include <stl_heap.h>
|
||||
#include "stl_heap.h"
|
||||
|
||||
// See concept_checks.h for the concept-checking macros
|
||||
// __STL_REQUIRES, __STL_CONVERTIBLE, etc.
|
||||
|
||||
@@ -33,33 +33,33 @@
|
||||
#define __SGI_STL_INTERNAL_ALGOBASE_H
|
||||
|
||||
#ifndef __STL_CONFIG_H
|
||||
#include <stl_config.h>
|
||||
#include "stl_config.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_RELOPS
|
||||
#include <stl_relops.h>
|
||||
#include "stl_relops.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_PAIR_H
|
||||
#include <stl_pair.h>
|
||||
#include "stl_pair.h"
|
||||
#endif
|
||||
#ifndef __TYPE_TRAITS_H
|
||||
#include <type_traits.h>
|
||||
#include "type_traits.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <new.h>
|
||||
#include "string.h"
|
||||
#include "limits.h"
|
||||
#include "stdlib.h"
|
||||
#include "stddef.h"
|
||||
#include "new"
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
#include <iosfwd>
|
||||
#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
#include <iostream.h>
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
//#include "iosfwd"
|
||||
//#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#include "iostream.h"
|
||||
//#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_ITERATOR_H
|
||||
#include <stl_iterator_base.h>
|
||||
#include <stl_iterator.h>
|
||||
#include "stl_iterator_base.h"
|
||||
#include "stl_iterator.h"
|
||||
#endif
|
||||
|
||||
// We pick up concept_checks.h from stl_iterator_base.h.
|
||||
|
||||
@@ -40,19 +40,20 @@
|
||||
|
||||
#ifndef __THROW_BAD_ALLOC
|
||||
# if defined(__STL_NO_BAD_ALLOC) || !defined(__STL_USE_EXCEPTIONS)
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# define __THROW_BAD_ALLOC fprintf(stderr, "out of memory\n"); exit(1)
|
||||
//# include <stdio.h>
|
||||
//# include <stdlib.h>
|
||||
#include "asserts.hpp"
|
||||
# define __THROW_BAD_ALLOC assert2(false,"out of memory");
|
||||
# else /* Standard conforming out-of-memory handling */
|
||||
# include <new>
|
||||
# define __THROW_BAD_ALLOC throw std::bad_alloc()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "stddef.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "asserts.hpp"
|
||||
#ifndef __RESTRICT
|
||||
# define __RESTRICT
|
||||
#endif
|
||||
|
||||
@@ -141,84 +141,84 @@
|
||||
// * __stl_assert, either as a test or as a null macro, depending on
|
||||
// whether or not __STL_ASSERTIONS is defined.
|
||||
|
||||
# if defined(_PTHREADS) && !defined(_NOTHREADS)
|
||||
# define __STL_PTHREADS
|
||||
# endif
|
||||
|
||||
# if defined(_UITHREADS) && !defined(_PTHREADS) && !defined(_NOTHREADS)
|
||||
# define __STL_UITHREADS
|
||||
# endif
|
||||
|
||||
# if defined(__sgi) && !defined(__GNUC__)
|
||||
# include <standards.h>
|
||||
# if !defined(_BOOL)
|
||||
# define __STL_NO_BOOL
|
||||
# endif
|
||||
# if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32
|
||||
# define __STL_STATIC_CONST_INIT_BUG
|
||||
# endif
|
||||
# if defined(_WCHAR_T_IS_KEYWORD)
|
||||
# define __STL_HAS_WCHAR_T
|
||||
# endif
|
||||
# if !defined(_TYPENAME_IS_KEYWORD)
|
||||
# define __STL_NEED_TYPENAME
|
||||
# endif
|
||||
# ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES
|
||||
# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
# endif
|
||||
# if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32
|
||||
# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
# endif
|
||||
# ifdef _MEMBER_TEMPLATES
|
||||
# define __STL_MEMBER_TEMPLATES
|
||||
# define __STL_TEMPLATE_FRIENDS
|
||||
# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
# endif
|
||||
# if defined(_MEMBER_TEMPLATE_KEYWORD)
|
||||
# define __STL_MEMBER_TEMPLATE_KEYWORD
|
||||
# endif
|
||||
# if defined(_STANDARD_C_PLUS_PLUS)
|
||||
# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
# endif
|
||||
# if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32
|
||||
# define __STL_MEMBER_TEMPLATE_KEYWORD
|
||||
# endif
|
||||
# if COMPILER_VERSION < 720 || (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32)
|
||||
# define __STL_DEFAULT_CONSTRUCTOR_BUG
|
||||
# endif
|
||||
# if !defined(_EXPLICIT_IS_KEYWORD)
|
||||
# define __STL_NEED_EXPLICIT
|
||||
# endif
|
||||
# ifdef __EXCEPTIONS
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# endif
|
||||
# if (_COMPILER_VERSION >= 721) && defined(_NAMESPACES)
|
||||
# define __STL_HAS_NAMESPACES
|
||||
# endif
|
||||
# if (_COMPILER_VERSION < 721) || \
|
||||
!defined(__STL_HAS_NAMESPACES) || defined(__STL_NO_NAMESPACES)
|
||||
# define __STL_NO_EXCEPTION_HEADER
|
||||
# endif
|
||||
# if _COMPILER_VERSION < 730 || !defined(_STANDARD_C_PLUS_PLUS) || \
|
||||
!defined(_NAMESPACES)
|
||||
# define __STL_NO_BAD_ALLOC
|
||||
# endif
|
||||
# if !defined(_NOTHREADS) && !defined(__STL_PTHREADS)
|
||||
# define __STL_SGI_THREADS
|
||||
# endif
|
||||
# if defined(_LONGLONG) && defined(_SGIAPI) && _SGIAPI
|
||||
# define __STL_LONG_LONG
|
||||
# endif
|
||||
# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
|
||||
# define __STL_USE_NEW_IOSTREAMS
|
||||
# endif
|
||||
# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
|
||||
# define __STL_CAN_THROW_RANGE_ERRORS
|
||||
# endif
|
||||
# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
|
||||
# define __SGI_STL_USE_AUTO_PTR_CONVERSIONS
|
||||
# endif
|
||||
# endif
|
||||
//# if defined(_PTHREADS) && !defined(_NOTHREADS)
|
||||
//# define __STL_PTHREADS
|
||||
//# endif
|
||||
//
|
||||
//# if defined(_UITHREADS) && !defined(_PTHREADS) && !defined(_NOTHREADS)
|
||||
//# define __STL_UITHREADS
|
||||
//# endif
|
||||
//
|
||||
//# if defined(__sgi) && !defined(__GNUC__)
|
||||
//# include <standards.h>
|
||||
//# if !defined(_BOOL)
|
||||
//# define __STL_NO_BOOL
|
||||
//# endif
|
||||
//# if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32
|
||||
//# define __STL_STATIC_CONST_INIT_BUG
|
||||
//# endif
|
||||
//# if defined(_WCHAR_T_IS_KEYWORD)
|
||||
//# define __STL_HAS_WCHAR_T
|
||||
//# endif
|
||||
//# if !defined(_TYPENAME_IS_KEYWORD)
|
||||
//# define __STL_NEED_TYPENAME
|
||||
//# endif
|
||||
//# ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES
|
||||
//# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
//# endif
|
||||
//# if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32
|
||||
//# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
//# endif
|
||||
//# ifdef _MEMBER_TEMPLATES
|
||||
//# define __STL_MEMBER_TEMPLATES
|
||||
//# define __STL_TEMPLATE_FRIENDS
|
||||
//# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
//# endif
|
||||
//# if defined(_MEMBER_TEMPLATE_KEYWORD)
|
||||
//# define __STL_MEMBER_TEMPLATE_KEYWORD
|
||||
//# endif
|
||||
//# if defined(_STANDARD_C_PLUS_PLUS)
|
||||
//# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
//# endif
|
||||
//# if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32
|
||||
//# define __STL_MEMBER_TEMPLATE_KEYWORD
|
||||
//# endif
|
||||
//# if COMPILER_VERSION < 720 || (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32)
|
||||
//# define __STL_DEFAULT_CONSTRUCTOR_BUG
|
||||
//# endif
|
||||
//# if !defined(_EXPLICIT_IS_KEYWORD)
|
||||
//# define __STL_NEED_EXPLICIT
|
||||
//# endif
|
||||
//# ifdef __EXCEPTIONS
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# endif
|
||||
//# if (_COMPILER_VERSION >= 721) && defined(_NAMESPACES)
|
||||
//# define __STL_HAS_NAMESPACES
|
||||
//# endif
|
||||
//# if (_COMPILER_VERSION < 721) || \
|
||||
// !defined(__STL_HAS_NAMESPACES) || defined(__STL_NO_NAMESPACES)
|
||||
//# define __STL_NO_EXCEPTION_HEADER
|
||||
//# endif
|
||||
//# if _COMPILER_VERSION < 730 || !defined(_STANDARD_C_PLUS_PLUS) || \
|
||||
// !defined(_NAMESPACES)
|
||||
//# define __STL_NO_BAD_ALLOC
|
||||
//# endif
|
||||
//# if !defined(_NOTHREADS) && !defined(__STL_PTHREADS)
|
||||
//# define __STL_SGI_THREADS
|
||||
//# endif
|
||||
//# if defined(_LONGLONG) && defined(_SGIAPI) && _SGIAPI
|
||||
//# define __STL_LONG_LONG
|
||||
//# endif
|
||||
//# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
|
||||
//# define __STL_USE_NEW_IOSTREAMS
|
||||
//# endif
|
||||
//# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
|
||||
//# define __STL_CAN_THROW_RANGE_ERRORS
|
||||
//# endif
|
||||
//# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
|
||||
//# define __SGI_STL_USE_AUTO_PTR_CONVERSIONS
|
||||
//# endif
|
||||
//# endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -230,42 +230,70 @@
|
||||
* macro __USLC__ being defined
|
||||
*/
|
||||
// SCO UDK 7 compiler (UnixWare 7x, OSR 5, UnixWare 2x)
|
||||
# if defined(__USLC__)
|
||||
# define __STL_HAS_WCHAR_T
|
||||
# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
# define __STL_PARTIAL_SPECIALIZATION_SYNTAX
|
||||
# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
# define __STL_MEMBER_TEMPLATES
|
||||
# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# define __STL_HAS_NAMESPACES
|
||||
# define __STL_USE_NAMESPACES
|
||||
# define __STL_LONG_LONG
|
||||
# if defined(_REENTRANT)
|
||||
# define _UITHREADS /* if UnixWare < 7.0.1 */
|
||||
# define __STL_UITHREADS
|
||||
// use the following defines instead of the UI threads defines when
|
||||
// you want to use POSIX threads
|
||||
//# define _PTHREADS /* only if UnixWare >=7.0.1 */
|
||||
//# define __STL_PTHREADS
|
||||
# endif
|
||||
# endif
|
||||
//# if defined(__USLC__)
|
||||
//# define __STL_HAS_WCHAR_T
|
||||
//# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
//# define __STL_PARTIAL_SPECIALIZATION_SYNTAX
|
||||
//# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
//# define __STL_MEMBER_TEMPLATES
|
||||
//# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# define __STL_HAS_NAMESPACES
|
||||
//# define __STL_USE_NAMESPACES
|
||||
//# define __STL_LONG_LONG
|
||||
//# if defined(_REENTRANT)
|
||||
//# define _UITHREADS /* if UnixWare < 7.0.1 */
|
||||
//# define __STL_UITHREADS
|
||||
//// use the following defines instead of the UI threads defines when
|
||||
//// you want to use POSIX threads
|
||||
////# define _PTHREADS /* only if UnixWare >=7.0.1 */
|
||||
////# define __STL_PTHREADS
|
||||
//# endif
|
||||
//# endif
|
||||
|
||||
|
||||
|
||||
//# ifdef __GNUC__
|
||||
//# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
|
||||
//# define __STL_STATIC_TEMPLATE_MEMBER_BUG
|
||||
//# endif
|
||||
//# if __GNUC__ < 2
|
||||
//# define __STL_NEED_TYPENAME
|
||||
//# define __STL_NEED_EXPLICIT
|
||||
//# endif
|
||||
//# if __GNUC__ == 2 && __GNUC_MINOR__ <= 8
|
||||
//# define __STL_NO_EXCEPTION_HEADER
|
||||
//# define __STL_NO_BAD_ALLOC
|
||||
//# endif
|
||||
//# if __GNUC__ == 2 && __GNUC_MINOR__ >= 8
|
||||
//# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
//# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
//# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
//# define __STL_MEMBER_TEMPLATES
|
||||
//# define __STL_CAN_THROW_RANGE_ERRORS
|
||||
// // g++ 2.8.1 supports member template functions, but not member
|
||||
// // template nested classes.
|
||||
//# if __GNUC_MINOR__ >= 9
|
||||
//# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
//# define __STL_TEMPLATE_FRIENDS
|
||||
//# define __SGI_STL_USE_AUTO_PTR_CONVERSIONS
|
||||
//# define __STL_HAS_NAMESPACES
|
||||
////# define __STL_USE_NEW_IOSTREAMS
|
||||
//# endif
|
||||
//# endif
|
||||
//# define __STL_DEFAULT_CONSTRUCTOR_BUG
|
||||
//# ifdef __EXCEPTIONS
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# endif
|
||||
//# ifdef _REENTRANT
|
||||
//# define __STL_PTHREADS
|
||||
//# endif
|
||||
//# if (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
|
||||
//# define __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
|
||||
//# endif
|
||||
//# endif
|
||||
|
||||
# ifdef __GNUC__
|
||||
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
|
||||
# define __STL_STATIC_TEMPLATE_MEMBER_BUG
|
||||
# endif
|
||||
# if __GNUC__ < 2
|
||||
# define __STL_NEED_TYPENAME
|
||||
# define __STL_NEED_EXPLICIT
|
||||
# endif
|
||||
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 8
|
||||
# define __STL_NO_EXCEPTION_HEADER
|
||||
# define __STL_NO_BAD_ALLOC
|
||||
# endif
|
||||
# if __GNUC__ == 2 && __GNUC_MINOR__ >= 8
|
||||
# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
@@ -273,155 +301,147 @@
|
||||
# define __STL_CAN_THROW_RANGE_ERRORS
|
||||
// g++ 2.8.1 supports member template functions, but not member
|
||||
// template nested classes.
|
||||
# if __GNUC_MINOR__ >= 9
|
||||
# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
# define __STL_TEMPLATE_FRIENDS
|
||||
# define __SGI_STL_USE_AUTO_PTR_CONVERSIONS
|
||||
# define __STL_HAS_NAMESPACES
|
||||
//# define __STL_USE_NEW_IOSTREAMS
|
||||
# endif
|
||||
# endif
|
||||
# define __STL_DEFAULT_CONSTRUCTOR_BUG
|
||||
# ifdef __EXCEPTIONS
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# endif
|
||||
# ifdef _REENTRANT
|
||||
# define __STL_PTHREADS
|
||||
# endif
|
||||
# if (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
|
||||
# define __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
|
||||
# endif
|
||||
//# ifdef _REENTRANT
|
||||
//# define __STL_PTHREADS
|
||||
//# endif
|
||||
# endif
|
||||
|
||||
# if defined(__SUNPRO_CC)
|
||||
# define __STL_NO_BOOL
|
||||
# define __STL_NEED_TYPENAME
|
||||
# define __STL_NEED_EXPLICIT
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# ifdef _REENTRANT
|
||||
# define __STL_PTHREADS
|
||||
# endif
|
||||
# define __SGI_STL_NO_ARROW_OPERATOR
|
||||
# define __STL_PARTIAL_SPECIALIZATION_SYNTAX
|
||||
# define __STL_NO_EXCEPTION_HEADER
|
||||
# define __STL_NO_BAD_ALLOC
|
||||
# endif
|
||||
|
||||
# if defined(__COMO__)
|
||||
# define __STL_MEMBER_TEMPLATES
|
||||
# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
# define __STL_TEMPLATE_FRIENDS
|
||||
# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# define __STL_HAS_NAMESPACES
|
||||
# endif
|
||||
|
||||
//# if defined(__SUNPRO_CC)
|
||||
//# define __STL_NO_BOOL
|
||||
//# define __STL_NEED_TYPENAME
|
||||
//# define __STL_NEED_EXPLICIT
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# ifdef _REENTRANT
|
||||
//# define __STL_PTHREADS
|
||||
//# endif
|
||||
//# define __SGI_STL_NO_ARROW_OPERATOR
|
||||
//# define __STL_PARTIAL_SPECIALIZATION_SYNTAX
|
||||
//# define __STL_NO_EXCEPTION_HEADER
|
||||
//# define __STL_NO_BAD_ALLOC
|
||||
//# endif
|
||||
|
||||
//# if defined(__COMO__)
|
||||
//# define __STL_MEMBER_TEMPLATES
|
||||
//# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
//# define __STL_TEMPLATE_FRIENDS
|
||||
//# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# define __STL_HAS_NAMESPACES
|
||||
//# endif
|
||||
|
||||
// Intel compiler, which uses the EDG front end.
|
||||
# if defined(__ICL)
|
||||
# define __STL_LONG_LONG
|
||||
# define __STL_MEMBER_TEMPLATES
|
||||
# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
# define __STL_TEMPLATE_FRIENDS
|
||||
# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
# define __STL_NO_DRAND48
|
||||
# define __STL_HAS_NAMESPACES
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# define __STL_MEMBER_TEMPLATE_KEYWORD
|
||||
# ifdef _CPPUNWIND
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# endif
|
||||
# ifdef _MT
|
||||
# define __STL_WIN32THREADS
|
||||
# endif
|
||||
# endif
|
||||
//# if defined(__ICL)
|
||||
//# define __STL_LONG_LONG
|
||||
//# define __STL_MEMBER_TEMPLATES
|
||||
//# define __STL_MEMBER_TEMPLATE_CLASSES
|
||||
//# define __STL_TEMPLATE_FRIENDS
|
||||
//# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
//# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
//# define __STL_NO_DRAND48
|
||||
//# define __STL_HAS_NAMESPACES
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# define __STL_MEMBER_TEMPLATE_KEYWORD
|
||||
//# ifdef _CPPUNWIND
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# endif
|
||||
//# ifdef _MT
|
||||
//# define __STL_WIN32THREADS
|
||||
//# endif
|
||||
//# endif
|
||||
|
||||
// Mingw32, egcs compiler using the Microsoft C runtime
|
||||
# if defined(__MINGW32__)
|
||||
# define __STL_NO_DRAND48
|
||||
# ifdef _MT
|
||||
# define __STL_WIN32THREADS
|
||||
# endif
|
||||
# endif
|
||||
//# if defined(__MINGW32__)
|
||||
//# define __STL_NO_DRAND48
|
||||
//# ifdef _MT
|
||||
//# define __STL_WIN32THREADS
|
||||
//# endif
|
||||
//# endif
|
||||
|
||||
// Cygwin32, egcs compiler on MS Windows
|
||||
# if defined(__CYGWIN__)
|
||||
# define __STL_NO_DRAND48
|
||||
# endif
|
||||
//# if defined(__CYGWIN__)
|
||||
//# define __STL_NO_DRAND48
|
||||
//# endif
|
||||
|
||||
|
||||
|
||||
// Microsoft compiler.
|
||||
# if defined(_MSC_VER) && !defined(__ICL) && !defined(__MWERKS__)
|
||||
# define __STL_NO_DRAND48
|
||||
# define __STL_STATIC_CONST_INIT_BUG
|
||||
# define __STL_NEED_TYPENAME
|
||||
# define __STL_NO_USING_CLAUSE_IN_CLASS
|
||||
# define __STL_NO_FRIEND_TEMPLATE_CLASS
|
||||
# if _MSC_VER < 1100 /* 1000 is version 4.0, 1100 is 5.0, 1200 is 6.0. */
|
||||
# define __STL_NEED_EXPLICIT
|
||||
# define __STL_NO_BOOL
|
||||
# define __STL_NO_BAD_ALLOC
|
||||
# endif
|
||||
# if _MSC_VER > 1000
|
||||
# include <yvals.h>
|
||||
# define __STL_DONT_USE_BOOL_TYPEDEF
|
||||
# endif
|
||||
# define __STL_NON_TYPE_TMPL_PARAM_BUG
|
||||
# define __SGI_STL_NO_ARROW_OPERATOR
|
||||
# define __STL_DEFAULT_CONSTRUCTOR_BUG
|
||||
# ifdef _CPPUNWIND
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# endif
|
||||
# ifdef _MT
|
||||
# define __STL_WIN32THREADS
|
||||
# endif
|
||||
# if _MSC_VER >= 1200
|
||||
# define __STL_PARTIAL_SPECIALIZATION_SYNTAX
|
||||
# define __STL_HAS_NAMESPACES
|
||||
# define __STL_CAN_THROW_RANGE_ERRORS
|
||||
# define NOMINMAX
|
||||
# undef min
|
||||
# undef max
|
||||
// disable warning 'initializers put in unrecognized initialization area'
|
||||
# pragma warning ( disable : 4075 )
|
||||
// disable warning 'empty controlled statement found'
|
||||
# pragma warning ( disable : 4390 )
|
||||
// disable warning 'debug symbol greater than 255 chars'
|
||||
# pragma warning ( disable : 4786 )
|
||||
# endif
|
||||
# if _MSC_VER < 1100
|
||||
# define __STL_NO_EXCEPTION_HEADER
|
||||
# define __STL_NO_BAD_ALLOC
|
||||
# endif
|
||||
// Because of a Microsoft front end bug, we must not provide a
|
||||
// namespace qualifier when declaring a friend function.
|
||||
# define __STD_QUALIFIER
|
||||
# endif
|
||||
//# if defined(_MSC_VER) && !defined(__ICL) && !defined(__MWERKS__)
|
||||
//# define __STL_NO_DRAND48
|
||||
//# define __STL_STATIC_CONST_INIT_BUG
|
||||
//# define __STL_NEED_TYPENAME
|
||||
//# define __STL_NO_USING_CLAUSE_IN_CLASS
|
||||
//# define __STL_NO_FRIEND_TEMPLATE_CLASS
|
||||
//# if _MSC_VER < 1100 /* 1000 is version 4.0, 1100 is 5.0, 1200 is 6.0. */
|
||||
//# define __STL_NEED_EXPLICIT
|
||||
//# define __STL_NO_BOOL
|
||||
//# define __STL_NO_BAD_ALLOC
|
||||
//# endif
|
||||
//# if _MSC_VER > 1000
|
||||
//# include <yvals.h>
|
||||
//# define __STL_DONT_USE_BOOL_TYPEDEF
|
||||
//# endif
|
||||
//# define __STL_NON_TYPE_TMPL_PARAM_BUG
|
||||
//# define __SGI_STL_NO_ARROW_OPERATOR
|
||||
//# define __STL_DEFAULT_CONSTRUCTOR_BUG
|
||||
//# ifdef _CPPUNWIND
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# endif
|
||||
//# ifdef _MT
|
||||
//# define __STL_WIN32THREADS
|
||||
//# endif
|
||||
//# if _MSC_VER >= 1200
|
||||
//# define __STL_PARTIAL_SPECIALIZATION_SYNTAX
|
||||
//# define __STL_HAS_NAMESPACES
|
||||
//# define __STL_CAN_THROW_RANGE_ERRORS
|
||||
//# define NOMINMAX
|
||||
//# undef min
|
||||
//# undef max
|
||||
//// disable warning 'initializers put in unrecognized initialization area'
|
||||
//# pragma warning ( disable : 4075 )
|
||||
//// disable warning 'empty controlled statement found'
|
||||
//# pragma warning ( disable : 4390 )
|
||||
//// disable warning 'debug symbol greater than 255 chars'
|
||||
//# pragma warning ( disable : 4786 )
|
||||
//# endif
|
||||
//# if _MSC_VER < 1100
|
||||
//# define __STL_NO_EXCEPTION_HEADER
|
||||
//# define __STL_NO_BAD_ALLOC
|
||||
//# endif
|
||||
// // Because of a Microsoft front end bug, we must not provide a
|
||||
// // namespace qualifier when declaring a friend function.
|
||||
//# define __STD_QUALIFIER
|
||||
//# endif
|
||||
|
||||
# if defined(__BORLANDC__)
|
||||
# define __STL_NO_BAD_ALLOC
|
||||
# define __STL_NO_DRAND48
|
||||
# define __STL_DEFAULT_CONSTRUCTOR_BUG
|
||||
# if __BORLANDC__ >= 0x540 /* C++ Builder 4.0 */
|
||||
# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
# define __STL_MEMBER_TEMPLATES
|
||||
# define __STL_TEMPLATE_FRIENDS
|
||||
# else
|
||||
# define __STL_NEED_TYPENAME
|
||||
# define __STL_LIMITED_DEFAULT_TEMPLATES
|
||||
# define __SGI_STL_NO_ARROW_OPERATOR
|
||||
# define __STL_NON_TYPE_TMPL_PARAM_BUG
|
||||
# endif
|
||||
# ifdef _CPPUNWIND
|
||||
# define __STL_USE_EXCEPTIONS
|
||||
# endif
|
||||
# ifdef __MT__
|
||||
# define __STL_WIN32THREADS
|
||||
# endif
|
||||
# endif
|
||||
//# if defined(__BORLANDC__)
|
||||
//# define __STL_NO_BAD_ALLOC
|
||||
//# define __STL_NO_DRAND48
|
||||
//# define __STL_DEFAULT_CONSTRUCTOR_BUG
|
||||
//# if __BORLANDC__ >= 0x540 /* C++ Builder 4.0 */
|
||||
//# define __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
//# define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
//# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
//# define __STL_MEMBER_TEMPLATES
|
||||
//# define __STL_TEMPLATE_FRIENDS
|
||||
//# else
|
||||
//# define __STL_NEED_TYPENAME
|
||||
//# define __STL_LIMITED_DEFAULT_TEMPLATES
|
||||
//# define __SGI_STL_NO_ARROW_OPERATOR
|
||||
//# define __STL_NON_TYPE_TMPL_PARAM_BUG
|
||||
//# endif
|
||||
//# ifdef _CPPUNWIND
|
||||
//# define __STL_USE_EXCEPTIONS
|
||||
//# endif
|
||||
//# ifdef __MT__
|
||||
//# define __STL_WIN32THREADS
|
||||
//# endif
|
||||
//# endif
|
||||
|
||||
# if defined(__STL_NO_BOOL) && !defined(__STL_DONT_USE_BOOL_TYPEDEF)
|
||||
typedef int bool;
|
||||
@@ -462,6 +482,9 @@
|
||||
# define __STL_TEMPLATE_NULL
|
||||
# endif
|
||||
|
||||
|
||||
#define __STL_USE_SGI_ALLOCATORS
|
||||
|
||||
// Use standard-conforming allocators if we have the necessary language
|
||||
// features. __STL_USE_SGI_ALLOCATORS is a hook so that users can
|
||||
// disable new-style allocators, and continue to use the same kind of
|
||||
@@ -491,20 +514,20 @@
|
||||
// edit library headers.
|
||||
# if defined(__STL_HAS_NAMESPACES) && !defined(__STL_NO_NAMESPACES)
|
||||
# define __STL_USE_NAMESPACES
|
||||
# define __STD std
|
||||
# define __STL_BEGIN_NAMESPACE namespace std {
|
||||
# define __STD cgistd
|
||||
# define __STL_BEGIN_NAMESPACE namespace cgistd {
|
||||
# define __STL_END_NAMESPACE }
|
||||
# if defined(__STL_FUNCTION_TMPL_PARTIAL_ORDER) && \
|
||||
!defined(__STL_NO_RELOPS_NAMESPACE)
|
||||
# define __STL_USE_NAMESPACE_FOR_RELOPS
|
||||
# define __STL_BEGIN_RELOPS_NAMESPACE namespace std { namespace rel_ops {
|
||||
# define __STL_BEGIN_RELOPS_NAMESPACE namespace cgistd { namespace rel_ops {
|
||||
# define __STL_END_RELOPS_NAMESPACE } }
|
||||
# define __STD_RELOPS std::rel_ops
|
||||
# define __STD_RELOPS cgistd::rel_ops
|
||||
# else /* Use std::rel_ops namespace */
|
||||
# define __STL_USE_NAMESPACE_FOR_RELOPS
|
||||
# define __STL_BEGIN_RELOPS_NAMESPACE namespace std {
|
||||
# define __STL_BEGIN_RELOPS_NAMESPACE namespace cgistd {
|
||||
# define __STL_END_RELOPS_NAMESPACE }
|
||||
# define __STD_RELOPS std
|
||||
# define __STD_RELOPS cgistd
|
||||
# endif /* Use std::rel_ops namespace */
|
||||
# else
|
||||
# define __STD
|
||||
@@ -524,7 +547,7 @@
|
||||
// MR version is not expected to have it.
|
||||
|
||||
# if defined(__STL_USE_NAMESPACES) && !defined(__STD_QUALIFIER)
|
||||
# define __STD_QUALIFIER std::
|
||||
# define __STD_QUALIFIER cgistd::
|
||||
# else
|
||||
# define __STD_QUALIFIER
|
||||
# endif
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_CONSTRUCT_H
|
||||
#define __SGI_STL_INTERNAL_CONSTRUCT_H
|
||||
|
||||
#include <new.h>
|
||||
#include "new"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* You should not attempt to use it directly.
|
||||
*/
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_DEQUE_H
|
||||
#define __SGI_STL_INTERNAL_DEQUE_H
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
// in <exception>, but it suffices to support a bare minimum of STL
|
||||
// functionality.
|
||||
|
||||
#include <stl_config.h>
|
||||
#include "stl_config.h"
|
||||
|
||||
#ifndef __STL_NO_EXCEPTION_HEADER
|
||||
|
||||
#include <exception>
|
||||
#include "exception"
|
||||
#define __STL_EXCEPTION_BASE exception
|
||||
|
||||
#else /* __STL_NO_EXCEPTION_HEADER */
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_HASH_FUN_H
|
||||
#define __SGI_STL_HASH_FUN_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "stddef.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_HASH_MAP_H
|
||||
#define __SGI_STL_INTERNAL_HASH_MAP_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_HASH_SET_H
|
||||
#define __SGI_STL_INTERNAL_HASH_SET_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -34,15 +34,15 @@
|
||||
// Hashtable class, used to implement the hashed associative containers
|
||||
// hash_set, hash_map, hash_multiset, and hash_multimap.
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_tempbuf.h>
|
||||
#include <stl_algo.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_function.h>
|
||||
#include <stl_vector.h>
|
||||
#include <stl_hash_fun.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_tempbuf.h"
|
||||
#include "stl_algo.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_function.h"
|
||||
#include "stl_vector.h"
|
||||
#include "stl_hash_fun.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -583,377 +583,377 @@ operator+(_Dist __n,
|
||||
// using new, templatized iostreams than if we're using the old cfront
|
||||
// version.
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
|
||||
template <class _Tp,
|
||||
class _CharT = char, class _Traits = char_traits<_CharT>,
|
||||
class _Dist = ptrdiff_t>
|
||||
class istream_iterator {
|
||||
public:
|
||||
typedef _CharT char_type;
|
||||
typedef _Traits traits_type;
|
||||
typedef basic_istream<_CharT, _Traits> istream_type;
|
||||
|
||||
typedef input_iterator_tag iterator_category;
|
||||
typedef _Tp value_type;
|
||||
typedef _Dist difference_type;
|
||||
typedef const _Tp* pointer;
|
||||
typedef const _Tp& reference;
|
||||
|
||||
istream_iterator() : _M_stream(0), _M_ok(false) {}
|
||||
istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); }
|
||||
|
||||
reference operator*() const { return _M_value; }
|
||||
pointer operator->() const { return &(operator*()); }
|
||||
|
||||
istream_iterator& operator++() {
|
||||
_M_read();
|
||||
return *this;
|
||||
}
|
||||
istream_iterator operator++(int) {
|
||||
istream_iterator __tmp = *this;
|
||||
_M_read();
|
||||
return __tmp;
|
||||
}
|
||||
|
||||
bool _M_equal(const istream_iterator& __x) const
|
||||
{ return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); }
|
||||
|
||||
private:
|
||||
istream_type* _M_stream;
|
||||
_Tp _M_value;
|
||||
bool _M_ok;
|
||||
|
||||
void _M_read() {
|
||||
_M_ok = (_M_stream && *_M_stream) ? true : false;
|
||||
if (_M_ok) {
|
||||
*_M_stream >> _M_value;
|
||||
_M_ok = *_M_stream ? true : false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Tp, class _CharT, class _Traits, class _Dist>
|
||||
inline bool
|
||||
operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
|
||||
const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) {
|
||||
return __x._M_equal(__y);
|
||||
}
|
||||
|
||||
#ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
|
||||
template <class _Tp, class _CharT, class _Traits, class _Dist>
|
||||
inline bool
|
||||
operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
|
||||
const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) {
|
||||
return !__x._M_equal(__y);
|
||||
}
|
||||
|
||||
#endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
|
||||
|
||||
template <class _Tp,
|
||||
class _CharT = char, class _Traits = char_traits<_CharT> >
|
||||
class ostream_iterator {
|
||||
public:
|
||||
typedef _CharT char_type;
|
||||
typedef _Traits traits_type;
|
||||
typedef basic_ostream<_CharT, _Traits> ostream_type;
|
||||
|
||||
typedef output_iterator_tag iterator_category;
|
||||
typedef void value_type;
|
||||
typedef void difference_type;
|
||||
typedef void pointer;
|
||||
typedef void reference;
|
||||
|
||||
ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
|
||||
ostream_iterator(ostream_type& __s, const _CharT* __c)
|
||||
: _M_stream(&__s), _M_string(__c) {}
|
||||
ostream_iterator<_Tp>& operator=(const _Tp& __value) {
|
||||
*_M_stream << __value;
|
||||
if (_M_string) *_M_stream << _M_string;
|
||||
return *this;
|
||||
}
|
||||
ostream_iterator<_Tp>& operator*() { return *this; }
|
||||
ostream_iterator<_Tp>& operator++() { return *this; }
|
||||
ostream_iterator<_Tp>& operator++(int) { return *this; }
|
||||
private:
|
||||
ostream_type* _M_stream;
|
||||
const _CharT* _M_string;
|
||||
};
|
||||
|
||||
// The default template argument is declared in iosfwd
|
||||
|
||||
// We do not read any characters until operator* is called. The first
|
||||
// time operator* is called, it calls getc. Subsequent calls to getc
|
||||
// return a cached character, and calls to operator++ use snextc. Before
|
||||
// operator* or operator++ has been called, _M_is_initialized is false.
|
||||
template<class _CharT, class _Traits>
|
||||
class istreambuf_iterator
|
||||
: public iterator<input_iterator_tag, _CharT,
|
||||
typename _Traits::off_type, _CharT*, _CharT&>
|
||||
{
|
||||
public:
|
||||
typedef _CharT char_type;
|
||||
typedef _Traits traits_type;
|
||||
typedef typename _Traits::int_type int_type;
|
||||
typedef basic_streambuf<_CharT, _Traits> streambuf_type;
|
||||
typedef basic_istream<_CharT, _Traits> istream_type;
|
||||
|
||||
public:
|
||||
istreambuf_iterator(streambuf_type* __p = 0) { this->_M_init(__p); }
|
||||
istreambuf_iterator(istream_type& __is) { this->_M_init(__is.rdbuf()); }
|
||||
|
||||
char_type operator*() const
|
||||
{ return _M_is_initialized ? _M_c : _M_dereference_aux(); }
|
||||
|
||||
istreambuf_iterator& operator++() { this->_M_nextc(); return *this; }
|
||||
istreambuf_iterator operator++(int) {
|
||||
if (!_M_is_initialized)
|
||||
_M_postincr_aux();
|
||||
istreambuf_iterator __tmp = *this;
|
||||
this->_M_nextc();
|
||||
return __tmp;
|
||||
}
|
||||
|
||||
bool equal(const istreambuf_iterator& __i) const {
|
||||
return this->_M_is_initialized && __i._M_is_initialized
|
||||
? this->_M_eof == __i._M_eof
|
||||
: this->_M_equal_aux(__i);
|
||||
}
|
||||
|
||||
private:
|
||||
void _M_init(streambuf_type* __p) {
|
||||
_M_buf = __p;
|
||||
_M_eof = !__p;
|
||||
_M_is_initialized = _M_eof;
|
||||
}
|
||||
|
||||
char_type _M_dereference_aux() const;
|
||||
bool _M_equal_aux(const istreambuf_iterator&) const;
|
||||
void _M_postincr_aux();
|
||||
|
||||
void _M_nextc() {
|
||||
int_type __c = _M_buf->snextc();
|
||||
_M_c = traits_type::to_char_type(__c);
|
||||
_M_eof = traits_type::eq_int_type(__c, traits_type::eof());
|
||||
_M_is_initialized = true;
|
||||
}
|
||||
|
||||
void _M_getc() const {
|
||||
int_type __c = _M_buf->sgetc();
|
||||
_M_c = traits_type::to_char_type(__c);
|
||||
_M_eof = traits_type::eq_int_type(__c, traits_type::eof());
|
||||
_M_is_initialized = true;
|
||||
}
|
||||
|
||||
private:
|
||||
streambuf_type* _M_buf;
|
||||
mutable _CharT _M_c;
|
||||
mutable bool _M_eof : 1;
|
||||
mutable bool _M_is_initialized : 1;
|
||||
};
|
||||
|
||||
template<class _CharT, class _Traits>
|
||||
_CharT istreambuf_iterator<_CharT, _Traits>::_M_dereference_aux() const
|
||||
{
|
||||
this->_M_getc();
|
||||
return _M_c;
|
||||
}
|
||||
|
||||
template<class _CharT, class _Traits>
|
||||
bool istreambuf_iterator<_CharT, _Traits>
|
||||
::_M_equal_aux(const istreambuf_iterator& __i) const
|
||||
{
|
||||
if (!this->_M_is_initialized)
|
||||
this->_M_getc();
|
||||
if (!__i._M_is_initialized)
|
||||
__i._M_getc();
|
||||
|
||||
return this->_M_eof == __i._M_eof;
|
||||
}
|
||||
|
||||
template<class _CharT, class _Traits>
|
||||
void istreambuf_iterator<_CharT, _Traits>::_M_postincr_aux()
|
||||
{
|
||||
this->_M_getc();
|
||||
}
|
||||
|
||||
template<class _CharT, class _Traits>
|
||||
inline bool operator==(const istreambuf_iterator<_CharT, _Traits>& __x,
|
||||
const istreambuf_iterator<_CharT, _Traits>& __y) {
|
||||
return __x.equal(__y);
|
||||
}
|
||||
|
||||
#ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
|
||||
template<class _CharT, class _Traits>
|
||||
inline bool operator!=(const istreambuf_iterator<_CharT, _Traits>& __x,
|
||||
const istreambuf_iterator<_CharT, _Traits>& __y) {
|
||||
return !__x.equal(__y);
|
||||
}
|
||||
|
||||
#endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
|
||||
|
||||
// The default template argument is declared in iosfwd
|
||||
template<class _CharT, class _Traits>
|
||||
class ostreambuf_iterator
|
||||
: public iterator<output_iterator_tag, void, void, void, void>
|
||||
{
|
||||
public:
|
||||
typedef _CharT char_type;
|
||||
typedef _Traits traits_type;
|
||||
typedef typename _Traits::int_type int_type;
|
||||
typedef basic_streambuf<_CharT, _Traits> streambuf_type;
|
||||
typedef basic_ostream<_CharT, _Traits> ostream_type;
|
||||
|
||||
public:
|
||||
ostreambuf_iterator(streambuf_type* __buf) : _M_buf(__buf), _M_ok(__buf) {}
|
||||
ostreambuf_iterator(ostream_type& __o)
|
||||
: _M_buf(__o.rdbuf()), _M_ok(__o.rdbuf() != 0) {}
|
||||
|
||||
ostreambuf_iterator& operator=(char_type __c) {
|
||||
_M_ok = _M_ok && !traits_type::eq_int_type(_M_buf->sputc(__c),
|
||||
traits_type::eof());
|
||||
return *this;
|
||||
}
|
||||
|
||||
ostreambuf_iterator& operator*() { return *this; }
|
||||
ostreambuf_iterator& operator++() { return *this; }
|
||||
ostreambuf_iterator& operator++(int) { return *this; }
|
||||
|
||||
bool failed() const { return !_M_ok; }
|
||||
|
||||
private:
|
||||
streambuf_type* _M_buf;
|
||||
bool _M_ok;
|
||||
};
|
||||
|
||||
#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
template <class _Tp, class _Dist = ptrdiff_t> class istream_iterator;
|
||||
|
||||
template <class _Tp, class _Dist>
|
||||
inline bool operator==(const istream_iterator<_Tp, _Dist>&,
|
||||
const istream_iterator<_Tp, _Dist>&);
|
||||
|
||||
template <class _Tp, class _Dist>
|
||||
class istream_iterator {
|
||||
#ifdef __STL_TEMPLATE_FRIENDS
|
||||
template <class _T1, class _D1>
|
||||
friend bool operator==(const istream_iterator<_T1, _D1>&,
|
||||
const istream_iterator<_T1, _D1>&);
|
||||
#else /* __STL_TEMPLATE_FRIENDS */
|
||||
friend bool __STD_QUALIFIER
|
||||
operator== __STL_NULL_TMPL_ARGS (const istream_iterator&,
|
||||
const istream_iterator&);
|
||||
#endif /* __STL_TEMPLATE_FRIENDS */
|
||||
|
||||
protected:
|
||||
istream* _M_stream;
|
||||
_Tp _M_value;
|
||||
bool _M_end_marker;
|
||||
void _M_read() {
|
||||
_M_end_marker = (*_M_stream) ? true : false;
|
||||
if (_M_end_marker) *_M_stream >> _M_value;
|
||||
_M_end_marker = (*_M_stream) ? true : false;
|
||||
}
|
||||
public:
|
||||
typedef input_iterator_tag iterator_category;
|
||||
typedef _Tp value_type;
|
||||
typedef _Dist difference_type;
|
||||
typedef const _Tp* pointer;
|
||||
typedef const _Tp& reference;
|
||||
|
||||
istream_iterator() : _M_stream(&cin), _M_end_marker(false) {}
|
||||
istream_iterator(istream& __s) : _M_stream(&__s) { _M_read(); }
|
||||
reference operator*() const { return _M_value; }
|
||||
#ifndef __SGI_STL_NO_ARROW_OPERATOR
|
||||
pointer operator->() const { return &(operator*()); }
|
||||
#endif /* __SGI_STL_NO_ARROW_OPERATOR */
|
||||
istream_iterator<_Tp, _Dist>& operator++() {
|
||||
_M_read();
|
||||
return *this;
|
||||
}
|
||||
istream_iterator<_Tp, _Dist> operator++(int) {
|
||||
istream_iterator<_Tp, _Dist> __tmp = *this;
|
||||
_M_read();
|
||||
return __tmp;
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
|
||||
template <class _Tp, class _Dist>
|
||||
inline input_iterator_tag
|
||||
iterator_category(const istream_iterator<_Tp, _Dist>&)
|
||||
{
|
||||
return input_iterator_tag();
|
||||
}
|
||||
|
||||
template <class _Tp, class _Dist>
|
||||
inline _Tp*
|
||||
value_type(const istream_iterator<_Tp, _Dist>&) { return (_Tp*) 0; }
|
||||
|
||||
template <class _Tp, class _Dist>
|
||||
inline _Dist*
|
||||
distance_type(const istream_iterator<_Tp, _Dist>&) { return (_Dist*)0; }
|
||||
|
||||
#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */
|
||||
|
||||
template <class _Tp, class _Distance>
|
||||
inline bool operator==(const istream_iterator<_Tp, _Distance>& __x,
|
||||
const istream_iterator<_Tp, _Distance>& __y) {
|
||||
return (__x._M_stream == __y._M_stream &&
|
||||
__x._M_end_marker == __y._M_end_marker) ||
|
||||
__x._M_end_marker == false && __y._M_end_marker == false;
|
||||
}
|
||||
|
||||
#ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
|
||||
template <class _Tp, class _Distance>
|
||||
inline bool operator!=(const istream_iterator<_Tp, _Distance>& __x,
|
||||
const istream_iterator<_Tp, _Distance>& __y) {
|
||||
return !(__x == __y);
|
||||
}
|
||||
|
||||
#endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
|
||||
|
||||
template <class _Tp>
|
||||
class ostream_iterator {
|
||||
protected:
|
||||
ostream* _M_stream;
|
||||
const char* _M_string;
|
||||
public:
|
||||
typedef output_iterator_tag iterator_category;
|
||||
typedef void value_type;
|
||||
typedef void difference_type;
|
||||
typedef void pointer;
|
||||
typedef void reference;
|
||||
|
||||
ostream_iterator(ostream& __s) : _M_stream(&__s), _M_string(0) {}
|
||||
ostream_iterator(ostream& __s, const char* __c)
|
||||
: _M_stream(&__s), _M_string(__c) {}
|
||||
ostream_iterator<_Tp>& operator=(const _Tp& __value) {
|
||||
*_M_stream << __value;
|
||||
if (_M_string) *_M_stream << _M_string;
|
||||
return *this;
|
||||
}
|
||||
ostream_iterator<_Tp>& operator*() { return *this; }
|
||||
ostream_iterator<_Tp>& operator++() { return *this; }
|
||||
ostream_iterator<_Tp>& operator++(int) { return *this; }
|
||||
};
|
||||
|
||||
#ifndef __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
|
||||
template <class _Tp>
|
||||
inline output_iterator_tag
|
||||
iterator_category(const ostream_iterator<_Tp>&) {
|
||||
return output_iterator_tag();
|
||||
}
|
||||
|
||||
#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */
|
||||
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
//
|
||||
//template <class _Tp,
|
||||
// class _CharT = char, class _Traits = char_traits<_CharT>,
|
||||
// class _Dist = ptrdiff_t>
|
||||
//class istream_iterator {
|
||||
//public:
|
||||
// typedef _CharT char_type;
|
||||
// typedef _Traits traits_type;
|
||||
// typedef basic_istream<_CharT, _Traits> istream_type;
|
||||
//
|
||||
// typedef input_iterator_tag iterator_category;
|
||||
// typedef _Tp value_type;
|
||||
// typedef _Dist difference_type;
|
||||
// typedef const _Tp* pointer;
|
||||
// typedef const _Tp& reference;
|
||||
//
|
||||
// istream_iterator() : _M_stream(0), _M_ok(false) {}
|
||||
// istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); }
|
||||
//
|
||||
// reference operator*() const { return _M_value; }
|
||||
// pointer operator->() const { return &(operator*()); }
|
||||
//
|
||||
// istream_iterator& operator++() {
|
||||
// _M_read();
|
||||
// return *this;
|
||||
// }
|
||||
// istream_iterator operator++(int) {
|
||||
// istream_iterator __tmp = *this;
|
||||
// _M_read();
|
||||
// return __tmp;
|
||||
// }
|
||||
//
|
||||
// bool _M_equal(const istream_iterator& __x) const
|
||||
// { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); }
|
||||
//
|
||||
//private:
|
||||
// istream_type* _M_stream;
|
||||
// _Tp _M_value;
|
||||
// bool _M_ok;
|
||||
//
|
||||
// void _M_read() {
|
||||
// _M_ok = (_M_stream && *_M_stream) ? true : false;
|
||||
// if (_M_ok) {
|
||||
// *_M_stream >> _M_value;
|
||||
// _M_ok = *_M_stream ? true : false;
|
||||
// }
|
||||
// }
|
||||
//};
|
||||
//
|
||||
//template <class _Tp, class _CharT, class _Traits, class _Dist>
|
||||
//inline bool
|
||||
//operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
|
||||
// const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) {
|
||||
// return __x._M_equal(__y);
|
||||
//}
|
||||
//
|
||||
//#ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
//
|
||||
//template <class _Tp, class _CharT, class _Traits, class _Dist>
|
||||
//inline bool
|
||||
//operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
|
||||
// const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) {
|
||||
// return !__x._M_equal(__y);
|
||||
//}
|
||||
//
|
||||
//#endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
|
||||
//
|
||||
//template <class _Tp,
|
||||
// class _CharT = char, class _Traits = char_traits<_CharT> >
|
||||
//class ostream_iterator {
|
||||
//public:
|
||||
// typedef _CharT char_type;
|
||||
// typedef _Traits traits_type;
|
||||
// typedef basic_ostream<_CharT, _Traits> ostream_type;
|
||||
//
|
||||
// typedef output_iterator_tag iterator_category;
|
||||
// typedef void value_type;
|
||||
// typedef void difference_type;
|
||||
// typedef void pointer;
|
||||
// typedef void reference;
|
||||
//
|
||||
// ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
|
||||
// ostream_iterator(ostream_type& __s, const _CharT* __c)
|
||||
// : _M_stream(&__s), _M_string(__c) {}
|
||||
// ostream_iterator<_Tp>& operator=(const _Tp& __value) {
|
||||
// *_M_stream << __value;
|
||||
// if (_M_string) *_M_stream << _M_string;
|
||||
// return *this;
|
||||
// }
|
||||
// ostream_iterator<_Tp>& operator*() { return *this; }
|
||||
// ostream_iterator<_Tp>& operator++() { return *this; }
|
||||
// ostream_iterator<_Tp>& operator++(int) { return *this; }
|
||||
//private:
|
||||
// ostream_type* _M_stream;
|
||||
// const _CharT* _M_string;
|
||||
//};
|
||||
//
|
||||
//// The default template argument is declared in iosfwd
|
||||
//
|
||||
//// We do not read any characters until operator* is called. The first
|
||||
//// time operator* is called, it calls getc. Subsequent calls to getc
|
||||
//// return a cached character, and calls to operator++ use snextc. Before
|
||||
//// operator* or operator++ has been called, _M_is_initialized is false.
|
||||
//template<class _CharT, class _Traits>
|
||||
//class istreambuf_iterator
|
||||
// : public iterator<input_iterator_tag, _CharT,
|
||||
// typename _Traits::off_type, _CharT*, _CharT&>
|
||||
//{
|
||||
//public:
|
||||
// typedef _CharT char_type;
|
||||
// typedef _Traits traits_type;
|
||||
// typedef typename _Traits::int_type int_type;
|
||||
// typedef basic_streambuf<_CharT, _Traits> streambuf_type;
|
||||
// typedef basic_istream<_CharT, _Traits> istream_type;
|
||||
//
|
||||
//public:
|
||||
// istreambuf_iterator(streambuf_type* __p = 0) { this->_M_init(__p); }
|
||||
// istreambuf_iterator(istream_type& __is) { this->_M_init(__is.rdbuf()); }
|
||||
//
|
||||
// char_type operator*() const
|
||||
// { return _M_is_initialized ? _M_c : _M_dereference_aux(); }
|
||||
//
|
||||
// istreambuf_iterator& operator++() { this->_M_nextc(); return *this; }
|
||||
// istreambuf_iterator operator++(int) {
|
||||
// if (!_M_is_initialized)
|
||||
// _M_postincr_aux();
|
||||
// istreambuf_iterator __tmp = *this;
|
||||
// this->_M_nextc();
|
||||
// return __tmp;
|
||||
// }
|
||||
//
|
||||
// bool equal(const istreambuf_iterator& __i) const {
|
||||
// return this->_M_is_initialized && __i._M_is_initialized
|
||||
// ? this->_M_eof == __i._M_eof
|
||||
// : this->_M_equal_aux(__i);
|
||||
// }
|
||||
//
|
||||
//private:
|
||||
// void _M_init(streambuf_type* __p) {
|
||||
// _M_buf = __p;
|
||||
// _M_eof = !__p;
|
||||
// _M_is_initialized = _M_eof;
|
||||
// }
|
||||
//
|
||||
// char_type _M_dereference_aux() const;
|
||||
// bool _M_equal_aux(const istreambuf_iterator&) const;
|
||||
// void _M_postincr_aux();
|
||||
//
|
||||
// void _M_nextc() {
|
||||
// int_type __c = _M_buf->snextc();
|
||||
// _M_c = traits_type::to_char_type(__c);
|
||||
// _M_eof = traits_type::eq_int_type(__c, traits_type::eof());
|
||||
// _M_is_initialized = true;
|
||||
// }
|
||||
//
|
||||
// void _M_getc() const {
|
||||
// int_type __c = _M_buf->sgetc();
|
||||
// _M_c = traits_type::to_char_type(__c);
|
||||
// _M_eof = traits_type::eq_int_type(__c, traits_type::eof());
|
||||
// _M_is_initialized = true;
|
||||
// }
|
||||
//
|
||||
//private:
|
||||
// streambuf_type* _M_buf;
|
||||
// mutable _CharT _M_c;
|
||||
// mutable bool _M_eof : 1;
|
||||
// mutable bool _M_is_initialized : 1;
|
||||
//};
|
||||
//
|
||||
//template<class _CharT, class _Traits>
|
||||
//_CharT istreambuf_iterator<_CharT, _Traits>::_M_dereference_aux() const
|
||||
//{
|
||||
// this->_M_getc();
|
||||
// return _M_c;
|
||||
//}
|
||||
//
|
||||
//template<class _CharT, class _Traits>
|
||||
//bool istreambuf_iterator<_CharT, _Traits>
|
||||
// ::_M_equal_aux(const istreambuf_iterator& __i) const
|
||||
//{
|
||||
// if (!this->_M_is_initialized)
|
||||
// this->_M_getc();
|
||||
// if (!__i._M_is_initialized)
|
||||
// __i._M_getc();
|
||||
//
|
||||
// return this->_M_eof == __i._M_eof;
|
||||
//}
|
||||
//
|
||||
//template<class _CharT, class _Traits>
|
||||
//void istreambuf_iterator<_CharT, _Traits>::_M_postincr_aux()
|
||||
//{
|
||||
// this->_M_getc();
|
||||
//}
|
||||
//
|
||||
//template<class _CharT, class _Traits>
|
||||
//inline bool operator==(const istreambuf_iterator<_CharT, _Traits>& __x,
|
||||
// const istreambuf_iterator<_CharT, _Traits>& __y) {
|
||||
// return __x.equal(__y);
|
||||
//}
|
||||
//
|
||||
//#ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
//
|
||||
//template<class _CharT, class _Traits>
|
||||
//inline bool operator!=(const istreambuf_iterator<_CharT, _Traits>& __x,
|
||||
// const istreambuf_iterator<_CharT, _Traits>& __y) {
|
||||
// return !__x.equal(__y);
|
||||
//}
|
||||
//
|
||||
//#endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
|
||||
//
|
||||
//// The default template argument is declared in iosfwd
|
||||
//template<class _CharT, class _Traits>
|
||||
//class ostreambuf_iterator
|
||||
// : public iterator<output_iterator_tag, void, void, void, void>
|
||||
//{
|
||||
//public:
|
||||
// typedef _CharT char_type;
|
||||
// typedef _Traits traits_type;
|
||||
// typedef typename _Traits::int_type int_type;
|
||||
// typedef basic_streambuf<_CharT, _Traits> streambuf_type;
|
||||
// typedef basic_ostream<_CharT, _Traits> ostream_type;
|
||||
//
|
||||
//public:
|
||||
// ostreambuf_iterator(streambuf_type* __buf) : _M_buf(__buf), _M_ok(__buf) {}
|
||||
// ostreambuf_iterator(ostream_type& __o)
|
||||
// : _M_buf(__o.rdbuf()), _M_ok(__o.rdbuf() != 0) {}
|
||||
//
|
||||
// ostreambuf_iterator& operator=(char_type __c) {
|
||||
// _M_ok = _M_ok && !traits_type::eq_int_type(_M_buf->sputc(__c),
|
||||
// traits_type::eof());
|
||||
// return *this;
|
||||
// }
|
||||
//
|
||||
// ostreambuf_iterator& operator*() { return *this; }
|
||||
// ostreambuf_iterator& operator++() { return *this; }
|
||||
// ostreambuf_iterator& operator++(int) { return *this; }
|
||||
//
|
||||
// bool failed() const { return !_M_ok; }
|
||||
//
|
||||
//private:
|
||||
// streambuf_type* _M_buf;
|
||||
// bool _M_ok;
|
||||
//};
|
||||
//
|
||||
//#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
//
|
||||
//template <class _Tp, class _Dist = ptrdiff_t> class istream_iterator;
|
||||
//
|
||||
//template <class _Tp, class _Dist>
|
||||
//inline bool operator==(const istream_iterator<_Tp, _Dist>&,
|
||||
// const istream_iterator<_Tp, _Dist>&);
|
||||
//
|
||||
//template <class _Tp, class _Dist>
|
||||
//class istream_iterator {
|
||||
//#ifdef __STL_TEMPLATE_FRIENDS
|
||||
// template <class _T1, class _D1>
|
||||
// friend bool operator==(const istream_iterator<_T1, _D1>&,
|
||||
// const istream_iterator<_T1, _D1>&);
|
||||
//#else /* __STL_TEMPLATE_FRIENDS */
|
||||
// friend bool __STD_QUALIFIER
|
||||
// operator== __STL_NULL_TMPL_ARGS (const istream_iterator&,
|
||||
// const istream_iterator&);
|
||||
//#endif /* __STL_TEMPLATE_FRIENDS */
|
||||
//
|
||||
//protected:
|
||||
// istream* _M_stream;
|
||||
// _Tp _M_value;
|
||||
// bool _M_end_marker;
|
||||
// void _M_read() {
|
||||
// _M_end_marker = (*_M_stream) ? true : false;
|
||||
// if (_M_end_marker) *_M_stream >> _M_value;
|
||||
// _M_end_marker = (*_M_stream) ? true : false;
|
||||
// }
|
||||
//public:
|
||||
// typedef input_iterator_tag iterator_category;
|
||||
// typedef _Tp value_type;
|
||||
// typedef _Dist difference_type;
|
||||
// typedef const _Tp* pointer;
|
||||
// typedef const _Tp& reference;
|
||||
//
|
||||
// istream_iterator() : _M_stream(&cin), _M_end_marker(false) {}
|
||||
// istream_iterator(istream& __s) : _M_stream(&__s) { _M_read(); }
|
||||
// reference operator*() const { return _M_value; }
|
||||
//#ifndef __SGI_STL_NO_ARROW_OPERATOR
|
||||
// pointer operator->() const { return &(operator*()); }
|
||||
//#endif /* __SGI_STL_NO_ARROW_OPERATOR */
|
||||
// istream_iterator<_Tp, _Dist>& operator++() {
|
||||
// _M_read();
|
||||
// return *this;
|
||||
// }
|
||||
// istream_iterator<_Tp, _Dist> operator++(int) {
|
||||
// istream_iterator<_Tp, _Dist> __tmp = *this;
|
||||
// _M_read();
|
||||
// return __tmp;
|
||||
// }
|
||||
//};
|
||||
//
|
||||
//#ifndef __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
//
|
||||
//template <class _Tp, class _Dist>
|
||||
//inline input_iterator_tag
|
||||
//iterator_category(const istream_iterator<_Tp, _Dist>&)
|
||||
//{
|
||||
// return input_iterator_tag();
|
||||
//}
|
||||
//
|
||||
//template <class _Tp, class _Dist>
|
||||
//inline _Tp*
|
||||
//value_type(const istream_iterator<_Tp, _Dist>&) { return (_Tp*) 0; }
|
||||
//
|
||||
//template <class _Tp, class _Dist>
|
||||
//inline _Dist*
|
||||
//distance_type(const istream_iterator<_Tp, _Dist>&) { return (_Dist*)0; }
|
||||
//
|
||||
//#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */
|
||||
//
|
||||
//template <class _Tp, class _Distance>
|
||||
//inline bool operator==(const istream_iterator<_Tp, _Distance>& __x,
|
||||
// const istream_iterator<_Tp, _Distance>& __y) {
|
||||
// return (__x._M_stream == __y._M_stream &&
|
||||
// __x._M_end_marker == __y._M_end_marker) ||
|
||||
// __x._M_end_marker == false && __y._M_end_marker == false;
|
||||
//}
|
||||
//
|
||||
//#ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
//
|
||||
//template <class _Tp, class _Distance>
|
||||
//inline bool operator!=(const istream_iterator<_Tp, _Distance>& __x,
|
||||
// const istream_iterator<_Tp, _Distance>& __y) {
|
||||
// return !(__x == __y);
|
||||
//}
|
||||
//
|
||||
//#endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
|
||||
//
|
||||
//template <class _Tp>
|
||||
//class ostream_iterator {
|
||||
//protected:
|
||||
// ostream* _M_stream;
|
||||
// const char* _M_string;
|
||||
//public:
|
||||
// typedef output_iterator_tag iterator_category;
|
||||
// typedef void value_type;
|
||||
// typedef void difference_type;
|
||||
// typedef void pointer;
|
||||
// typedef void reference;
|
||||
//
|
||||
// ostream_iterator(ostream& __s) : _M_stream(&__s), _M_string(0) {}
|
||||
// ostream_iterator(ostream& __s, const char* __c)
|
||||
// : _M_stream(&__s), _M_string(__c) {}
|
||||
// ostream_iterator<_Tp>& operator=(const _Tp& __value) {
|
||||
// *_M_stream << __value;
|
||||
// if (_M_string) *_M_stream << _M_string;
|
||||
// return *this;
|
||||
// }
|
||||
// ostream_iterator<_Tp>& operator*() { return *this; }
|
||||
// ostream_iterator<_Tp>& operator++() { return *this; }
|
||||
// ostream_iterator<_Tp>& operator++(int) { return *this; }
|
||||
//};
|
||||
//
|
||||
//#ifndef __STL_CLASS_PARTIAL_SPECIALIZATION
|
||||
//
|
||||
//template <class _Tp>
|
||||
//inline output_iterator_tag
|
||||
//iterator_category(const ostream_iterator<_Tp>&) {
|
||||
// return output_iterator_tag();
|
||||
//}
|
||||
//
|
||||
//#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */
|
||||
//
|
||||
//#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
__STL_END_NAMESPACE
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
// The internal file stl_iterator.h contains predefined iterators,
|
||||
// such as front_insert_iterator and istream_iterator.
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_LIST_H
|
||||
#define __SGI_STL_INTERNAL_LIST_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_MAP_H
|
||||
#define __SGI_STL_INTERNAL_MAP_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_MULTIMAP_H
|
||||
#define __SGI_STL_INTERNAL_MULTIMAP_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_MULTISET_H
|
||||
#define __SGI_STL_INTERNAL_MULTISET_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_QUEUE_H
|
||||
#define __SGI_STL_INTERNAL_QUEUE_H
|
||||
|
||||
#include <sequence_concepts.h>
|
||||
#include "sequence_concepts.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// __STL_DONT_THROW_RANGE_ERRORS is a hook so that users can disable
|
||||
// this exception throwing.
|
||||
|
||||
#include <stl_config.h>
|
||||
#include "stl_config.h"
|
||||
|
||||
#if defined(__STL_CAN_THROW_RANGE_ERRORS) && \
|
||||
defined(__STL_USE_EXCEPTIONS) && \
|
||||
@@ -45,7 +45,7 @@ __STL_END_NAMESPACE
|
||||
// stdexcept header and throw the appropriate exceptions directly.
|
||||
#elif defined(__STL_THROW_RANGE_ERRORS)
|
||||
|
||||
#include <stdexcept>
|
||||
#include "stdexcept"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
inline void __stl_throw_range_error(const char* __msg)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_SET_H
|
||||
#define __SGI_STL_INTERNAL_SET_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_SLIST_H
|
||||
#define __SGI_STL_INTERNAL_SLIST_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_STACK_H
|
||||
#define __SGI_STL_INTERNAL_STACK_H
|
||||
|
||||
#include <sequence_concepts.h>
|
||||
#include "sequence_concepts.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
#ifndef __SGI_STL_STRING_FWD_H
|
||||
#define __SGI_STL_STRING_FWD_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stl_config.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <char_traits.h>
|
||||
#include "stddef.h"
|
||||
#include "stl_config.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "char_traits.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -25,15 +25,15 @@
|
||||
// Schlick, 1999.
|
||||
|
||||
#if defined(__STL_SGI_THREADS)
|
||||
#include <mutex.h>
|
||||
#include <time.h>
|
||||
#include "mutex.h"
|
||||
#include "time.h"
|
||||
#elif defined(__STL_PTHREADS)
|
||||
#include <pthread.h>
|
||||
#include "pthread.h"
|
||||
#elif defined(__STL_UITHREADS)
|
||||
#include <thread.h>
|
||||
#include <synch.h>
|
||||
#include "thread.h"
|
||||
#include "synch.h"
|
||||
#elif defined(__STL_WIN32THREADS)
|
||||
#include <windows.h>
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
@@ -53,10 +53,10 @@ iterators invalidated are those referring to the deleted node.
|
||||
|
||||
*/
|
||||
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_function.h>
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_function.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __SGI_STL_INTERNAL_VECTOR_H
|
||||
#define __SGI_STL_INTERNAL_VECTOR_H
|
||||
|
||||
#include <concept_checks.h>
|
||||
#include "concept_checks.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -14,20 +14,20 @@
|
||||
#ifndef __SGI_STL_STRING
|
||||
#define __SGI_STL_STRING
|
||||
|
||||
#include <stl_config.h>
|
||||
#include <stl_string_fwd.h>
|
||||
#include <ctype.h>
|
||||
#include <functional>
|
||||
#include <stl_ctraits_fns.h>
|
||||
#include <stdexcept>
|
||||
#include <stl_iterator_base.h>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include "stl_config.h"
|
||||
#include "stl_string_fwd.h"
|
||||
#include "ctype.h"
|
||||
#include "functional"
|
||||
#include "stl_ctraits_fns.h"
|
||||
#include "stdexcept"
|
||||
#include "stl_iterator_base.h"
|
||||
#include "memory"
|
||||
#include "algorithm"
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
#include <iosfwd>
|
||||
#include "iosfwd"
|
||||
#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
#include <char_traits.h>
|
||||
#include "char_traits.h"
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
// Standard C++ string class. This class has performance
|
||||
@@ -2017,329 +2017,329 @@ inline void swap(basic_string<_CharT,_Traits,_Alloc>& __x,
|
||||
|
||||
// I/O.
|
||||
|
||||
#ifndef __STL_USE_NEW_IOSTREAMS
|
||||
__STL_END_NAMESPACE
|
||||
#include <iostream.h>
|
||||
__STL_BEGIN_NAMESPACE
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#ifndef __STL_USE_NEW_IOSTREAMS
|
||||
//__STL_END_NAMESPACE
|
||||
//#include "iostream.h"
|
||||
//__STL_BEGIN_NAMESPACE
|
||||
//#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline bool
|
||||
__sgi_string_fill(basic_ostream<_CharT, _Traits>& __os,
|
||||
basic_streambuf<_CharT, _Traits>* __buf,
|
||||
size_t __n)
|
||||
{
|
||||
_CharT __f = __os.fill();
|
||||
size_t __i;
|
||||
bool __ok = true;
|
||||
|
||||
for (__i = 0; __i < __n; __i++)
|
||||
__ok = __ok && !_Traits::eq_int_type(__buf->sputc(__f), _Traits::eof());
|
||||
return __ok;
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
{
|
||||
typename basic_ostream<_CharT, _Traits>::sentry __sentry(__os);
|
||||
bool __ok = false;
|
||||
|
||||
if (__sentry) {
|
||||
__ok = true;
|
||||
size_t __n = __s.size();
|
||||
size_t __pad_len = 0;
|
||||
const bool __left = (__os.flags() & ios::left) != 0;
|
||||
const size_t __w = __os.width(0);
|
||||
basic_streambuf<_CharT, _Traits>* __buf = __os.rdbuf();
|
||||
|
||||
if (__w != 0 && __n < __w)
|
||||
__pad_len = __w - __n;
|
||||
|
||||
if (!__left)
|
||||
__ok = __sgi_string_fill(__os, __buf, __pad_len);
|
||||
|
||||
__ok = __ok &&
|
||||
__buf->sputn(__s.data(), streamsize(__n)) == streamsize(__n);
|
||||
|
||||
if (__left)
|
||||
__ok = __ok && __sgi_string_fill(__os, __buf, __pad_len);
|
||||
}
|
||||
|
||||
if (!__ok)
|
||||
__os.setstate(ios_base::failbit);
|
||||
|
||||
return __os;
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
basic_istream<_CharT, _Traits>&
|
||||
operator>>(basic_istream<_CharT, _Traits>& __is,
|
||||
basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
{
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
|
||||
|
||||
if (__sentry) {
|
||||
basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
|
||||
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__is.getloc());
|
||||
|
||||
__s.clear();
|
||||
size_t __n = __is.width(0);
|
||||
if (__n == 0)
|
||||
__n = static_cast<size_t>(-1);
|
||||
else
|
||||
__s.reserve(__n);
|
||||
|
||||
|
||||
while (__n-- > 0) {
|
||||
typename _Traits::int_type __c1 = __buf->sbumpc();
|
||||
if (_Traits::eq_int_type(__c1, _Traits::eof())) {
|
||||
__is.setstate(ios_base::eofbit);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
_CharT __c = _Traits::to_char_type(__c1);
|
||||
|
||||
if (__ctype.is(ctype<_CharT>::space, __c)) {
|
||||
if (_Traits::eq_int_type(__buf->sputbackc(__c), _Traits::eof()))
|
||||
__is.setstate(ios_base::failbit);
|
||||
break;
|
||||
}
|
||||
else
|
||||
__s.push_back(__c);
|
||||
}
|
||||
}
|
||||
|
||||
// If we have read no characters, then set failbit.
|
||||
if (__s.size() == 0)
|
||||
__is.setstate(ios_base::failbit);
|
||||
}
|
||||
else
|
||||
__is.setstate(ios_base::failbit);
|
||||
|
||||
return __is;
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
basic_istream<_CharT, _Traits>&
|
||||
getline(istream& __is,
|
||||
basic_string<_CharT,_Traits,_Alloc>& __s,
|
||||
_CharT __delim)
|
||||
{
|
||||
size_t __nread = 0;
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sentry(__is, true);
|
||||
if (__sentry) {
|
||||
basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
|
||||
__s.clear();
|
||||
|
||||
int __c1;
|
||||
while (__nread < __s.max_size()) {
|
||||
int __c1 = __buf->sbumpc();
|
||||
if (_Traits::eq_int_type(__c1, _Traits::eof())) {
|
||||
__is.setstate(ios_base::eofbit);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
++__nread;
|
||||
_CharT __c = _Traits::to_char_type(__c1);
|
||||
if (!_Traits::eq(__c, __delim))
|
||||
__s.push_back(__c);
|
||||
else
|
||||
break; // Character is extracted but not appended.
|
||||
}
|
||||
}
|
||||
}
|
||||
if (__nread == 0 || __nread >= __s.max_size())
|
||||
__is.setstate(ios_base::failbit);
|
||||
|
||||
return __is;
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
inline basic_istream<_CharT, _Traits>&
|
||||
getline(basic_istream<_CharT, _Traits>& __is,
|
||||
basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
{
|
||||
return getline(__is, __s, '\n');
|
||||
}
|
||||
|
||||
#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
inline void __sgi_string_fill(ostream& __os, streambuf* __buf, size_t __n)
|
||||
{
|
||||
char __f = __os.fill();
|
||||
size_t __i;
|
||||
|
||||
for (__i = 0; __i < __n; __i++) __buf->sputc(__f);
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
ostream& operator<<(ostream& __os,
|
||||
const basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
{
|
||||
streambuf* __buf = __os.rdbuf();
|
||||
if (__buf) {
|
||||
size_t __n = __s.size();
|
||||
size_t __pad_len = 0;
|
||||
const bool __left = (__os.flags() & ios::left) != 0;
|
||||
const size_t __w = __os.width();
|
||||
|
||||
if (__w > 0) {
|
||||
__n = min(__w, __n);
|
||||
__pad_len = __w - __n;
|
||||
}
|
||||
|
||||
if (!__left)
|
||||
__sgi_string_fill(__os, __buf, __pad_len);
|
||||
|
||||
const size_t __nwritten = __buf->sputn(__s.data(), __n);
|
||||
|
||||
if (__left)
|
||||
__sgi_string_fill(__os, __buf, __pad_len);
|
||||
|
||||
if (__nwritten != __n)
|
||||
__os.clear(__os.rdstate() | ios::failbit);
|
||||
|
||||
__os.width(0);
|
||||
}
|
||||
else
|
||||
__os.clear(__os.rdstate() | ios::badbit);
|
||||
|
||||
return __os;
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
istream& operator>>(istream& __is, basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
{
|
||||
if (!__is)
|
||||
return __is;
|
||||
|
||||
streambuf* __buf = __is.rdbuf();
|
||||
if (__buf) {
|
||||
|
||||
#ifdef __USLC__
|
||||
/* Jochen Schlick '1999 - operator >> modified. Work-around to get the
|
||||
* output buffer flushed (necessary when using
|
||||
* "cout" (without endl or flushing) followed by
|
||||
* "cin >>" ...)
|
||||
*/
|
||||
if (__is.flags() & ios::skipws) {
|
||||
_CharT __c;
|
||||
do
|
||||
__is.get(__c);
|
||||
while (__is && isspace(__c));
|
||||
if (__is)
|
||||
__is.putback(__c);
|
||||
}
|
||||
#else
|
||||
if (__is.flags() & ios::skipws) {
|
||||
int __c;
|
||||
do {
|
||||
__c = __buf->sbumpc();
|
||||
}
|
||||
while (__c != EOF && isspace((unsigned char)__c));
|
||||
|
||||
if (__c == EOF) {
|
||||
__is.clear(__is.rdstate() | ios::eofbit | ios::failbit);
|
||||
}
|
||||
else {
|
||||
if (__buf->sputbackc(__c) == EOF)
|
||||
__is.clear(__is.rdstate() | ios::failbit);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// If we arrive at end of file (or fail for some other reason) while
|
||||
// still discarding whitespace, then we don't try to read the string.
|
||||
if (__is) {
|
||||
__s.clear();
|
||||
|
||||
size_t __n = __is.width();
|
||||
if (__n == 0)
|
||||
__n = static_cast<size_t>(-1);
|
||||
else
|
||||
__s.reserve(__n);
|
||||
|
||||
while (__n-- > 0) {
|
||||
int __c1 = __buf->sbumpc();
|
||||
if (__c1 == EOF) {
|
||||
__is.clear(__is.rdstate() | ios::eofbit);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
_CharT __c = _Traits::to_char_type(__c1);
|
||||
|
||||
if (isspace((unsigned char) __c)) {
|
||||
if (__buf->sputbackc(__c) == EOF)
|
||||
__is.clear(__is.rdstate() | ios::failbit);
|
||||
break;
|
||||
}
|
||||
else
|
||||
__s.push_back(__c);
|
||||
}
|
||||
}
|
||||
|
||||
// If we have read no characters, then set failbit.
|
||||
if (__s.size() == 0)
|
||||
__is.clear(__is.rdstate() | ios::failbit);
|
||||
}
|
||||
|
||||
__is.width(0);
|
||||
}
|
||||
else // We have no streambuf.
|
||||
__is.clear(__is.rdstate() | ios::badbit);
|
||||
|
||||
return __is;
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
istream& getline(istream& __is,
|
||||
basic_string<_CharT,_Traits,_Alloc>& __s,
|
||||
_CharT __delim)
|
||||
{
|
||||
streambuf* __buf = __is.rdbuf();
|
||||
if (__buf) {
|
||||
size_t __nread = 0;
|
||||
if (__is) {
|
||||
__s.clear();
|
||||
|
||||
while (__nread < __s.max_size()) {
|
||||
int __c1 = __buf->sbumpc();
|
||||
if (__c1 == EOF) {
|
||||
__is.clear(__is.rdstate() | ios::eofbit);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
++__nread;
|
||||
_CharT __c = _Traits::to_char_type(__c1);
|
||||
if (!_Traits::eq(__c, __delim))
|
||||
__s.push_back(__c);
|
||||
else
|
||||
break; // Character is extracted but not appended.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (__nread == 0 || __nread >= __s.max_size())
|
||||
__is.clear(__is.rdstate() | ios::failbit);
|
||||
}
|
||||
else
|
||||
__is.clear(__is.rdstate() | ios::badbit);
|
||||
|
||||
return __is;
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
inline istream&
|
||||
getline(istream& __is, basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
{
|
||||
return getline(__is, __s, '\n');
|
||||
}
|
||||
|
||||
#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
//#ifdef __STL_USE_NEW_IOSTREAMS
|
||||
//
|
||||
//template <class _CharT, class _Traits>
|
||||
//inline bool
|
||||
//__sgi_string_fill(basic_ostream<_CharT, _Traits>& __os,
|
||||
// basic_streambuf<_CharT, _Traits>* __buf,
|
||||
// size_t __n)
|
||||
//{
|
||||
// _CharT __f = __os.fill();
|
||||
// size_t __i;
|
||||
// bool __ok = true;
|
||||
//
|
||||
// for (__i = 0; __i < __n; __i++)
|
||||
// __ok = __ok && !_Traits::eq_int_type(__buf->sputc(__f), _Traits::eof());
|
||||
// return __ok;
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, class _Alloc>
|
||||
//basic_ostream<_CharT, _Traits>&
|
||||
//operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
// const basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
//{
|
||||
// typename basic_ostream<_CharT, _Traits>::sentry __sentry(__os);
|
||||
// bool __ok = false;
|
||||
//
|
||||
// if (__sentry) {
|
||||
// __ok = true;
|
||||
// size_t __n = __s.size();
|
||||
// size_t __pad_len = 0;
|
||||
// const bool __left = (__os.flags() & ios::left) != 0;
|
||||
// const size_t __w = __os.width(0);
|
||||
// basic_streambuf<_CharT, _Traits>* __buf = __os.rdbuf();
|
||||
//
|
||||
// if (__w != 0 && __n < __w)
|
||||
// __pad_len = __w - __n;
|
||||
//
|
||||
// if (!__left)
|
||||
// __ok = __sgi_string_fill(__os, __buf, __pad_len);
|
||||
//
|
||||
// __ok = __ok &&
|
||||
// __buf->sputn(__s.data(), streamsize(__n)) == streamsize(__n);
|
||||
//
|
||||
// if (__left)
|
||||
// __ok = __ok && __sgi_string_fill(__os, __buf, __pad_len);
|
||||
// }
|
||||
//
|
||||
// if (!__ok)
|
||||
// __os.setstate(ios_base::failbit);
|
||||
//
|
||||
// return __os;
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, class _Alloc>
|
||||
//basic_istream<_CharT, _Traits>&
|
||||
//operator>>(basic_istream<_CharT, _Traits>& __is,
|
||||
// basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
//{
|
||||
// typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
|
||||
//
|
||||
// if (__sentry) {
|
||||
// basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
|
||||
// const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__is.getloc());
|
||||
//
|
||||
// __s.clear();
|
||||
// size_t __n = __is.width(0);
|
||||
// if (__n == 0)
|
||||
// __n = static_cast<size_t>(-1);
|
||||
// else
|
||||
// __s.reserve(__n);
|
||||
//
|
||||
//
|
||||
// while (__n-- > 0) {
|
||||
// typename _Traits::int_type __c1 = __buf->sbumpc();
|
||||
// if (_Traits::eq_int_type(__c1, _Traits::eof())) {
|
||||
// __is.setstate(ios_base::eofbit);
|
||||
// break;
|
||||
// }
|
||||
// else {
|
||||
// _CharT __c = _Traits::to_char_type(__c1);
|
||||
//
|
||||
// if (__ctype.is(ctype<_CharT>::space, __c)) {
|
||||
// if (_Traits::eq_int_type(__buf->sputbackc(__c), _Traits::eof()))
|
||||
// __is.setstate(ios_base::failbit);
|
||||
// break;
|
||||
// }
|
||||
// else
|
||||
// __s.push_back(__c);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // If we have read no characters, then set failbit.
|
||||
// if (__s.size() == 0)
|
||||
// __is.setstate(ios_base::failbit);
|
||||
// }
|
||||
// else
|
||||
// __is.setstate(ios_base::failbit);
|
||||
//
|
||||
// return __is;
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, class _Alloc>
|
||||
//basic_istream<_CharT, _Traits>&
|
||||
//getline(istream& __is,
|
||||
// basic_string<_CharT,_Traits,_Alloc>& __s,
|
||||
// _CharT __delim)
|
||||
//{
|
||||
// size_t __nread = 0;
|
||||
// typename basic_istream<_CharT, _Traits>::sentry __sentry(__is, true);
|
||||
// if (__sentry) {
|
||||
// basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
|
||||
// __s.clear();
|
||||
//
|
||||
// int __c1;
|
||||
// while (__nread < __s.max_size()) {
|
||||
// int __c1 = __buf->sbumpc();
|
||||
// if (_Traits::eq_int_type(__c1, _Traits::eof())) {
|
||||
// __is.setstate(ios_base::eofbit);
|
||||
// break;
|
||||
// }
|
||||
// else {
|
||||
// ++__nread;
|
||||
// _CharT __c = _Traits::to_char_type(__c1);
|
||||
// if (!_Traits::eq(__c, __delim))
|
||||
// __s.push_back(__c);
|
||||
// else
|
||||
// break; // Character is extracted but not appended.
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (__nread == 0 || __nread >= __s.max_size())
|
||||
// __is.setstate(ios_base::failbit);
|
||||
//
|
||||
// return __is;
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, class _Alloc>
|
||||
//inline basic_istream<_CharT, _Traits>&
|
||||
//getline(basic_istream<_CharT, _Traits>& __is,
|
||||
// basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
//{
|
||||
// return getline(__is, __s, '\n');
|
||||
//}
|
||||
//
|
||||
//#else /* __STL_USE_NEW_IOSTREAMS */
|
||||
//
|
||||
//inline void __sgi_string_fill(ostream& __os, streambuf* __buf, size_t __n)
|
||||
//{
|
||||
// char __f = __os.fill();
|
||||
// size_t __i;
|
||||
//
|
||||
// for (__i = 0; __i < __n; __i++) __buf->sputc(__f);
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, class _Alloc>
|
||||
//ostream& operator<<(ostream& __os,
|
||||
// const basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
//{
|
||||
// streambuf* __buf = __os.rdbuf();
|
||||
// if (__buf) {
|
||||
// size_t __n = __s.size();
|
||||
// size_t __pad_len = 0;
|
||||
// const bool __left = (__os.flags() & ios::left) != 0;
|
||||
// const size_t __w = __os.width();
|
||||
//
|
||||
// if (__w > 0) {
|
||||
// __n = min(__w, __n);
|
||||
// __pad_len = __w - __n;
|
||||
// }
|
||||
//
|
||||
// if (!__left)
|
||||
// __sgi_string_fill(__os, __buf, __pad_len);
|
||||
//
|
||||
// const size_t __nwritten = __buf->sputn(__s.data(), __n);
|
||||
//
|
||||
// if (__left)
|
||||
// __sgi_string_fill(__os, __buf, __pad_len);
|
||||
//
|
||||
// if (__nwritten != __n)
|
||||
// __os.clear(__os.rdstate() | ios::failbit);
|
||||
//
|
||||
// __os.width(0);
|
||||
// }
|
||||
// else
|
||||
// __os.clear(__os.rdstate() | ios::badbit);
|
||||
//
|
||||
// return __os;
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, class _Alloc>
|
||||
//istream& operator>>(istream& __is, basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
//{
|
||||
// if (!__is)
|
||||
// return __is;
|
||||
//
|
||||
// streambuf* __buf = __is.rdbuf();
|
||||
// if (__buf) {
|
||||
//
|
||||
//#ifdef __USLC__
|
||||
///* Jochen Schlick '1999 - operator >> modified. Work-around to get the
|
||||
// * output buffer flushed (necessary when using
|
||||
// * "cout" (without endl or flushing) followed by
|
||||
// * "cin >>" ...)
|
||||
// */
|
||||
// if (__is.flags() & ios::skipws) {
|
||||
// _CharT __c;
|
||||
// do
|
||||
// __is.get(__c);
|
||||
// while (__is && isspace(__c));
|
||||
// if (__is)
|
||||
// __is.putback(__c);
|
||||
// }
|
||||
//#else
|
||||
// if (__is.flags() & ios::skipws) {
|
||||
// int __c;
|
||||
// do {
|
||||
// __c = __buf->sbumpc();
|
||||
// }
|
||||
// while (__c != EOF && isspace((unsigned char)__c));
|
||||
//
|
||||
// if (__c == EOF) {
|
||||
// __is.clear(__is.rdstate() | ios::eofbit | ios::failbit);
|
||||
// }
|
||||
// else {
|
||||
// if (__buf->sputbackc(__c) == EOF)
|
||||
// __is.clear(__is.rdstate() | ios::failbit);
|
||||
// }
|
||||
// }
|
||||
//#endif
|
||||
//
|
||||
// // If we arrive at end of file (or fail for some other reason) while
|
||||
// // still discarding whitespace, then we don't try to read the string.
|
||||
// if (__is) {
|
||||
// __s.clear();
|
||||
//
|
||||
// size_t __n = __is.width();
|
||||
// if (__n == 0)
|
||||
// __n = static_cast<size_t>(-1);
|
||||
// else
|
||||
// __s.reserve(__n);
|
||||
//
|
||||
// while (__n-- > 0) {
|
||||
// int __c1 = __buf->sbumpc();
|
||||
// if (__c1 == EOF) {
|
||||
// __is.clear(__is.rdstate() | ios::eofbit);
|
||||
// break;
|
||||
// }
|
||||
// else {
|
||||
// _CharT __c = _Traits::to_char_type(__c1);
|
||||
//
|
||||
// if (isspace((unsigned char) __c)) {
|
||||
// if (__buf->sputbackc(__c) == EOF)
|
||||
// __is.clear(__is.rdstate() | ios::failbit);
|
||||
// break;
|
||||
// }
|
||||
// else
|
||||
// __s.push_back(__c);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // If we have read no characters, then set failbit.
|
||||
// if (__s.size() == 0)
|
||||
// __is.clear(__is.rdstate() | ios::failbit);
|
||||
// }
|
||||
//
|
||||
// __is.width(0);
|
||||
// }
|
||||
// else // We have no streambuf.
|
||||
// __is.clear(__is.rdstate() | ios::badbit);
|
||||
//
|
||||
// return __is;
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, class _Alloc>
|
||||
//istream& getline(istream& __is,
|
||||
// basic_string<_CharT,_Traits,_Alloc>& __s,
|
||||
// _CharT __delim)
|
||||
//{
|
||||
// streambuf* __buf = __is.rdbuf();
|
||||
// if (__buf) {
|
||||
// size_t __nread = 0;
|
||||
// if (__is) {
|
||||
// __s.clear();
|
||||
//
|
||||
// while (__nread < __s.max_size()) {
|
||||
// int __c1 = __buf->sbumpc();
|
||||
// if (__c1 == EOF) {
|
||||
// __is.clear(__is.rdstate() | ios::eofbit);
|
||||
// break;
|
||||
// }
|
||||
// else {
|
||||
// ++__nread;
|
||||
// _CharT __c = _Traits::to_char_type(__c1);
|
||||
// if (!_Traits::eq(__c, __delim))
|
||||
// __s.push_back(__c);
|
||||
// else
|
||||
// break; // Character is extracted but not appended.
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (__nread == 0 || __nread >= __s.max_size())
|
||||
// __is.clear(__is.rdstate() | ios::failbit);
|
||||
// }
|
||||
// else
|
||||
// __is.clear(__is.rdstate() | ios::badbit);
|
||||
//
|
||||
// return __is;
|
||||
//}
|
||||
//
|
||||
//template <class _CharT, class _Traits, class _Alloc>
|
||||
//inline istream&
|
||||
//getline(istream& __is, basic_string<_CharT,_Traits,_Alloc>& __s)
|
||||
//{
|
||||
// return getline(__is, __s, '\n');
|
||||
//}
|
||||
//
|
||||
//#endif /* __STL_USE_NEW_IOSTREAMS */
|
||||
|
||||
template <class _CharT, class _Traits, class _Alloc>
|
||||
void _S_string_copy(const basic_string<_CharT,_Traits,_Alloc>& __s,
|
||||
@@ -2366,7 +2366,7 @@ inline const char* __get_c_string(const string& __s) { return __s.c_str(); }
|
||||
|
||||
__STL_END_NAMESPACE
|
||||
|
||||
#include <stl_hash_fun.h>
|
||||
#include "stl_hash_fun.h"
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -28,22 +28,22 @@
|
||||
#define __SGI_STL_TEMPBUF_H
|
||||
|
||||
#ifndef __SGI_STL_PAIR_H
|
||||
#include <pair.h>
|
||||
#include "pair.h"
|
||||
#endif
|
||||
#include <limits.h> /* XXX should use <climits> */
|
||||
#include <stddef.h> /* XXX should use <cstddef> */
|
||||
#include <climits> /* XXX should use <climits> */
|
||||
#include <cstddef> /* XXX should use <cstddef> */
|
||||
#include <stdlib.h> /* XXX should use <cstdlib> */
|
||||
#ifndef __TYPE_TRAITS_H
|
||||
#include <type_traits.h>
|
||||
#include "type_traits.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_CONSTRUCT_H
|
||||
#include <stl_construct.h>
|
||||
#include "stl_construct.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_UNINITIALIZED_H
|
||||
#include <stl_uninitialized.h>
|
||||
#include "stl_uninitialized.h"
|
||||
#endif
|
||||
#ifndef __SGI_STL_INTERNAL_TEMPBUF_H
|
||||
#include <stl_tempbuf.h>
|
||||
#include "stl_tempbuf.h"
|
||||
#endif
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#define __SGI_STL_TREE_H
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_TREE_H
|
||||
#include <stl_tree.h>
|
||||
#include "stl_tree.h"
|
||||
#endif
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::rb_tree;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#define __TYPE_TRAITS_H
|
||||
|
||||
#ifndef __STL_CONFIG_H
|
||||
#include <stl_config.h>
|
||||
#include "stl_config.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#ifndef __SGI_STL_UTILITY
|
||||
#define __SGI_STL_UTILITY
|
||||
|
||||
#include <stl_config.h>
|
||||
#include <stl_relops.h>
|
||||
#include <stl_pair.h>
|
||||
#include "stl_config.h"
|
||||
#include "stl_relops.h"
|
||||
#include "stl_pair.h"
|
||||
|
||||
#endif /* __SGI_STL_UTILITY */
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
#ifndef __SGI_STL_VALARRAY
|
||||
#define __SGI_STL_VALARRAY
|
||||
|
||||
#include <type_traits.h>
|
||||
#include <math.h>
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <limits>
|
||||
#include <new>
|
||||
#include "type_traits.h"
|
||||
#include "math.h"
|
||||
#include "algorithm"
|
||||
#include "numeric"
|
||||
#include "limits"
|
||||
#include "new"
|
||||
|
||||
|
||||
__STL_BEGIN_NAMESPACE
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
#ifndef __SGI_STL_VECTOR
|
||||
#define __SGI_STL_VECTOR
|
||||
|
||||
#include <stl_range_errors.h>
|
||||
#include <stl_algobase.h>
|
||||
#include <stl_alloc.h>
|
||||
#include <stl_construct.h>
|
||||
#include <stl_uninitialized.h>
|
||||
#include <stl_vector.h>
|
||||
#include <stl_bvector.h>
|
||||
#include "stl_range_errors.h"
|
||||
#include "stl_algobase.h"
|
||||
#include "stl_alloc.h"
|
||||
#include "stl_construct.h"
|
||||
#include "stl_uninitialized.h"
|
||||
#include "stl_vector.h"
|
||||
#include "stl_bvector.h"
|
||||
|
||||
#endif /* __SGI_STL_VECTOR */
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
#ifndef __SGI_STL_VECTOR_H
|
||||
#define __SGI_STL_VECTOR_H
|
||||
|
||||
#include <stl_range_errors.h>
|
||||
#include <algobase.h>
|
||||
#include <alloc.h>
|
||||
#include <stl_vector.h>
|
||||
#include "stl_range_errors.h"
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include "stl_vector.h"
|
||||
|
||||
#ifdef __STL_USE_NAMESPACES
|
||||
using __STD::vector;
|
||||
|
||||
Reference in New Issue
Block a user