Toggle Function Definition moves a function definition inside an C/C++ source editor from one position to another and preserves correctness.
Toggling is available whenever the cursor is inside a function declaration or definition. Any selection between the first and the last character of the function definition (without comments) is considered valid for toggling.
Valid selection region
The refactoring moves free functions from an implementation file to a header file with the same name and back. If the header file does not exist the file is created.
The function definition of a member function can by moved from the class declaration in the header file to an inline definition in the header file to the implementation file and back to the class definition.