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
e2fb1d98
Commit
e2fb1d98
authored
Mar 08, 2016
by
Antal Tátrai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment has been added to fix (issue #1266)
parent
3cc35adb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
map.h
src/google/protobuf/map.h
+4
-0
No files found.
src/google/protobuf/map.h
View file @
e2fb1d98
...
@@ -548,6 +548,10 @@ class Map {
...
@@ -548,6 +548,10 @@ class Map {
!defined(GOOGLE_PROTOBUF_OS_NACL) && !defined(GOOGLE_PROTOBUF_OS_ANDROID)
!defined(GOOGLE_PROTOBUF_OS_NACL) && !defined(GOOGLE_PROTOBUF_OS_ANDROID)
template
<
class
NodeType
,
class
...
Args
>
template
<
class
NodeType
,
class
...
Args
>
void
construct
(
NodeType
*
p
,
Args
&&
...
args
)
{
void
construct
(
NodeType
*
p
,
Args
&&
...
args
)
{
// Clang 3.6 doesn't compile static casting to void* directly. (Issue #1266)
// According C++ standard 5.2.9/1: "The static_cast operator shall not cast
// away constness". So first the maybe const pointer is casted to const void* and
// after the const void* is const casted.
new
(
const_cast
<
void
*>
(
static_cast
<
const
void
*>
(
p
)))
NodeType
(
std
::
forward
<
Args
>
(
args
)...);
new
(
const_cast
<
void
*>
(
static_cast
<
const
void
*>
(
p
)))
NodeType
(
std
::
forward
<
Args
>
(
args
)...);
}
}
...
...
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