Boost logo

Boost :

From: John Phillips (phillips_at_[hidden])
Date: 2004-04-30 21:16:51


Jody Hagins wrote:
> On Thu, 29 Apr 2004 17:45:52 -0400
> John Phillips <phillips_at_[hidden]> wrote:
>
>
>
>>Unimplemented C++ feature
>>big_integer.hpp line 153
>>
>>The portion in question is
>>
>> template<class T>
>> friend bool operator<(T lhs, const expression<Base>& rhs)
>> { return rhs > lhs; }
>>
>>which doesn't strike me as all that odd, but maybe I'm missing
>>something.
>> I'll try to look at it more, later and see if I can fix the
>> problem.
>
>
>
> Maybe something as simple as moving the definition...
>
>
> template<class T>
> friend bool operator<(T lhs, const expression<Base>& rhs);
>
> ...
>
> template<class T>
> bool operator<(T lhs, const expression<Base>& rhs)
> {
> return rhs > lhs;
> }

   I got a chance to fiddle with it, and this solution seems to work. CW
Pro 9.2 does not currently like friend template definitions in the
class. Even the very simple example

class Foo
   {
   public:

     template<class T>
       friend operator<(T lhs, const Foo& rhs)
         { return rhs > lhs; }
   };

triggers the "unimplemented feature" error. However, if the definition
is moved out of the class, the error goes away.

Richard, is it going to mess up anything else to move these outside the
class?

John

> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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