overloading/byte now used

This commit is contained in:
Frank B. Brokken 2023-08-06 12:27:55 -07:00
parent 108c753182
commit 7121355d8e
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ lsect(ConversionOperators)(Conversion operators)
includefile(overloading/conversion)
lsect(BYTE)(An alternative implementation of the `byte' type)
includefile(inheritance/byte)
includefile(overloading/byte)
lsect(EXPLICIT)(The keyword `explicit')
includefile(overloading/explicit.yo)

View file

@ -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
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
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
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
references to these objects whenever possible to avoid calling the composed
object's copy constructor.