Skip to content
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

Default template argument not treated as reference to #include #103

Open
Farqd opened this issue May 13, 2017 · 0 comments
Open

Default template argument not treated as reference to #include #103

Farqd opened this issue May 13, 2017 · 0 comments

Comments

@Farqd
Copy link

Farqd commented May 13, 2017

Cppclean doesn't recognize default template arguments as references to included file.
See below example:

A.h

class A
{ 
  
};

B.h

#include "A.h"

template<typename T = A>
void f()
{
}

Cppclean prints
./B.h:1: 'A.h' does not need to be #included

When include is removed, g++ gives an error:

B.h:3:23: error: ‘A’ does not name a type
 template<typename T = A>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant