Code Formatting - Reorder function declarations in cpp to match definitions in header.

Hi,

It is possible to automatically make the function declarations in a cpp, match the order defined in the header? Vice versa.
I like my functions to be listed in the same order in both places, to make it easier to navigate.

Many thanks,
Magnus

8
3 comments
Avatar
Permanently deleted user

Hello,

Not yet, sorry. In general, ReSharper C++ cannot yet move functions around ("Rearrange Code" commands do not work). Once we implement this, we'll think about enforcing the order of definitions, but it might be complicated - in C++ too much depends on the relative order of code elements because of involved visibility rules.

Thanks!

3

I would love that feature! Manually rearranging function definitions is the biggest noise I have remaining with all the cool stuff of CLion (and Resharper).

Please consider the possibility, there are a lot of simple non-placement-dependent .cpp code out there, which is easily rearranged (just swap the unsorted methods ignoring the ones in-between), so at least an experimental feature to provide such functionality would be exceptionally useful! Much love

1
Avatar
Permanently deleted user

Is this still on the roadmap and will this make it in soon?  Such a great feature.

5

Please sign in to leave a comment.