boost

what will happen with the overlapping portion of boost once C++0x becomes mainstream?

what will happen with the overlapping portion of boost once C++0x becomes mainstream? Will boost still contain everything it used to, or will they adapt the library to update it with the new std:: stuff? Will boost have both a normal c++ version and a c++0x version that they will maintain? ...

Boost Message Queue not based on POSIX message queue? Impossible to select(2)?!

I thought I'd use Boost.Interprocess's Message Queue in place of sockets for communication within one host. But after digging into it, it seems that this library for some reason eschews the POSIX message queue facility (which my Linux system supports), and instead is implemented on top of POSIX shared memory. The interface is similar e...

What harm can come from defining BOOST_DISABLE_ABI_HEADERS when compiling boost?

What harm can come from defining BOOST_DISABLE_ABI_HEADERS when compiling boost? From the boost file: boost_1_37_0\boost\config\user.hpp // BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any // prefix/suffix headers that normally control things like struct // packing and alignment. //#define BOOST_DISABLE_ABI_HEADERS...

C++, equivalence between pointer-to-functions and pointer-to-member-functions?

I'm used to thinking of member functions as just being a special case of normal functions, where member functions have an extra parameter at the beginning of their parameter list for the 'this' pointer, that is, the object on which the member function is supposed to act. I've used boost::function this way in the past and never encountere...

Boost Thread tutorials

Not really a question, more of a reference list: Boost.Thread was heavily modified since 1.34, to conform to upcoming C++0x standard. Thus, most tutorials I can find on the web can be considered obsolete. Today, Boost's version is 1.37, and the only links I found on the web were: Boost 1.37 Threads http://www.boost.org/doc/libs/1_37_...

Non-Linux Implementations of boost::random_device

Currently, Boost only implements the random_device class for Linux (maybe *nix) systems. Does anyone know of existing implementations for other OS-es? Ideally, these implementations would be open-source. If none exist, how should I go about implementing a non-deterministic RNG for Windows as well as Mac OS X? Do API calls exist in ei...

Using boost shared_ptr

I have to use a smart pointer and I found "shared_ptr" from boost looks good. I downloaded the boost library and I can see many files and libraries there. Is there any way to use only the shared_ptr ? ...

What's the best way of ensuring valid object lifespan when using Boost.Asio?

Hi all. Been playing a lot with Boost.Asio of late. I like the library a lot since it offers a fantastic way to squeeze performance out of today's multicore systems. A question I have asked myself a few times, and I thought worth throwing out there regards object lifespan / ownership when making async calls with Asio. The problem I'v...

Convert CYMK image to RGB using BOOST::GIL

I am trying to use the boost generic image library to convert CYMK images to RGB. The following code does not compile // read cmyk image file cmyk8_image_t img; jpeg_read_image( "1502-T2-C-PER.jpg", img ); // convert to rgb rgb8_image_t rgb( img.dimensions() ); copy_pixels( color_converted_view<rgb8_image_t>(view(img)), view(rgb)); ...

Regex Replacing &#58; to ":" etc

Hi, I've got a bunch of strings like: "Hello, here's a test colon&#58;. Here's a test semi-colon&#59;" I would like to replace that with "Hello, here's a test colon:. Here's a test semi-colon;" And so on for all printable ASCII values. At present I'm using boost::regex_search to match &#(\d+);, building up a string as I process e...

Debugging Best Practices for C++ STL/Boost with gdb

Debugging with gdb, any c++ code that uses STL/boost is still a nightmare. Anyone who has used gdb with STL knows this. For example, see sample runs of some debugging sessions in code here. I am trying to reduce the pain by collecting tips. Can you please comment on the tips I have collected below (particularly which ones you have been...

boost source code

Is there any way to get the boost libraries source code? I have browsed the SVN repository and I could see only HPP files. No source files are available there. I would like to look into the source code for "shared_ptr". Can anyone guide me? Also from where can I download BCP utility? ...

Building a subset of boost in windows

Hi! I'm trying setup a subset of boost and get it properly compiled using bjam, however I'm not getting the result I'm looking for. I'm working on windows using boost 1.37.0. Let's say I want the libraries smart_ptr and filesystem built/installed. I intentionally chose a header only library and one library needing to compile a library....

Regular Expression to match {if cond}foo{else}bar{/if}

Hi, I'm having difficulty throwing away the bits of the expression I don't want, and keeping the bits I do. The problem is - given the input string: {if cond}foo{else}bar{/if} I'd like just to have: 0: {if cond}foo{else}bar{/if} 1: cond 2: foo 3: bar And for the input string: {if cond}foo{/if} I'd like just to have: 0: {if co...

Linking issue with indirect dependencies on Mac OS X

Hi all, we have some linking problems with indirect dependencies. Guessing from what I read on the web it may be because of two-level namespace usage. This happens when we link against a boost library, boost_filesystem to be precise, which itself depends on boost_system. The linker doesn't resolve the dependency between boost_filesystem ...

Cannot execute program if using boost (C++) libraries in debug-version on WinXP

I'm using boost for several C++ projects. I recently made a upgrade (1.33.1 to 1.36, soon to 1.37), since then I cannot run any debug-builds anymore. To be sure that no other project issues remain, I've created a minimum test-project, which only includes boost.thread, and uses it to start one method. The release build can be started, ...

Building Boost BCP

I was trying to build Boost C++ Libraries for last two hours and stopped without any result. Since I am new to C++, I am unable to get the build right. How can I build it correctly using Visual Studio 2008? I need to use the BCP tool to extract a subset of library. So I need to build BCP first, right? How to do this? When I tried to bui...

boost lite?

I heard there is a light implementation of boost where its only smart pointers and a few other very basic stuff. I think i heard it doesnt use any OS functions either. I tried searching for it but found nothing. Does anyone know what it is called or an implementation of boost styled smart pointers that doesnt require OS calls? ...

make shared_ptr not use delete

in my code i would like boost::shared_ptr not to call delete but call ptr->deleteMe() instead. Also i have a few C styled functions that return a ptr. Can i make it call lib_freeXYZ(ptr); instead of trying to delete? ...

Simple option handling using Boost library (C++)

For instance, using the following syntax: -I [file] -A 1 2 3 Question: How to check if a file was specified and additionally if three (integer) values were specified. I understand the following: po::options_descriptions desc("Allowed options"); desc.add_options() How to then use the specified arguments, for instance: if (ar...