mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
overloading/byte now used
This commit is contained in:
parent
108c753182
commit
7121355d8e
2 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ lsect(ConversionOperators)(Conversion operators)
|
||||||
includefile(overloading/conversion)
|
includefile(overloading/conversion)
|
||||||
|
|
||||||
lsect(BYTE)(An alternative implementation of the `byte' type)
|
lsect(BYTE)(An alternative implementation of the `byte' type)
|
||||||
includefile(inheritance/byte)
|
includefile(overloading/byte)
|
||||||
|
|
||||||
lsect(EXPLICIT)(The keyword `explicit')
|
lsect(EXPLICIT)(The keyword `explicit')
|
||||||
includefile(overloading/explicit.yo)
|
includefile(overloading/explicit.yo)
|
||||||
|
|
|
@ -159,10 +159,10 @@ operator. Defining a conversion operator as an em(lvalue) (e.g., defining an
|
||||||
tt(operator int &()) conversion operator) opens up a back door, and the
|
tt(operator int &()) conversion operator) opens up a back door, and the
|
||||||
operator can only be used as em(lvalue) when explicitly called (as in:
|
operator can only be used as em(lvalue) when explicitly called (as in:
|
||||||
tt(x.operator int&() = 5)). Don't normally use it, although there are
|
tt(x.operator int&() = 5)). Don't normally use it, although there are
|
||||||
exceptions to this rule (cf. section ref(Byte)).
|
exceptions to this rule (cf. section ref(BYTE)).
|
||||||
it() Conversion operators are normally defined as tt(const) member
|
it() Conversion operators are normally defined as tt(const) member
|
||||||
functions as they normally don't modify their object's data members (but
|
functions as they normally don't modify their object's data members (but
|
||||||
again: see section ref(Byte)).
|
again: see section ref(BYTE)).
|
||||||
it() Conversion operators returning composed objects should return const
|
it() Conversion operators returning composed objects should return const
|
||||||
references to these objects whenever possible to avoid calling the composed
|
references to these objects whenever possible to avoid calling the composed
|
||||||
object's copy constructor.
|
object's copy constructor.
|
||||||
|
|
Loading…
Reference in a new issue