Boost is a large collection of high-quality libraries intended for use in C++. Boost is free, and is often considered a "second standard library".

learn more… | top users | synonyms

4
votes
1answer
43 views

Template with boost::operators extremely verbose and repeating

I got the following ugly code: ...
3
votes
1answer
61 views

Converting data when output std container via ostream_iterator

I have a strongly typed enum and std::vector of this type. ...
4
votes
0answers
55 views

Reading Intervals from command line

I want to parse a command line using boost.program_options. Most of my command line arguments will be intervals, which I could implement as something like ...
11
votes
1answer
207 views

Partitioned Multikey Map

Below is the code for what I've called a partitioned_multitype_map. This has two major facets: Allowing a lookup based on keys of multiple lengths and of multiple ...
3
votes
0answers
62 views

Boost multi-index based orderbook

As suggested here, I'm using Boost multi-index to implement orderbook. So far my code looks like this: "CommonsNative.h" contains typedef int64_t myDecimal; and ...
7
votes
1answer
117 views

Moving method from derived class to base

I've some classes (Derived1, Derived2, etc.) derived from class Base. All of derived classes ...
5
votes
4answers
308 views

Converting std::string to int without Boost

I'm trying to convert an std::string to an int with a default value if the conversion fails. C's ...
3
votes
0answers
189 views

Signal simulation through Python scripts using shared memory for testing a C application

This is bit long, but I need to explain something before I can ask for actual reviews/advice. I have to test generated C code from Matlab Simulink model. I can create a executable binary from those. ...
6
votes
2answers
990 views

Multithreading C++ loop

I've made a small skeleton for a larger project that will include cross-platform multithreading (by using Boost) and thread-safe random numbers (by using GNU scientific libraries and mutexes). My ...
2
votes
0answers
362 views

Event system using callback functions in C++

I am learning C++ and have been trying to create an event system for use in a small game. This will be the mechanism by which game entities communicate. I would be eternally grateful if someone with ...
5
votes
1answer
234 views

Generic pipe and filters

I made a template pipe and filters to replace an old pipe and filters implementation that used inheritance and had a very heavy base class. ...
4
votes
1answer
1k views

efficient smart pointer implementation in C++

So the idea behind this is mainly educational but I might even consider using it in reality if turns out to be good. Here's my first try at implementing ...
3
votes
1answer
78 views

Selecting element from a collection based on bitwise-and result

I need to improve this section of code: ...
2
votes
1answer
2k views

Boost Threads - Producer Consumer threads with synchronization - Review

I have below code for multi threaded consumer and single producer. Kindly review it ro concurrency correctness. ...
7
votes
2answers
183 views

Is this the right way to handle game states?

I'm writing an ORPG. The code below is client side. I have main thread looping in Game::Run: ...
10
votes
3answers
643 views

Force locking for thread-safety

After reading Herb Sutter's Associate Mutexes with Data to Prevent Races, I found that my solution was superior in several aspects, least important first: The code is cleaner, without macros No ...
4
votes
0answers
89 views

Take two on type to instance map

I realised that what I was doing wasn't particularly smart, so I switched to a different approach. This costs more dynamic allocations but has a much simpler implementation: ...
2
votes
1answer
162 views

C++ Singleton Boost Based Timer (For Review)

I would like a review on this code, and how I could make it better. ...
2
votes
2answers
617 views

boost::thread producer consumer

I am new toboost::thread I am making a producer consumer with a Monitor. This is how I've coded it so far. ...
2
votes
0answers
504 views

Boost Python converter for std::tuple

I could not find a Boost Python converter which converts std::tuple, so I wrote one. Here it is. This was tested with a g++ 4.7 snapshot on Debian squeeze. It uses C++ 11 features, specifically ...