42 lines
2.0 KiB
Markdown
42 lines
2.0 KiB
Markdown
[class.mfct.non.static]
|
||
|
||
# 11 Classes [[class]](./#class)
|
||
|
||
## 11.4 Class members [[class.mem]](class.mem#class.mfct.non.static)
|
||
|
||
### 11.4.3 Non-static member functions [class.mfct.non.static]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/classes.tex#L1121)
|
||
|
||
A non-static member function may be called for an object of
|
||
its class type, or for an object of a class derived ([[class.derived]](class.derived "11.7 Derived classes"))
|
||
from its class type, using the class member
|
||
access syntax ([[expr.ref]](expr.ref "7.6.1.5 Class member access"), [[over.match.call]](over.match.call "12.2.2.2 Function call syntax"))[.](#1.sentence-1)
|
||
|
||
A non-static
|
||
member function may also be called directly using the function call
|
||
syntax ([[expr.call]](expr.call "7.6.1.3 Function call"), [[over.match.call]](over.match.call "12.2.2.2 Function call syntax")) from within
|
||
its class or a class derived from its class, or
|
||
a member thereof, as described below[.](#1.sentence-2)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/classes.tex#L1131)
|
||
|
||
[*Note [1](#note-1)*:
|
||
|
||
An implicit object member function can be declared with[*cv-qualifier*](dcl.decl.general#nt:cv-qualifier "9.3.1 General [dcl.decl.general]")*s*, which affect the type of the this pointer ([[expr.prim.this]](expr.prim.this "7.5.3 This")),
|
||
and/or a [*ref-qualifier*](dcl.decl.general#nt:ref-qualifier "9.3.1 General [dcl.decl.general]") ([[dcl.fct]](dcl.fct "9.3.4.6 Functions"));
|
||
both affect overload resolution ([[over.match.funcs]](over.match.funcs "12.2.2 Candidate functions and argument lists"))[.](#2.sentence-1)
|
||
|
||
â *end note*]
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/classes.tex#L1143)
|
||
|
||
An implicit object member function may be declared
|
||
virtual ([[class.virtual]](class.virtual "11.7.3 Virtual functions")) or pure virtual ([[class.abstract]](class.abstract "11.7.4 Abstract classes"))[.](#3.sentence-1)
|