patch: <bits/localefwd.h> with -fno-exceptions
Harri Porten
harri@trolltech.com
Sun Jan 14 12:13:00 GMT 2001
Hi !
Here is a patch that replaces all usage of execption handling in
<bits/localefwd.h> with the #defines from stl_config.h. What's missing
is appearantly the inclusion of stl_config.h or similar. I haven't been
able to find a proper working spot. But the patch is verified to be
right by inserting the defines manually.
Harri.
--- localefwd.h.org Sun Jan 14 21:03:19 2001
+++ localefwd.h Sun Jan 14 21:03:25 2001
@@ -220,7 +220,7 @@
template<typename _Facet>
friend bool
- has_facet(const locale&) throw();
+ has_facet(const locale&) __STL_NOTHROW;
// Category values:
// NB much depends on the order in which these appear:
@@ -236,10 +236,10 @@
// Construct/copy/destroy:
inline
- locale() throw();
+ locale() __STL_NOTHROW;
inline
- locale(const locale& __other) throw();
+ locale(const locale& __other) __STL_NOTHROW;
explicit
locale(const char* __std_name);
@@ -252,10 +252,10 @@
locale(const locale& __other, _Facet* __f);
inline
- ~locale() throw();
+ ~locale() __STL_NOTHROW;
const locale&
- operator=(const locale& __other) throw();
+ operator=(const locale& __other) __STL_NOTHROW;
template<typename _Facet>
locale
@@ -298,7 +298,7 @@
static const int _S_facets_num = 26;
explicit
- locale(_Impl*) throw();
+ locale(_Impl*) __STL_NOTHROW;
static inline void
_S_initialize()
@@ -327,7 +327,7 @@
template<typename _Facet>
friend bool
- has_facet(const locale&) throw();
+ has_facet(const locale&) __STL_NOTHROW;
private:
// Data Members.
@@ -345,18 +345,18 @@
static const locale::id* const* const _S_facet_categories[];
inline void
- _M_add_reference() throw()
+ _M_add_reference() __STL_NOTHROW
{ ++_M_references; } // XXX MT
inline void
- _M_remove_reference() throw()
+ _M_remove_reference() __STL_NOTHROW
{
if (_M_references-- == 0) // XXX MT
{
- try {
+ __STL_TRY {
delete this;
}
- catch(...) {
+ __STL_CATCH_ALL {
}
}
}
@@ -364,7 +364,7 @@
_Impl(const _Impl&, size_t);
_Impl(const _Impl&, const string&, category, size_t);
_Impl(size_t, size_t, bool __has_name = false, string __name = "*");
- ~_Impl() throw();
+ ~_Impl() __STL_NOTHROW;
void
_M_replace_categories(const _Impl*, category);
@@ -406,13 +406,13 @@
};
// class locale inlines, that need declaration of locale::_Imp
- locale::locale() throw()
+ locale::locale() __STL_NOTHROW
{
_S_initialize();
(_M_impl = _S_global)->_M_add_reference();
} // XXX MT
- locale::locale(const locale& __other) throw()
+ locale::locale(const locale& __other) __STL_NOTHROW
{ (_M_impl = __other._M_impl)->_M_add_reference(); }
template<typename _Facet>
@@ -424,7 +424,7 @@
_M_impl->_M_name = "*";
}
- locale::~locale() throw()
+ locale::~locale() __STL_NOTHROW
{ _M_impl->_M_remove_reference(); }
// 22.1.1.1.2 Class locale::facet
@@ -435,7 +435,7 @@
protected:
explicit
- facet(size_t __refs = 0) throw();
+ facet(size_t __refs = 0) __STL_NOTHROW;
virtual
~facet() { };
@@ -444,10 +444,10 @@
size_t _M_references;
void
- _M_add_reference() throw();
+ _M_add_reference() __STL_NOTHROW;
void
- _M_remove_reference() throw();
+ _M_remove_reference() __STL_NOTHROW;
facet(const facet&); // not defined
@@ -466,7 +466,7 @@
use_facet(const locale&);
template<typename _Facet>
friend bool
- has_facet(const locale&) throw ();
+ has_facet(const locale&) __STL_NOTHROW;
public:
id() { };
private:
@@ -490,7 +490,7 @@
template<typename _Facet>
bool
- has_facet(const locale& __loc) throw();
+ has_facet(const locale& __loc) __STL_NOTHROW;
} // namespace std
More information about the Libstdc++
mailing list