Skip to content

Keyword-like forms of logical operators are not supported in C++ requires clause #10506

@MiroPalmu

Description

@MiroPalmu

Describe the bug
Keyword-like forms of logical operators and, or and not are not supported in required clause.

For example for following class:

template<typename T>
    requires std::is_enum_v<T> and std::unsigned_integral<std::underlying_type_t<T>>
class flags_t {...};

"Detailed Description" in html documentation would contain:

template<typename T>
requires std::is_enum_v<T>
class idg::sstd::flags::flags_t< T >

If one would change and -> && missing std::unsigned_integral<std::underlying_type_t<T>> would appear in the documentation.

Expected behavior
Support for keyword-like forms of logical opeators.

Screenshots
image

To Reproduce
doxygen_bug.tar.gz

Version
Doxygen 1.9.6 on Arch Linux

Additional context
I don't understand the implementation enough to say for sure but it seems that the bug lies in doxygen/src/scanner.I:2343:

<RequiresClause>"||"|"&&"               { // "requires A || B" or "requires A && B"
                                          yyextra->current->req+=yytext;
                                        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    C/C++enhancementa request to enhance doxygen, not a bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions