Sharing learnings on getting a C++ template function to work #941
Unanswered
kaycebasques
asked this question in
Q&A
Replies: 1 comment
-
This discussion is technically closed because I found an answer myself, but I'll leave the discussion open just to put it on people's radars |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! We're using Doxygen & Breathe with quite a bit of success over in the Pigweed docs (https://pigweed.dev). Thanks for maintaining this project.
I was having trouble getting Breathe/Doxygen to work with a C++ template function. I just figured it out. I spent quite a while trying to get this working, so I figured I'd share my learnings.
I am a C++ and Doxygen/Breathe n00b (I'm a technical writer) so please go easy on me if I have made any super n00b assumptions/mistakes
Solution
Debugging process
(I wrote this ten minutes ago, before I found the solution)
I'm having trouble getting Doxygen / Breathe to pick up this C++ template function:
https://cs.opensource.google/pigweed/pigweed/+/537df1014f69621c98c22d1488fe8db6bc621e64:pw_base64/public/pw_base64/base64.h;l=101
Here are the things I've tried:
Clang parsing in Doxyfile
Basic namespaced signature
The output suggests that Doxygen/Breathe is aware of the template function:
When I look into the Doxygen XML it seems like the function is also there:
Signature that Doxygen/Breathe suggested
It seems like
Encode
needs to be namespaced but I tried it verbatim just in case:That also did not work. I don't have the exact output anymore but I believe it was something along the lines of
Doxygen cannot find function "template<size_t kMaxBinaryDataSizeBytes"
(note how the quotes do not have the full signature)Beta Was this translation helpful? Give feedback.
All reactions