Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-06-11 13:02:26


Workaround idea: have the friend functions call other template
functions that have both "real" versions and "dummy" versions. The
"dummy" versions would be selected when the iterators do not support
the operation.

Howard Hinnant writes:
> 14.5.3 / 5:
>
> -5- When a function is defined in a friend function declaration in a
> class template, the function is defined at each instantiation of the
> class template. The function is defined even if it is never used. The
> same restrictions on multiple declarations and definitions which apply to
> non-template function declarations and definitions also apply to these
> implicit definitions. [Note: if the function definition is ill-formed for
> a given specialization of the enclosing class template, the program is
> ill-formed even if the function is never used. ]


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