{"id":251578,"date":"2024-11-27T05:00:42","date_gmt":"2024-11-27T13:00:42","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=251578"},"modified":"2024-11-26T19:22:49","modified_gmt":"2024-11-27T03:22:49","slug":"updates-for-c-developers-in-visual-studio-2022-17-12","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/updates-for-c-developers-in-visual-studio-2022-17-12\/","title":{"rendered":"Updates for C++ developers in Visual Studio 2022 17.12"},"content":{"rendered":"<p>Visual Studio 17.12 is here and comes with a host of new features for C++ developers. We\u2019ve made improvements across our toolchain, C++ Build Insights, Unreal Engine support, and more. This post gives a quick overview of what\u2019s available; for all the details, see <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/whats-new-for-c-developers-in-visual-studio-2022-17-12\/\">What\u2019s New for C++ Developers in Visual Studio 2022 17.12<\/a> on the C++ blog.<\/p>\n<h2>Standard Library and MSVC Compiler<\/h2>\n<p>As always, you can find all the details about our STL work in the <a href=\"https:\/\/github.com\/microsoft\/STL\/wiki\/Changelog\">changelog on GitHub<\/a>. Thanks to everyone who contributed changes for this release!<\/p>\n<p>On the conformance side, we have finished the implementation of C++23\u2019s <a href=\"https:\/\/wg21.link\/P2286R8\">P2286R8<\/a> Formatting Ranges and the multidimensional subscript operator (e.g. my_3d_span[i,j,k]). This release also comes with some new C++26 features:<\/p>\n<ul>\n<li><a href=\"https:\/\/wg21.link\/P2997R1\">P2997R1<\/a> Removing The Common Reference Requirement From The Indirectly Invocable Concepts<\/li>\n<li><a href=\"https:\/\/wg21.link\/P0952R2\">P0952R2<\/a> A New Specification For <code>generate_canonical()<\/code><\/li>\n<li><a href=\"https:\/\/wg21.link\/P2968R2\">P2968R2<\/a> Make <code>std::ignore<\/code> A First-Class Object<\/li>\n<\/ul>\n<p>You\u2019ll find improvements to several debug visualizers, including those for <code>mutex\/recursive_mutex and move_iterator.<\/code><\/p>\n<p>We added <code>lifetimebound<\/code> attributes to <code>min<\/code>, <code>max<\/code>, <code>clamp<\/code>, <code>ranges::min<\/code>, <code>ranges::max<\/code>, and <code>ranges::clamp<\/code>, allowing MSVC code analysis and Clang &#8211;<code>Wdangling<\/code> to detect dangling references in improper usage. See the documentation for <a href=\"https:\/\/learn.microsoft.com\/cpp\/code-quality\/c26815\">warnings C26815<\/a> and <a href=\"https:\/\/learn.microsoft.com\/cpp\/code-quality\/c26816\">C26816<\/a> for more information about lifetimebound annotations.<\/p>\n<p>Finally, we improved the performance of several types and algorithms. The <code>popcount()<\/code> function now uses a compiler intrinsic on ARM64. We further improved the vectorized implementations of the <code>minmax_element()<\/code> and <code>minmax()<\/code> algorithm families, and optimized the <code>search()<\/code> and <code>find_end()<\/code> algorithms. We also overhauled the implementations of <code>condition_variable<\/code> and <code>condition_variable_any<\/code>, which has knock-on effects on the <code>timed_mutex<\/code> and <code>recursive_timed_mutex<\/code> types.<\/p>\n<h2>Set Command Line Arguments for Unreal Engine Projects<\/h2>\n<p>For Unreal Engine projects, you can now set the command line arguments to pass to your application directly from the toolbar. This toolbar component will show up by default if you have the <strong>Game development with C++ workload <\/strong>installed. If you don\u2019t see it, you can add it by right-clicking on the toolbar and selecting <strong>Set Arguments<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-251579\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/set-command-line-arguments-box.png\" alt=\"Set command line arguments box (-graphicsadapter=0)\" width=\"600\" height=\"171\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/set-command-line-arguments-box.png 600w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/set-command-line-arguments-box-300x86.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>We\u2019ll be adding support for this feature to non-UE projects in the future. See <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/debugger\/specify-command-line-arguments?view=vs-2022\">Pass command-line arguments while debugging<\/a> on Microsoft Learn for documentation.<\/p>\n<h2>Open Folder for Unreal Engine uproject<\/h2>\n<p>We have added an additional entry point to open your Unreal Engine uproject with Visual Studio\u2019s uproject support. You can now open your uproject directly from the <strong>File<\/strong> menu by selecting <strong>Open &gt; Folder\u2026<\/strong>. This will open your Unreal Engine project in Visual Studio.<\/p>\n<p>For more information on how to use this feature, see the <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/debugger\/specify-command-line-arguments?view=vs-2022\">documentation on Microsoft Learn<\/a> and our <a href=\"https:\/\/aka.ms\/DirectUnrealSupport\">announcement blog post<\/a>.<\/p>\n<h2>Change Signature Improvements<\/h2>\n<p>We have updated the <strong>Change Signature<\/strong> interface, allowing you to add, remove, and rearrange parameters in the parameter configuration section. Additionally, you can change their order by selecting and dragging them to a new position.<\/p>\n<p>The access methods remain the same: press Ctrl+. to trigger the <em>Quick Actions and Refactorings<\/em> menu and select <strong>Change Signature<\/strong>. <img decoding=\"async\" class=\"alignnone wp-image-251580\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-2.png\" alt=\"Image showing and updated method signature (bool LayoutHorizontal(const char * label, int numItems, float itemLabelSize, bool showBorders) and parapmeters\" width=\"1680\" height=\"1009\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-2.png 1680w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-2-300x180.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-2-1024x615.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-2-768x461.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-2-1536x923.png 1536w\" sizes=\"(max-width: 1680px) 100vw, 1680px\" \/><\/p>\n<h2>C++ Build Insights<\/h2>\n<p>This release of Visual Studio comes with a bunch of quality-of-life improvements for C++ Build Insights.<\/p>\n<p>You can now select a few files, run Build Insights on them, and see exactly how these files impact build performance: <img decoding=\"async\" width=\"700\" height=\"393\" class=\"wp-image-251581\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/run-build-insights-on-file-selection-file-selectio.png\" alt=\"Run Build Insights on File Selection File Selection Command in contextual menu of selected files.\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/run-build-insights-on-file-selection-file-selectio.png 700w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/run-build-insights-on-file-selection-file-selectio-300x168.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>You can filter results by project and file path:<\/p>\n<p><img decoding=\"async\" width=\"447\" height=\"347\" class=\"wp-image-251582\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/file-path-filter.png\" alt=\"File Path Filter\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/file-path-filter.png 447w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/file-path-filter-300x233.png 300w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/p>\n<p>Note that we now truncate paths to make them easier to read.<\/p>\n<p>You can designate a folder to automatically store the reports so you can easily access them during your investigation.<\/p>\n<p><img decoding=\"async\" width=\"846\" height=\"570\" class=\"wp-image-251583\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/setting-to-save-traces-in-custom-location.png\" alt=\"Setting to save traces in custom location\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/setting-to-save-traces-in-custom-location.png 846w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/setting-to-save-traces-in-custom-location-300x202.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/setting-to-save-traces-in-custom-location-768x517.png 768w\" sizes=\"(max-width: 846px) 100vw, 846px\" \/><\/p>\n<p>Finally, you can now see a short description on how each tab of <a href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/build-insights\/?view=msvc-170\">Build Insights<\/a> can be used, along with a link to the documentation for a detailed explanation.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-251584\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-6.png\" alt=\"Image showing the highlighted ? for Build insights\" width=\"700\" height=\"394\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-6.png 700w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/11\/word-image-251578-6-300x169.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2>Summary<\/h2>\n<p>We hope this has given you a taste of what\u2019s new. For all the details, see <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/whats-new-for-c-developers-in-visual-studio-2022-17-12\/\">What\u2019s New for C++ Developers in Visual Studio 2022 17.12<\/a> on the C++ blog.<\/p>\n<p>We are very much interested in your feedback. The comments below are open. Feedback can also be shared through <a href=\"https:\/\/developercommunity.visualstudio.com\/cpp\">Visual Studio Developer Community<\/a>. You can also reach us via email at <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 17.12 is here and comes with a host of new features for C++ developers. We\u2019ve made improvements across our toolchain, C++ Build Insights, Unreal Engine support, and more. This post gives a quick overview of what\u2019s available; for all the details, see What\u2019s New for C++ Developers in Visual Studio 2022 17.12 on [&hellip;]<\/p>\n","protected":false},"author":706,"featured_media":251581,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[472,6868,6963,155],"tags":[],"class_list":["post-251578","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gaming","category-performance","category-productivity","category-visual-studio"],"acf":[],"blog_post_summary":"<p>Visual Studio 17.12 is here and comes with a host of new features for C++ developers. We\u2019ve made improvements across our toolchain, C++ Build Insights, Unreal Engine support, and more. This post gives a quick overview of what\u2019s available; for all the details, see What\u2019s New for C++ Developers in Visual Studio 2022 17.12 on [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/251578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/706"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=251578"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/251578\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/251581"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=251578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=251578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=251578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}