0

I've used a bit of metaprogramming (with metal and pfr) + Converting Tuple to string to map a c++ pod struct into its equivalent python struct representation (padding not accounted for yet but this is a separate step)

So my questions is, how can I do this better? I'm ok moving forward with this but it seems there must be some way I can simplify this code. Any suggestions?

Code here: https://github.com/Kubiyak/pybuffer_container/blob/master/meta_example.cpp

warrenm
  • 31,094
  • 6
  • 92
  • 116
  • Welcome to Stack Overflow! If you want help improving working code, you should post this on [CodeReview.SE](https://codereview.stackexchange.com/help/how-to-ask). If you do decide to do so, please delete the question here. – NathanOliver Jan 10 '20 at 19:12
  • Hi Nathan, I would do what you suggest but when I try to enter my code sample (which is on github) in CodeReview.SE it shows up quite garbled. If you can show me how to submit a link to the code on github or write the code better in SE I will do it. – user12691398 Jan 11 '20 at 01:20

1 Answers1

0

Actually, this is a good guide: I will take the solution based on std::apply w/ c How can you iterate over the elements of an std::tuple? of-an-stdtuple

That cleaned up my code significantly. How can I delete this q? I cannot find the delete button for it.