John Maddock wrote:
Joel,
Just another data point: escaping to BoostBook from within code doesn't
work unless the escape is inside a macro:
template <class T>
struct function_traits
{
static const std::size_t arity = __below;
typedef __below result_type;
typedef __below '''arg<replaceable>N</replaceable>_type''';
};
Does *not* process the escape, whereas:
[def __argN '''arg<replaceable>N</replaceable>_type''']
template <class T>
struct function_traits
{
static const std::size_t arity = __below;
typedef __below result_type;
typedef __below __argN;
};
Does process the escape. Took me a while to figure this out :-(
Right. This should be documented. It's the same issue with
quickbook font styles not being available in the code. In
code sections, quickbook syntax ceases to exist; for a good
reason: to avoid clashing with the syntax of the target
language (C++, Python, etc). I think the best solution, so
far, is to have a target-langauge specifific means to escape
back to quickbook mode:
template <class T>
struct function_traits
{
static const std::size_t arity = __below;
typedef __below result_type;
typedef __below `'''arg<replaceable>N</replaceable>_type'''`;
};
(tick `...` used to escape back to quickbook)
Aside: I think <replaceable>Id</replaceable> is common enough
to have its own quickbook markup. Example:
[replaceable N]
Regards,
--
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests:
https://lists.sourceforge.net/lists/listinfo/boost-docs