, ++, , , , (-). , , . Temp::Temp class Temp.
, . , :: ( -) type::type, :: - , , .
, , , . .
Historically, constructors evolved from factory functions that returned an initialized object of this type. This template, in which function names may be similar to types and constructors, is just conditional, it can still be seen in some languages. The current syntax comes from something like what you can see in JavaScript. Some early C ++ compilers (thinking about THINK C, unsure of the earliest versions of Cfront) did not consider constructors as members at all.
source
share