[article Template 1.5 [quickbook 1.5] ] [/ 1.5 uses static scoping ] [template x static scoping] [template foo1[] [x]] [template foo2[x] [foo1]] [foo2 dynamic scoping] [/ This should be '[a]' because [a] isn't matched. ] [template test1[] [a]] [template test2[a] [test1]] [test2 1] [/ In 1.5 template arguments are scoped at the point they are defined] [template y new] [template foo3[a y] [a]] [foo3 [y] old] [/ From https://svn.boost.org/trac/boost/ticket/2034 ] [template same[x] [x]] [template echo[a b] [a] [b]] [template echo_twice[x] [echo [same [x]]..[same [x]]]] [echo_twice foo] [/ 1.5 template arguments] [template binary[x y] {[x]-[y]}] [binary 1..2] [/ {1-2} ] [binary 1 2] [/ {1-2} ] [binary 1..2 3 4] [/ {1-2 3 4} ] [binary 1 2..3 4] [/ {1 2-3 4} ] [binary 1 2 3..4] [/ {1 2 3-4} ] [binary 1.\.2..3] [/ {1..2-3} ] [binary 1.\.2 3] [/ {1..2-3} ] [binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ] [binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ] [binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ] [binary \[1 2\] 3] [/ {[1-2] 3} ] [binary \[1..2\] 3] [/ {[1-2] 3} ] [binary \[1 2] [/ {(1-2} ] [template ternary[x y z] {[x]-[y]-[z]}] [ternary 1..2..3] [/ {1-2-3} ] [ternary 1 2 3] [/ {1-2-3} ] [/ Block vs. phrase templates ] [template phrase[] Some *text*] [template block[] A paragraph. ] [phrase] [block] [`phrase] [`block] [/ Trailing newline shouldn't be included] [template named_index[type title] ''''''[title]'''''' ] [named_index things Things]