help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Matching of template <> in C++ mode


From: lutorm
Subject: Matching of template <> in C++ mode
Date: 19 Feb 2007 16:46:06 -0800
User-agent: G2/1.0

Hi,
I'm wondering if it's possible to extend the emacs paren matching
functionality to the less-than/greater-than that's used in template
expressions in C++? With recent developments in C++ it's easy to get
messages like:

test.o: In function `w77run(double, double, double, double, double,
double, int, double, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, bool, bool)':
/home/patrik/sunrise.realpoly/src/test.cc:184: undefined reference to
`bool
mcrx::shoot<mcrx::xfer<mcrx::dust_model<mcrx::scatterer<mcrx::polychromatic_scatterer_policy,
mcrx::local_random>, mcrx::cumulative_sampling, mcrx::local_random>,
mcrx::adaptive_grid<mcrx::absorber<blitz::Array<double, 1> >,
mcrx::dynamic_grid<mcrx::absorber<blitz::Array<double, 1> >,
mcrx::octogrid<mcrx::absorber<blitz::Array<double, 1> > > > >,
mcrx::local_random>, mcrx::scatter_shooter<mcrx::polychromatic_biaser>
>(mcrx::xfer<mcrx::dust_model<mcrx::scatterer<mcrx::polychromatic_scatterer_policy,
mcrx::local_random>, mcrx::cumulative_sampling, mcrx::local_random>,
mcrx::adaptive_grid<mcrx::absorber<blitz::Array<double, 1> >,
mcrx::dynamic_grid<mcrx::absorber<blitz::Array<double, 1> >,
mcrx::octogrid<mcrx::absorber<blitz::Array<double, 1> > > > >,
mcrx::local_random>&,
mcrx::scatter_shooter<mcrx::polychromatic_biaser>, mcrx::terminator
const&, std::vector<ranlib::MersenneTwister::mt_state,
std::allocator<ranlib::MersenneTwister::mt_state> >&, long, long&,
int, int, std::basic_string<char, std::char_traits<char>,
std::allocator<char> >)'

which would be infinitely more easy to parse if the matching pairs of
angle brackets were highlighted...

I browsed around the sources and couldn't find where the list of which
characters are considered "parenthesis" characters is stored. (Of
course it's a little more complicated since ideally it shoudn't think
that << are 2 nested parentheses. However, since neither << or
unmatched < as conditionals are allowed within template declarations,
it would just give an annoying "unmatched paren" message in these
cases. It would still be useful.)

Regards,

/Patrik J.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]