Skip to main content
Filter by
Sorted by
Tagged with
Advice
1 vote
5 replies
57 views

When converting a differential equation (DQ) to a system of first-order DQs, if the term in the original DQ with the highest derivative has a variable coefficient, dividing by that coefficient may ...
GregReese's user avatar
1 vote
0 answers
88 views

Suppose we are waiting for incoming data on a socket using the call socket::async_wait(socket::wait_read, callback). After the callback notifies us that data is available, is it possible to read the ...
Joe J's user avatar
  • 1,391
2 votes
1 answer
143 views

As is well known, in Boost we can use a rate limit to restrict the read and write speed of a TCP stream, as indicated in the documentation: https://www.boost.org/doc/libs/latest/libs/beast/doc/html/...
Joe J's user avatar
  • 1,391
0 votes
2 answers
209 views

I've been going through Boost's unordered_flat_map implementation. Here's an overview: https://www.boost.org/doc/libs/latest/libs/unordered/doc/html/unordered/structures.html#...
freakish's user avatar
  • 57k
1 vote
1 answer
96 views

Boost version 1.74 Docker version 28.2.2 A toy program works when invoked from its build directory: $ cd build $ ./test 27610c1a6b49a0f459fc9e39a374f2e5b9b5e3175b0e926af4c7359c6bd7f93f but when ...
Zsar's user avatar
  • 523
1 vote
0 answers
122 views

According to the boost::asio documentation, for each io_context one or more additional threads can be created that will be used for host resolution. One or more additional threads per io_context to ...
Joe J's user avatar
  • 1,391
1 vote
1 answer
161 views

On installing boost library (of which boost graph library is a part), the following has been installed on my computer: (1) C:\local\boost_1_86_0\boost\graph\header files.hpp (2) C:\local\boost_1_86_0\...
One_Cable5781's user avatar
0 votes
1 answer
68 views

I'm using cmake 4.1 with boost 1.88.0. I set BOOST_ROOT to C:\boost_1_88_0 The problem happens because cmake finds BoostConfig.cmake in C:\boost_1_88_0\tools\cmake\config, which calls find_package() ...
Steven Schoch's user avatar
3 votes
1 answer
179 views

I am attempting to move away from std::vector<std::vector<int>> types and use boost::multi_array in its place. I am struggling how to initialize such data members though. I used to have a ...
One_Cable5781's user avatar
2 votes
1 answer
102 views

I have a Websocket class that connects asynchronously using Boost.Asio and Boost.Beast. The following code was working fine with Boost 1.78, but after updating to the latest Boost version, I now get a ...
Rutvik Parekh's user avatar
2 votes
1 answer
202 views

Actually No files ending with "vc143-mt-s-x64-1_89.lib" exist in my Boost library, but still compiler tried to find 'libboost_program_options-vc143-mt-s-x64-1_89.lib'. I don't know why. Here ...
Matt WU's user avatar
  • 41
4 votes
1 answer
143 views

I have the following program that just runs a timer for 5 seconds and has a signal handler. #include <boost/asio.hpp> #include <chrono> #include <iostream> #include <signal.h> ...
Pavel Krasnopevtsev's user avatar
2 votes
2 answers
97 views

I am working in a system which uses a global Clock singleton to store the current time. class Clock { public: static Clock& instance() { static Clock clock; return clock; ...
Steve Lorimer's user avatar
0 votes
1 answer
118 views

I have vcpkg 2025-09-03 installed and CMake 4.1.2 installed. Now I want to install Boost Date-Time .\vcpkg.exe install boost-date-time And check if boost-date-time is installed. PS C:\Users\negrå\...
euraad's user avatar
  • 2,897
2 votes
1 answer
73 views

I'm trying to build an older version of Mongod on Arch Linux. It's required by software called Deadline that I intend to use; Deadline's documentation says the following: "For maximum ...
AlexM's user avatar
  • 241
4 votes
1 answer
122 views

I am getting a warning (turned into an error with -Werror) about missing-field-initializers when using designated initializers for the fields in my struct, because I'm not initializing fields in a 3rd ...
Steve Lorimer's user avatar
-1 votes
0 answers
36 views

I wrote a sample console app that uses boost::cobalt with the following code in CMake: if(POLICY CMP0167) cmake_policy(SET CMP0167 NEW) endif() set(Boost_USE_STATIC_LIBS ON) set(...
Dmitriano's user avatar
  • 2,548
2 votes
1 answer
125 views

Suppose I accept a socket by calling async_accept like this acceptor.async_accept([](const boost::system::error_code& ec, boost::asio::ip::tcp::socket sock) { if (ec) return; auto sess = std:...
Joe J's user avatar
  • 1,391
1 vote
1 answer
130 views

My data-driven Boost test-case takes several parameters. I chose to group them in a std::tuple. So the resulting dataset consists in a list of tuples. Beyond a 1-element tuple (test1 below), the ...
Francois's user avatar
  • 2,086
-1 votes
0 answers
43 views

I have some courtine tasks that return an asio::awaitable<...> - possibly different types (but yes, I know what they supposed to return). I want to run them in parallel and wait for all of them ...
Karoly Horvath's user avatar
0 votes
0 answers
47 views

I checked out nghttp2/asio in my C++ project. I have built boost version 1.89.0 from source using b2. I am met with error "Could not find version of library" and as per the configure shell ...
Supreet Singh's user avatar
0 votes
0 answers
105 views

I'm trying to build boost on windows (currently windows 10 because my pc sadly doesn't have the tpm) with clang from msys2/mingw64/ucrt. To be clear, I have these infos from my current clang: clang++ -...
crillion's user avatar
  • 380
1 vote
1 answer
50 views

In a Boost b2 Jamfile.v2, I have a lib for which I want to define <optimization>off and <cxxflags>-O1, but only for release builds using Clang on macOS (so <target-os>darwin AND <...
Nick Williams's user avatar
0 votes
0 answers
231 views

I'm trying to use asio::co_spawn with boost::future in Thread library, such that I could chain the co_routine task with then() function. But the problem is asio::use_future only generates std::future. ...
YzEdwin's user avatar
  • 21
0 votes
0 answers
106 views

I encountered a compiler bug when using C++20 + Boost.ASIO in Windows boost1.89 & msvc17.6: asio\co_composed.hpp(162,33): error C3546: '...': there are no parameter packs available to expand asio\...
travaller2's user avatar
2 votes
1 answer
197 views

I am reading a http::request<http::string_body> request from the network using boost::beast, which is of type multipart/form-data. The request contains files and strings. How can I get each part ...
Joe J's user avatar
  • 1,391
0 votes
0 answers
57 views

We have a C++20 library that compiles several Boost modules and statically links their object files into our shared library. One of those modules is Boost.Stacktrace. We compile this library, and a ...
Nick Williams's user avatar
4 votes
2 answers
526 views

Consider the following struct: struct Particle { float scale; float opacity; float rotation; }; I want the following to compile: static_assert(indexOf<&Particle::scale>() == 0); ...
Vittorio Romeo's user avatar
5 votes
2 answers
132 views

I need to copy one boost::asio::streambuf to another. For this I decided to use std::ostream. At the moment I copy the buffer like this boost::asio::streambuf src; boost::asio::streambuf dst; std::...
Joe J's user avatar
  • 1,391
7 votes
2 answers
183 views

I'm using the boost mysql library in a project. I need to use boost::mysql::datetime (datetime) to represent timestamps. A datetime value can be constructed from a boost::mysql::datetime::time_point. ...
pacmaninbw's user avatar
3 votes
1 answer
104 views

I create http::response<string_body> and call prepare_payload() after the response is built like this http::response<http::string_body> res; res.version(11); res.result(http::status::ok); ...
Joe J's user avatar
  • 1,391
0 votes
1 answer
52 views

I can't compile the boost library on Windows 11, specifically serialization which is not header-only, for use with mex in MATLAB. I am compiling boost with .\bootstrap.bat; .\b2.exe link=static ...
dogAwakeCat's user avatar
1 vote
1 answer
81 views

I'm trying to serialize and compress a std::map using Boost. Here's the serialization code: #include <boost/archive/binary_oarchive.hpp> #include <boost/iostreams/filtering_stream.hpp> #...
Setu's user avatar
  • 1,086
3 votes
1 answer
153 views

I have two threads and I need to run a task from the first thread but in such a way that the task is executed in the second thread. For this I decided to use boost::asio::post, but I'm not sure if it ...
Joe J's user avatar
  • 1,391
2 votes
1 answer
192 views

The following code simulates short bursts of work by sleeping 1ms at a time in order to achieve a cancellable task that takes a total of 2s. That work is then launched in three different ways. The ...
Dalzhim's user avatar
  • 2,098
3 votes
1 answer
99 views

I have a websocket server where I call websocket::stream::async_accept to perform a handshake with the client. I also set a decorator to modify the headers like this conn->get_websocket_stream()....
Joe J's user avatar
  • 1,391
-1 votes
1 answer
145 views

I read TLS ClientHello data from the network using boost::asio like this socket->async_wait(ip::tcp::socket::wait_read, [=](const boost::system::error_code& ec) { std::size_t avail = socket-...
Joe J's user avatar
  • 1,391
4 votes
1 answer
65 views

I create http::response_parser<http::buffer_body> and set header_limit and body_limit like this auto parser = std::make_shared<http::response_parser<http::buffer_body>>(); parser->...
Joe J's user avatar
  • 1,391
3 votes
1 answer
161 views

I have some code that creates an ssl::stream. The ssl::stream object takes an ssl::context in its constructor by reference. Creating an ssl::stream looks like this ssl::context ssl_context(boost::asio:...
Joe J's user avatar
  • 1,391
1 vote
1 answer
130 views

I want to close the TLS connection gracefully. So before closing the socket I call ssl::stream::shutdown. I call ssl::stream::shutdown in the session destructor and at that moment I have no active ...
Joe J's user avatar
  • 1,391
3 votes
1 answer
152 views

Suppose we have ip::tcp::socket and asynchronous operations, and at some point we call ip::tcp::socket::cancel. Is it guaranteed that all asynchronous operations will be cancelled? The documentation ...
Joe J's user avatar
  • 1,391
1 vote
1 answer
71 views

I'm trying to bind a WebSocket connection to a specific network interface using Boost.Beast, but the socket keeps using the default interface instead of the specified one. I have a WebSocket client ...
nobody's user avatar
  • 13
2 votes
1 answer
110 views

I have one active async operation, it is http::async_read. At the moment when I want to close the ssl connection, I cancel this async operation on the socket by calling ip::tcp::socket::cancel. Then I ...
Joe J's user avatar
  • 1,391
3 votes
1 answer
152 views

Is it correct to call ssl::stream::async_shutdown while there are outstanding async_read_some/async_write operations? Should I wait for all async operations to complete before calling ssl::stream::...
Joe J's user avatar
  • 1,391
0 votes
0 answers
112 views

On a fresh install of MSYS2, I got into problems with a waf install of Ardour, the digital audio workstation, partly following this recipe. My approach was: Install MSYS2 using the installer from ...
alle_meije's user avatar
  • 2,528
2 votes
1 answer
87 views

I have made a boost multiindex of my GameObject, and I am trying to loop through and call non const functions on it. And I cannot for the life of me to get boost to stop giving long nasty compiler ...
user904542's user avatar
  • 7,087
2 votes
1 answer
95 views

I'm using the BOOST_ASIO_ENABLE_HANDLER_TRACKING flag in Boost.Asio to enable handler tracking logs, which provides useful debugging output to the standard error stream. I have a couple of questions ...
Zohar81's user avatar
  • 5,214
2 votes
1 answer
158 views

I want to implement Catmull-Rom interpolation for a time series of data sampled at irregular intervals. I noticed that Boost provides catmull_rom in its interpolation library, and I have tried to use ...
Bill Heitler's user avatar
0 votes
0 answers
99 views

I'm encountering an issue with the Boost.Asio library. My program uses a single io_context instance and multiple worker threads that call io_context::run(). Tasks are posted using spawn or post on the ...
Zohar81's user avatar
  • 5,214
1 vote
1 answer
130 views

Code firstly, very simple example code: template <typename CompletionToken> decltype(auto) test_initiate(CompletionToken&& token) { return boost::asio::async_initiate<...
Simon. Li's user avatar
  • 441

1
2 3 4 5
563