$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-09-18 15:14:43
On Mon, September 18, 2006 12:52 pm, Rob Caldecott wrote:
> Can the pair be declared without a typedef? Is this a limitation of the
> MS
> compiler?
It is a limitation of the preprocessor. It does not recognize <> as any
sort of parentheses, so it thinks the , separating the template parameters
is a macro argument separator.
You can try wrapping the whole argument in parentheses:
BOOST_FOREACH((std::pair<int, int> p), m)
But I'm not sure if the PP passes the parentheses on - in that case, you
might get syntax errors in the generated code. If that's the case, you'll
have to use the typedef.