New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] error when handle types defined with lambda #10313
Comments
The example in the attachment (docs.zip) is a bit large and the problem there is hard to pinpoint, though the small example in the issue already shows the problem of the fact tat the
into
(the problem is independent of using clang) |
@albert-github #define lambda [] https://en.cppreference.com/w/cpp/language/lambda Another thing is that I think |
@steve02081504 Please verify if the latest commit fixes the issue for you. Do not close the issue, this will be done automatically when the next release is made available. |
@doxygen Output looks better though: When taking the small example in the issue (and
When setting |
@doxygen Thanks for your help, it looks good now! //warp for not_unreadable_istream to make it unreadable
template<class stream_T> requires not_unreadable_istream_class<stream_T>
struct unreadable_wrap:stream_T,instance_struct<unreadable_wrap<stream_T>>,virtual decltype(lambda{
if constexpr(noexcept_stream_class<stream_T>) {
if constexpr(data_stream_class<stream_T>)
return type_info<noexcept_data_istream_t>;
else
return type_info<noexcept_text_istream_t<typename stream_T::char_type>>;
}
else {
if constexpr(data_stream_class<stream_T>)
return type_info<data_istream_t>;
else
return type_info<text_istream_t<typename stream_T::char_type>>;
}
}())::type{
//coool stuffs!
}; Screenshot of the generated output: |
I found a small example to reproduce the problem: #include <cstdio>
struct B { void f() { printf("B()\n"); } };
struct C { void f() { printf("C()\n"); } };
struct A : decltype([]{
if constexpr(sizeof(void*)==8) return B();
else return C();
}())
{
};
int main()
{
A a;
a.f();
} Note that this use of lamdas seems to be a C++20 feature. Also note that doxygen will not be able to evaluate the correct inheritance relation in such cases, but at least it should be able to parse over the decltype stuff. |
@steve02081504 Please verify if the latest commit fixes the problem (with the limitations mentioned). |
@doxygen though less important, but what is the status of the output issue mentioned in #10313 (comment) |
It's working fine thank you for your help! (and apologies for my late testing) |
I think the "multi-line initializer for using" can indeed better be handled as in other places. Can you make a new issue for this specifically? |
The requested (#10313 (comment)) issue: "Multi line initialization for using" #10334 |
This issue was previously marked 'fixed but not released', |
Describe the bug
Doxygen doesn't seem to be able to handle types defined with lambda correctly.
e.g.
Expected behavior
Handle it correctly.
Screenshots
https://elc-lang.github.io/ELC/namespaceelc_1_1defs_1_1basic__environment.html#a526ab5592597e881c00a5d308b568bd0
To Reproduce
docs.zip
Version
Doxygen version used: 1.9.8
github action with mattnotmitt/doxygen-action@452281f
Stack trace
none.
Additional context
none.
The text was updated successfully, but these errors were encountered: