BOOST WIKI | RecentChanges | Preferences | Page List | Links List

Please edit this page and ask a question or put a frequently asked Boost question and answer on this page.

Q I am thinking of adding Boost to an open source project. What do I need to do to make it easy for the users of my project to smoothly compile it?

A. First check which Boost libraries you are using -- most Boost libraries are header only, so no compilation would be required in that case. If a library is needed you might want to provide an integrated makefile that includes the Boost libraries you use. Otherwise just point them to the Boost.Build instructions. One other note. Boost is now distributed on major Linux distros and there is apparently a Windows installer on the horizon. So you could just point the user to these options. -- Jeff Garland

Q Is there an easy way to cast a std::vector< boost::smartptr< Derived > > to std::vector< boost::smartptr< Base > >? I've currently been wrapping my vectors in loops and downcasting using boost::shared_dynamic_cast, but I'm assuming there must be a cleaner way to implement this.

A. I would guess that the exactly method would vary depending on exactly how you're using the vector. Two ideas so far: a for_each loop with bind/lambda (same as you're doing now); iterator adaptor that casts on access.

Q How should I interpret the Boost Graph Library license? As I read it, it doesn't even look like I'm allowed to use it. Since I am looking for a graph library for use in a (semi) commercial project, this is quite important.

A. There should not be a problem. Based on the 1_25_0 license it looks like: ''You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution ''

So I take it to mean you can't charge for the graph library, but you can charge for your product. I put this on the mailing list as well.

People/Jeff Garland

Q. The size of Boost is overwhelming, how do get started learning the Boost libraries?

A. One of the best ways is to start by using a library for a specific project need. On the other hand, if you want to just begin getting familiar, it might make sense to start with the libraries with the most applicability. I would suggest:

People/Jeff Garland

A. Below is a prototype of a "Boost Library Navigator". The diagram provides a high level view of the boost libraries loosly based on a discussion (see message 17572) on the boost mailing list. If you put your cursor over the packages in the top row modern browsers will bring up a list of libraries in the categorization.

thread regular expressions, tokenizer, lexical_cast python smart pointers, pool, utility integer, random, rational, math/octonion, etc graph, iterator_adpators, operators call traits, concept checks, static assert, type traits bind, compose, functional, function array, graph, property_map lexical_cast, numeric_cast, safe polymorphic downcast array, graph, property_map

Let me know what people think. -- People/Jeff Garland

Q In the tokenizer library: If you use the default char_delimiters_separator on a string which contains adjacent separators (eg "x::y:z" with a char_delimiters_separator(":") ), which behavior does the tokenizer have:

Whichever behavior it has, how can you switch it to the other behavior?

A. char_delimiters_separator does not return null tokens. If you need to null tokens, use escaped_list_separator. - John R. Bandela

Q Are we supposed to ask questions here? Or is for the cream of the crop from somewhere else

A. I was assuming people would ask questions here and then folks could answer them -- I added a comment to the top of the page. Eventually I would expect we would refactor some items (like the question below :-) into triva versus FAQ. -- Jeff

Q How is tuple pronounced? toopul or tuhpul

A. I've heard both pronunciations in actual use. My preference (and the one I've heard more often) is toopul.

Trying to find definitive answers:

I guess I would say both are allowed.

People/JimHyslop : Interesting - I say "tuhpul" and "doopul"

Jonathan Turkanis: Interesting - I say "boost::tuhpul" but "std::tr1::toopul"

Is there a consensus?



I checked m-w and I think they say ooh is primary and uhh is alternate. Which I think is correct. -- Rodrigo de Salvo Braz
Q. How do I build boost?

A. You may not have to. Most boost libraries are entirely in header files, so simply include the relevant header files.

Some libraries do need to be built: thread, filesystem, program_options, ... (complete list?) Using an IDE like Visual Studio the simplest way to use one of these libraries is to add the .cpp files to a new project (e.g. boost_thread) and put that project in your solution.

Boost also provides command line tools for building libraries using JAM. This process is described at the official Boost Getting Started page. -- Stephen W. Carson

Q. When building boost with Boost jam what are the possible options for -with-* and -without-*?




Boost FAQ -- http://www.boost.org/more/faq.htm

[buy lipitor online] [buy lipitor] [[buy lipitor online]]

[buy fioricet online] [buy fioricet] [[buy fioricet online]]

BOOST WIKI | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited August 24, 2008 2:20 pm (diff)
Disclaimer: This site not officially maintained by Boost Developers