[cfe-dev] Two style questions

Chris Lattner clattner at apple.com
Sat Nov 10 20:56:52 CST 2007

On Nov 10, 2007, at 12:19 PM, James Widman wrote:

> On Nov 10, 2007, at 2:42 PM, Cédric Venet wrote:
>> I know you don't want to create dependency on boost [...]
> Is there really an aversion to all things Boost here?


There is only an aversion to:

1) importing all of boost into the repo
2) requiring users to get boost before building the project.

I have no problem with sucking in code from boost where useful.  To  
me, the biggest problem with boost is that it has a lot of hacks and  
build machinery to make it work on multiple compilers.  This machinery  
has caused problems for llvm in the past (when we tried to import a  
subset of boost into the llvm project).

However, I have no problem sucking in pieces of boost that are not  
hugely compiler-specific and just incorporating it directly into the  
llvm namespace or leaving it in the boost namespace.  The license of  
boost is designed exactly for this, and we have done it with several  
small helper classes in the past.

> Some things are often obviously better done with it.  For example,
> see the boost operator header:
> http://www.boost.org/libs/utility/operators.htm
> It's pretty tame as boost headers go:  It's short and it doesn't
> depend on the MPL (or anything as mind-bending).  And if you're going
> to write an operator function, it seems like you should at least
> explain to yourself why you think your approach is better.

Sure, if it's just a header, and it was useful, I would have no  
problem with just importing the header.


More information about the cfe-dev mailing list