Skip to main content

Questions tagged [boost]

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".

Filter by
Sorted by
Tagged with
4 votes
1 answer
276 views

Template with boost::operators extremely verbose and repeating

I got the following ugly code: ...
hivert's user avatar
  • 291
8 votes
1 answer
2k views

Smart pointer memory pool

I'm using a third-party library which utilizes boost::shared_ptr for memory management. The problem is that I need to allocate many objects and I have detected ...
dalle's user avatar
  • 233
7 votes
1 answer
247 views

Model of Arithmetic concept for usage as Opaque typedef

I have a type that models the Arithmetic concept and use it as an opaque typedef (AKA strong typedef, see Note below) in some ...
gnzlbg's user avatar
  • 173
9 votes
2 answers
2k views

Converting data when output std container via ostream_iterator

I have a strongly typed enum and std::vector of this type. ...
Loom's user avatar
  • 555
4 votes
0 answers
191 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 ...
Christoph's user avatar
  • 507
11 votes
1 answer
1k 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 ...
Yuushi's user avatar
  • 11k
7 votes
1 answer
1k 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 ...
Oleg Vazhnev's user avatar
7 votes
1 answer
387 views

Moving method from derived class to base

I've some classes (Derived1, Derived2, etc.) derived from class Base. All of derived classes ...
Loom's user avatar
  • 555
6 votes
4 answers
6k 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 ...
marcp's user avatar
  • 251
7 votes
1 answer
1k 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. ...
P0W's user avatar
  • 171
8 votes
2 answers
23k 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 ...
hherbol's user avatar
  • 83
7 votes
1 answer
4k 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 ...
Homar's user avatar
  • 171
8 votes
2 answers
3k 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. ...
ahenderson's user avatar
27 votes
1 answer
20k views

Efficient smart pointer implementation in C++

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 smart pointers: ...
mmirzadeh's user avatar
  • 411
3 votes
1 answer
136 views

Selecting element from a collection based on bitwise-and result

I need to improve this section of code: ...
Syffys's user avatar
  • 131
2 votes
1 answer
5k views

Boost Threads - Producer Consumer threads with synchronization

Please review this for concurrency correctness: ...
Eternal Learner's user avatar
14 votes
2 answers
472 views

Handling game states for an online RPG game

I'm writing an ORPG. The code below is client-side. I have a main thread looping in Game::Run: ...
Mislav Blažević's user avatar
15 votes
4 answers
3k 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 code ...
Gabriel's user avatar
  • 505
9 votes
0 answers
267 views

Take two on type to instance map [closed]

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: ...
Komi Golov's user avatar
  • 3,229
2 votes
1 answer
900 views

Singleton Boost-based timer

I would like a review on this code, and how I could make it better. ...
Matthew Hoggan's user avatar
2 votes
2 answers
2k views

boost::thread producer consumer

I am new toboost::thread and am making a producer-consumer with a Monitor. This is how I've coded it so far: ...
Dipro Sen's user avatar
  • 121
14 votes
2 answers
3k views

Boost Python converter for std::tuple

I could not find a Boost Python converter which converts std::tuple, so I wrote one. This was tested with a g++ 4.7 snapshot on Debian squeeze. It uses C++ 11 ...
Faheem Mitha's user avatar
9 votes
3 answers
3k views

Boost CRC example program file

I'm currently looking at this Boost::CRC example code which I have also inserted below. I always try to look for suggestions for improving my own coding style when I encounter well-written and well-...
Felix Dombek's user avatar
  • 1,081
10 votes
1 answer
542 views

Emulator for representing hardware and operating systems

This is an emulator I am currently re-writing for my Operating Systems course. It is a simple emulator that is supposed to represent hardware, OS, etc. It is strictly for learning purposes and I want ...
IAE's user avatar
  • 765
11 votes
1 answer
4k views

Small C++ Boost extension based on boost::property_tree

This is a small extension based on a boost::property_tree, which supports arbitrary values for the properties and appropriate serialization. It can be used as an ...
Yippie-Kai-Yay's user avatar

1 2 3
4