[phc-general] Boost now required for svn trunk
Paul Biggar
paul.biggar at gmail.com
Tue Aug 5 13:31:47 IST 2008
Hi folks,
FYI, for people using svn trunk.
As of revision 1503, we've added a requirement for Boost to be able to
compile svn trunk. There is a configure time check for the boost
libraries, which should be available on all platforms. If you're on
debian/ubuntu, Boost is packaged in libboost-dev. I hope this doesn't
disrupt anyone too much, and apologies in advance for the hassle.
One of the main advantages of the change is that it is now much easier
to iterate over lists. Instead of:
for (List<AST::Statement*>::const_iterator i = list->begin (); i !=
list->end (); i++)
{
(*i)->....
}
you can now use
#include "process_ir/General.h"
foreach (AST::Statement* s, *list)
{
s->....
}
Be aware that you can get verbose and confusing compile-time errors if
you pass a list* to foreach, instead of a list.
Until now, we used the for_lci and tfor_lci macros throughout new-ish
code. Using boost is cleaner and simpler than these macros, which
should be evident from the fact that there were 2 of them. These
macros have been removed.
Thanks,
Paul
--
Paul Biggar
paul.biggar at gmail.com
More information about the phc-general
mailing list