vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Incorrect Outline with C++20 namespace ::inline syntax

Open sean-mcmanus opened this issue 3 years ago • 2 comments

The examples I gave all look like they have been fixed, however I found a new example that is not outlined correctly:

namespace foo::bar {
    namespace baz::inline boop {
        class beep {
        public:
            beep();
        };

        int foobarbaz();
    }
}

Screenshot_2021-03-23_10-11-39

Of course, this syntax is new to c++20, so it is understandable that it's not fully supported yet. Using the pre-c++20 syntax yields the right outline:


namespace foo::bar {
    namespace baz {
        inline namespace boop {
            class beep {
            public:
                beep();
            };

            int foobarbaz();
        }
    }
}

Originally posted by @BigBahss in https://github.com/microsoft/vscode-cpptools/issues/6830#issuecomment-804935850

sean-mcmanus avatar Mar 23 '21 14:03 sean-mcmanus

@BigBahss Thanks for reporting this. I've filed a bug against our shared VS parser at https://developercommunity.visualstudio.com/t/C20-tag-parser-doesnt-work-with-names/1379199 . They usually prioritize C++20 features.

sean-mcmanus avatar Mar 23 '21 16:03 sean-mcmanus

Thanks Sean 👍

BigBahss avatar Mar 23 '21 23:03 BigBahss

@BigBahss Fixed in 1.13.1: https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.1

sean-mcmanus avatar Sep 28 '22 05:09 sean-mcmanus