MS-VS12E looking for standard namespaces inside my own files

Hey this has never happened before but I imagine that I've somehow accidently disabled a library or such.
Error: namespace SB::std has not member "string"

SB is the name of one of my namespaces and this is occurring on many functions under SB::Data::<function>

Anyone have any ideas what's going on?
Here's just a little snippet of the file...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
namespace SB{
    namespace Data{
        class DLL Filed abstract{
//DLL is a macro defined as either __declspec(dllexport) or __declspec(dllimport)
//depending on whether this is open as a project or a header
        public:
            static Filed* FactoryInstance(char type, ...);
            virtual operator std::string() = 0;
            virtual bool loadFromString(std::string& data, bool edit = false) = 0;
            virtual std::string writeToString() = 0;
            virtual std::string getFormat(uint form=0);

            int varType;
            std::string format;
        };
//Other namespace stuff
    }
}


The error is from intellisense and is present on every occurrence of std::string
Last edited on
Not sure if this is a good fix, but maybe try using ::std::string and see if that removes the error.
But the error should not be there at all, this solution and many more have already been compiled and working but now they're all showing the same error, only for std::string
Did you include header <string>?
Okay I know I've made a few slip ups with macros and such but I'd hope you'd think that the include would be the first thing I'd check.

1
2
3
4
5
6
7
8
9
#include <string>
#include <vector>
#include <stdio.h>
#include <stdarg.h>
#include <Windows.h>
#include <Registry.h>    //One of my header files, tested and works fine  
                     //And yes I've added my own working libraries into the VS directories
#include <boost/thread.hpp>
#include <boost/filesystem.hpp> 
Last edited on
*Bump*
Delete the file generated by 'intellisense' (found somwhere nearby the project / VSC++ 2010: *.sdf).
it has its glitches...
You say "generated by intelligence" I'm trusting that this is recreated on the next start up of VSE12?
By the way is this in the project folders or under the installation path?
with VSC++ 2010 it's a *.sdf file with the same name as the *.sln file and in the same folder.

You say "generated by intelligence" I'm trusting that this is recreated on the next start up of VSE12?
It's recreate the next time dumbisense wakes up and looks for this file
Nope :(
The file has be regenerated and the error still stands :(

I'm also getting over a hundred errors (compile and sense) from the 2 boost libraries that are included and I don't know why because as I've said this has been perfectly fine before...
These boost errors came along with the std::string thing.
Last edited on
Still need help.
Turns out that it's everything under the global namespace that isn't a primitive type. The reason that the boost library is getting thousands of errors is because it can't find ::<type> and/or ::std::<type>
Last edited on
Almost sounds like you've inadvertently modified a header file to not close a namespace.
But this is carried throughout all library types included as standard with the compiler... Also all the associated files are protected as read-only so neither the compiler, or any other program can edit them without exclusive administrator permission (which VSE does not have)
But this is carried throughout all library types included as standard with the compiler... Also all the associated files are protected as read-only so neither the compiler,


Suppose that in <Registry.h> you didn't close a namespace. The boost headers you include after it will appear to be defined in that namespace (leading to the errors you describe.) What's more, if those headers include other headers, those will also appear to be defined within the unclosed namespace.
I bow down to you good sir, thou art my savior.
I commented something out at the bottom of the Registry library and it appears I also commented out the closing namespace bracket.

Thanks so much!
Topic archived. No new replies allowed.