Boost logo

Boost :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2007-03-17 16:31:15


Steven Watanabe wrote:

> struct safe_mode {};
> struct fast_mode {};
> struct auto_unlink_mode {};
>
> template<class Tag, class Mode = safe_mode, class Pointer = void*>
> struct list_hook;
>
> template<class Tag, class Pointer>
> struct list_hook<Tag, safe_mode, Pointer>;
> template<class Tag, class Pointer>
> struct list_hook<Tag, fast_mode, Pointer>;
> template<class Tag, class Pointer>
> struct list_hook<Tag, auto_unlink_mode, Pointer>;

Nice.

> For class templates ADL looks in the namespaces associated
> with all the template arguments. The result is that an
> unqualified call to a function that has the same name as
> one in namespace std can unexpectedly call the std function.

Ok

> The strong guarantee is that if the function fails the program
> state is unchanged. A partially constructed tree doesn't meet
> this criterion.

You are right. Sorry.

Regards,

Ion


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