Re: partial specialization
- From: "Victor Bazarov" <v.Abazarov@xxxxxxxxxxxx>
- Date: Thu, 3 Apr 2008 15:48:19 -0400
Jack Hanebach wrote:
Victor Bazarov wrote:
template<>
struct A<double, int>
{
void foo() {}
};
and
template<>
void A<double, int>::foo() {}
(other than syntax, of course)?
The former is specialisation, the latter is a definition.
The former is specialization of A _and_ a definition of A::foo,
specializezed for double and int, the later is a definition of A::foo
specialized for double and int (and implicit specialization of A),
yes. Yet the effect of both is exactly the same...
No, it's not. It depends on the contents of struct A<T,U> definition,
which is _changed_ in the former case to a new definition and _used_
(with all relevant parts) to instantiate A<double,int> in the latter
case.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
.
- Follow-Ups:
- Re: partial specialization
- From: Jack Hanebach
- Re: partial specialization
- References:
- partial specialization
- From: Jack Hanebach
- Re: partial specialization
- From: Igor Tandetnik
- Re: partial specialization
- From: Jack Hanebach
- Re: partial specialization
- From: Victor Bazarov
- Re: partial specialization
- From: Jack Hanebach
- Re: partial specialization
- From: Victor Bazarov
- Re: partial specialization
- From: Jack Hanebach
- partial specialization
- Prev by Date: Re: partial specialization
- Next by Date: Re: partial specialization
- Previous by thread: Re: partial specialization
- Next by thread: Re: partial specialization
- Index(es):
Relevant Pages
|