mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
WIP reformatting indented verb-sections in itemization items
This commit is contained in:
parent
82537ddfab
commit
767186306e
3 changed files with 9 additions and 9 deletions
|
@ -35,8 +35,8 @@ actions; say, tt(findname) and tt(videoMode).
|
|||
it() bf(C++) does not allow identically named functions to differ only in
|
||||
their return values, as it is always the programmer's choice to either use or
|
||||
ignore a function's return value. E.g., the fragment
|
||||
verb(
|
||||
printf("Hello World!\n");
|
||||
verb(
|
||||
printf("Hello World!\n");
|
||||
)
|
||||
provides no information about the return value of the function
|
||||
tt(printf). Two functions tt(printf) which only differ in their
|
||||
|
|
|
@ -20,8 +20,8 @@ objects:
|
|||
i(constructor) expects multiple arguments. In our example representing,
|
||||
respectively, the field width and the alignment.
|
||||
it() Furthermore, we define the function:
|
||||
verb(
|
||||
ostream &operator<<(ostream &ostr, Align const &align)
|
||||
verb(
|
||||
ostream &operator<<(ostream &ostr, Align const &align)
|
||||
)
|
||||
so we can insert an tt(Align) object into the ostream.
|
||||
)
|
||||
|
|
|
@ -129,11 +129,11 @@ tt(X::operator std::string const() const) then tt(cout << X()) won't
|
|||
compile. The reason for this is explained in section ref(SPECIALIZING), but a
|
||||
shortcut allowing the conversion operator to work is to define the following
|
||||
overloaded tt(operator<<) function:
|
||||
verb(
|
||||
std::ostream &operator<<(std::ostream &out, std::string const &str)
|
||||
{
|
||||
return out.write(str.data(), str.length());
|
||||
}
|
||||
verb(
|
||||
std::ostream &operator<<(std::ostream &out, std::string const &str)
|
||||
{
|
||||
return out.write(str.data(), str.length());
|
||||
}
|
||||
)
|
||||
)
|
||||
Conversion operators are also used when objects of classes defining
|
||||
|
|
Loading…
Reference in a new issue