tags:

views:

6966

answers:

55

After spending most of my waking time on Stack Overflow, for better or for worse, I've come to notice how 99% of the C++ questions are answered with "use boost::wealreadysolvedyourproblem", but there must definitely be a few areas Boost doesn't cover, but would be better if it did.

So what features is Boost missing?

I'll start by saying:

  • boost::sql (although SOCI should try to become a legal part of boost)
  • boost::json (although TinyJSON should try to become a legal part of boost)
  • boost::audio (no idea about a good boost-like C++ library)


PS: The purpose is to compile a reasonable list, and hopefully Boost-like solutions out there that aren't yet a part of Boost, so no silly stuff like boost::turkey please.

+43  A: 

boost::gui would be a nice addition.

yesraaj
I'm pretty sure, that something like John Torjo's eGUI will become boost::gui someday. Of course, there might be other candidates as well. :)
Paulius Maruška
I doubt boost will include platform-specific libraries any time soon, Paulius.
gnud
Well actually a good GUI library would separate input, control and rendering. So input and rendering are platform dependent plug-ins, fairly easy to implement, and the controlling and event handling is generic. Many professional game-oriented libraries do exactly this, so it could be done IMHO.
Robert Gould
I have serious doubts that an useful GUI library will ever get into Boost (or C++). After all, C++ is known for its portability, and I can't imagine a GUI which scales from let's say Mac OS X down to a game boy.
Anteru
Luc Hermitte
Adam and Eve do seem very promissing considering Adobe has already contributed libraries to boost before. Kind of exciting actually!
Robert Gould
Don't think GUI code will, or should, go into Boost. In writing GUI's _everybody_ wants to do something unique or special at least in one point in time. Also a consistent and extensible interface handling all of the different GUI's would be far larger than the current Boost library.
Daemin
boostGL and associated widget libraries, well, why not. An alternative would be something like WTL, but ported to other platforms.
gbjbaanb
I really think a light weight platform independent GUI toolkit would be great. Not as a replacement for the larger GUI toolkits but as an easy way of getting some images and buttons on the screen. I've done this with glut some times now, and a c++-lib with some widgets would be a much better.
Laserallan
I really don't want a boost::gui. It's either going to need to be the size and complexity of Qt+WPF+OpenGL to do everything - or it's going to be so Tcl/TK primitive as to be useless.Or most likely it will be incredibly adaptable and theme-able to do everything but so insanely complex no one can use it.
Martin Beckett
I think that's completely beyond the scope of boost. Boost shouldn't be everything, just work with everything.
peterchen
+6  A: 

Fixed size strings.

grepsedawk
What do you mean? An immutable string system?
Robert Gould
I think he means strings with a fixed-sized buffer. The strings could be any size up to the buffer limit.
Ferruccio
so, not like a stl::string that's had reserve() called on it, but a c-string wrapper? I can see use in the latter.
gbjbaanb
I interpret this request like I prefer: strings with a program specified maximum size - so something like string s; cin >> s; can not fill all your virtual memory and bandwidth.
jdkoftinoff
+77  A: 

Well, I don't keep my expectations high, but boost::callstack would be nice (or maybe it should be boost::debug::callstack). I mean, on most platforms (compilers) the callstack info could be easily retrieved - it would be nice to have one api, that would work on all platforms.

Paulius Maruška
+50  A: 

boost::stl, seriously, something along the lines of the EASTL. A fast, efficient STL implementation which gets rid of the legacy problems. There has been some discussion at the Boost mailing list about new IOStreams, which would be byte oriented (and not character oriented!), things like that should really be done.

Besides that, it would be nice if a XML library like TinyXML would get into Boost. And give me a good string library which works by default with UTF-8 strings.

Finally, concurrency stuff in spirit of the TBB. We already see GCC implementing parallel_for (parallel mode), Microsoft is coming next -- obviously, this is something that should get standardized.

Anteru
for UTF-8 i like IBM's ICU library, although it could be more modern C++ like (http://www.icu-project.org/)
Robert Gould
Yeah, I know about it -- I'd have no problem if it would be included in Boost. The point is, Boost (and C++ itself) seriously lacks a modern string library.
Anteru
boost has delibrately not provided functionality that duplicates the STL. It has only added stuff that extends the STL.
Martin York
They have new style iterators, so why not new style containers?
Anteru
Agreed, they also have intrusive containers, so there is no reason they couldn't have EASTL like containers for high performance
Robert Gould
+1 for Intel TBB.
Marcus Lindblom
Oh, thank God! I'm glad to hear I'm not the only one who abhors the "character" oriented streams of C++. I've been wanting to write a better streams implementation for a while - something that understands what "byte" is and what a "character"/"text" is, and why they aren't the same. If I ever do, perhaps I should submit to boost...
Thanatos
+35  A: 

boost::concurency, like mentioned above, may contain lock free data structures, atomic operations, different usermode synchronization objects(spin locks) and so on.

Lazin
You should check out Intel's TBB (http://www.threadingbuildingblocks.org/) It's boost-like C++ and its platform independant
Robert Gould
Good advice, but i alredy use it. Many other boost parts(like boost signals) can be implemented thread safe or even lock free if such library will be the part of boost library.
Lazin
that would be sweet actually.
Robert Gould
boost::signals2 is in fact thread safe
grepsedawk
@Vicente: Just a heads-up: if you don't put the link in angle brackets, it will get hyperlinked correctly, e.g., http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#ConcurrentProgramming
James McNellis
See (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#ConcurrentProgramming) for a list of concurrent programming
Vicente Botet Escriba
+33  A: 

Is there a boost::xml? If not then TinyXML should be adopted. :)

Rob
or TinyXML++ (TICPP, http://code.google.com/p/ticpp/)
Kasprzol
Yes, TICPP would be ideal.
Rob
I think there is a boost::xml in the sandbox.
Ferruccio
There is a boost::xml in the sandbox and it's very good. We use TinyXML++ (which is decent) here but boost::xml was preferred; it was just too likely to change.
MattyT
The syntax for boost::xml is horrible
Martin Beckett
See (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.XML)
Vicente Botet Escriba
boost::serialization can export/import xml.
topright
+22  A: 

Cross-Platform, high performance timing. The microsecond timer doesn't work on windows (it will not throw errors, but is highly discontinuous).

teeks99
Timing has always been weird and tricky to execute. Though now if you lock the timer thread to one processor and use the QueryPerformance functions it works well.
Daemin
See Boost.Chrono (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Chrono)
Vicente Botet Escriba
+23  A: 

I'd like to see more high-level language interfaces like the existing boost::python.

boost::ruby maybe?

Ferruccio
I like that idea
Robert Gould
Actually, if that's even possible, I'd prefer boost::scripting as a common interface, and then specific implementations: boost::scripting::python, boost::scripting::ruby, boost::scripting::lua, boost::scripting::angel_script and so on.
Paulius Maruška
That would be an interesting idea, sort of (I don't know if it was Steve Yegge who said it) like a means for different languages to share libraries / communicate with. Though I think I'm taking the scope of this a little far.
Daemin
You might be interested in this project: http://rice.rubyforge.org/(Ruby Interface for C++ Extensions)It is very similar to boost.python.
grepsedawk
boost::langbinding (http://www.boostpro.com/writing/oopsla04.html) was proposed back in '04 but needs funding. It could be used to (re-)implement specific language bindings like Python, Lua, Perl, etc. Yum!
Bklyn
Use Robin for Python/C++ coupling.
Avihu Turzion
@Paulius et al: That is *such* a good idea!
Kaz Dragon
+8  A: 

boost::os to query and interact with the machines enviroment, settings and performance info in a standardized C++ fashion. And it would probably provide other c-posix capabilities missing from C++.

Also boost::url would be nice (probably a cUrl wrapper)

Robert Gould
You should split the boost::url into another answer. That way it is easier to see which suggestions are more popular.
Paulius Maruška
+56  A: 

a boost::archive to directly manipulate .zip, .tar, .rar, etc. files would be useful.

Ferruccio
I think that would be great...however there's lots of patent issues with that and there are already libraries that do a lot of it too.
teeks99
Its not exactly what you ask for, but currently the iostreams library can gunzip files.
haggai_e
Upvote 1 000 000 000 times!
topright
+22  A: 

How about a good arbitrary precision float (or int) data type. Sometimes you want to carry around a number with super high precision (like calculating pi).

teeks99
And how about a fixed point decimal to go with that?
Bklyn
My fixed point class (http://www.codef00.com/projects/Fixed.h) was submitted for consideration in boost by someone, but nothing came of it :(. I guess there aren't enough of us that want it.
Evan Teran
@Evan: very nice
Bklyn
+12  A: 

A thread pool.

teeks99
boost::threadpool does actually exist :)http://threadpool.sourceforge.net/index.html
Robert Gould
But its not an official part of boost.
Bklyn
It isn't? Its right there inside Boost, so it seems official enough to me, but I might be wrong.
Robert Gould
Where? I see none under http://www.boost.org/doc/libs/1_37_0/doc/html/thread.htmlhttp://threadpool.sourceforge.net/ is not part of boost proper.
Bklyn
boost thread group?
Mykola Golubyev
why not wait until c++0x: http://en.wikipedia.org/wiki/C%2B%2B0x#Threading_facilities
s1n
AFAIK that threadpool is not official boost, worse still when I tried it a few months ago it suffered from a number of deadlock problems.
Adam Bowen
Boost asio essentially gives you threadpool.
Joseph Garvin
See (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Task)
Vicente Botet Escriba
+86  A: 

A boost::log library is my vote. For logging messages, not logarithms, silly.

Bklyn
That is uncanny. Now that you've mentioned it its utterly absurd that there is no boost::log!
Robert Gould
There was (is?) a proposed one. It's not made it through yet though. Not sure how likely it is to make it into the mainline Boost library, but you can go look it up if you like. A problem with logging is that everyone wants to do it differently!
John Zwinck
There were multiple proposals, and I agree that its a bit of a bikeshed.
Bklyn
+1 for the Exclamation Point factor. Every "real" project I've worked on spouts logs--always using ad hoc code for the project. "Everyone" uses logging, it should definitely be there.
chaosTechnician
See the already accepted Boost.Log (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Log)
Vicente Botet Escriba
+12  A: 

Boost RPC.

Something that connects the boost network/IPC-functionality with the serialization features to make it possible to call functions on processes remotely in some fancy type safe way.

It should preferably be cross platform (no endian problems), floating point compatible, and string encoding agnostic.

Laserallan
Actually this is a VERY big task .. i think this would require the existence of lots of currently not existing boost libraries aswell...
smerlin
See Boost.RPC (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.RPC)
Vicente Botet Escriba
+3  A: 

boost::artificial_intelligence

Amit Kumar
I'm not so sure that AI is a good candidate for a general purpose library. Yes, there are many general AI techniques, but they must be well tailored to fit your problem.
Scottie T
boost::state_machine and boost::graph exist, thats applicable to AI. a boost::genetic_algorithm and boost::ann, could be nice
Robert Gould
@Scottie Modern C++ has an advantage of configurability, which can be exploited well for AI. Some general purpose libraries I can think of are: constraint programming, propositional logic, resolution, uncertainty models and so on. The application domains would be gaming, and systems.
Amit Kumar
Something tells me this poster was kidding.
Kevin
@kevin Not quite. Indeed java folks are working on Mahout machine learning library. Would be exciting if C++ AI algorithms are used, for example in gaming.
Amit Kumar
-1 this could not be a library
Vicente Botet Escriba
@Vicente Agree that AI is too big to be a single library (and that makes me partially agree to Kevin's comment above; I posted this more than one year back). However I still believe there are good reasons for general purpose libraries such as the ones I have listed in my earlier comments within this answer.
Amit Kumar
+18  A: 

boost::atomic

Larry Gritz
yeah this would help
Robert Gould
Or at least a wrapper and documentation for the existing implementations! boost::smart_ptr and boost::thread have their own atomic implementations in their respective details. The (not accepted yet) boost::lockfree library has another implementation. :o
sstock
atomic is improved a lot in the new C++ standard so this might be redundant
Martin Beckett
See Boost.Atomic (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Atomic)
Vicente Botet Escriba
+9  A: 

A checksum/hashing library. The CRC-library is nice, but md5 or sha would be useful as well.

Laserallan
Or even a crypto library - something like Keyczar
Martin Beckett
+6  A: 

How about Boost::MQ. A message queue to augment Boost::ASIO

hackworks
Yeah a fine tuned and reliable MessageQueue would be nice, can't count the times I've had to implement one myself
Robert Gould
what's wrong with http://www.boost.org/doc/libs/1_40_0/doc/html/boost/interprocess/message_queue.html ?
Isak Savo
That is based on shared memory and works only between processes on a single machine. For distributed programming, I would like to have something based on TCPIP (or something that can use FC like infiniband)
hackworks
I don't think Unix MQueue can be used in distributed programming.
Vicente Botet Escriba
+3  A: 

Boost::time

I hate the cstdlib time.h, simply because it makes me hack out how long my program is taking.

Hooked
boost::date_time exists! http://www.boost.org/doc/libs/1_39_0/doc/html/date_time.html
teeks99
fml, thank you.
Hooked
See Boost.Chrono (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Chrono)
Vicente Botet Escriba
+7  A: 

boost::coroutines

Why not have a call tree or even a call graph instead of a dull call stack?

Eduardo León
There is some work being done on that: http://www.crystalclearsoftware.com/soc/coroutine/
Ferruccio
See (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#ConcurrentProgramming) for a list of concurrent programming, and in particular the proposed Boost Fiber (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Fiber)
Vicente Botet Escriba
+12  A: 

From what I can tell boost stays away from specific standards. Whereas you might expect that it could have a DOM library, it might not be specific to XML or JSON.

Anything touching hardware would be right out. Anything touching specific standards is out. Anything platform specific is out (unless it can clearly be made to be non-specific). Anything requiring other libraries is out.

You dont find boost gzip or boost png, because again too specific. Nor audio or GUI stuff because they touch hardware/platform/other libs.

Basically anything that could be a moving target is out.

Good candidates for boost libs would be very generic concepts that can be improved until there is no reason to modify it again except to fix bugs.

Catskul
This needs more upvotes. Boost shouldn't be the "library of everything". That would drag in far, far too many dependencies and problems, and bloat the library too much.
Thomas
See (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.XML)
Vicente Botet Escriba
A: 

boost::reflection, boost::eval, boost::emit, and boost::compile.

cdiggins
I really don't think those are feasible with the C++ programming model. Boost type_traits give you some compile-time reflection capabilities and the rest would require a full-blown C++ compiler at run-time. By the time you were done, you would have reinvented Java/C#.
Ferruccio
See (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#ReflectiveProgramming) for a list of libraries related to reflection
Vicente Botet Escriba
+12  A: 

boost::encoding would be nice. A library to be able to convert between different character encodings.

navigator
Boost.Unicode: Aims at providing the foundation tools to accurately represent and deal with natural text in C++ in a portable and robust manner, so as to allow internationalized applications, by implementing parts of the Unicode Standard. (see (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Unicode2))
Vicente Botet Escriba
This is already included as part of C++03. It's provided by the std::codecvt facet of the locale library.
Billy ONeal
Take a look on Boost.Locale it is a part of it
Artyom
+3  A: 

I'd like to see something like the SafeInt library in boost.

It can catch integer overflow and casting problems at runtime.

Alexandre Jasmin
See (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.SafeInt>)
Vicente Botet Escriba
+5  A: 

I would definitely be interested in a Boost.Sql library.

However, I think to really be interesting, one should up the bar (in term of interface) from the SOCI interface you mentioned.

Here is the kind of thing I'd like to write:

DEFINE_TABLE(
  myTable,
  ((id, Int, NotNull))
  ((name, VarChar2<56>, NotNull))
  ((firstName, VarChar2<64>, Null)),
  (PrimaryKey)(id)(name)
);

And then:

auto aQuery = Select(myTable.id, myTable.name).From(myTable).Where(myTable.firstName != Null);

auto aCursor = Cursor(aQuery);

std::list< std::pair<int,std::string> > aList;
while(aCursor.fetch())
{
  aList.insert(std::make_pair(aCursor.get(myTable.id), aCursor.get(myTable.name)));
}

I am definitely waiting for the auto keyword of course, since this implies a high degree of template meta-programming, but I do love DSELs and compile-time checking of the validity of a sql request with "natural" syntax would be a huge boon!

Matthieu M.
Mmm, that's quite an interesting API. Never seen something like it except for the boost::assign libraries of Thorsten Ottosen. not sure it can be implemented exactly as you propose, but is a nice source of inspiration. I'll try to design my next library (of what I have no idea) to look something like that, just for the fun of it.
Robert Gould
Well, actually I already have quite a similar thing working, so I doubt it would be a challenge for a Boost coder :) The only problem is that without `auto` it's difficult because of the types generated :/
Matthieu M.
See (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Database) for a list of related libraries
Vicente Botet Escriba
Thanks `@Vicente`, I just had a look at Boost.rdb and its interface is very promising. I have only read about sql query formatting, don't know if it does much more, and it doesn't look like it uses parameterized sql when the parameters are known at compile time (which is a shame I think), but it's a really good piece of work imho :)
Matthieu M.
+5  A: 

Boost.Unicode. Unicode is such a core component in many technologies desired above/below*: XML, GUIs, etc. Its existence would provide a much needed stepping stone.

*delete as appropriate.

Kaz Dragon
Look for Boost.Locale
Artyom
Boost.Unicode: Aims at providing the foundation tools to accurately represent and deal with natural text in C++ in a portable and robust manner, so as to allow internationalized applications, by implementing parts of the Unicode Standard. (see (http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Unicode2))
Vicente Botet Escriba
@Artyom and Vicente: it's not me particularly that needs this library. What I see is that Boost most needs this library in order to enable development in further areas that keep cropping up. But thanks for pointing out these particulars should I ever need them.
Kaz Dragon
+2  A: 

Regarding boost::sql proposal, there is some work in progress:

  • On BoostCon'09 Jeff Garland led workshop: Library in Week 2009 to discuss the std::rdb propsals, here are materials std::rdb (.tgz package)
  • std_rdb - Boost sister mailing list to discuss standard rdb proposal(s)
  • SOCI has been discussed in frame of the std::rdb mailing list and the workshop
mloskot
+5  A: 

I hope you will find this link Libraries Under Construction useful.

Please let me know if you want I add some wish libraries to it by adding a comment to this answer, or posting on the Boost ML.

Vicente Botet Escriba
Hmmmm, Firefox doesn't want me to use that link. AFAICT, Boost uses a self-signed certificate for https, and Firefox is getting even nastier about those. Do they get kickbacks from certificate authorities or something?
David Thornley
+4  A: 

boost::cryptography, including a wide set of security related algorithms, similar to Crypto++. As I often write networked applications that need different kinds of security on application level, I would love this feature to be present in boost. There are some libs around (I mostly use crpyto++) but having it clearly licensed in the boost library would be very helpful.

KillianDS
See Boost.Crypto (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Crypto)
Vicente Botet Escriba
+2  A: 

A logic programming library including unification and backtracking.

Vicente Botet Escriba
A: 

ObjectRole a library that helps to implement the Object Role pattern.

Vicente Botet Escriba
+1  A: 

The scoped_guard as included on the detail directory of Boost.MultiIndex

Vicente Botet Escriba
A: 

Boost.Persistent able to manage with objects stored on a persistent storage

Vicente Botet Escriba
A: 

Arrays indexed by enums

Vicente Botet Escriba
A: 

EnumSet similar to bitset but with enum indexes.

Vicente Botet Escriba
A: 

Boost.Quartet Quartet are half an octet, i.e. 4 bits taking values from 0..15, and usually represented by chars '0'-'9' 'A'-'F'. There are some container specializations as std::string, std::vector and boost::array that could be of interest to some applications. They are also used when a decimal number is encoded using the BCD format (binary coded decimal) or to encode telephone numbers.

Vicente Botet Escriba
+1  A: 

Boost.Singleton

Vicente Botet Escriba
A: 

Boost.BloomFilters

Vicente Botet Escriba
A: 

Boost.Dataflow

Vicente Botet Escriba
+1  A: 

Unique identifier : Use to create unique identifiers for example in database tables, network messages session identifiers, transactions identifiers.

Vicente Botet Escriba
@Vicente, you may be interested in the Tokenmap proposal for inclusion into Boost: http://svn.boost.org/svn/boost/sandbox/tokenmap/libs/tokenmap/doc/html/index.html . It's not a solution for generating *persistent* unique identifiers (that may be saved in databases), but for things like session, network, and transaction IDs, it would work really well.
Daniel Trebbien
@Daniel Thanks, I'll take a look and add it to the Boost Libraries Under construction (I missed it :()
Vicente Botet Escriba
A: 

Monotonic allocators.

Vicente Botet Escriba
A: 

Formatted container output: Simple and uniform display mechanism for arbitrary ordered lists

Vicente Botet Escriba
A: 

Boost.Tree: divers tree implementations and hierarchical iteration

Vicente Botet Escriba
+2  A: 

boost::persistent_collections ⇒ A Persistent Collections Library.

missingfaktor
+9  A: 

I would like much some boost::gpu to abstract call to layers like cuda or openCL with nice syntaxic sugar. I can't believe software vendors are actually providing their own compilers (nvcc for cuda) for that purpose.

kriss
+2  A: 

config files support with reading and writing

I used boost:program_options to read config files and there is some unkept promises. My point is that boost::po supports a kind of unification between command line option and config files parsers, but for config files what is available fall short : only one supported format similar to old windows ini files.

But my biggest regret is definitely that boost::po has not the slighlest hint of a write support for config files.

kriss
Try boost::property_tree.
Jonathan Sternberg
A: 

How about Boost::Network for items like SMTP, FTP, HTTP protocol handlers etc.

gbjbaanb
+2  A: 

boost::unique_ptr. The one in Boost.Interprocess needs to put into Boost.SmartPtr so that anyone may use it (without having to depend on Interprocess).

Emile Cormier
+1  A: 

regarding boost::sql there is Wt dbo although it is more like hibernate

lurscher
A: 
  1. WS-I (SOAP based web services) support.
  2. How about image/ voice processing?
rursw1
+4  A: 

boost::extensions for adding scripting support to your application. You'd have boost::extensions::scheme, boost::extensions::python, boost::extensions::ruby and boost::extensions::lua etc.

Kind of like guile.

Joe D
A: 

boost::magic_button

You simply add a magic button to your program, and it does everything.

topright
I didn't expect that button to downvote my answer!
topright
A: 

I second that a thread pool would be nice.

tuscland
+1  A: 

boost::video : sort of like directshow/vmr

plan9assembler