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

3 comments
Comment actions Permalink

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
Comment actions Permalink

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

2
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

1

Please sign in to leave a comment.