boost

C++ Process Management

Is there a well known, portable, good library for c++ process management? I found a promising library called Boost.Process (http://www.netbsd.org/~jmmv/process/) but it's only a candidate for inclusion in the Boost library. Has anyone use this? Does anyone know why it isn't a part of Boost? Thanks! ...

How to link against boost.system with cmake

...

Using Boost::asio in Winx64: I'm stuck, need to figure out how to build libboost_system_xxxx.lib for x64

Unlike this question: http://stackoverflow.com/questions/704294/linker-error-while-building-application-using-boost-asio-in-visual-studio-c-200 I need an x64 build of the lib files... I'm not even sure how to get started. I'm reading here: http://www.boost.org/doc/libs/1_39_0/more/getting_started/windows.html Or, more generally, how ...

Should boost::filesystem::exists really throw an exception for removable media device with no media?

I've run into a bit of an odd circumstance while using boost::filesystem::exists. If you attempt to check for the existance of a file on a drive that isn't ready or has no media in it, it throws a basic_filesystem_error. As far as I'm concerned for most all uses of bfs::exists, if a drive isn't ready it means the file doesn't exist. I...

How do I avoid compiler warnings when converting enum values to integer ones?

I created a class CMyClass whose CTor takes a UCHAR as argument. That argument can have the values of various enums (all guaranteed to fit into a UCHAR). I need to convert these values to UCHAR because of a library function demanding its parameter as that type. I have to create a lot of those message objects and to save typing effort I ...

is there a functor that derefences a (smart) pointer, upcasts it, and then calls a method on it?

I have class A: public B { ...} vector<A*> v; I want to do for_each(v.begin(), v.end(), mem_fun_deref(B::blah())); (Actually I have: vector<unique_ptr<A>> but it shouldn't matter) I need to upcast and call the member function. ...

Building Boost without filename decorations?

The default naming convention for the Boost C++ libraries is: libboost_regex-vc71-mt-d-1_34.lib where all libraries are built into the same directory. I'd like to modify the build process so that the filename does not contain the target architecture or build type (versions are okay). I want the file to end up in a different directory d...

Differences between different flavours of shared_ptr

Are there any differences between boost::shared_ptr, std::tr1::shared_ptr and the upcoming (in C++0x) std::shared_ptr? Will porting from one to another have any overhead or are they basically the same? ...

std::vector visualizer doesn't work properly on std::vector<boost::variant>

The visual studio std::vector visualizer in the VS2008 autoexp.dat file doesn't seem to work if I have a std::vector<boost::variant<...>>. It does work on other types of vectors I have tried (e.g std::vector<int>, std::vector<boost::shared_ptr<..>>) Here is the visualizer code: std::vector<*>{ children ( #array ( expr : ($e._Myfir...

Eclipse CDT: How to reference 3rd party includes via a Relative path

I'm new to Eclipse-CDT, setting up a new project for the first time. I'm trying to reference Boost without hardcoding an absolute path. I've put boost in my workspace folder, e.g. /home/user/workspace/boost_1_39_0 I was then hoping to add an include directory pointing to that folder relative to the workspace, but Eclipse won't do that,...

Difference between BOOST_CHECK_CLOSE and BOOST_CHECK_CLOSE_FRACTION?

Can anyone describe the difference in behavior between BOOST_CHECK_CLOSE and BOOST_CHECK_CLOSE_FRACTION? The documentation implies the that both macros treat their third parameter identically, which makes me suspect the documentation is wrong. In particular, BOOST_CHECK_CLOSE_FRACTION gives me some odd looking results: error in "...":...

Using Boost::ref correctly..?

How can I get this to compile? The error is when I start using boost::ref(). I thought boost::ref is used to pass reference to C++ algorithm classes? list<Object> lst; lst.push_back(Object(1,2.0f)); lst.push_back(Object(3,4.3f)); struct between_1_and_10 { int d; void operator() (Object& value) { value.a +=...

Install and build Boost library in Linux

I'm just following Boost Getting Started article. I've installed with Bjam and I could see include files and library files(.a, .so). #include <boost/regex.hpp> #include <iostream> #include <string> int main() { std::string line; boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" ); } If I build above code using this command... g...

Using boost on the iPhone

After alot of hacking i have managed to compile the boost-libraries for iphone, both device and simulator, but when i try to use them i get an error in the xcode debugger saying: dyld: Library not loaded: libboost_graph.so.1.40.0 which im guessing is a dynamic library loader which isn't allowed on the iphone. i'm linking the app with -...

Boost::regex issue, Matching an HTML span element

Dears, I don't get it. I created this regular expression: <span class="copy[Green|Red].*>[\s]*(.*)[\s]*<\/span> to match certain parts of HTML code (a part between spans). For instance the following: <span class="copyGreen">0.12</span> <span class="copyRed"> 0.12 </span> Now, this works beautifully with RegexBuddy and others, ...

installing c++ boost on mac osx leopard -- port fails

I'm not much of a c++ programmer, just an end-user trying to install an existing project from source. One of the project dependencies is the boost library. When I tried to install boost on my osx 10.5.7 using "sudo port install boost", I got the following error message: ---> Building boost with target all Error: Target org.macports.bui...

CSV parser in C++

All I need is a good CSV file parser for C++. At this point it can really just be a comma-delimited parser (ie don't worry about escaping new lines and commas). The main need is a line-by-line parser that will return a vector for the next line each time the method is called. I found this article which looks quite promising: http://www...

where can I find a good boost reference?

I'd like to have a good up-to-date reference for boost by my side, and the only books I found are the following: Beyond the C++ Standard Library: An Introduction to Boost The C++ Standard Library Extensions: A Tutorial and Reference Both books are somewhat dated, and I am sure boost has been evolving. Obviously I can just use a d...

Namespace loop or code leak in boost::function ?

I'm really baffled by this. Have I managed to do something to cause this, or is it an unclosed namespace block in boost, or some bug in VS c++ 2008? I'm definitely sure I've closed all my own namespaces properly, all includes are outside of and above them, and all my header files got include guards. The boost/function.hpp is only incl...

Transfer a boost::ptr_list from a library to a client

I dynamically load a library in C++ like described here. My abstract base class looks like this: #include <boost/ptr_container/ptr_list.hpp> class Base { public: virtual void get_list(boost::ptr_list<AnotherObject>& list) const = 0; }; And my library now provides a derived class Derived class Derived : public Base { ... }; void...