Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
3d2fda9b
Commit
3d2fda9b
authored
Oct 17, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build on GCC <= 5
parent
81880bac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
libcaf_core/caf/config_value_adaptor.hpp
libcaf_core/caf/config_value_adaptor.hpp
+16
-2
No files found.
libcaf_core/caf/config_value_adaptor.hpp
View file @
3d2fda9b
...
...
@@ -41,6 +41,9 @@ public:
using
indices
=
typename
detail
::
il_indices
<
value_type
>::
type
;
using
fields_tuple
=
typename
detail
::
select_adaptor_fields
<
value_type
,
indices
>::
type
;
using
array_type
=
std
::
array
<
config_value_field
<
value_type
>*
,
sizeof
...(
Ts
)
>
;
template
<
class
U
,
...
...
@@ -48,7 +51,8 @@ public:
!
std
::
is_same
<
detail
::
decay_t
<
U
>,
config_value_adaptor
>::
value
>
,
class
...
Us
>
config_value_adaptor
(
U
&&
x
,
Us
&&
...
xs
)
:
fields_
(
std
::
forward
<
U
>
(
x
),
std
::
forward
<
Us
>
(
xs
)...)
{
:
fields_
(
make_fields
(
indices
{},
std
::
forward
<
U
>
(
x
),
std
::
forward
<
Us
>
(
xs
)...))
{
init
(
indices
{});
}
...
...
@@ -59,12 +63,22 @@ public:
}
private:
// TODO: This is a workaround for GCC <= 5 because initializing fields_
// directly from (xs...) fails. Remove when moving on to newer
// compilers.
template
<
long
...
Pos
,
class
...
Us
>
fields_tuple
make_fields
(
detail
::
int_list
<
Pos
...
>
,
Us
&&
...
xs
)
{
return
std
::
make_tuple
(
detail
::
config_value_adaptor_field_impl
<
value_type
,
Pos
>
(
std
::
forward
<
Us
>
(
xs
))...);
}
template
<
long
...
Pos
>
void
init
(
detail
::
int_list
<
Pos
...
>
)
{
ptr_fields_
=
array_type
{{
&
std
::
get
<
Pos
>
(
fields_
)...}};
}
typename
detail
::
select_adaptor_fields
<
value_type
,
indices
>::
typ
e
fields_
;
fields_tupl
e
fields_
;
array_type
ptr_fields_
;
};
...
...
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