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
b65378b5
Commit
b65378b5
authored
Jun 23, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer simple verb over is_... as constexpr member
parent
d5e0477d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
libcaf_core/caf/default_sum_type_access.hpp
libcaf_core/caf/default_sum_type_access.hpp
+1
-1
libcaf_core/caf/sum_type_access.hpp
libcaf_core/caf/sum_type_access.hpp
+2
-2
No files found.
libcaf_core/caf/default_sum_type_access.hpp
View file @
b65378b5
...
@@ -36,7 +36,7 @@ struct default_sum_type_access {
...
@@ -36,7 +36,7 @@ struct default_sum_type_access {
static
constexpr
bool
specialized
=
true
;
static
constexpr
bool
specialized
=
true
;
static
constexpr
bool
i
s_mutable
=
tru
e
;
static
constexpr
bool
i
mmutable
=
fals
e
;
template
<
int
Pos
>
template
<
int
Pos
>
static
bool
is
(
const
T
&
x
,
std
::
integral_constant
<
int
,
Pos
>
token
)
{
static
bool
is
(
const
T
&
x
,
std
::
integral_constant
<
int
,
Pos
>
token
)
{
...
...
libcaf_core/caf/sum_type_access.hpp
View file @
b65378b5
...
@@ -28,7 +28,7 @@ namespace caf {
...
@@ -28,7 +28,7 @@ namespace caf {
template
<
class
T
>
template
<
class
T
>
struct
sum_type_access
{
struct
sum_type_access
{
static
constexpr
bool
specialized
=
false
;
static
constexpr
bool
specialized
=
false
;
static
constexpr
bool
i
s_
mutable
=
false
;
static
constexpr
bool
i
m
mutable
=
false
;
};
};
/// Evaluates to `true` if `T` specializes `sum_type_access`.
/// Evaluates to `true` if `T` specializes `sum_type_access`.
...
@@ -44,7 +44,7 @@ struct has_sum_type_access {
...
@@ -44,7 +44,7 @@ struct has_sum_type_access {
template
<
class
T
>
template
<
class
T
>
struct
has_mutable_sum_type_access
{
struct
has_mutable_sum_type_access
{
static
constexpr
bool
value
=
sum_type_access
<
T
>::
specialized
static
constexpr
bool
value
=
sum_type_access
<
T
>::
specialized
&&
sum_type_access
<
T
>::
is_
mutable
;
&&
!
sum_type_access
<
T
>::
im
mutable
;
};
};
}
// namespace caf
}
// namespace caf
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