summaryrefslogtreecommitdiff
path: root/libstdc++/stl
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-09-02 12:33:38 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-09-02 12:33:38 +0000
commitb8b32a0e8e19d9e400a43b936f0e1f2f8a081fc1 (patch)
treed088b544717108c5d90ea39a37a5d46dd399a275 /libstdc++/stl
parent4f08f26b214e1fd978a561f10c4f6b0752b090be (diff)
downloadgcc-b8b32a0e8e19d9e400a43b936f0e1f2f8a081fc1.tar.gz
Initial revision
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++/stl')
-rw-r--r--libstdc++/stl/stl_exception.h57
-rw-r--r--libstdc++/stl/stl_string_fwd.h51
2 files changed, 108 insertions, 0 deletions
diff --git a/libstdc++/stl/stl_exception.h b/libstdc++/stl/stl_exception.h
new file mode 100644
index 00000000000..37b54d74442
--- /dev/null
+++ b/libstdc++/stl/stl_exception.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef __SGI_STL_EXCEPTION_H
+#define __SGI_STL_EXCEPTION_H
+
+// This header exists solely for portability. Normally it just includes
+// the header <exception>.
+
+// The header <exception> contains low-level functions that interact
+// with a compiler's exception-handling mechanism. It is assumed to
+// be supplied with the compiler, rather than with the library, because
+// it is inherently tied very closely to the compiler itself.
+
+// On platforms where <exception> does not exist, this header defines
+// an exception base class. This is *not* a substitute for everything
+// in <exception>, but it suffices to support a bare minimum of STL
+// functionality.
+
+#include <stl_config.h>
+
+#ifndef __STL_NO_EXCEPTION_HEADER
+
+#include <exception>
+#define __STL_EXCEPTION_BASE exception
+
+#else /* __STL_NO_EXCEPTION_HEADER */
+
+__STL_BEGIN_NAMESPACE
+
+class _Exception {
+public:
+ virtual ~_Exception() __STL_NOTHROW {}
+ virtual const char* what() const __STL_NOTHROW { return ""; }
+};
+
+#define __STL_EXCEPTION_BASE _Exception
+
+__STL_END_NAMESPACE
+
+#endif /* __STL_NO_EXCEPTION_HEADER */
+
+#endif /* __SGI_STL_EXCEPTION_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++/stl/stl_string_fwd.h b/libstdc++/stl/stl_string_fwd.h
new file mode 100644
index 00000000000..d2af9e19f01
--- /dev/null
+++ b/libstdc++/stl/stl_string_fwd.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef __SGI_STL_STRING_FWD_H
+#define __SGI_STL_STRING_FWD_H
+
+#include <stddef.h>
+
+__STL_BEGIN_NAMESPACE
+
+#ifdef __STL_USE_STD_ALLOCATORS
+
+template <class _Tp> class allocator;
+
+#else /* __STL_USE_STD_ALLOCATORS */
+
+template <bool __threads, int __inst> class _Default_alloc_template;
+typedef _Default_alloc_template<true, 0> _Alloc;
+
+#endif /* __STL_USE_STD_ALLOCATORS */
+
+template <class _CharT> struct char_traits;
+template <class _CharT,
+ class _Traits = char_traits<_CharT>,
+ class _Alloc = __STL_DEFAULT_ALLOCATOR(_CharT) >
+class basic_string;
+
+typedef basic_string<char> string;
+typedef basic_string<wchar_t> wstring;
+
+template <class _CharT, class _Traits, class _Alloc>
+void _S_string_copy(const basic_string<_CharT,_Traits,_Alloc>&, _CharT*,
+ size_t);
+
+__STL_END_NAMESPACE
+
+#endif /* __SGI_STL_STRING_FWD_H */
+
+// Local Variables:
+// mode:C++
+// End: