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
df948253
Commit
df948253
authored
Aug 26, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print maps in the notation we expect in configs
parent
4f71075e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
libcaf_core/caf/detail/stringification_inspector.hpp
libcaf_core/caf/detail/stringification_inspector.hpp
+27
-13
libcaf_core/src/stringification_inspector.cpp
libcaf_core/src/stringification_inspector.cpp
+1
-0
No files found.
libcaf_core/caf/detail/stringification_inspector.hpp
View file @
df948253
...
@@ -24,24 +24,22 @@
...
@@ -24,24 +24,22 @@
#include <vector>
#include <vector>
#include "caf/atom.hpp"
#include "caf/atom.hpp"
#include "caf/detail/append_hex.hpp"
#include "caf/detail/apply_args.hpp"
#include "caf/detail/int_list.hpp"
#include "caf/detail/type_traits.hpp"
#include "caf/error.hpp"
#include "caf/error.hpp"
#include "caf/meta/annotation.hpp"
#include "caf/meta/hex_formatted.hpp"
#include "caf/meta/omittable.hpp"
#include "caf/meta/omittable_if_empty.hpp"
#include "caf/meta/omittable_if_none.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/none.hpp"
#include "caf/none.hpp"
#include "caf/string_view.hpp"
#include "caf/string_view.hpp"
#include "caf/timespan.hpp"
#include "caf/timespan.hpp"
#include "caf/timestamp.hpp"
#include "caf/timestamp.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/meta/omittable.hpp"
#include "caf/meta/annotation.hpp"
#include "caf/meta/hex_formatted.hpp"
#include "caf/meta/omittable_if_none.hpp"
#include "caf/meta/omittable_if_empty.hpp"
#include "caf/detail/append_hex.hpp"
#include "caf/detail/apply_args.hpp"
#include "caf/detail/int_list.hpp"
#include "caf/detail/type_traits.hpp"
namespace
caf
{
namespace
caf
{
namespace
detail
{
namespace
detail
{
...
@@ -154,7 +152,23 @@ public:
...
@@ -154,7 +152,23 @@ public:
}
}
template
<
class
T
>
template
<
class
T
>
enable_if_t
<
is_iterable
<
T
>::
value
enable_if_t
<
is_map_like
<
T
>::
value
&&
!
is_inspectable
<
stringification_inspector
,
T
>::
value
&&
!
std
::
is_convertible
<
T
,
string_view
>::
value
&&
!
has_to_string
<
T
>::
value
>
consume
(
T
&
xs
)
{
result_
+=
'{'
;
for
(
const
auto
&
kvp
:
xs
)
{
sep
();
consume
(
deconst
(
kvp
.
first
));
result_
+=
" = "
;
consume
(
deconst
(
kvp
.
second
));
}
result_
+=
'}'
;
}
template
<
class
T
>
enable_if_t
<
is_list_like
<
T
>::
value
&&
!
is_inspectable
<
stringification_inspector
,
T
>::
value
&&
!
is_inspectable
<
stringification_inspector
,
T
>::
value
&&
!
std
::
is_convertible
<
T
,
string_view
>::
value
&&
!
std
::
is_convertible
<
T
,
string_view
>::
value
&&
!
has_to_string
<
T
>::
value
>
&&
!
has_to_string
<
T
>::
value
>
...
...
libcaf_core/src/stringification_inspector.cpp
View file @
df948253
...
@@ -28,6 +28,7 @@ void stringification_inspector::sep() {
...
@@ -28,6 +28,7 @@ void stringification_inspector::sep() {
switch
(
result_
.
back
())
{
switch
(
result_
.
back
())
{
case
'('
:
case
'('
:
case
'['
:
case
'['
:
case
'{'
:
case
' '
:
// only at back if we've printed ", " before
case
' '
:
// only at back if we've printed ", " before
break
;
break
;
default:
default:
...
...
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