views:

455

answers:

2

I have some C++ code, and for some reason, for a couple of classes, they show up as boost::boost::boost::boost::boost::classname in the Visual Studio browser.

The classes themselves are not in the boost namespace.

There's no problem compiling the code. I've output the preprocessed version of the .cpp file, and I can't see anything funky. I've tried deleting and rebuilding the Intellisense database, no go.

I've tried putting a ';' on a line by itself after the #include , even though I know namespaces don't require that. No go.

Anyone else ever seen this, or know how to fix it?

A: 

I suspect you are seeing the ruminants of the mangled name given to the template variable by the compiler.

The C++ compiler mangles the variable name to include information about the template arguments so these names can become quite complex.

jussij
I doubt that. I don't think the `:` character is allowed (or ever used) in a name. Did you read the article you linked?
Chris Lutz
Based on what little information there is to go on from the original question, my guess still is that this is some sort of name mangling issue. But hey, I could be wrong ;)
jussij
Nah, it's not name mangling. This is in intellisense, not the linker. And over in the Class View, that class will be under the boost namespace. Nested however many levels deep, all it their own boost namespaces. It's like the intellisense parser thinks there's an unclosed namespace, but there obviously isn't (since things compile correctly).
Eric H.
+1  A: 

I installed boost 1.40 instead of 1.39, and the problem went away.

Eric H.