|
Boost : |
From: Tom Honermann (tom.honermann_at_[hidden])
Date: 2006-04-07 21:55:48
Presumably, identity<T>::type would be a typedef which would also be
invalid:
Section 7.1.5.3 paragraph 2 of Standard C++:
3.4.4 describes how name lookup proceeds for the /identifier/ in an
/elaborated-type-specifier/. ... If the /identifier/ resolves to a
*/typedef-name/* or a *template /type-parameter/*, the
/elaborated-type-specifier/ is ill-formed. [/Note/: this implies
that, within a class template with a template /type-parameter/ T,
the declaration
friend class T;
is ill-formed. ]
Tom.
Felipe Magno de Almeida wrote:
>On 4/7/06, Anthony Williams <anthony_w.geo_at_[hidden]> wrote:
>
>
>>Vladislav Lazarenko <snail_at_[hidden]> writes:
>>
>>
>
>[snipped]
>
>
>
>>Unfortunately the declaration "friend typename T", is not legal. It might
>>happen to work on current releases of Microsoft compilers, but that's a bug in
>>the compiler.
>>
>>
>
>Is
>
>friend typename identity<T>::type;
>
>also illegal?
>
>
>
>>Anthony
>>--
>>Anthony Williams
>>Software Developer
>>Just Software Solutions Ltd
>>http://www.justsoftwaresolutions.co.uk
>>
>>
>
>--
>Felipe Magno de Almeida
>_______________________________________________
>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