Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
philip82148
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
philip82148
3y ago
Sorry, plz ignore this comment. I just changed the source. I used std::tuple_size to handle everything that has a valid `std::tuple_size` specialization.
2.
▲
by
philip82148
3y ago
Oh, I forgot to mention this, but I am already using std::tuple_size. There is no reason not to handle/accept everything that has a valid `std::tuple_size` specialization. (I am not a native speaker, so I might have misunderstood your
3.
▲
by
philip82148
3y ago
The macro version is for printing the variable's name. But it also has a function version. Why this library has some other macros is written in my new comment. Also, (though I hadn't mentioned competitive programming before my new
4.
▲
by
philip82148
3y ago
I thought it would be odd to use C++ as an analogy for C++ itself. But it might be confusing. I'll reconsider. Thank your for the feedback!
5.
▲
by
philip82148
3y ago
Yes, this dumps recursively, so it also supports with nested ones. Why I made this is written in my new comment.
6.
▲
by
philip82148
3y ago
What I want to do with this library is to make a C++ version of JavaScript's console.log(), PHP's var_dump(), or Python's print(objs...). In other words, this library aims to print variables of any types easily for debugging.
7.
▲
by
philip82148
3y ago
Would you tell me what I should use instead of std::clog and std::endl? (Is it a deleted comment? I'm not used to HN because this is the first time for me.)
8.
▲
by
philip82148
3y ago
Thank you for your advice! I appreciate it and I'll do so.
9.
▲
by
philip82148
3y ago
Wow, I didn't know about this. Does this also support formatting nested containers with auto indent? I couldn't figure it out from the README.
10.
▲
by
philip82148
3y ago
It supports both std::pair and std::tuple. But I used std::get instead of std::tuple_element. I'll change it. Thank you for your advice!
11.
▲
Show HN: A C++ dump func. that can print multi-D vectors, maps, tuples, and all
(github.com)
82 points
by
philip82148
3y ago
|
31 comments