{"id":24670,"date":"2019-07-29T17:05:23","date_gmt":"2019-07-29T17:05:23","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=24670"},"modified":"2019-07-29T17:05:23","modified_gmt":"2019-07-29T17:05:23","slug":"smarter-member-list-filtering-for-c","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/smarter-member-list-filtering-for-c\/","title":{"rendered":"Smarter\u00a0Member\u00a0List\u00a0Filtering for C++\u00a0"},"content":{"rendered":"<p><span data-contrast=\"auto\">We are always looking for ways to make you more productive while coding in Visual Studio. <\/span><span data-contrast=\"auto\">In<\/span><span data-contrast=\"auto\">\u00a0<\/span><a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\"><span data-contrast=\"none\">Visual Studio 2019<\/span><span data-contrast=\"none\">\u00a0<\/span><span data-contrast=\"none\">version\u00a0<\/span><span data-contrast=\"none\">16.2<\/span><\/a><span data-contrast=\"auto\">, we have created a smarter, more relevant Member List. Specifically, we now apply method filtering based on type qualifiers. To illustrate this, consider the following example:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">You have two vectors, but one is\u00a0<\/span><code><span data-contrast=\"auto\">const<\/span><\/code><span data-contrast=\"auto\">.\u00a0<\/span><span data-contrast=\"auto\">When we invoke the member list on<\/span><span data-contrast=\"auto\">\u00a0the<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">non-const vector<\/span><span data-contrast=\"auto\">, we see the option for\u00a0<\/span><code><span data-contrast=\"auto\">push_back<\/span><\/code><span data-contrast=\"auto\">. However, when we invoke the member list on<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">the\u00a0<\/span><span data-contrast=\"auto\">const<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">vec<\/span><span data-contrast=\"auto\">tor<\/span><span data-contrast=\"auto\">, Visual Studio<\/span><span data-contrast=\"auto\">\u00a0now<\/span><span data-contrast=\"auto\">\u00a0knows not to display<\/span><span data-contrast=\"auto\">\u00a0any<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">non-const members on a const object<\/span><span data-contrast=\"auto\">:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><img decoding=\"async\" class=\"alignnone size-full wp-image-24671\" style=\"font-size: 1rem;\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/07\/qualifierFilter.gif\" alt=\"\" width=\"456\" height=\"265\" \/><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Even More Filtering<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">If you wish to benefit further from Member List<\/span><span data-contrast=\"auto\">\u00a0and completion<\/span><span data-contrast=\"auto\">\u00a0filtering, try out\u00a0<\/span><span data-contrast=\"auto\">Predictive IntelliSense<\/span><span data-contrast=\"auto\">. As an experimental feature, Predictive IntelliSense is disabled by default, but can be enabled under<\/span><span data-contrast=\"auto\">\u00a0<\/span><i><span data-contrast=\"auto\">Tools &gt; Options &gt; Text Editor &gt; C\/C++ &gt; Experimental.<\/span><\/i><span data-contrast=\"auto\">\u00a0Or simply type \u201cpredictive\u201d in the (Ctrl + Q) Search Bar.<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">Currently, Predictive IntelliSense<\/span><span data-contrast=\"auto\">\u00a0filters by type when you&#8217;re in a<\/span><span data-contrast=\"auto\">n argument or assignment position<\/span><span data-contrast=\"auto\">. In the example below,<\/span><span data-contrast=\"auto\">\u00a0<\/span><code><span data-contrast=\"auto\">i<\/span><\/code><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">is of type\u00a0<\/span><code><span data-contrast=\"auto\">int<\/span><\/code><span data-contrast=\"auto\">, so Predictive IntelliSense only shows\u00a0<\/span><code><span data-contrast=\"auto\">int<\/span><\/code><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">items in the completion list.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-24672\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/07\/PI.png\" alt=\"\" width=\"636\" height=\"215\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/07\/PI.png 636w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/07\/PI-300x101.png 300w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p><b><span data-contrast=\"auto\">Note<\/span><\/b><b><span data-contrast=\"auto\">:<\/span><\/b><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">I<\/span><span data-contrast=\"auto\">f you ever wish to\u00a0<\/span><span data-contrast=\"auto\">un<\/span><span data-contrast=\"auto\">&#8211;<\/span><span data-contrast=\"auto\">filter<\/span><span data-contrast=\"auto\">\u00a0the completion list, just click the green \u201c+\u201d symbol in the bottom left of the list.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3><span data-contrast=\"none\">Talk to Us!\u202f<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"none\">If you have feedback on\u202f<\/span><span data-contrast=\"none\">Member List filtering<\/span><span data-contrast=\"none\">\u202fin Visual Studio, we would love to hear from you. We can be reached via the comments below or via email (visualcpp@microsoft.com). If you encounter other problems with Visual Studio or MSVC or have a\u202fsuggestion, you can use the\u202f<\/span><a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio?view=vs-2019\"><span data-contrast=\"none\">Report a Problem<\/span><\/a><span data-contrast=\"none\">\u202ftool in Visual Studio or head over to\u202f<\/span><a href=\"https:\/\/developercommunity.visualstudio.com\/spaces\/8\/index.html\"><span data-contrast=\"none\">Visual Studio Developer Community<\/span><\/a><span data-contrast=\"none\">. You can also find us on Twitter\u00a0<\/span><a href=\"https:\/\/twitter.com\/visualc\"><span data-contrast=\"none\">@<\/span><span data-contrast=\"none\">VisualC<\/span><\/a><span data-contrast=\"none\">\u00a0and\u202f<\/span><span data-contrast=\"none\">follow me\u00a0<\/span><a href=\"https:\/\/twitter.com\/NickUhlenhuth\"><span data-contrast=\"none\">@<\/span><span data-contrast=\"none\">nickuhlenhuth<\/span><\/a><span data-contrast=\"none\">.\u202f<\/span><span data-ccp-props=\"{&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are always looking for ways to make you more productive while coding in Visual Studio. In\u00a0Visual Studio 2019\u00a0version\u00a016.2, we have created a smarter, more relevant Member List. Specifically, we now apply method filtering based on type qualifiers. To illustrate this, consider the following example:\u00a0 You have two vectors, but one is\u00a0const.\u00a0When we invoke the [&hellip;]<\/p>\n","protected":false},"author":329,"featured_media":24671,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[270,256,230],"tags":[],"class_list":["post-24670","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcement","category-experimental","category-new-feature"],"acf":[],"blog_post_summary":"<p>We are always looking for ways to make you more productive while coding in Visual Studio. In\u00a0Visual Studio 2019\u00a0version\u00a016.2, we have created a smarter, more relevant Member List. Specifically, we now apply method filtering based on type qualifiers. To illustrate this, consider the following example:\u00a0 You have two vectors, but one is\u00a0const.\u00a0When we invoke the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/24670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/329"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=24670"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/24670\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/24671"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=24670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=24670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=24670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}