Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

std and tr1 namespaces for Intel C++ and C++0X

jlperla
Beginner
407 Views
I am interested in suggestions for std::tr1:: namespace alias's. I use Intel C++ 11.0 on Windows. The following are using Intel C++ within Visual Studio 2008.

1) I am currently using boost::function, etc. directly. Should I be using one with the built in compiler?

I am able to: #include
but when I look at the file, it appears to be coming out of the Visual Studio includes instead of intel? Is this expected behavior or do I have something setup wrong? What about when I compile with Intel C++ 11.0 on Linux?

2) I am using the std:c++0x when I compile and compile to keep up as C++0X features sneak in. With C++0X, are the current tr1 features expected to be in the std:: or std::tr1:: namespace (or both?)? Can I do a hack like the following temporarily until C++0X?:
namespace std {
using namespace ::std::tr1;
}

I know you aren't supposed to do this, but I would hate to force the ugly std::tr1:: throughout my code if it is dissapearing soon.
0 Kudos
1 Reply
Judith_W_Intel
Employee
407 Views

Intel does not provide itsown C and C++ librarieswith just a few exceptions for things like the
math library.When you #include a header file it will just pick up the same one you would have
gotten had you been using Microsoft on Windows or Gnu on Linux/Mac.

Most of the classes that were in technical report 1 have been accepted into the new C++0x standard.
I presume that the Gnu and Microsoft libraries at some point will put them into namespace std.

Judy
0 Kudos
Reply