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

C++ parsing problem with operators <<, <, >, >> inside templates (Origin: bugzilla #709526) #5305

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.5 on platform Other
Assigned to: Dimitri van Heesch

On 2013-10-06 20:04:49 +0000, Vincent wrote:

Here is an example of a problem with the parsing of C++ default template parameters that implies operators <<, <, > and >>:


#include
#include <type_traits>

template <class Type, class = typename std::enable_if<!std::is_void<decltype(std::declvalstd::ostream&()<<std::declval())>::value>::type>
bool print(std::ostream& stream, const Type& value)
{
return stream<<value;
}

int main(int argc, char* argv[])
{
print(std::cout, 42);
return 0;
}

It seems that these operators are interpreted as template delimiters causing a parsing problem.

On 2013-10-12 21:02:57 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next GIT update.

On 2013-12-24 18:59:54 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.6. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant (preferrably in the form of a self-contained example).

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment