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
fb2c9831
Commit
fb2c9831
authored
Sep 25, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add make_uri convenience function
parent
a1798bcb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
libcaf_core/caf/uri.hpp
libcaf_core/caf/uri.hpp
+3
-0
libcaf_core/src/uri.cpp
libcaf_core/src/uri.cpp
+8
-0
No files found.
libcaf_core/caf/uri.hpp
View file @
fb2c9831
...
@@ -141,6 +141,9 @@ std::string to_string(const uri::authority_type& x);
...
@@ -141,6 +141,9 @@ std::string to_string(const uri::authority_type& x);
/// @relates uri
/// @relates uri
error
parse
(
string_view
str
,
uri
&
dest
);
error
parse
(
string_view
str
,
uri
&
dest
);
/// @relates uri
expected
<
uri
>
make_uri
(
string_view
str
);
}
// namespace caf
}
// namespace caf
namespace
std
{
namespace
std
{
...
...
libcaf_core/src/uri.cpp
View file @
fb2c9831
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "caf/detail/parser/read_uri.hpp"
#include "caf/detail/parser/read_uri.hpp"
#include "caf/detail/uri_impl.hpp"
#include "caf/detail/uri_impl.hpp"
#include "caf/error.hpp"
#include "caf/error.hpp"
#include "caf/expected.hpp"
#include "caf/make_counted.hpp"
#include "caf/make_counted.hpp"
#include "caf/serializer.hpp"
#include "caf/serializer.hpp"
...
@@ -139,4 +140,11 @@ error parse(string_view str, uri& dest) {
...
@@ -139,4 +140,11 @@ error parse(string_view str, uri& dest) {
static_cast
<
size_t
>
(
ps
.
column
));
static_cast
<
size_t
>
(
ps
.
column
));
}
}
expected
<
uri
>
make_uri
(
string_view
str
)
{
uri
result
;
if
(
auto
err
=
parse
(
str
,
result
))
return
err
;
return
result
;
}
}
// 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