Difference between "const <class_name>&" and "<class_name> const&"

I am reading about the implicit copy constructor of cpp in case there is no an explicit one declared.

*From cppreference:
http://en.cppreference.com/w/cpp/language/copy_constructor

I read that the typical declaration of a copy constructor is the following:
class_name ( const class_name & )

*However in the answer of this post:
https://stackoverflow.com/questions/1810163/c-implicit-copy-constructor-for-a-class-that-contains-other-objects

I find the signature of the implicit copy constructor is like this:
X::X(X const& )
where X is the name of the class


1.- What is the effect of the placement of const in the different signatures? What is constant in each case?
2.- What is the correct prototype for the implicit copy constructor?
Thanks.
Last edited on
1. Nothing. Same, the X.
2. Both.

See
http://carlowood.github.io/cpp/const.qualifier.html
Last edited on
Topic archived. No new replies allowed.