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


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,

Comment actions Permalink


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.


Comment actions Permalink

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

Comment actions Permalink

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


Please sign in to leave a comment.