Skip to content

how to decode_and_store_arg a variable size argument #706

Answered by odygrd
p-selini asked this question in Q&A
Discussion options

You must be logged in to vote

Regarding the second question, supporting nested types is possible but might be time-consuming to implement if not strictly needed. To implement it, you’d define Codec<NestedType>, then Codec<Payload> using Codec<NestedType>, and finally Codec<Foo> using Codec<Payload>.

This approach is already supported for STL types in the library, for example:
StdVectorLoggingTest.cpp#L179

And example of potential nested codec calls can be seen here:
Vector.h#L70

I assumed you were only interested in printing the dynamic part since Foo was doing so in the example.

I've updated the example to print both parts as intended. Please have a look here

https://godbolt.org/z/45cvdnev5

#include "quill/Backend.h"
#

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@p-selini
Comment options

Comment options

You must be logged in to vote
1 reply
@p-selini
Comment options

Comment options

You must be logged in to vote
5 replies
@p-selini
Comment options

@odygrd
Comment options

@p-selini
Comment options

@odygrd
Comment options

@p-selini
Comment options

Answer selected by p-selini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants