As per the document, which says that the constructor, deconstructor and asignment operator of std::array
are implicitly declared. How to understand that?
I fully understand default declared functions(say, default constructor and etc), user provided functions.
What’re implicitly declared functions?
As per the tutorial, which says:
The popular type std::array (17.1 — Introduction to std::array) is also an aggregate.
The cpprefrence clearly states class types which belong to aggregate should have no user-provided, inherited, or explicit constructors. Therefore, it seems that implicitly declared constructor meets the aforementioned requirement.
6
What’re implicitly declared functions?
These are functions that fall under the category of defaulted functions and implementations shall provide implicit definitions for them. This can be seen from dcl.fct.default#5:
Explicitly-defaulted functions and implicitly-declared functions are collectively called defaulted functions, and the implementation shall provide implicit definitions for them ([class.ctor], [class.dtor], [class.copy.ctor], [class.copy.assign]) as described below, including possibly defining them as deleted.
From special:
An implicitly-declared special member function is declared at the closing } of the class-specifier.
Programs shall not define implicitly-declared special member functions.