Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 vote
0 answers
58 views

Stand/Bench for testing emergency situations for 2p2 networks in games

In fact, this is a throttling proxy. It can work in two modes: "paired" and "multi-Client". In "pair" mode, two clients connect to each other through a proxy, very ...
Alexovsky's user avatar
2 votes
1 answer
77 views

string compatible enum-like structure

So I've decided to flex showcase my "enum that accepts strings etc..." here. I don't know if it's great but I'm pretty sure it's decent. It is implemented in less than 200 lines of code (not ...
PinkTurtle's user avatar
3 votes
1 answer
464 views

C++ Readers-Writer Lock using Asio's Strands

The locking mechanism is implemented in the class RW_Lock. The saved_async_completion_handler structure is used in ...
DeltA's user avatar
  • 133
2 votes
1 answer
66 views

API Implementation guidance and improvement

I have recently made significant progress in overcoming beginner barriers related to using Git, CMake, libraries, and successfully implementing an API in C++. Despite my achievements, I acknowledge ...
user avatar
2 votes
1 answer
660 views

Tool for asynchronous IPC using pipes

Description of the code: The code provides asynchronous IPC functionality in C++ using the Boost libraries and pipes. Each process asynchronously "listens" on the read end of the pipe and ...
kasra's user avatar
  • 123
-2 votes
1 answer
519 views

How can I optimize C++ serialization? [closed]

I want to serialize a C++ class Ramdomclass . Below is the serialization function. ...
Sebastian Orteho's user avatar
0 votes
1 answer
509 views

What can I do better in my C++ serialization implementation?

I want to serialize a class Mango recursively. ...
James_sheford's user avatar
3 votes
2 answers
7k views

Printing a C++ struct

Critique? ...
user1095108's user avatar
  • 1,434
0 votes
1 answer
255 views

Parallelise numerical integration with OpenMP in C++

I would like to parallelise with OpenMP a one-dimensional integral using the integrate() function implemented in the Boost library. I found a rather obscure ...
CafféSospeso's user avatar
3 votes
0 answers
389 views

boost-asio reverse proxy

I wrote reverse proxy using boost::asio. The idea is to send client's data to two external servers and send back response from one of them. Here is my code: ...
rudolfninja's user avatar
2 votes
0 answers
1k views

A reuseable reconnecting TCP socket with Asio

I'm using (non-boost) Asio 1.18.1 and C++17. Forgive the boost tag, there wasn't a more specific one. I have a async_connect_with_retry composed asynchronous ...
MHebes's user avatar
  • 143
2 votes
3 answers
347 views

Fixed-size memory allocator

I've been trying to implement a simple Boost PMR allocator that has a fixed amount of memory. My first implementation (which can be found here) had undefined behavior and did not handle memory ...
Kory's user avatar
  • 31
2 votes
0 answers
2k views

Implement Websocket using boost::asio::beast with serialized writes

Here's a proposal implementation of websocket using boost::asio::beast that is thread-safe to parallel writes. In this example below, the ...
Zohar81's user avatar
  • 153
1 vote
1 answer
322 views

Unit Tests for the operators of image template class with Boost.Test framework in C++

This is a follow-up question for Tests for the operators of image template class in C++. As G. Sliepen's answer mentioned, I am attempting to use Boost.Test and several test cases are created with <...
JimmyHu's user avatar
  • 5,060
2 votes
1 answer
305 views

Makefile that compiles to two separate executables

I'm working on a project that will have both a server and a client, using Boost's ASIO library for networking. I'm not really comfortable working with Makefiles, but, with some help from Chase Lambert'...
Spiwocoal's user avatar
3 votes
3 answers
2k views

Connect to telnet server

I've just started to learn C++. I have this class and I don't know where to put the following two lines because of the catch: delete[] chost; delete[] cport; I ...
VansFannel's user avatar
1 vote
0 answers
71 views

A recursive_transform template function for the binary operation cases with execution policy in C++

This is a follow-up question for A recursive_transform template function for the binary operation cases in C++, A recursive_transform Template Function with Unwrap Level for Various Type Arbitrary ...
JimmyHu's user avatar
  • 5,060
0 votes
1 answer
86 views

extents_to_array and array_to_extents functions for Boost.MultiArray in C++

This is a follow-up question for A get_extents helper function for Boost.MultiArray in C++. In order to retrieve, manipulate and calculate size information in each dimension from Boost.MultiArray in ...
JimmyHu's user avatar
  • 5,060
0 votes
1 answer
40 views

Simple runtime profiler for executable files

I'm sure there are several profilers written in C++ on here already, though with this one the goals are quite different. I attempted to make it as robust as possible, or 'fool-proof' if you will so ...
Jack Avante's user avatar
2 votes
1 answer
524 views

Network library based on boost::asio

I'm currently trying to develop an easy to use TCP networking library based on boost::asio. This is my first attempt to work with ...
Cian's user avatar
  • 21
5 votes
2 answers
361 views

Nested std::deque and std::vector Type Test Cases for recursive_transform Template Function in C++

This is a follow-up question for A recursive_transform Template Function Implementation with std::invocable concept in C++, A recursive_transform Template Function ...
JimmyHu's user avatar
  • 5,060
6 votes
1 answer
184 views

A Various Container Type Arbitrary Nested Iterable Generator Function Implementation in C++

This is a follow-up question for std::array and std::vector Type Arbitrary Nested Iterable Generator Functions Implementation in C++ and std::deque and std::list Type Arbitrary Nested Iterable ...
JimmyHu's user avatar
  • 5,060
6 votes
1 answer
152 views

Non-nested std::deque and std::list Generator Function for arithmetic_mean Function Testing in C++

This is a follow-up question for A non-nested test_vectors_generator Function for arithmetic_mean Function Testing in C++ and An arithmetic_mean Function For Various Type Arbitrary Nested Iterable ...
JimmyHu's user avatar
  • 5,060
1 vote
0 answers
58 views

A non-nested test_vectors_generator Function for arithmetic_mean Function Testing in C++

This is a follow-up question for An arithmetic_mean Function For Various Type Arbitrary Nested Iterable Implementation in C++. As Toby Speight's answer mentioned, some self-checking unit tests are ...
JimmyHu's user avatar
  • 5,060
1 vote
1 answer
129 views

A get_extents helper function for Boost.MultiArray in C++

This is a follow-up question for A filled_multi_array Template Function for Boost.MultiArray in C++. Based on G. Sliepen's answer, there is another get_extents ...
JimmyHu's user avatar
  • 5,060
3 votes
1 answer
126 views

A filled_multi_array Template Function for Boost.MultiArray in C++

This is a follow-up question for A ones Function for Boost.MultiArray in C++. Thanks to G. Sliepen's answer, the mentioned method which can set various initial value is better in generic purpose usage....
JimmyHu's user avatar
  • 5,060
2 votes
1 answer
134 views

A ones Function for Boost.MultiArray in C++

This is a follow-up question for An Element-wise Increment and Decrement Operator For Boost.MultiArray in C++ and A recursive_transform Template Function for BoostMultiArray. I am trying to implement ...
JimmyHu's user avatar
  • 5,060
1 vote
1 answer
86 views

An Element-wise Increment and Decrement Operator For Boost.MultiArray in C++

This is a follow-up question for A recursive_transform Template Function for BoostMultiArray and An Add/Minus Operator For Boost.MultiArray in C++. Besides the add / minus operator for Boost....
JimmyHu's user avatar
  • 5,060
3 votes
1 answer
110 views

A recursive_transform Template Function for BoostMultiArray

This is a follow-up question for A Sine Template Function For Boost.MultiArray in C++, A recursive_transform for std::array with various return type, A recursive_transform for std::vector with various ...
JimmyHu's user avatar
  • 5,060
2 votes
1 answer
78 views

A Sine Template Function For Boost.MultiArray in C++

This is a follow-up question for An element_wise_add Function For Boost.MultiArray in C++. Besides the basic add operation applying onto each element, I am trying to implement a sine template function ...
JimmyHu's user avatar
  • 5,060
3 votes
0 answers
159 views

An element_wise_multiplication and an element_wise_division Function For Boost.MultiArray in C++

This is a follow-up question for An element_wise_add Function For Boost.MultiArray in C++ and An Add/Minus Operator For Boost.MultiArray in C++. Besides the basic element-wise add / minus operations, ...
JimmyHu's user avatar
  • 5,060
4 votes
1 answer
146 views

An Add/Minus Operator For Boost.MultiArray in C++

This is a follow-up question for An element_wise_add Function For Boost.MultiArray in C++. The following code is the improved version based on G. Sliepen's answer. On the other hand, the built-in ...
JimmyHu's user avatar
  • 5,060
3 votes
1 answer
142 views

An element_wise_add Function For Boost.MultiArray in C++

This is a follow-up question for A Summation Function For Boost.MultiArray in C++. Besides the summation operation of all elements, I am trying to focus on the element-wise operation here. The main ...
JimmyHu's user avatar
  • 5,060
5 votes
1 answer
288 views

A Summation Function For Boost.MultiArray in C++

This is a follow-up question for A Summation Function For Arbitrary Nested Vector Implementation In C++ and A Summation Function For Various Type Arbitrary Nested Iterable Implementation in C++. I am ...
JimmyHu's user avatar
  • 5,060
4 votes
1 answer
760 views

Boost.Asio Server and RAII

I am trying to implement a network server application in C++ using Boost.Asio. Here are the requirements I am trying to meet: The Application creates only one instance of ...
MarekR's user avatar
  • 141
2 votes
1 answer
2k views

Async tcp socket client: send multiple requests with one connection

I'm new to socket programming and c++. I have a the following method that sends an array to server and receives sum of the array, I tried to make it async. ...
Abraham's user avatar
  • 23
3 votes
0 answers
120 views

Yet another reflection library

Tried to do my own implementation of reflection(introspection) for using in my next projects. Is it optimized at compile time? If no, how can I improve it? This macro is good interface for adapting ...
Vladyslav Mozhvylo's user avatar
6 votes
1 answer
1k views

Using Boost.Spirit to transform expression to AST

Is there a better way to transform some expression to AST using Boost.Spirit? I have built it, but I think it's messy and can be simplified a lot. Code is also available on Godbolt. ...
Vladyslav Mozhvylo's user avatar
1 vote
1 answer
237 views

Implementing boost::upgrade_mutex using only standard locks

Is this my_upgrade_mutex class a valid implementation of boost::upgrade_mutex semantics? (Ignoring the ...
zwhconst's user avatar
  • 137
2 votes
0 answers
58 views

Using Boost's Runge-Kutta integration capability in a templated mathematical model

This is my first time using Boost and templates in general, so I'm mostly looking for a style critique on my C++. In particular, I'd like feedback on: state_type, ...
ijustlovemath's user avatar
2 votes
1 answer
5k views

C++ Sorting Filenames In A Directory

I wanted to have some advice about the code I have. I managed to get what I wanted done, but I do not think it is the "proper" way of doing it in the programmers' world. Could you help me improve ...
beluga's user avatar
  • 23
2 votes
1 answer
203 views

"Structure of arrays" wrapper

I was looking into SOA to better utilize SIMD instructions. I implemented a generic wrapper object that lets you chose the amount of individual vectors each structure consists of. I am using xsimd and ...
Yamahari's user avatar
  • 299
5 votes
2 answers
473 views

A Matrix Library in C++;

I have written a Matrix library that contains all the main properties of matrices. It's a relatively long project, I am hoping it is ok to post here since I really want to have it reviewed. The ...
HBatalha's user avatar
  • 355
1 vote
0 answers
914 views

Implementing boost::asio's async_read_some

I need to implement async_read_some from Boost Asio. The reason is here https://stackoverflow.com/questions/59223064/implementing-behaviour-of-boostasio-for-a-class but I don't think it's relevant. ...
PPP's user avatar
  • 111
4 votes
0 answers
86 views

Fibonacci and Lucas sequence generator using Boost and GMP

I implemented this console application that generates Fibonacci and Lucas sequence numbers using boost and GMP for multiprecision. There is an iterator-like class which can do any sequence based on ...
slepic's user avatar
  • 5,477
2 votes
0 answers
56 views

program options from command line initialize [v3 - after CR]

After my previous code review, I'm sharing my new code, and asking for better ways (which always exist) to improve the code, even with new libraries. The only thing that important to me, is the way of ...
Coral Kashri's user avatar
6 votes
1 answer
156 views

program options from command line initialize [v2 - after CR]

After getting a CR from @pacmaninbw and @ALX23z here, I want to share my new code, and to ask for better ways (which always exist) to improve the code, even with new libraries. The only thing that ...
Coral Kashri's user avatar
3 votes
2 answers
883 views

program options from command line initialize

I'd like to receive a CR for the following command-line program options' initializing using boost::program_options. I'd like to know if there is a better way of ...
Coral Kashri's user avatar
3 votes
1 answer
855 views

Producer consumer with threads and using boost ring buffer

I have two threads, one is the producer and other is consumer. My consumer is always late (due to some costly function call, simulated in below code using sleeps) so I have used ring buffer as I can ...
noman pouigt's user avatar
7 votes
1 answer
404 views

Parallel Ramanujan's formula for 1/π calculation

I finished my university project for calculating \$1/\pi\$ and I would love to get some feedback. Before you guys jump into this code please keep in mind newcomer to C++ just decided to use it for ...
kuskmen's user avatar
  • 413