c++ Programming Glossary: mycontainer
Is it okay to inherit implementation from STL containers, rather than delegate? http://stackoverflow.com/questions/2034916/is-it-okay-to-inherit-implementation-from-stl-containers-rather-than-delegate to be a reoccurring pattern for me in my designs class MyContainer public std vector MyObject public Redeclare all container traits.. What about making it clear that the user should not use MyContainer via a std vector pointer non_api_header_file.h namespace detail.. std vector MyObject MyObjectBase api_header_file.h class MyContainer public detail MyObjectBase ... The boost libraries seem to do..
Using Iterators to hide internal container and achieve generic operation over a base container http://stackoverflow.com/questions/2191724/using-iterators-to-hide-internal-container-and-achieve-generic-operation-over-a both these containers and the objects stored. std vector MyContainer containers for int i 0 i containers.size i iterator i containers.. not yet figure out how to do that as well. std vector MyContainer containers for int i 0 i containers.size i BOOST_FOREACH MyObject..
Interfaces and covariance problem http://stackoverflow.com/questions/6977820/interfaces-and-covariance-problem which implements an interface template typename T class MyContainer public Container T class Something public IInterface public..
Trailing return types, decltype and const-ness http://stackoverflow.com/questions/7255379/trailing-return-types-decltype-and-const-ness a problem with this simplified code #include list class MyContainer std list int ints auto begin decltype ints.begin return ints.begin.. std c 0x flag In member function 'std list int iterator MyContainer begin const' error could not convert ' const MyContainer this.. MyContainer begin const' error could not convert ' const MyContainer this MyContainer ints.std list _Tp _Alloc begin with _Tp int..
pimpl for a templated class http://stackoverflow.com/questions/7858271/pimpl-for-a-templated-class constructor assignment destructor template class T class MyContainer T instance_ public MyContainer instance_ 0 T access if instance_.. template class T class MyContainer T instance_ public MyContainer instance_ 0 T access if instance_ 0 instance_ new T return.. type awareness in the outer layer template class T class MyContainer MyBase virtual void allocate return new T public T access return..
|