You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classA {
public:explicitA(constchar* person = "World"): person_(person){}
voidsay_hello() const{
std::cout << "Hello " << person_ << "!\n";
}
A& operator=(const A& a) = delete;
private:
std::string person_;
};
A global_variable;
codegen
// [...]voidadd_methods() const{
auto& t = module_;
DEBUG_MSG("Adding global_variable methods to provide access to the global variable global_variable (" __HERE__ ")");
// defined in ./A.h:17:3
t.method("global_variable", []()-> A& { return global_variable; });
t.method("global_variable!", [](const A& val)-> A& { return global_variable = val; });
}
// [...]
The generated code does not compile, because the statement global_variable = val is invalid, as the assignment operation has been deleted. Codegen should skip generating the setter method in this case.
The text was updated successfully, but these errors were encountered:
MWE
source file
codegen
The generated code does not compile, because the statement
global_variable = val
is invalid, as the assignment operation has been deleted. Codegen should skip generating the setter method in this case.The text was updated successfully, but these errors were encountered: