A person who, or thing that, constructs.
constructor
Definitions, parts of speech, synonyms, and sentence examples for constructor.
Editorial note
A copy constructor that cannot be elided is a broken copy constructor.
Quick take
A person who, or thing that, constructs.
Meaning at a glance
The clearest senses and uses of constructor gathered in one view.
(object-oriented programming) A class method that creates and initializes each instance of an object.
(crosswording) A person who creates crossword puzzles.
Definitions
Core meanings and parts of speech for constructor.
noun
A person who, or thing that, constructs.
noun
(object-oriented programming) A class method that creates and initializes each instance of an object.
noun
(crosswording) A person who creates crossword puzzles.
noun
(automotive) A company which, or individual who, builds racing vehicles. In Formula One, constructor status is strictly defined by the rules, but in other motorsports the term is merely a descriptor. Depending on the racing rules, some constructors (e.g. Cosworth) may provide vehicles to racing teams who are not themselves constructors, while others are both teams and constructors (Ducati Corse, Scuderia Ferrari).
Example sentences
A copy constructor that cannot be elided is a broken copy constructor.
That's why you see 'constructor, destructor' before 'move constructor'.
The reason for the weakness is that there is no guidance for how one is to go about testing whether some constructor actively violates a physical law.
You could just as easily have stored more procedures in the object returned by the constructor.
You should definitely favour a noexcept move constructor that results in an unspecified state over a implementing a throwing move.
On the other hand, you're absolutely right that this constructor is too clever by half.
It wraps a real world concern around a type (it has a type constructor).
Constructors may need to allocate a sentinel, I see no reason for the move constructor to do so.
If your type doesn't have a copy constructor then you can't accidentally call it.
Your calls to big_object_ptr.reset(...) will cause the BigObject copy constructor to be called.
If you use the aliasing constructor, it's even more confusing.
Presumably this is why his final output consisted of constructor.
Quote examples
You might wonder, "well why don't functors have a generic constructor", and (among other answers to that) the reason is that it doesn't serve any purpose in the functor laws.
The "constructor" function calls malloc() to create an instance of the class, sets its member variables from its parameters and returns a pointer to it.
Oh, I don't think "constructor theory" answers any interesting questions.
Frequently asked questions
Short answers drawn from the clearest meanings and examples for this word.
How do you use constructor in a sentence?
A copy constructor that cannot be elided is a broken copy constructor.
What does constructor mean?
A person who, or thing that, constructs.
What part of speech is constructor?
constructor is commonly used as noun.