Makefile.am: Add functional.cc, shared_ptr.cc.
2011-03-14 Benjamin Kosnik <bkoz@redhat.com> * src/Makefile.am: Add functional.cc, shared_ptr.cc. * src/Makefile.in: Regenerate. * libsupc++/Makefile.am: Add nested_exception.cc. * libsupc++/Makefile.in: Regenerate. * src/system_error.cc: Add ctor and dtor definitions for error_category. * src/functional.cc: New. Add dtor definition for bad_function_call. * src/stdexcept.cc: Add dtor definitions for domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error. * src/future.cc: Add dtor definition for __future_base::_Result_base. * src/shared_ptr.cc: New. Add dtor definition for bad_weak_ptr. * src/thread.cc: Add dtor for thread::_Impl_base. * include/std/system_error: Adjust. * include/std/stdexcept: Same. * include/std/future: Same. * include/std/functional: Same. * include/std/thread: Same. * include/bits/shared_ptr_base.h: Same. * libsupc++/nested_exception.cc: New. Add dtor for nested_exception. * libsupc++/nested_exception.h: Adjust. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust line numbers. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * config/abi/pre/gnu.ver: Add new exports. * include/bits/regex_compiler.h: Nest namespace versioning. * include/bits/regex_grep_matcher.tcc: Same. * include/bits/regex_grep_matcher.h: Same. * include/bits/regex_cursor.h: Same. * include/bits/regex_nfa.h: Same. * include/bits/regex_nfa.tcc: Same. From-SVN: r170975
This commit is contained in:
parent
fe8e6abcdd
commit
e95992339f
28 changed files with 730 additions and 504 deletions
|
@ -1,3 +1,36 @@
|
|||
2011-03-14 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* src/Makefile.am: Add functional.cc, shared_ptr.cc.
|
||||
* src/Makefile.in: Regenerate.
|
||||
* libsupc++/Makefile.am: Add nested_exception.cc.
|
||||
* libsupc++/Makefile.in: Regenerate.
|
||||
* src/system_error.cc: Add ctor and dtor definitions for error_category.
|
||||
* src/functional.cc: New. Add dtor definition for bad_function_call.
|
||||
* src/stdexcept.cc: Add dtor definitions for domain_error,
|
||||
invalid_argument, length_error, out_of_range, range_error,
|
||||
overflow_error, underflow_error.
|
||||
* src/future.cc: Add dtor definition for __future_base::_Result_base.
|
||||
* src/shared_ptr.cc: New. Add dtor definition for bad_weak_ptr.
|
||||
* src/thread.cc: Add dtor for thread::_Impl_base.
|
||||
* include/std/system_error: Adjust.
|
||||
* include/std/stdexcept: Same.
|
||||
* include/std/future: Same.
|
||||
* include/std/functional: Same.
|
||||
* include/std/thread: Same.
|
||||
* include/bits/shared_ptr_base.h: Same.
|
||||
* libsupc++/nested_exception.cc: New. Add dtor for nested_exception.
|
||||
* libsupc++/nested_exception.h: Adjust.
|
||||
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust line numbers.
|
||||
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
|
||||
* config/abi/pre/gnu.ver: Add new exports.
|
||||
|
||||
* include/bits/regex_compiler.h: Nest namespace versioning.
|
||||
* include/bits/regex_grep_matcher.tcc: Same.
|
||||
* include/bits/regex_grep_matcher.h: Same.
|
||||
* include/bits/regex_cursor.h: Same.
|
||||
* include/bits/regex_nfa.h: Same.
|
||||
* include/bits/regex_nfa.tcc: Same.
|
||||
|
||||
2011-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* doc/xml/manual/abi.xml: Replace docs.sun.com URLs by their OTN
|
||||
|
|
|
@ -124,7 +124,7 @@ GLIBCXX_3.4 {
|
|||
std::messages*;
|
||||
std::money*;
|
||||
# std::n[^u]*;
|
||||
std::n[^au]*;
|
||||
std::n[^aue]*;
|
||||
std::nu[^m]*;
|
||||
std::num[^e]*;
|
||||
std::ostrstream*;
|
||||
|
@ -1219,6 +1219,31 @@ GLIBCXX_3.4.15 {
|
|||
_ZTISt11regex_error;
|
||||
_ZSt19__throw_regex_errorNSt15regex_constants10error_typeE;
|
||||
|
||||
_ZNSt12bad_weak_ptrD*;
|
||||
_ZNKSt12bad_weak_ptr4whatEv;
|
||||
_ZTSSt12bad_weak_ptr;
|
||||
_ZTVSt12bad_weak_ptr;
|
||||
_ZTISt12bad_weak_ptr;
|
||||
|
||||
_ZNSt14error_categoryC*;
|
||||
_ZNSt14error_categoryD*;
|
||||
|
||||
_ZNSt13__future_base12_Result_baseC*;
|
||||
_ZNSt13__future_base12_Result_baseD*;
|
||||
_ZTINSt13__future_base12_Result_baseE;
|
||||
_ZTSNSt13__future_base12_Result_baseE;
|
||||
_ZTVNSt13__future_base12_Result_baseE;
|
||||
|
||||
_ZNSt13__future_base11_State_baseD*;
|
||||
_ZTINSt13__future_base11_State_baseE;
|
||||
_ZTSNSt13__future_base11_State_baseE;
|
||||
_ZTVNSt13__future_base11_State_baseE;
|
||||
|
||||
_ZNSt6thread10_Impl_baseD*;
|
||||
_ZTINSt6thread10_Impl_baseE;
|
||||
_ZTSNSt6thread10_Impl_baseE;
|
||||
_ZTVNSt6thread10_Impl_baseE;
|
||||
|
||||
} GLIBCXX_3.4.14;
|
||||
|
||||
# Symbols in the support library (libsupc++) have their own tag.
|
||||
|
@ -1403,4 +1428,10 @@ CXXABI_1.3.5 {
|
|||
_ZTSSt17bad_function_call;
|
||||
_ZTVSt17bad_function_call;
|
||||
|
||||
# std::nested_exception
|
||||
_ZNSt16nested_exceptionD*;
|
||||
_ZTISt16nested_exception;
|
||||
_ZTSSt16nested_exception;
|
||||
_ZTVSt16nested_exception;
|
||||
|
||||
} CXXABI_1.3.4;
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
namespace __regex
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
struct _Scanner_base
|
||||
{
|
||||
typedef unsigned int _StateT;
|
||||
|
@ -41,6 +41,8 @@ namespace __regex
|
|||
static constexpr _StateT _S_state_at_start = 1 << 0;
|
||||
static constexpr _StateT _S_state_in_brace = 1 << 2;
|
||||
static constexpr _StateT _S_state_in_bracket = 1 << 3;
|
||||
|
||||
virtual ~_Scanner_base() { };
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -1100,9 +1102,8 @@ namespace __regex
|
|||
{ return _AutomatonPtr(new _Nfa(_Compiler<_InIter, _TraitsT>(__b, __e, __t,
|
||||
__f)._M_nfa())); }
|
||||
|
||||
} // namespace __regex
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
} // namespace __regex
|
||||
} // namespace std
|
||||
|
||||
/* vim: set ts=8 sw=2 sts=2: */
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
namespace __regex
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
// ABC for pattern matching
|
||||
struct _PatternCursor
|
||||
{
|
||||
|
@ -88,7 +88,6 @@ namespace __regex
|
|||
__cursor(const _FwdIterT& __b, const _FwdIterT __e)
|
||||
{ return _SpecializedCursor<_FwdIterT>(__b, __e); }
|
||||
|
||||
} // namespace __regex
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace __regex
|
||||
} // namespace
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
template<typename _BiIter>
|
||||
class sub_match;
|
||||
|
@ -40,6 +39,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
|
||||
namespace __regex
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
// A _Results facade specialized for wrapping a templated match_results.
|
||||
template<typename _FwdIterT, typename _Alloc>
|
||||
class _SpecializedResults
|
||||
|
@ -121,9 +122,8 @@ namespace __regex
|
|||
_Results& _M_results;
|
||||
};
|
||||
|
||||
} // namespace __regex
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace __regex
|
||||
} // namespace
|
||||
|
||||
#include <bits/regex_grep_matcher.tcc>
|
||||
|
|
|
@ -32,11 +32,8 @@
|
|||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
// A stack of states used in evaluating the NFA.
|
||||
typedef std::stack<std::__regex::_StateIdT,
|
||||
std::vector<std::__regex::_StateIdT>
|
||||
|
@ -104,6 +101,8 @@ namespace
|
|||
|
||||
namespace __regex
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
inline _Grep_matcher::
|
||||
_Grep_matcher(_PatternCursor& __p, _Results& __r,
|
||||
const _AutomatonPtr& __nfa,
|
||||
|
@ -175,7 +174,6 @@ namespace __regex
|
|||
return __e;
|
||||
}
|
||||
|
||||
} // namespace __regex
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace __regex
|
||||
} // namespace
|
||||
|
|
|
@ -30,10 +30,9 @@
|
|||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
namespace __regex
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
// Base class for, um, automata. Could be an NFA or a DFA. Your choice.
|
||||
class _Automaton
|
||||
|
@ -43,8 +42,7 @@ namespace __regex
|
|||
|
||||
public:
|
||||
virtual
|
||||
~_Automaton()
|
||||
{ }
|
||||
~_Automaton() { }
|
||||
|
||||
virtual _SizeT
|
||||
_M_sub_count() const = 0;
|
||||
|
@ -394,10 +392,9 @@ namespace __regex
|
|||
|
||||
};
|
||||
|
||||
} // namespace __regex
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
} // namespace __regex
|
||||
} // namespace std
|
||||
|
||||
#include <bits/regex_nfa.tcc>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// class template regex -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
@ -31,10 +31,10 @@
|
|||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
namespace __regex
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
#ifdef _GLIBCXX_DEBUG
|
||||
inline std::ostream& _State::
|
||||
_M_print(std::ostream& ostr) const
|
||||
|
@ -169,7 +169,6 @@ inline _StateIdT _StateSeq::
|
|||
_M_clone()
|
||||
{ return 0; }
|
||||
|
||||
} // namespace __regex
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace __regex
|
||||
} // namespace
|
||||
|
|
|
@ -61,8 +61,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
public:
|
||||
virtual char const*
|
||||
what() const throw()
|
||||
{ return "std::bad_weak_ptr"; }
|
||||
what() const throw();
|
||||
|
||||
virtual ~bad_weak_ptr() throw();
|
||||
};
|
||||
|
||||
// Substitute for bad_weak_ptr object in the case of -fno-exceptions.
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -160,7 +160,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
exception_ptr _M_error;
|
||||
|
||||
_Result_base() = default;
|
||||
_Result_base(const _Result_base&) = delete;
|
||||
_Result_base& operator=(const _Result_base&) = delete;
|
||||
|
||||
|
@ -173,7 +172,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
};
|
||||
|
||||
protected:
|
||||
~_Result_base();
|
||||
_Result_base();
|
||||
virtual ~_Result_base();
|
||||
};
|
||||
|
||||
/// Result.
|
||||
|
@ -273,8 +273,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
}
|
||||
|
||||
|
||||
/// Shared state between a promise and one or more associated futures.
|
||||
class _State
|
||||
/// Base class for state between a promise and one or more
|
||||
/// associated futures.
|
||||
class _State_base
|
||||
{
|
||||
typedef _Ptr<_Result_base>::type _Ptr_type;
|
||||
|
||||
|
@ -285,10 +286,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
once_flag _M_once;
|
||||
|
||||
public:
|
||||
_State() : _M_result(), _M_retrieved(ATOMIC_FLAG_INIT) { }
|
||||
|
||||
_State(const _State&) = delete;
|
||||
_State& operator=(const _State&) = delete;
|
||||
_State_base() : _M_result(), _M_retrieved(ATOMIC_FLAG_INIT) { }
|
||||
_State_base(const _State_base&) = delete;
|
||||
_State_base& operator=(const _State_base&) = delete;
|
||||
virtual ~_State_base();
|
||||
|
||||
_Result_base&
|
||||
wait()
|
||||
|
@ -296,7 +297,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
_M_run_deferred();
|
||||
unique_lock<mutex> __lock(_M_mutex);
|
||||
if (!_M_ready())
|
||||
_M_cond.wait(__lock, std::bind<bool>(&_State::_M_ready, this));
|
||||
_M_cond.wait(__lock, std::bind<bool>(&_State_base::_M_ready, this));
|
||||
return *_M_result;
|
||||
}
|
||||
|
||||
|
@ -305,7 +306,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
wait_for(const chrono::duration<_Rep, _Period>& __rel)
|
||||
{
|
||||
unique_lock<mutex> __lock(_M_mutex);
|
||||
auto __bound = std::bind<bool>(&_State::_M_ready, this);
|
||||
auto __bound = std::bind<bool>(&_State_base::_M_ready, this);
|
||||
return _M_ready() || _M_cond.wait_for(__lock, __rel, __bound);
|
||||
}
|
||||
|
||||
|
@ -314,7 +315,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
wait_until(const chrono::time_point<_Clock, _Duration>& __abs)
|
||||
{
|
||||
unique_lock<mutex> __lock(_M_mutex);
|
||||
auto __bound = std::bind<bool>(&_State::_M_ready, this);
|
||||
auto __bound = std::bind<bool>(&_State_base::_M_ready, this);
|
||||
return _M_ready() || _M_cond.wait_until(__lock, __abs, __bound);
|
||||
}
|
||||
|
||||
|
@ -324,7 +325,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
bool __set = __ignore_failure;
|
||||
// all calls to this function are serialized,
|
||||
// side-effects of invoking __res only happen once
|
||||
call_once(_M_once, &_State::_M_do_set, this, ref(__res),
|
||||
call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
|
||||
ref(__set));
|
||||
if (!__set)
|
||||
__throw_future_error(int(future_errc::promise_already_satisfied));
|
||||
|
@ -368,7 +369,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
|
||||
typename promise<_Res>::_Ptr_type operator()()
|
||||
{
|
||||
_State::_S_check(_M_promise->_M_future);
|
||||
_State_base::_S_check(_M_promise->_M_future);
|
||||
_M_promise->_M_storage->_M_set(_M_arg);
|
||||
return std::move(_M_promise->_M_storage);
|
||||
}
|
||||
|
@ -382,7 +383,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
typename promise<_Res>::_Ptr_type operator()()
|
||||
{
|
||||
_State::_S_check(_M_promise->_M_future);
|
||||
_State_base::_S_check(_M_promise->_M_future);
|
||||
_M_promise->_M_storage->_M_set(std::move(_M_arg));
|
||||
return std::move(_M_promise->_M_storage);
|
||||
}
|
||||
|
@ -398,7 +399,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
typename promise<_Res>::_Ptr_type operator()()
|
||||
{
|
||||
_State::_S_check(_M_promise->_M_future);
|
||||
_State_base::_S_check(_M_promise->_M_future);
|
||||
_M_promise->_M_storage->_M_error = _M_ex;
|
||||
return std::move(_M_promise->_M_storage);
|
||||
}
|
||||
|
@ -463,8 +464,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
struct _Task_setter;
|
||||
};
|
||||
|
||||
inline __future_base::_Result_base::~_Result_base() = default;
|
||||
|
||||
/// Partial specialization for reference types.
|
||||
template<typename _Res>
|
||||
struct __future_base::_Result<_Res&> : __future_base::_Result_base
|
||||
|
@ -495,7 +494,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
class __basic_future : public __future_base
|
||||
{
|
||||
protected:
|
||||
typedef shared_ptr<_State> __state_type;
|
||||
typedef shared_ptr<_State_base> __state_type;
|
||||
typedef __future_base::_Result<_Res>& __result_type;
|
||||
|
||||
private:
|
||||
|
@ -512,7 +511,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
void
|
||||
wait() const
|
||||
{
|
||||
_State::_S_check(_M_state);
|
||||
_State_base::_S_check(_M_state);
|
||||
_M_state->wait();
|
||||
}
|
||||
|
||||
|
@ -520,7 +519,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
bool
|
||||
wait_for(const chrono::duration<_Rep, _Period>& __rel) const
|
||||
{
|
||||
_State::_S_check(_M_state);
|
||||
_State_base::_S_check(_M_state);
|
||||
return _M_state->wait_for(__rel);
|
||||
}
|
||||
|
||||
|
@ -528,7 +527,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
bool
|
||||
wait_until(const chrono::time_point<_Clock, _Duration>& __abs) const
|
||||
{
|
||||
_State::_S_check(_M_state);
|
||||
_State_base::_S_check(_M_state);
|
||||
return _M_state->wait_until(__abs);
|
||||
}
|
||||
|
||||
|
@ -537,7 +536,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
__result_type
|
||||
_M_get_result()
|
||||
{
|
||||
_State::_S_check(_M_state);
|
||||
_State_base::_S_check(_M_state);
|
||||
_Result_base& __res = _M_state->wait();
|
||||
if (!(__res._M_error == 0))
|
||||
rethrow_exception(__res._M_error);
|
||||
|
@ -553,7 +552,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
explicit
|
||||
__basic_future(const __state_type& __state) : _M_state(__state)
|
||||
{
|
||||
_State::_S_check(_M_state);
|
||||
_State_base::_S_check(_M_state);
|
||||
_M_state->_M_set_retrieved_flag();
|
||||
}
|
||||
|
||||
|
@ -850,9 +849,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
template<typename _Res>
|
||||
class promise
|
||||
{
|
||||
typedef __future_base::_State _State;
|
||||
typedef __future_base::_Result<_Res> _Res_type;
|
||||
typedef typename __future_base::_Ptr<_Res_type>::type _Ptr_type;
|
||||
typedef __future_base::_State_base _State;
|
||||
typedef __future_base::_Result<_Res> _Res_type;
|
||||
typedef typename __future_base::_Ptr<_Res_type>::type _Ptr_type;
|
||||
template<typename, typename> friend class _State::_Setter;
|
||||
|
||||
shared_ptr<_State> _M_future;
|
||||
|
@ -942,9 +941,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
template<typename _Res>
|
||||
class promise<_Res&>
|
||||
{
|
||||
typedef __future_base::_State _State;
|
||||
typedef __future_base::_Result<_Res&> _Res_type;
|
||||
typedef typename __future_base::_Ptr<_Res_type>::type _Ptr_type;
|
||||
typedef __future_base::_State_base _State;
|
||||
typedef __future_base::_Result<_Res&> _Res_type;
|
||||
typedef typename __future_base::_Ptr<_Res_type>::type _Ptr_type;
|
||||
template<typename, typename> friend class _State::_Setter;
|
||||
|
||||
shared_ptr<_State> _M_future;
|
||||
|
@ -1017,9 +1016,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
template<>
|
||||
class promise<void>
|
||||
{
|
||||
typedef __future_base::_State _State;
|
||||
typedef __future_base::_Result<void> _Res_type;
|
||||
typedef typename __future_base::_Ptr<_Res_type>::type _Ptr_type;
|
||||
typedef __future_base::_State_base _State;
|
||||
typedef __future_base::_Result<void> _Res_type;
|
||||
typedef typename __future_base::_Ptr<_Res_type>::type _Ptr_type;
|
||||
template<typename, typename> friend class _State::_Setter;
|
||||
|
||||
shared_ptr<_State> _M_future;
|
||||
|
@ -1085,19 +1084,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
|
||||
// set void
|
||||
template<>
|
||||
struct __future_base::_State::_Setter<void, void>
|
||||
struct __future_base::_State_base::_Setter<void, void>
|
||||
{
|
||||
promise<void>::_Ptr_type operator()()
|
||||
{
|
||||
_State::_S_check(_M_promise->_M_future);
|
||||
_State_base::_S_check(_M_promise->_M_future);
|
||||
return std::move(_M_promise->_M_storage);
|
||||
}
|
||||
|
||||
promise<void>* _M_promise;
|
||||
};
|
||||
|
||||
inline __future_base::_State::_Setter<void, void>
|
||||
__future_base::_State::__setter(promise<void>* __prom)
|
||||
inline __future_base::_State_base::_Setter<void, void>
|
||||
__future_base::_State_base::__setter(promise<void>* __prom)
|
||||
{
|
||||
return _Setter<void, void>{ __prom };
|
||||
}
|
||||
|
@ -1149,7 +1148,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
};
|
||||
|
||||
template<typename _Res, typename... _Args>
|
||||
struct __future_base::_Task_state<_Res(_Args...)> : __future_base::_State
|
||||
struct __future_base::_Task_state<_Res(_Args...)>
|
||||
: __future_base::_State_base
|
||||
{
|
||||
typedef _Res _Res_type;
|
||||
|
||||
|
@ -1263,14 +1263,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
void
|
||||
operator()(_ArgTypes... __args)
|
||||
{
|
||||
__future_base::_State::_S_check(_M_state);
|
||||
__future_base::_State_base::_S_check(_M_state);
|
||||
_M_state->_M_run(std::forward<_ArgTypes>(__args)...);
|
||||
}
|
||||
|
||||
void
|
||||
reset()
|
||||
{
|
||||
__future_base::_State::_S_check(_M_state);
|
||||
__future_base::_State_base::_S_check(_M_state);
|
||||
packaged_task(std::move(_M_state->_M_task)).swap(*this);
|
||||
}
|
||||
};
|
||||
|
@ -1288,7 +1288,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
|
||||
|
||||
template<typename _Res>
|
||||
class __future_base::_Deferred_state : public __future_base::_State
|
||||
class __future_base::_Deferred_state : public __future_base::_State_base
|
||||
{
|
||||
public:
|
||||
typedef _Res _Res_type;
|
||||
|
@ -1314,7 +1314,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
};
|
||||
|
||||
template<typename _Res>
|
||||
class __future_base::_Async_state : public __future_base::_State
|
||||
class __future_base::_Async_state : public __future_base::_State_base
|
||||
{
|
||||
public:
|
||||
typedef _Res _Res_type;
|
||||
|
@ -1347,7 +1347,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
async(launch __policy, _Fn&& __fn, _Args&&... __args)
|
||||
{
|
||||
typedef typename result_of<_Fn(_Args...)>::type result_type;
|
||||
std::shared_ptr<__future_base::_State> __state;
|
||||
std::shared_ptr<__future_base::_State_base> __state;
|
||||
if (__policy == launch::async)
|
||||
{
|
||||
typedef typename __future_base::_Async_state<result_type> _State;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Standard exception classes -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2005, 2007, 2009, 2010
|
||||
// Copyright (C) 2001, 2002, 2005, 2007, 2009, 2010, 2011
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
|
@ -62,8 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
explicit
|
||||
logic_error(const string& __arg);
|
||||
|
||||
virtual
|
||||
~logic_error() throw();
|
||||
virtual ~logic_error() throw();
|
||||
|
||||
/** Returns a C-style character string describing the general cause of
|
||||
* the current error (the same string passed to the ctor). */
|
||||
|
@ -77,6 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
public:
|
||||
explicit domain_error(const string& __arg);
|
||||
virtual ~domain_error() throw();
|
||||
};
|
||||
|
||||
/** Thrown to report invalid arguments to functions. */
|
||||
|
@ -84,6 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
public:
|
||||
explicit invalid_argument(const string& __arg);
|
||||
virtual ~invalid_argument() throw();
|
||||
};
|
||||
|
||||
/** Thrown when an object is constructed that would exceed its maximum
|
||||
|
@ -92,6 +93,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
public:
|
||||
explicit length_error(const string& __arg);
|
||||
virtual ~length_error() throw();
|
||||
};
|
||||
|
||||
/** This represents an argument whose value is not within the expected
|
||||
|
@ -100,6 +102,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
public:
|
||||
explicit out_of_range(const string& __arg);
|
||||
virtual ~out_of_range() throw();
|
||||
};
|
||||
|
||||
/** Runtime errors represent problems outside the scope of a program;
|
||||
|
@ -116,8 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
explicit
|
||||
runtime_error(const string& __arg);
|
||||
|
||||
virtual
|
||||
~runtime_error() throw();
|
||||
virtual ~runtime_error() throw();
|
||||
|
||||
/** Returns a C-style character string describing the general cause of
|
||||
* the current error (the same string passed to the ctor). */
|
||||
|
@ -130,6 +132,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
public:
|
||||
explicit range_error(const string& __arg);
|
||||
virtual ~range_error() throw();
|
||||
};
|
||||
|
||||
/** Thrown to indicate arithmetic overflow. */
|
||||
|
@ -137,6 +140,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
public:
|
||||
explicit overflow_error(const string& __arg);
|
||||
virtual ~overflow_error() throw();
|
||||
};
|
||||
|
||||
/** Thrown to indicate arithmetic underflow. */
|
||||
|
@ -144,6 +148,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
public:
|
||||
explicit underflow_error(const string& __arg);
|
||||
virtual ~underflow_error() throw();
|
||||
};
|
||||
|
||||
// @} group exceptions
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// <system_error> -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
@ -69,7 +69,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
error_category();
|
||||
|
||||
public:
|
||||
virtual ~error_category() { }
|
||||
virtual ~error_category();
|
||||
|
||||
error_category(const error_category&) = delete;
|
||||
error_category& operator=(const error_category&) = delete;
|
||||
|
@ -102,8 +102,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{ return this != &__other; }
|
||||
};
|
||||
|
||||
inline error_category::error_category() = default;
|
||||
|
||||
// DR 890.
|
||||
_GLIBCXX_CONST const error_category& system_category() throw();
|
||||
_GLIBCXX_CONST const error_category& generic_category() throw();
|
||||
|
|
|
@ -100,7 +100,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
__shared_base_type _M_this_ptr;
|
||||
|
||||
inline virtual ~_Impl_base();
|
||||
virtual ~_Impl_base();
|
||||
|
||||
virtual void _M_run() = 0;
|
||||
};
|
||||
|
@ -195,8 +195,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
}
|
||||
};
|
||||
|
||||
inline thread::_Impl_base::~_Impl_base() = default;
|
||||
|
||||
inline void
|
||||
swap(thread& __x, thread& __y)
|
||||
{ __x.swap(__y); }
|
||||
|
|
|
@ -77,6 +77,7 @@ sources = \
|
|||
guard.cc \
|
||||
guard_error.cc \
|
||||
hash_bytes.cc \
|
||||
nested_exception.cc \
|
||||
new_handler.cc \
|
||||
new_op.cc \
|
||||
new_opnt.cc \
|
||||
|
@ -134,6 +135,11 @@ cp-demangle.o: cp-demangle.c
|
|||
$(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
|
||||
|
||||
|
||||
nested_exception.lo: nested_exception.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
nested_exception.o: nested_exception.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
|
|
|
@ -98,10 +98,10 @@ am__objects_1 = array_type_info.lo atexit_arm.lo bad_alloc.lo \
|
|||
eh_term_handler.lo eh_terminate.lo eh_throw.lo eh_type.lo \
|
||||
eh_unex_handler.lo enum_type_info.lo function_type_info.lo \
|
||||
fundamental_type_info.lo guard.lo guard_error.lo hash_bytes.lo \
|
||||
new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo \
|
||||
pbase_type_info.lo pmem_type_info.lo pointer_type_info.lo \
|
||||
pure.lo si_class_type_info.lo tinfo.lo tinfo2.lo vec.lo \
|
||||
vmi_class_type_info.lo vterminate.lo
|
||||
nested_exception.lo new_handler.lo new_op.lo new_opnt.lo \
|
||||
new_opv.lo new_opvnt.lo pbase_type_info.lo pmem_type_info.lo \
|
||||
pointer_type_info.lo pure.lo si_class_type_info.lo tinfo.lo \
|
||||
tinfo2.lo vec.lo vmi_class_type_info.lo vterminate.lo
|
||||
@GLIBCXX_HOSTED_TRUE@am__objects_2 = cp-demangle.lo
|
||||
am_libsupc___la_OBJECTS = $(am__objects_1) $(am__objects_2)
|
||||
libsupc___la_OBJECTS = $(am_libsupc___la_OBJECTS)
|
||||
|
@ -383,6 +383,7 @@ sources = \
|
|||
guard.cc \
|
||||
guard_error.cc \
|
||||
hash_bytes.cc \
|
||||
nested_exception.cc \
|
||||
new_handler.cc \
|
||||
new_op.cc \
|
||||
new_opnt.cc \
|
||||
|
@ -766,6 +767,11 @@ cp-demangle.lo: cp-demangle.c
|
|||
cp-demangle.o: cp-demangle.c
|
||||
$(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
|
||||
|
||||
nested_exception.lo: nested_exception.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
nested_exception.o: nested_exception.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
install-stdHEADERS: $(std_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(stddir)
|
||||
|
|
29
libstdc++-v3/libsupc++/nested_exception.cc
Normal file
29
libstdc++-v3/libsupc++/nested_exception.cc
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2011 Free Software Foundation
|
||||
//
|
||||
// This file is part of GCC.
|
||||
//
|
||||
// GCC is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// GCC is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// Under Section 7 of GPL version 3, you are granted additional
|
||||
// permissions described in the GCC Runtime Library Exception, version
|
||||
// 3.1, as published by the Free Software Foundation.
|
||||
|
||||
// You should have received a copy of the GNU General Public License and
|
||||
// a copy of the GCC Runtime Library Exception along with this program;
|
||||
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace std
|
||||
{
|
||||
nested_exception::~nested_exception() = default;
|
||||
} // namespace std
|
|
@ -63,7 +63,7 @@ namespace std
|
|||
|
||||
nested_exception& operator=(const nested_exception&) = default;
|
||||
|
||||
inline virtual ~nested_exception();
|
||||
virtual ~nested_exception();
|
||||
|
||||
void
|
||||
rethrow_nested() const __attribute__ ((__noreturn__))
|
||||
|
@ -74,8 +74,6 @@ namespace std
|
|||
{ return _M_ptr; }
|
||||
};
|
||||
|
||||
inline nested_exception::~nested_exception() = default;
|
||||
|
||||
template<typename _Except>
|
||||
struct _Nested_exception : public _Except, public nested_exception
|
||||
{
|
||||
|
|
|
@ -201,6 +201,7 @@ sources = \
|
|||
ctype.cc \
|
||||
debug.cc \
|
||||
functexcept.cc \
|
||||
functional.cc \
|
||||
globals_io.cc \
|
||||
hash_c++0x.cc \
|
||||
hash_tr1.cc \
|
||||
|
@ -225,6 +226,7 @@ sources = \
|
|||
istream.cc \
|
||||
placeholders.cc \
|
||||
regex.cc \
|
||||
shared_ptr.cc \
|
||||
streambuf.cc \
|
||||
mutex.cc \
|
||||
condition_variable.cc \
|
||||
|
@ -292,6 +294,11 @@ functexcept.lo: functexcept.cc
|
|||
functexcept.o: functexcept.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
shared_ptr.lo: shared_ptr.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
shared_ptr.o: shared_ptr.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
system_error.lo: system_error.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
system_error.o: system_error.cc
|
||||
|
@ -312,6 +319,11 @@ compatibility-c++0x.lo: compatibility-c++0x.cc
|
|||
compatibility-c++0x.o: compatibility-c++0x.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
functional.lo: functional.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
functional.o: functional.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
hash_c++0x.lo: hash_c++0x.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
hash_c++0x.o: hash_c++0x.cc
|
||||
|
|
|
@ -110,13 +110,13 @@ am__objects_6 = atomic.lo bitmap_allocator.lo pool_allocator.lo \
|
|||
compatibility-c++0x.lo compatibility-debug_list.lo \
|
||||
compatibility-debug_list-2.lo compatibility-list.lo \
|
||||
compatibility-list-2.lo complex_io.lo ctype.lo debug.lo \
|
||||
functexcept.lo globals_io.lo hash_c++0x.lo hash_tr1.lo \
|
||||
hashtable_c++0x.lo hashtable_tr1.lo ios.lo ios_failure.lo \
|
||||
ios_init.lo ios_locale.lo limits.lo list.lo locale.lo \
|
||||
locale_init.lo locale_facets.lo localename.lo \
|
||||
functexcept.lo functional.lo globals_io.lo hash_c++0x.lo \
|
||||
hash_tr1.lo hashtable_c++0x.lo hashtable_tr1.lo ios.lo \
|
||||
ios_failure.lo ios_init.lo ios_locale.lo limits.lo list.lo \
|
||||
locale.lo locale_init.lo locale_facets.lo localename.lo \
|
||||
math_stubs_float.lo math_stubs_long_double.lo stdexcept.lo \
|
||||
strstream.lo system_error.lo tree.lo istream.lo \
|
||||
placeholders.lo regex.lo streambuf.lo mutex.lo \
|
||||
placeholders.lo regex.lo shared_ptr.lo streambuf.lo mutex.lo \
|
||||
condition_variable.lo chrono.lo thread.lo future.lo \
|
||||
valarray.lo $(am__objects_1) $(am__objects_5)
|
||||
am_libstdc___la_OBJECTS = $(am__objects_6)
|
||||
|
@ -420,6 +420,7 @@ sources = \
|
|||
ctype.cc \
|
||||
debug.cc \
|
||||
functexcept.cc \
|
||||
functional.cc \
|
||||
globals_io.cc \
|
||||
hash_c++0x.cc \
|
||||
hash_tr1.cc \
|
||||
|
@ -444,6 +445,7 @@ sources = \
|
|||
istream.cc \
|
||||
placeholders.cc \
|
||||
regex.cc \
|
||||
shared_ptr.cc \
|
||||
streambuf.cc \
|
||||
mutex.cc \
|
||||
condition_variable.cc \
|
||||
|
@ -885,6 +887,11 @@ functexcept.lo: functexcept.cc
|
|||
functexcept.o: functexcept.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
shared_ptr.lo: shared_ptr.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
shared_ptr.o: shared_ptr.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
system_error.lo: system_error.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
system_error.o: system_error.cc
|
||||
|
@ -905,6 +912,11 @@ compatibility-c++0x.lo: compatibility-c++0x.cc
|
|||
compatibility-c++0x.o: compatibility-c++0x.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
functional.lo: functional.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
functional.o: functional.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
hash_c++0x.lo: hash_c++0x.cc
|
||||
$(LTCXXCOMPILE) -std=gnu++0x -c $<
|
||||
hash_c++0x.o: hash_c++0x.cc
|
||||
|
|
35
libstdc++-v3/src/functional.cc
Normal file
35
libstdc++-v3/src/functional.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Support for <functional> -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2011
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// Under Section 7 of GPL version 3, you are granted additional
|
||||
// permissions described in the GCC Runtime Library Exception, version
|
||||
// 3.1, as published by the Free Software Foundation.
|
||||
|
||||
// You should have received a copy of the GNU General Public License and
|
||||
// a copy of the GCC Runtime Library Exception along with this program;
|
||||
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
bad_function_call::~bad_function_call() throw() = default;
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
|
@ -79,8 +79,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
const char*
|
||||
future_error::what() const throw() { return _M_code.message().c_str(); }
|
||||
|
||||
__future_base::_Result_base::_Result_base() = default;
|
||||
|
||||
__future_base::_Result_base::~_Result_base() = default;
|
||||
|
||||
__future_base::_State_base::~_State_base() = default;
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
} // namespace std
|
||||
|
||||
// XXX GLIBCXX_ABI Deprecated
|
||||
// gcc-4.6.0
|
||||
|
|
39
libstdc++-v3/src/shared_ptr.cc
Normal file
39
libstdc++-v3/src/shared_ptr.cc
Normal file
|
@ -0,0 +1,39 @@
|
|||
// Support for pointer abstractions -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2011
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// Under Section 7 of GPL version 3, you are granted additional
|
||||
// permissions described in the GCC Runtime Library Exception, version
|
||||
// 3.1, as published by the Free Software Foundation.
|
||||
|
||||
// You should have received a copy of the GNU General Public License and
|
||||
// a copy of the GCC Runtime Library Exception along with this program;
|
||||
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
bad_weak_ptr::~bad_weak_ptr() throw() = default;
|
||||
|
||||
char const*
|
||||
bad_weak_ptr::what() const throw()
|
||||
{ return "std::bad_weak_ptr"; }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
|
@ -1,6 +1,6 @@
|
|||
// Methods for Exception Support for -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1999, 2001, 2002, 2005, 2009
|
||||
// Copyright (C) 1997, 1999, 2001, 2002, 2005, 2009, 2011
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
|
@ -46,15 +46,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
domain_error::domain_error(const string& __arg)
|
||||
: logic_error(__arg) { }
|
||||
|
||||
domain_error::~domain_error() throw() { }
|
||||
|
||||
invalid_argument::invalid_argument(const string& __arg)
|
||||
: logic_error(__arg) { }
|
||||
|
||||
invalid_argument::~invalid_argument() throw() { }
|
||||
|
||||
length_error::length_error(const string& __arg)
|
||||
: logic_error(__arg) { }
|
||||
|
||||
length_error::~length_error() throw() { }
|
||||
|
||||
out_of_range::out_of_range(const string& __arg)
|
||||
: logic_error(__arg) { }
|
||||
|
||||
out_of_range::~out_of_range() throw() { }
|
||||
|
||||
runtime_error::runtime_error(const string& __arg)
|
||||
: exception(), _M_msg(__arg) { }
|
||||
|
||||
|
@ -67,12 +75,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
range_error::range_error(const string& __arg)
|
||||
: runtime_error(__arg) { }
|
||||
|
||||
range_error::~range_error() throw() { }
|
||||
|
||||
overflow_error::overflow_error(const string& __arg)
|
||||
: runtime_error(__arg) { }
|
||||
|
||||
overflow_error::~overflow_error() throw() { }
|
||||
|
||||
underflow_error::underflow_error(const string& __arg)
|
||||
: runtime_error(__arg) { }
|
||||
|
||||
underflow_error::~underflow_error() throw() { }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// <system_error> implementation file
|
||||
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
@ -74,13 +74,17 @@ namespace std _GLIBCXX_VISIBILITY(default)
|
|||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
error_category::error_category() = default;
|
||||
|
||||
error_category::~error_category() = default;
|
||||
|
||||
const error_category&
|
||||
system_category() throw() { return system_category_instance; }
|
||||
|
||||
const error_category&
|
||||
generic_category() throw() { return generic_category_instance; }
|
||||
|
||||
system_error::~system_error() throw() { }
|
||||
system_error::~system_error() throw() = default;
|
||||
|
||||
error_condition
|
||||
error_category::default_error_condition(int __i) const
|
||||
|
|
|
@ -54,6 +54,8 @@ namespace std _GLIBCXX_VISIBILITY(default)
|
|||
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
thread::_Impl_base::~_Impl_base() = default;
|
||||
|
||||
void
|
||||
thread::join()
|
||||
{
|
||||
|
|
|
@ -32,9 +32,9 @@ void test01()
|
|||
{
|
||||
X* px = 0;
|
||||
std::shared_ptr<X> p1(px); // { dg-error "here" }
|
||||
// { dg-error "incomplete" "" { target *-*-* } 765 }
|
||||
// { dg-error "incomplete" "" { target *-*-* } 766 }
|
||||
|
||||
std::shared_ptr<X> p9(ap()); // { dg-error "here" }
|
||||
// { dg-error "incomplete" "" { target *-*-* } 857 }
|
||||
// { dg-error "incomplete" "" { target *-*-* } 858 }
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ main()
|
|||
}
|
||||
|
||||
// { dg-warning "note" "" { target *-*-* } 354 }
|
||||
// { dg-warning "note" "" { target *-*-* } 1085 }
|
||||
// { dg-warning "note" "" { target *-*-* } 1086 }
|
||||
// { dg-warning "note" "" { target *-*-* } 467 }
|
||||
// { dg-warning "note" "" { target *-*-* } 587 }
|
||||
// { dg-warning "note" "" { target *-*-* } 1050 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue