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
Describe the bug
Generated .cpp file has incorrect #line numbers, misplaced braces, should be a newline between closing brace and next function. See inline comments for issue descriptions.
To Reproduce
regression-tests/pure2-types-that-parameters.cpp2
#line 1 "pure2-types-that-parameters.cpp2"
class myclass {
public: myclass()
: name{ "Henry" }
, addr{ "123 Ford Dr." }
#line 5 "pure2-types-that-parameters.cpp2" // The following braces are from line 4, not 5
{} // Braces are at column 0 instead of normal indentation from function or at source column
public: explicit myclass(myclass const& that)
: name{ that.name }
, addr{ that.addr }
#line 7 "pure2-types-that-parameters.cpp2" // The following brace is from line 6, not 7
{ // Brace is at column 0 instead of normal indentation from function or at source column
}public: auto operator=(myclass const& that) -> void{name = that.name;addr = that.addr;} // assignment operator follows immediately after closing brace with no whitespace, generated by line 6, but will be reported as line 9. Assignments in body are from lines 7 and 8 but will be reported as line 9. No whitespace inside function body.
public: explicit myclass(myclass&& that)
: name{ std::move(that).name }
, addr{ std::move(that).addr }
#line 12 "pure2-types-that-parameters.cpp2" // The following brace is from line 11, not 12
{
}public: auto operator=(myclass&& that) -> void{name = std::move(that).name;addr = std::move(that).addr;} // assignment operator follows immediately after closing brace with no whitespace, generated by line 11, but will be reported as line 14. Assignments in body are from lines 12 and 13 but will be reported as line 14
See the wiki documentation page: https://github.com/hsutter/cppfront/wiki/Cpp2:-operator=,-this-&-that
See also the new `pure2-types-smf*.cpp2` test cases for examples.
Made Cpp1 assignment "return *this;", closes#277
Changed in<T> to pass fundamental types by value. Only those are known to be always complete. Partly addresses #270.
Also partly improves #282.
Describe the bug
Generated
.cpp
file has incorrect #line numbers, misplaced braces, should be a newline between closing brace and next function. See inline comments for issue descriptions.To Reproduce
regression-tests/pure2-types-that-parameters.cpp2
regression-tests/test-results/pure2-types-that-parameters.cpp
Expected something like this
The text was updated successfully, but these errors were encountered: