Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ true, 'c', 1, 3.140000
( value1, value2, ... )

# FIFO/LIFO
std::queue{ front()= value, back()= value, size()= integer }
std::queue{ size()= integer, front()= value, back()= value }

# Pointer
*value
Expand Down
6 changes: 3 additions & 3 deletions cpp-dump/hpp/export_var/export_xixo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ inline std::string export_xixo(

_p_CPP_DUMP_DEFINE_EXPORT_OBJECT_COMMON1;

append_output("size()", queue.size());
if (!queue.empty()) {
append_output("front()", queue.front());
if (queue.size() >= 2) append_output("back()", queue.back());
}
append_output("size()", queue.size());

_p_CPP_DUMP_DEFINE_EXPORT_OBJECT_COMMON2;
}
Expand All @@ -54,8 +54,8 @@ inline std::string export_xixo(

_p_CPP_DUMP_DEFINE_EXPORT_OBJECT_COMMON1;

if (!pq.empty()) append_output("top()", pq.top());
append_output("size()", pq.size());
if (!pq.empty()) append_output("top()", pq.top());

_p_CPP_DUMP_DEFINE_EXPORT_OBJECT_COMMON2;
}
Expand All @@ -73,8 +73,8 @@ inline std::string export_xixo(

_p_CPP_DUMP_DEFINE_EXPORT_OBJECT_COMMON1;

if (!stack.empty()) append_output("top()", stack.top());
append_output("size()", stack.size());
if (!stack.empty()) append_output("top()", stack.top());

_p_CPP_DUMP_DEFINE_EXPORT_OBJECT_COMMON2;
}
Expand Down
Binary file modified readme/cpp-dump.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified readme/customizable-colors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified readme/supports-various-types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 18 additions & 18 deletions test/txt/color_indent_normal_by_syntax.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,49 +252,49 @@ here`,
)
===================================================================== test of FIFO/LIFO ======================================================================
[dump] queue1
=> std::queue{ front()= "----------------------------------------------------------------------------------------------------------------", size()= 1 }
=> std::queue{ size()= 1, front()= "----------------------------------------------------------------------------------------------------------------" }
[dump] queue2 => std::queue{ 
front()= "-----------------------------------------------------------------------------------------------------------------", 
size()= 1
size()= 1, 
front()= "-----------------------------------------------------------------------------------------------------------------"
}
[dump] queue3 => std::queue{ 
size()= 1, 
front()= 
`this string contains a newline
here`, 
size()= 1
here`
}
[dump] queue4
=> std::queue{ front()= "--------------------------------------------------", back()= "--------------------------------------------------", size()= 2 }
=> std::queue{ size()= 2, front()= "--------------------------------------------------", back()= "--------------------------------------------------" }
[dump] queue5 => std::queue{ 
size()= 2, 
front()= "--------------------------------------------------", 
back()= "---------------------------------------------------", 
size()= 2
back()= "---------------------------------------------------"
}
================================================================================================================================================================
[dump] stack1
=> std::stack{ top()= "------------------------------------------------------------------------------------------------------------------", size()= 1 }
=> std::stack{ size()= 1, top()= "------------------------------------------------------------------------------------------------------------------" }
[dump] stack2 => std::stack{ 
top()= "-------------------------------------------------------------------------------------------------------------------", 
size()= 1
size()= 1, 
top()= "-------------------------------------------------------------------------------------------------------------------"
}
[dump] stack3 => std::stack{ 
size()= 1, 
top()= 
`this string contains a newline
here`, 
size()= 1
here`
}
================================================================================================================================================================
[dump] pq1
=> std::priority_queue{ top()= "---------------------------------------------------------------------------------------------------------", size()= 1 }
=> std::priority_queue{ size()= 1, top()= "---------------------------------------------------------------------------------------------------------" }
[dump] pq2 => std::priority_queue{ 
top()= "----------------------------------------------------------------------------------------------------------", 
size()= 1
size()= 1, 
top()= "----------------------------------------------------------------------------------------------------------"
}
[dump] pq3 => std::priority_queue{ 
size()= 1, 
top()= 
`this string contains a newline
here`, 
size()= 1
here`
}
========================================================== test of CPP_DUMP_DEFINE_EXPORT_OBJECT() ===========================================================
[dump] class_a1
Expand Down
Loading