Question: In Professional C++ (2e page 689) it says:

> 
> Only for constructors and the destructor you should use `X` and not
>  `X<T>`.
> 
> 
> 

So:

```
template<typename T>
class X{
    X();                                  // X
    ~X();                                 // X
    X<T>& operator=(const X<T>& rhs);     // X<T>
};

```

Why should you not use `X<T>` for constructor and destructor declarations?

Answer: 
**The quote is, quite simply, *wrong*.**

`X<T>` is the actual name of the type:

> 
> `[C++11: 14.2/6]:` A *simple-template-id* that names a class template specialization is a *class-name* (Clause 9).
> 
> 
> 

…and you can use it everywhere:

```
template<typename T>
class X
{
public:
    X<T>() {}
    ~X<T>() {}
    X<T>& operator=(const X<T>& rhs) {}
};

int main()
{
    X<int> x;
}

```

([live demo](http://coliru.stacked-crooked.com/a/245cb9ad647016b7))

You may optionally use `X` as a "shorthand", whereby the template argument will be automatically appended for you (kinda):

> 
> `[C++11: 14.6.1/1]:` **Like normal (non-template) classes, class templates have an *injected-class-name* (Clause 9). The *injected-class-name* can be used as a *template-name* or a *type-name*.** When it is used with a *template-argument-list*, as a *template-argument* for a template *template-parameter*, or as the final identiﬁer in the *elaborated-type-specifier* of a friend class template declaration, it refers to the class template itself. **Otherwise, it is equivalent to the *template-name* followed by the *template-parameters* of the class template enclosed in `<>`.**
> 
> 
> 

…but it's certainly not *required* anywhere.

**It sounds like the author is trying to enforce a *style guide*, but has made it insufficiently clear that it is entirely up to you.**
Here there is no relevance to X , it is just a class name.

Since constructors and destructors share the same name as the class and there is no return type for both, there is no need to specify it.