« Return to Thread: templates, macros and spaces

Re: templates, macros and spaces

by João Abecasis-2 :: Rate this Message:

Reply to Author | View in Thread

Joel de Guzman wrote:

> So, going back to John's experiment, I'd like the final qbk code
> to be:
>
>      [template alpha[] '''α''']
>      [template super[text] '''<superscript>'''[text]'''</superscript>''']
>      [template pow[a, b] [a]'''<superscript>'''[b]'''</superscript>''' ]
>
> Notice [text], [a] and [b] are bracketed. They are essentially
> templates that exist only in the duration of the template body
> (that is their scope). Notice too that alpha[] is a nullary
> template.

I'd make the nullary brackets optional. They may be needed to avoid
ambiguity with a bracketed expression at the beginning of the
definition, but in other situations they look superfluous.

Another thing we can consider is dropping the comma. I think this looks
more quickbooky:

    [template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]

Best regards,


João


_______________________________________________
Boost-docs mailing list
Boost-docs@...
Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs

 « Return to Thread: templates, macros and spaces