Template 1.7
Templates
nullary_arg
foo baz
foo baz
This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
baz
This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
madagascar madagascar madagascar madagascar.... blah blah blah......
zoom peanut zoom
exactly xanadu
wx
wxyz wxyz trail
int main()
{
std::cout << "Hello, World" << std::endl;
}
x2
α2
x2
got a banana?
.0 00
[fool]
Nested Templates
Pre
Start block template.
Start block template.
Hello!
End block template.
End block template.
Post
Pre
Start block template.
Start phrase template. Hello! End phrase template.
End block template.
Post
Pre Start phrase template.
Start block template.
Hello!
End block template.
End phrase template. Post
Pre Start phrase template. Start phrase template. Hello! End phrase template.
End phrase template. Post
Block Markup
a
b
int main() {}
Paragraphs 1
Paragraphs 2
a
b
int main() {}
Paragraphs 1
Paragraphs 2
Static Scoping
static scoping
[a]
new
foo foo
Template Arguments
{1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
{ {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
{[1-2] 3} {[1-2] 3} {[1-2}
{1-2-3} {1-2-3}
Block and phrase
templates
Some text
A <emphasis>paragraph</emphasis>.
Some *text* A paragraph.
Things
Text2 afterwards. Text3 before.
Text4 before.
Text4 afterwards.
* Not a list.
* Not a list.
Skipping the template body
correctly
Argument
code
code
Escaped templates
Not real boostbook More fake boostbook