boost

Boost warnings with VC++ 9

When the Boost library/headers is used with VC++ 9 compilers (Visual C++ 2008 Express Edition or Visual Studio 2008), a lot of benign warnings are generated. They are of 2 kinds: Warning about the Wp64 setting. Warning about the compiler version. How can I turn off these warnings? ...

C++ std::tr2 for VS2005

Is Boost the only way for VS2005 users experience TR2? Also is there a idiot proof way of downloading only the TR2 related packages? I was looking at the boost installer provided by BoostPro Consulting. If I select the options for all the threading options with all the packages for MSVC8 it requires 1.1GB. While I am not short of space,...

Task oriented thread pooling

I've created a model for executing worker tasks in a server application using a thread pool associated with an IO completion port such as shown in the posts below: http://weblogs.asp.net/kennykerr/archive/2008/01/03/parallel-programming-with-c-part-4-i-o-completion-ports.aspx http://blogs.msdn.com/larryosterman/archive/2004/03/29/10132...

Super Robust as chrome c++ and portable - tips - help - comments.

Hi everyone, We are producing a portable code (win+macOs) and we are looking at how to make the code more rubust as it crashes every so often... (overflows or bad initializations usually) :-( I was reading that Google Chrome uses a process for every tab so if something goes wrong then the program does not crash compleatelly, only that ...

What is std::pair?

What is std::pair for, why would I use it, and what benefits does boost::compressed_pair bring? ...

How do you install Boost on MacOS?

How do you install Boost on MacOS? Right now I can't find bjam for the Mac. update: Thanks for the MacPorts answer, and special thanks to hasseg's comment for the link http://www.macports.org/ I'm still new to my Mac, but with ports it seems like we'll get going along much better. ...

Strange call stack, could it be problem in asio's usage of openssl?

I have this strange call stack and I am stumped to understand why. It seems to me that asio calls open ssl's read and then gets a negative return value (-37) . Asio seems to then try to use it inside the memcpy function. The function that causes this call stack is used hunderds of thousands of times without this error. It happens ...

Understanding C++ boost library the easy way

I have been using C++ boost library for about 2 years now. However, I haven't found any good documentation that gives an overview of how its various components have been implemented and the involved basic principles for implementation. I am aware of the following resources, that cover bits and parts of boost. 1) Boost documentation - ...

Boost shared_ptr container question

Let's say I have a container (std::vector) of pointers used by a multi-threaded application. When adding new pointers to the container, the code is protected using a critical section (boost::mutex). All well and good. The code should be able to return one of these pointers to a thread for processing, but another separate thread could ...

How can I wrap BOOST in a separate namespace?

I'm looking to have two versions of BOOST compiled into a project at the same time. Ideally they should be usable along these lines: boost_1_36_0::boost::shared_ptr<SomeClass> someClass = new SomeClass(); boost_1_35_0::boost::regex expression("[0-9]", boost_1_35_0::boost::regex_constants::basic); ...

Generic cache of objects

Hi, Does anyone know any implementation of a templated cache of objects? You use a key to find object (the same as in std::map<>) You specify a maximum number of objects that can be in the cache at the same time There are facilities to create an object not found in the cache There are facilities to know when an object is discarded fr...

What are the advantages of using the C++ Boost libraries?

So, I've been reading through and it appears that the Boost libraries get used a lot in practice (not at my shop, though). Why is this? and what makes it so wonderful? ...

Is it reasonable to have Boost as a dependency for a C++ open source project?

Boost is meant to be the standard non-standard C++ library that every C++ user can use. Is it reasonable to assume it's available for an open source C++ project, or is it a large dependency too far? ...

Getting a boost::shared_ptr for this

I am making extensive use of boost:shared_ptr in my code. In fact, most of the objects that are allocated on the heap are held by a shared_ptr. Unfortunately this means that I can't pass this into any function that takes a shared_ptr. Consider this code: void bar(boost::shared_ptr<Foo> pFoo) { ... } void Foo::someFunction() { b...

Including Relevant Boost Libraries with C++ Source (Using Visual Studio)

I have a project I'm working on (for school) that I'm digging into the Boost libraries for the solutions. I need some way to distribute the required Boost source code with my application so that it can be compiled without the libraries being installed on the system doing the compiling. (School computers lack just about anything you can m...

Boost Library

Since I have started using this site, I keep hearing about the Boost library. I am wondering what are some of the major benefits of the Boost library (hence why should I use it) and how portable is the Boost library? ...

Boost: Fire and forget asynchronous function call?

I would like invoke a function call in a one shot manner. What's the best way to do this in Boost / C++? I would like to pass it two parameters and do not need a result. ...

Using .reset() to free a boost::shared_ptr with sole ownership

I'm storing an object (TTF_Font) in a shared_ptr that is provided to me from a third-party API. I cannot use new or delete on the object, so the shared_ptr is also provided a "freeing" functor. // Functor struct CloseFont { void operator()(TTF_Font* font) const { if(font != NULL) { TTF_CloseFont(font); ...

How do I improve compiling speed in Visual Studio C++ 2003 project that is using C++ Boost Libraries

I have just started using Boost 1.36. These libraries would be very useful in reducing the amount of code needed in the unmanaged C++ software project that I am working on. However when I tried to used these libraries my compile times increased ten fold. This would pretty much offset the productivity gains I would receive by using the l...

Using boost in embedded system with memory limitation

Hi, We are using c++ to develop an application that runs in Windows CE 4 on an embedded system. One of our constraint is that all the memory used by the application shall be allocated during startup only. We wrote a lot of containers and algorithms that are using only preallocated memory instead of allocating new one. Do you think it...