Share your experience, who uses enum for cleaning? Over time, usually many values ​​accumulate, some of which are already missing in the code. This is especially true for enum 'project errors. Brushing your hands immediately causes sleepiness and apathy :)

There are of course grep and xarg, but maybe there is a ready-made tool? Or technology. I would like to automate the process.

  • one
    For C # and for C / C ++, the methods are likely to be different. Better to do two separate questions ... - HolyBlackCat pm
  • For C / C ++, you can try to write a 'simple' utility on top of libclang. - HolyBlackCat
  • one
    why, I do not agree, in client-server solutions one enum is usually written for c++ and c# - with defines only. - NewView
  • one
    Resharper. 6 characters you need - AK
  • Maybe I misunderstood the question, but usually in the IDE there is a function like "safe delete" for deleting unused entities. If there are many values ​​and you want to delete everything at once, then again you can use the "clean code" from the refactoring menu of your IDE. All this has nothing to do with YaP or enum - cpp questions

0