Closed Binary-Song closed 4 years ago
Hello.
I need more information about what you are doing. Please explain with code samples. The header code, the implementation, and the expected output.
Hi.
For expamle, I have a class with a friend <<
operator declaration.
//my_class.h
#ifndef MY_CLASS_H
#define MY_CLASS_H
#include <iostream>
class MyClass
{
friend std::ostream &operator<<(std::ostream &strm, MyClass obj);
};
#endif
When I use Create Implementation on operator<<
, the output goes like this:
//my_class.cpp
friend std::ostream &MyClass::operator<<(std::ostream &strm, MyClass obj)
{
}
while the expected output should be something like:
//my_class.cpp
std::ostream &operator<<(std::ostream &strm, MyClass obj)
{
}
It doesn't seem to generate friend functions correctly. The
friend
token was not removed and the class scope::
was added. Amazing plugin by the way! Saved me a lot of work.