Boost logo

Boost Users :

From: Kevin Wheatley (yg-boost-users_at_[hidden])
Date: 2003-07-11 04:44:47


Kevin Wheatley wrote:
> I'm trying to hide both the implementation of the body class and that
> of the template type, something like that below but my compiler is
> complaining about partial specialization in the declaration of the
> implementation class in handle.cpp

So a few hours of sleep and the BFO is apparent... my problem was
'solvable' by moving the nested template class outside of the handle
class scope:

//handle.h
#ifndef handle_h
#define handle_h

template <typename U> class handleimpl;

template <typename T>
class handle
{
  public:
    handle();
    ~handle();
    void callsomefunctionviaimpl();
  private:
    handleimpl<T> *impl;
};
#endif

Although it still leaves me with the problem of templated handle/body
requiring the code to the impl to work, I guess in my case I shall
move the member T into the handle as it's essentially static const
data anyway.

Kevin

-- 
| Kevin Wheatley                   | These are the opinions of |
| Senior Do-er of Technical Things | nobody and are not shared |
| Cinesite (Europe) Ltd            | by my employers           |

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net