Boost logo

Boost :

From: Gennadiy E. Rozental (rogeeff_at_[hidden])
Date: 2001-11-05 11:31:55


It compiles with MSVC6

Did you try to use typedefs?

like this:

typedef foo<int> fooint;

Gennadiy.

--- In boost_at_y..., Bill Seymour <bill-at-the-office_at_p...> wrote:
> I've discovered one reason why I'm having trouble
> compiling the fixed-point decimal library with
> MSVC v5. In a nutshell:
>
> template<typename T> struct foo { };
>
> template<typename U>
> struct bar
> {
> bar(const foo<int>&);
> bar(const foo<double>&);
> };
>
> On the line with the second ctor, the compiler tells me
> that bar(const foo&) is already declared (so it's not
> recognizing foo<int> and foo<double> as distinct types).
> If I make bar a non-template class by just commenting
> out the template<typename U> line, it works OK.
>
> Is this a problem with MSVC v6, too? If so, is there
> a workaround?
>
> Thanks,
>
> --Bill Seymour


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk