The Lone C++ Coder's Blog

The Lone C++ Coder's Blog

The continued diary of an experienced C++ programmer. Thoughts on C++ and other languages I play with, Emacs, functional, non functional and sometimes non-functioning programming.

Timo Geusch

1-Minute Read

I’m generally more of a grep person but sometimes it’s easier to just use the built-in search in Visual Studio, especially if you want to be able to restrict the search to parts of your Visual Studio solution. Visual Studio does have pretty powerful search built in if you do use regular expressions instead of the default text matching. Here are a couple of regexes to get you started:

Find all shared_ptr calls that use “new” instead of the recommended make_shared: shared_ptr<.+>(new .+)

Find all empty destructors - very useful if you want to remove them in C++11 code: ~.+s+{s*}

Recent Posts

Categories

About

A developer's journey. Still trying to figure out this software thing after several decades.