cppfront
cppfront copied to clipboard
[BUG] cpp2::move(std)::cout suddenly appears
trafficstars
Sorry but I won't be able to give much info as this bug seems to appear “randomly”.
Sometimes I'll add a valid line of code to a method and another function in my code (always the same) will start being generated in the wrong way.
It's impossible to reproduce this bug in an MRE, because it's incomprehensible. I once had this bug and adding this line count = count + 0;, in the method I was working on made it go away.
Sometime this method:
printMenu:() = {
clear();
std::cout << "**************************************************" << std::endl;
std::cout << "* GOPP2 Menu *" << std::endl;
std::cout << "**************************************************" << std::endl;
std::cout << "* Please select one of the following: *" << std::endl;
std::cout << "* *" << std::endl;
std::cout << "* 1. Start a game *" << std::endl;
std::cout << "* 2. Exit *" << std::endl;
std::cout << "**************************************************" << std::endl;
std::cout << std::endl << getNextMessage() << std::endl;
}
Is generated like this for no apparent reason:
auto printMenu() -> void{
clear();
std::cout << "**************************************************" << std::endl;
std::cout << "* GOPP2 Menu *" << std::endl;
std::cout << "**************************************************" << std::endl;
std::cout << "* Please select one of the following: *" << std::endl;
cpp2::move(std)::cout << "* *" << std::endl;
std::cout << "* 1. Start a game *" << std::endl;
std::cout << "* 2. Exit *" << std::endl;
std::cout << "**************************************************" << std::endl;
std::cout << std::endl << getNextMessage() << std::endl;
}
Why does cpp2::move(std)::cout is generated?
I don't have any explanation, I'll let you know if I get any new information on this.