From the C++ standard working draft:
Default constructors ([class.default.ctor]), copy constructors, move constructors ([class.copy.ctor]), copy assignment operators, move assignment operators ([class.copy.assign]), and prospective destructors ([class.dtor]) are special member functions.
(https://eel.is/c++draft/special)
Given the following code:
struct S {
S(int, float, double);
};
In my understanding, the constructor of S is not a special member function, since it is neither a default constructor, copy constructor, nor move constructor.
I would like to know whether the standard still considers such as constructor a member function (or something "unique").
I read the parts of the C++ working draft about member functions, special member functions, and constructors, but didn't find anything reasonable answering this question. I also looked on StackOverflow, but most answers state that all constructors are considered special member functions, which seems to contradict the standard.
tldr;
A constructor is declared using a function-declarator and so it is a function and hence a member function.
Language-lawyered Explanation
class.mem states:
Now we move onto class.mem#general-3 to see what is a member function:
Now we need to show that a ctor is a function so we move onto class.ctor.general#1:
The important thing to note is that a ctor is declared using a declarator which is a function declarator. Now to see that the ctor's function declarator declares a function we move onto dcl.spec.auto.general:
Now since the ctor's function declarator form doesn't include a trailing return type, the ctor's function declarator declares a function as per the above reference.
Hence proved, the ctor
S::S(int, float, double) is a function and so a member function.Additional support
There is additional support for the statement that a constructor is a function in dcl.constexpr:
This also indicates that a constructor is a function.
Layman Explanation
Yes, because the constructor
S::S(int, float, double)is declared inside the member-specification of the classSso the declaration is by definition a member function declaration.Basically, declarations inside the member-specification of the class are member declarations. If the declaration is of a
So yes,
S::S(int, float, double)is a member function.