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
031558bd
Commit
031558bd
authored
Dec 09, 2015
by
Yangqing Jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to match the internal version
parent
bbf64cee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
arena.h
src/google/protobuf/arena.h
+7
-6
No files found.
src/google/protobuf/arena.h
View file @
031558bd
...
...
@@ -511,8 +511,7 @@ class LIBPROTOBUF_EXPORT Arena {
struct
is_arena_constructable
:
public
google
::
protobuf
::
internal
::
integral_constant
<
bool
,
sizeof
(
InternalIsArenaConstructableHelper
::
ArenaConstructable
<
const
T
>
(
static_cast
<
const
T
*>
(
0
)))
==
sizeof
(
char
)
>
{
const
T
>
(
static_cast
<
const
T
*>
(
0
)))
==
sizeof
(
char
)
>
{
};
private
:
...
...
@@ -574,6 +573,7 @@ class LIBPROTOBUF_EXPORT Arena {
return
google
::
protobuf
::
internal
::
has_trivial_destructor
<
T
>::
value
;
}
private
:
struct
InternalIsDestructorSkippableHelper
{
template
<
typename
U
>
static
char
DestructorSkippable
(
...
...
@@ -582,6 +582,7 @@ class LIBPROTOBUF_EXPORT Arena {
static
double
DestructorSkippable
(...);
};
public
:
// Helper typetrait that indicates whether the desctructor of type T should be
// called when arena is destroyed at compile time. This is only to allow
// construction of higher-level templated utilities.
...
...
@@ -778,10 +779,10 @@ class LIBPROTOBUF_EXPORT Arena {
// which needs to declare google::protobuf::Map as friend of generated message.
template
<
typename
T
>
static
void
CreateInArenaStorage
(
T
*
ptr
,
Arena
*
arena
)
{
CreateInArenaStorageInternal
(
ptr
,
arena
,
typename
is_arena_constructable
<
T
>::
type
());
RegisterDestructorInternal
(
ptr
,
arena
,
typename
is_destructor_skippable
<
T
>::
type
());
CreateInArenaStorageInternal
(
ptr
,
arena
,
typename
is_arena_constructable
<
T
>::
type
());
RegisterDestructorInternal
(
ptr
,
arena
,
typename
is_destructor_skippable
<
T
>::
type
());
}
template
<
typename
T
>
...
...
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