This document provides 7 reasons to move C++ code to Visual Studio 2017. It highlights improvements in performance, diagnostics, and features for editing, debugging, testing, and committing code. Specific enhancements mentioned include faster IntelliSense, new compiler warnings, improved error experience, and support for additional unit test frameworks and languages. Benchmark results show Visual Studio 2017 providing better performance than 2015 for SPEC CPU2017 tests.
13. https://aka.ms/msvc
+8.9%
scalar replacement to sink stores out of loops
✔
✔
✔
e.g. /guard:cf, /GS, /Qspectre
Example New diagnostic
struct C { int x; int y;
C (int a): y(a), x(y) {}
};
warning C5038: data member 'C::y' will be initialized after
data member 'C::x'
SPEC 2017 2015 2017
602.gcc_s 521 443 15%
605.mcf_s 572 546 5%
620.omnetpp_s 402 393 2%
623.xalancbmk_s 163 157 4%
625.x264_s 269 204 24%
…
31. Read & Edit
New filters + Predictive IntelliSense
mode
Go To (ctrl + ,) with various filters
Find All References improvements
Code formatting enforcement
(via. .clang-format or .editorconfig)
Structure guidelines
Ctrl+Click to go-to-definition
(and coming in 15.8)
C++ Template IntelliSense
Code Analysis warnings as squiggles
Expand macro
Convert macro to constexpr
Diagnose
Improved
Error List results
Memory and CPU profiler
Debugging
std::function debugging
Run to Click
Reattach to process
Exception helper
Break-on-exception conditions
Compiler diagnostics via /diagnostics:caret
ImageWatch visualizer (VS Marketplace)
Test
CodeLens
New Unit Test Frameworks
Google Test
Boost.Test
Compile
/debug:fastlink
OSS libs from https://aka.ms/vcpkg
Commit
Force push your changes
SSH support for remotes
View Commit Diff
40. Example New diagnostic under /permissive-
template<typename T>
void bar()
{
T::foo<int>();
// Should be T::template foo<T>();
}
test.cpp(5,8): error C7510: 'foo': use of dependent template name requires 'template' keyword
T::foo<int>();
^
template <typename T>
void bar() {
T::Type x;
// Should be typename T::Type x
}
test.cpp(5,5): error C7511: 'Type': use of dependent type name must be prefixed with 'typename'
T::Type x;
^
struct X {};
template <class T>
void bar() {
typename X x; // Should be "X x"
}
test.cpp(5,11): error C7511: 'X': 'typename' keyword must be followed by a qualified name
typename X x;
^