[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

coding standard: typedef of a full template instantiation

Hicham Mouline

12/3/2008 5:03:00 PM

namespace com { namespace product {

template < typename T1, typename T2 > class S;

namespace subns {

typedef S<int, int> S;

}

}


Note here the type subns::S overrides the S template from the enclosing
namespace.

This compiles ok with VS and g++.


Is this use frowned upon? against coding styles out there?

regards,


1 Answer

john

12/3/2008 5:15:00 PM

0

Hicham Mouline wrote:
> namespace com { namespace product {
>
> template < typename T1, typename T2 > class S;
>
> namespace subns {
>
> typedef S<int, int> S;
>
> }
>
> }
>
>
> Note here the type subns::S overrides the S template from the enclosing
> namespace.
>
> This compiles ok with VS and g++.
>
>
> Is this use frowned upon? against coding styles out there?
>
> regards,
>
>

Since I could get confused about what S is, yeah...I'd bitch about it in
a code review.