That depends on whether or not the OP needs the entries of mIndex to be processed in the order they appear in mIndex. If not, then yes, this would be even faster.
For what it's worth, the C++0x standard specifies fine-grained requirements for each of the STL container member functions rather than imposing requirements on the container as a whole. In...
I know it is only necessary to declare a method as virtual in the base class, and the overridden version in the derived class will automatically be virtual.
Really? In my experience, the compiler can still auto-generate a copy constructor, since references can be copy-constructed. It is only the assignment operator that the compiler cannot generate.
...
What are you looking to beautify? If it's C++ code, then most IDEs (e.g. eclipse, Visual Studio) have a "Format" feature that formats the code according to conventions that you can (usually)...
I never said the file descriptors were the same... The man page I quoted says that one is a copy of the other. On the other hand, they point to the same file description - the file description is not...
Nope. There is a subtle difference between file descriptors and file descriptions. A file description is data structure in the kernel which stores information about an open file such as the current...
I'm no expert, but I think this effectively means that it is safe for either the child or the parent to use the file/socket, but not both (the one that doesn't use...
Note that you can get your original version to work if you provide the enumeration name in the function declaration (SOME_PARENT::MyEnum instead of SOME_PARENT::SOME_ENUM) and you provide the...
I use Eclipse CDT with gcc. Besides both of them (eclipse and gcc) being cross-platform, Eclipse CDT has an internal parser which parses your code on the fly and applies syntax...
I don't know much about how compilers work, but would it make writing compilers much more difficult, or would it make them much slower (because they would have to do more passes) if they were...