On Fri, 23 Nov 2018 at 23:12, Marek Polacek <pola...@redhat.com> wrote: > > >A nested namespace definition cannot be inline. This is supposed to handle > > >cases such as > > >namespace A::B::inline C { ... } > > >because after 'C' we don't see :: so it breaks and we call push_namespace > > >outside the for loop. So I still don't see a bug; do you have a test that > > >I got wrong? > > > > The way I read the question is "what does > > > > namespace A::inline B::C::D {...} > > > > do?". > > Thanks. This case is still handled correctly; I just checked the > push_namespace calls in gdb and just the one for B is with make_inline=true.
I think that renders Jason's concern about it moot, then. :) > > C and D are not inline. For what it's worth, I had an earlier very > > incomplete > > stab at it, haven't looked how complete it really was; I know that it didn't > > handle diagnostics as well as yours, and I have no recollection > > of whether it handles the cases like the above. See attached. > > I wasn't aware you had worked on this. Perhaps we should track the progress > of > C++20 features in Bugzilla (to keep track of who's working on what). Maybe, but in this case it's no big deal, I cooked up a barebones implementation because I happened to somewhat like the proposal, so I did a quick stab to be able to say that a prototype exists, had anyone asked.