Why can I not read the word 'conjunction' without getting the conjunction-junction song stuck in my head? :(
How many times is the ctor called?
Which constructor? The default constructor (which you have explicitly defined), the copy constructor, or both? Add the below to your struct to see copy constructor calls. Note: because of compiler optimizations, you may see far less than you expect.
The above compiles for me...what error are you getting? (warnings about _cpy being unreferenced aren't important...you can just omit the name '_cpy' if you care).
Simple classes have 4 things automatically defined by the compiler: a default constructor, a copy constructor, an assignment operator, and a destructor. So yes, it is assumed to have a copy constructor. Note there are various cases where some of these are NOT generated by the compiler, but that's another topic. Also, C++11 adds a couple other compiler-generated methods, but again another topic ;)
Have you read it anywhere in particular that there are two types of ctor?If so, please tell me to report an error in the question.
The original question didn't have the struct definition
If your professor wants to know the number of constructors, and you are given both main and f():
There is one default constructor, when x is defined. There may be up to 3 copy constructors for the first call to f(), along with one more potentially when f() returns, whose return value is then used in the 2nd call to f(). In this second call, there may be up to 3 copy constructors called as well. However, if a move constructor is defined for the struct in question, because the passed in parameter is an rvalue, there will be at most 1 move constructor and 2 copy constructors called, along with potentially 1 more moving the return value from the 2nd f() to a temporary, and 1 last move constructor (or copy, if move not defined) when constructing y. However, due to RVO, many of these copies may be elided, including all copies to temporaries outside of functions, and even the copies to the parameter of f(), resulting in only 2 copies being required for each call to f() (for a total of 4), plus one for the eventual construction of y.
By "Normal Constructor" Framework (probably) means that you can have constructors for any types you want as arguments with the same freedom as with functions.