Create C++ Member Function in Visual Studio

We are excited to announce that Create C++ Member Function can now be used to quickly add constructor and in Visual Studio 17.6 Preview 2. When you have a class with fields, you can add a default constructor, constructor with all fields, equality operator, and .

Three dots will appear below a class name to indicate that you can add a member function, and you can hover over them to see the quick action (screwdriver icon). When the default constructor and equality operator are added respectively, the Go to Definition of the operator== is displayed below, showing that the body of the  

An example of creating C++ member function without fields.

You can also choose to add a constructor with all fields and an equality operator with all fields respectively, and the Go to Definition will show that the operator== has all the field comparisons.    

An example of creating C++ member function with all fields included.

Future Work

This experimental feature will be improved by adding more functions that can save you a lot of typing. Right now, it includes constructor and operator==and we are considering adding more cases,  

We have a Developer Community ticket to Improve “Create Member Function”, if you have the same suggestions make sure to upvote it.  

Send us your feedback! 

Download the latest version of Visual Studio Preview and give the Create C++ Member Function feature a try. Your feedback will be extremely helpful in shaping this experience, therefore, please continue to send your feedback in the comments below or/and via Developer Community. You can also reach us on Twitter (@VisualC), or via email at