Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2001-07-20 07:12:09

> The big problem I had was the handling of default template parameters.
> Basically, I could not specify these again, so users of the forward
> library were forced to spell out all the template parameters.

You can specify them in your forward header, and not in your implementation
header. That's what I do for poolfwd.hpp:

namespace std {
  template <class Key,
            class T,
            class Compare = std::less<T>,
            class Alloc = std::allocator<T> >
  class multimap;

namespace std {
  template <class Key,
            class T,
            class Compare,
            class Alloc>
  class multimap { ... };

//some client .hpp file
#include "map_fwd.hpp"

class map_tester {
  //map pointer can use a forward declaration
  std::multimap<int, int> * mmapPtr_;


Boost list run by bdawes at, gregod at, cpdaniel at, john at