* [patch] Make __allocated_ptr::_S_raw_ptr static
@ 2016-07-13 17:23 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2016-07-13 17:23 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/x-patch, Size: 102 bytes --]
These functions should have been static members all along.
tested x86_64-linux, committed to trunk.
[-- Attachment #2: patch1.txt --]
[-- Type: text/plain, Size: 1021 bytes --]
commit 421ccb84e555efcd7e3e0123dc85dd40155f1e82
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Jul 13 17:34:04 2016 +0100
Make __allocated_ptr::_S_raw_ptr static
* include/bits/allocated_ptr.h (__allocated_ptr::_S_raw_ptr): Make
static.
diff --git a/libstdc++-v3/include/bits/allocated_ptr.h b/libstdc++-v3/include/bits/allocated_ptr.h
index 2bd9d82..97e2666 100644
--- a/libstdc++-v3/include/bits/allocated_ptr.h
+++ b/libstdc++-v3/include/bits/allocated_ptr.h
@@ -85,10 +85,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
value_type* get() { return _S_raw_ptr(_M_ptr); }
private:
- value_type* _S_raw_ptr(value_type* __ptr) { return __ptr; }
+ static value_type* _S_raw_ptr(value_type* __ptr) { return __ptr; }
template<typename _Ptr>
- auto _S_raw_ptr(_Ptr __ptr) -> decltype(_S_raw_ptr(__ptr.operator->()))
+ static auto
+ _S_raw_ptr(_Ptr __ptr) -> decltype(_S_raw_ptr(__ptr.operator->()))
{ return _S_raw_ptr(__ptr.operator->()); }
_Alloc* _M_alloc;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-13 17:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13 17:23 [patch] Make __allocated_ptr::_S_raw_ptr static Jonathan Wakely
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).