class B { public: virtual void f() const; }; class D: public B { public: virtual void f(); };
The idea is for D::f to redefine the virtual functionB::f, but there's a mistake: inB, f is a const member function, but inD it's not declaredconst. One compiler I know says this about that:
warning: D::f() hides virtual B::f()
Hiding: only name the same, other thing different
Overload: name the same, parameter different. other thing doesn't matter
2.
The primary standard C++ library functionality consists of the STL, iostreams, and locales. The C99 standard library is also included.
TR1 adds support for smart pointers (e.g., tr1::shared_ptr), generalized function pointers (tr1::function), hash-based containers, regular expressions, and 10 other components.
TR1 itself is only a specification. To take advantage of TR1, you need an implementation. One source for implementations of TR1 components is Boost.