Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
98bd6d75
Commit
98bd6d75
authored
Jun 16, 2016
by
Feng Xiao
Committed by
GitHub
Jun 16, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1692 from vjpai/friendless
Workaround for gcc-4.4 incompatibility
parents
52598c64
6daf3d2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
map.h
src/google/protobuf/map.h
+7
-4
No files found.
src/google/protobuf/map.h
View file @
98bd6d75
...
...
@@ -587,7 +587,7 @@ class Map {
explicit
MapAllocator
(
Arena
*
arena
)
:
arena_
(
arena
)
{}
template
<
typename
X
>
MapAllocator
(
const
MapAllocator
<
X
>&
allocator
)
:
arena_
(
allocator
.
arena
_
)
{}
:
arena_
(
allocator
.
arena
()
)
{}
pointer
allocate
(
size_type
n
,
const_pointer
hint
=
0
)
{
// If arena is not given, malloc needs to be called which doesn't
...
...
@@ -650,12 +650,15 @@ class Map {
return
std
::
numeric_limits
<
size_type
>::
max
();
}
// To support gcc-4.4, which does not properly
// support templated friend classes
Arena
*
arena
()
const
{
return
arena_
;
}
private
:
typedef
void
DestructorSkippable_
;
Arena
*
const
arena_
;
template
<
typename
X
>
friend
class
MapAllocator
;
};
// InnerMap's key type is Key and its value type is value_type*. We use a
...
...
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