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
06cfaf7d
Commit
06cfaf7d
authored
Nov 26, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix conversion constructor for caf::span
parent
4c2c9871
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
libcaf_core/caf/detail/type_traits.hpp
libcaf_core/caf/detail/type_traits.hpp
+2
-2
libcaf_core/test/span.cpp
libcaf_core/test/span.cpp
+6
-0
No files found.
libcaf_core/caf/detail/type_traits.hpp
View file @
06cfaf7d
...
...
@@ -695,8 +695,8 @@ template <class T, class To>
class
has_convertible_data_member
{
private:
template
<
class
U
>
static
auto
sfinae
(
U
*
x
)
->
decltype
(
std
::
declval
<
To
*>
()
=
x
->
data
(),
std
::
true_type
())
;
static
auto
sfinae
(
U
*
x
)
->
std
::
integral_constant
<
bool
,
std
::
is_convertible
<
decltype
(
x
->
data
()),
To
*>::
value
>
;
template
<
class
U
>
static
auto
sfinae
(...)
->
std
::
false_type
;
...
...
libcaf_core/test/span.cpp
View file @
06cfaf7d
...
...
@@ -114,4 +114,10 @@ CAF_TEST(make_span) {
CAF_CHECK_EQUAL
(
begin
(
ys
),
begin
(
zs
));
}
CAF_TEST
(
spans
are
convertible
from
compatible
containers
)
{
std
::
vector
<
int
>
xs
{
1
,
2
,
3
};
span
<
const
int
>
ys
{
xs
};
CAF_CHECK
(
std
::
equal
(
xs
.
begin
(),
xs
.
end
(),
ys
.
begin
()));
}
CAF_TEST_FIXTURE_SCOPE_END
()
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