public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-4855] libstdc++: Add some noexcept to std::valarray Date: Wed, 3 Nov 2021 00:16:15 +0000 (GMT) [thread overview] Message-ID: <20211103001616.0E0FB3858C27@sourceware.org> (raw) https://gcc.gnu.org/g:4f032929ac9e549ade45c952505ef562b82d297e commit r12-4855-g4f032929ac9e549ade45c952505ef562b82d297e Author: Jonathan Wakely <jwakely@redhat.com> Date: Mon Nov 1 19:11:47 2021 +0000 libstdc++: Add some noexcept to std::valarray libstdc++-v3/ChangeLog: * include/std/valarray (valarray::valarray()): Add noexcept. (valarray::operator[]): Likewise. Diff: --- libstdc++-v3/include/std/valarray | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray index c6242eb4db9..9c2f1be1e41 100644 --- a/libstdc++-v3/include/std/valarray +++ b/libstdc++-v3/include/std/valarray @@ -137,7 +137,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _lib.valarray.cons_ construct/destroy: /// Construct an empty array. - valarray(); + valarray() _GLIBCXX_NOTHROW; /// Construct an array with @a n elements. explicit valarray(size_t); @@ -270,11 +270,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __i Index of element to return. * @return Reference to the i'th element. */ - _Tp& operator[](size_t __i); + _Tp& operator[](size_t __i) _GLIBCXX_NOTHROW; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 389. Const overload of valarray::operator[] returns by value. - const _Tp& operator[](size_t) const; + const _Tp& operator[](size_t) const _GLIBCXX_NOTHROW; // _lib.valarray.sub_ subset operations: /** @@ -581,7 +581,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp> inline const _Tp& - valarray<_Tp>::operator[](size_t __i) const + valarray<_Tp>::operator[](size_t __i) const _GLIBCXX_NOTHROW { __glibcxx_requires_subscript(__i); return _M_data[__i]; @@ -589,7 +589,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp> inline _Tp& - valarray<_Tp>::operator[](size_t __i) + valarray<_Tp>::operator[](size_t __i) _GLIBCXX_NOTHROW { __glibcxx_requires_subscript(__i); return _M_data[__i]; @@ -618,7 +618,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp> inline - valarray<_Tp>::valarray() : _M_size(0), _M_data(0) {} + valarray<_Tp>::valarray() _GLIBCXX_NOTHROW : _M_size(0), _M_data(0) {} template<typename _Tp> inline
reply other threads:[~2021-11-03 0:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211103001616.0E0FB3858C27@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).