Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
91b142ff
Commit
91b142ff
authored
Jun 16, 2015
by
Jonathan Wakely
Committed by
Jonathan Wakely
Jun 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* include/bits/allocated_ptr.h (__allocated_ptr): Use __addressof.
From-SVN: r224540
parent
200fcd33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
libstdc++-v3/ChangeLog
+2
-0
libstdc++-v3/include/bits/allocated_ptr.h
+3
-2
No files found.
libstdc++-v3/ChangeLog
View file @
91b142ff
2015-06-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/allocated_ptr.h (__allocated_ptr): Use __addressof.
* include/bits/list.tcc (list::operator=(const list&), list::merge):
Use __addressof instead of operator&.
(list::sort): Use array-to-pointer decay instead of operator&.
...
...
libstdc++-v3/include/bits/allocated_ptr.h
View file @
91b142ff
...
...
@@ -50,14 +50,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// Take ownership of __ptr
__allocated_ptr
(
_Alloc
&
__a
,
pointer
__ptr
)
noexcept
:
_M_alloc
(
&
__a
),
_M_ptr
(
__ptr
)
:
_M_alloc
(
std
::
__addressof
(
__a
)
),
_M_ptr
(
__ptr
)
{
}
/// Convert __ptr to allocator's pointer type and take ownership of it
template
<
typename
_Ptr
,
typename
_Req
=
_Require
<
is_same
<
_Ptr
,
value_type
*>>>
__allocated_ptr
(
_Alloc
&
__a
,
_Ptr
__ptr
)
:
_M_alloc
(
&
__a
),
_M_ptr
(
pointer_traits
<
pointer
>::
pointer_to
(
*
__ptr
))
:
_M_alloc
(
std
::
__addressof
(
__a
)),
_M_ptr
(
pointer_traits
<
pointer
>::
pointer_to
(
*
__ptr
))
{
}
/// Transfer ownership of the owned pointer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment