unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Matching of template <> in C++ mode
@ 2007-02-20  0:46 lutorm
  2007-02-20 13:04 ` rgb
  0 siblings, 1 reply; 3+ messages in thread
From: lutorm @ 2007-02-20  0:46 UTC (permalink / raw)
  To: help-gnu-emacs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-20 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-20  0:46 Matching of template <> in C++ mode lutorm
2007-02-20 13:04 ` rgb
2007-02-20 19:57   ` lutorm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).