Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
0 answers
51 views

Is Boost suppose to hardcode the C++ files' paths from the highest possible folder? [duplicate]

I'm using the C++ Boost libraries and I am troubleshooting way too much to my taste to not ask if this is not normal. The way I understand it, in C, #include allows to sort of import other files: if I ...
Castro Pablo's user avatar
0 votes
0 answers
45 views

Why adding one more BOOST_LOG_TRIVIAL(info) to the function crashes the binary and how to fix it? [closed]

On a QNX system node I have a GTEST binary and a member function like this: void Session::close(bool peer_is_connected) { //BOOST_LOG_TRIVIAL(debug) << toString() << "Session ...
forestgril's user avatar
-1 votes
0 answers
25 views

How to fix errors in reading json using boost? [closed]

I'm trying to use Boost Lib to read a json file, following is the code: #include <iostream> #include <cstdlib> #include <fstream> #include <filesystem> #include <boost/...
milin's user avatar
  • 19
1 vote
0 answers
39 views

How to hide macro usage from an output shared library

I'm trying to write a C++ logging library. It uses boost::log mainly for the BOOST_LOG_SEV macro. I can use my library without an issue like LOG(debug) << "Test message". Here is my ...
cppbird's user avatar
  • 21
1 vote
1 answer
46 views

Try to replace old boost with new one in old code and get error, "type": is not a member of boost::mpl::eval_if

I tried to compile old code (~15 years old - luabind) that uses very old boost version (sth like 1.30) with new version of boost 1.86. I replaced some apply_if usages with eval_if like it is suggested ...
BartekPL's user avatar
  • 2,390
1 vote
1 answer
33 views

Boost integer_modulus Usage

Boost documentation mentions the integer_modulus function. template <class Integer1, class Integer2> Integer2 integer_modulus(const Integer1& x, Integer2 val); I've found that it resides in ...
ENIAC's user avatar
  • 942
1 vote
1 answer
17 views

boost spirit alternative operator

Please advise about boost spirit alternative operator. test_parser() is posted on the official website. test_parser("Hello", string("Hell") | string("Hello")); Output ...
福岡仁's user avatar
1 vote
0 answers
88 views

Bazel: Why can GCC suddenly not find stdlib.h anymore?

My WORKSPACE file contains this code snippet: new_local_repository( name = "boost", build_file = "//bazel/third_party:boost.BUILD", path = "C:/msys64/mingw64/...
VincentSchaerl's user avatar
-7 votes
0 answers
58 views

I found this boost asio c++ code and do not understand it [closed]

I found this code with copilot This is the code, i think it is invalid #include <boost/asio.hpp> #include <boost/beast.hpp> #include <boost/asio/ssl.hpp> #include <iostream> #...
1u1u's user avatar
  • 127
3 votes
1 answer
54 views

How does boost::asio::yield_context work?

I'm reading through the documentation for boost::asio and came across this example: void foo(boost::asio::yield_context yield) { size_t n = socket.async_read_some(buffer, yield); // ... } I am ...
Jordan Bonecutter's user avatar
5 votes
1 answer
57 views

How to construct boost::json value?

I have the following code for constructing Boost::Json value object. void tag_invoke(boost::json::value_from_tag, boost::json::value& jv, AppointmentEnd const& obj) { jv = { { "...
bobeff's user avatar
  • 3,697
1 vote
1 answer
63 views

Save boost asio async operation completion handler

I need to implement custom asynchronous operation using boost asio library. The operation itself will be performed by a 3rd-party library. Approach, which I'm following is: start async operation via ...
Alexander Stepaniuk's user avatar
5 votes
2 answers
119 views

Is boost::filesystem thread-safe?

Here is the following case I am observing on my Debian stable system: % valgrind --tool=drd ./threads ==1368067== drd, a thread error detector ==1368067== Copyright (C) 2006-2020, and GNU GPL'd, by ...
malat's user avatar
  • 12.3k
1 vote
1 answer
49 views

Beast Socket from Boost Python Package Kills Jupyter Kernel

For some reason when exposing the below to python using Boost Python, the unique pointer constructor (the obj constructor) fails. This used to work for me before, not sure why it stopped. #pragma once ...
SpeakX's user avatar
  • 385
0 votes
1 answer
32 views

Is it possible to build boost library as shared object on ARM64 architecture?

I am trying to build boost v.1.86 on Windows 11 for ARM64 architecture in a shared library format. These are the commands I am using currently: .\bootstrap --with-libraries=regex .\b2 cxxflags="-...
Fox1942's user avatar
  • 364
0 votes
0 answers
80 views

Visual Studio hangs when debug project with boost

I use Visual Studio 2022 community for development app on ubuntu 22.04. I use gcc 11.4 and cmake. I create simple project with boost and use multi-index containers. Boost installed from repositories. ...
Vit123's user avatar
  • 1
1 vote
1 answer
69 views

Boost::program_options "option cannot be specified more than once" error when implementing a program with multiple modes

I am attempting to create a program with the following command line usage: test_program [General Options] <mode_1_option_1> <required_option_1> OR test_program [General Options] --toggle-...
Danny Brent's user avatar
2 votes
0 answers
24 views

How to use SKIP properly with special characters? [duplicate]

I have this regex expression link (\b(?:(?:highp|lowp|mediump|return|\?|\=)(?:\s+\w+)*\s+(float|(?:i|b)?vec[2-4]|mat[2-4](?:x[2-4])?))(*SKIP)(?!)|(?=\b(float|(?:i|b)?vec[2-4]|mat[2-4](?:x[2-4])?))) ...
Fox1942's user avatar
  • 364
0 votes
1 answer
33 views

STM32 ARM GCC Toolchain CMake target_compile_features no known features for CXX compiler

Our project is using STM32 GCC ARM Toolchain, using STM32 CMake toolchain file (gcc-arm-none-eabi.cmake) which sets the CMAKE_C_COMPILER_ID and CMAKE_CXX_COMPILER_ID to GNU. When lines like this are ...
Panda's user avatar
  • 947
2 votes
1 answer
79 views

Regex for a comma separated text with optional double quotes that can contain backslash-escaped quotes

I need a regular expression that can separate a string like: 1st, 2nd=second, "3rd=third","4th = forth",,"6th=\"this, is, the, sixth\"" into 1st // not ...
Sam's user avatar
  • 2,542
0 votes
0 answers
29 views

Error building Boost dynamic libraries on Windows with MSVC

I recently got a Windows laptop after having Macs for 13 years. I would love to just use WSL (I already built it on WSL just fine) but I need something that specifically runs on Windows and must be ...
university of phoenix alum's user avatar
-1 votes
1 answer
91 views

How to ignore keywords in regex before variables?

I trying to create a function which is capable of putting precision modulator keywords in front of float variables where there is no such a keyword So it converts const float x; to lowp const float ...
Fox1942's user avatar
  • 364
1 vote
1 answer
49 views

boost wave generates runtime assertion

I am developing a 'C' macro-expander with Visual Studio 2022 & Boost.Wave (through vcpkg). I based the application on the advanced_hooks sample that ships with boost. The application works ...
johnco3's user avatar
  • 2,564
2 votes
1 answer
62 views

How to put checking for more whitespaces in a negative look beyond?

I am creating a small function, which is capable of modifying the two lines below precision highp float; highp float intensity; to this: precision highp float; lowp float intensity; So ...
Fox1942's user avatar
  • 364
3 votes
1 answer
55 views

Is it possible to emplace a key, value pair into a boost::json::value?

Is it possible to emplace or otherwise add a key/value pair into a boost::json::value, like you can into a boost::json::object? boost::json::object obj; obj.emplace("timestamp", "2023-...
Pavel Sh's user avatar
-1 votes
0 answers
39 views

Issue adding flag through cmake file [duplicate]

I am able to compile a program using g++ using a flag, but am not able to do the same thing via a cmake file. I have a program that when compiled like g++ tutorial.cpp gives an error, but works when ...
Yoogi Kovendhan's user avatar
2 votes
1 answer
74 views

Does Boost guarantee safety of deserealization?

For example, a client serializes std::vector, std::unordered_map, boost::optional, std::shared_ptr or some other type whose serialization mechanism is laid out directly in Boost, and then sends it to ...
gth-other's user avatar
0 votes
0 answers
31 views

Using Boost::Compute, how do I pass two values to a custom function?

I'd like to use Boost::Compute to do a calculation using two passed in values. I'm using Visual Studio 2022 on Windows 10. I'm using vcpkg to pull in OpenCL and Boost::Compute. Here is the code I ...
Dave F's user avatar
  • 903
0 votes
0 answers
11 views

Fail to build boost library from source under window

Most Boost libraries are header-only, but several Boost libraries must be built. Following the steps from the link https://www.boost.org/doc/libs/1_86_0/more/getting_started/windows.html#or-build-...
Jogging Song's user avatar
0 votes
1 answer
51 views

For boost::fibonacci_heap, does pop() API automatically update the heap? Or is it necessary to follow it with update()?

I am new to using boost::fibonacci_heap and had some questions regarding usage. I have read the user manual, the answer is not clear: "https://www.boost.org/doc/libs/1_51_0/doc/html/boost/heap/...
user2128105's user avatar
1 vote
0 answers
43 views

Is it possible to set ACL permissions for Boost.Interprocess managed_shared_memory? If not, how can I achieve this?

I'm using the Boost.Interprocess library in C++ to manage shared memory using the managed_shared_memory class. I am creating the shared memory segment with the open_or_create flag and specifying ...
Rishi Jain's user avatar
2 votes
1 answer
90 views

How to delete the first rows/columns in a boost::multi_array?

It is very easy to delete the last rows or columns in a boost::multi_array, for example, using the following minimal example: #include "boost/multi_array.hpp" #include <iostream> ...
TMueller83's user avatar
1 vote
1 answer
30 views

Is there a way to get second level domain using boost-url?

I am trying to get the Second Level Domain of a URL using boost-url. For example if url is https://google.com, I want to store google in a std::string. Here is a complete example: #include <boost/...
Hassan Zubair's user avatar
1 vote
2 answers
44 views

How to create/use boost::multi_index with key types/values unrelated to the mapped type/value

I want a double-key "map" to access a type value. The key types are unrelated to the mapped type. Example: using key1_type = double; using key2_type = int; using mapped_type = std::...
Alex Net's user avatar
  • 192
1 vote
1 answer
31 views

Boost binary_oarchive not working with dynamic buffer

I'm trying to serialize an object using boost serialization. Everything works perfectly if I use a text_archive, I can serialize, deserialize back, and everything is in its place. I tried to serialize ...
ErniBrown's user avatar
  • 1,352
0 votes
1 answer
54 views

How can I change a vertex in 'boost::geometry::polygon'?

I am using the following code to get the vertices from a boost::geometry::polygon: using namespace boost::geometry; using PointType = model::d2::point_xy<double>; using PolygonType = model::...
Andrew Bond's user avatar
1 vote
2 answers
81 views

LINK : fatal error LNK1104: cannot open file 'libboost_log-vc143-mt-gd-x64-1_85.lib' in CMake project

I've encountered this problem: linker cannot find Boost.Log library which clearly does exist in destination. I use MS Visual Studio 2022, so my compiler surely is msvc143 as stated in library. I have ...
chrkspln's user avatar
0 votes
0 answers
159 views

Cannot build Boost Library on Windows 11

I am on Windows 11, and I cannot build Boost C++ library. I installed successfully Microsoft Visual Sutdio 2022, downloaded boost1.83.0, unzipped it, did from the Microsoft Visual Studio Command ...
Louise's user avatar
  • 1
0 votes
1 answer
50 views

UTC Now using boost Posix Time with nanoseconds precision

Is there a way to get the ptime representation of the current UTC time using boost Posix Time Library with nanoseconds precision? I know how to get microseconds precision using microsec_clock. I know ...
SpeakX's user avatar
  • 385
0 votes
0 answers
34 views

cmake has not found boost_graph library

The problem is that cmake don't find boost-graph library during building of the project. However, this library is installed on the system. Hello everyone! I've faced with such problem. I've tried to ...
Vitalii Frolov's user avatar
2 votes
1 answer
52 views

Boost program_options: Mixing positional arguments and named arguments

I am using boost::program_options to make a simple executable with the following general syntax: program --command <cmd> [args] For example: program --command run --listen locahost --port 8080 ...
sorush-r's user avatar
  • 10.8k
0 votes
0 answers
39 views

Visual Studio 2022 not creating DLL using Boost.Python

After following this page on how to install boost in Visual Studio 2022, I added the hello world for Boost.Python into the main.cpp file. However, even though the program builds and runs successfully, ...
AsianTemptation's user avatar
1 vote
1 answer
37 views

Iterating over buffers in an asio::streambuf

While transferring data over named pipes I need to serialize some data structure and then transmit a sequence consisting of the size in bytes of the serialized structure as a uint32_t followed by the ...
chili's user avatar
  • 676
1 vote
0 answers
47 views

Check package exists in cmake without reverting to the old policy settings

In my project, I use the Boost and CUDA libraries. Previously, I used find_package(Boost) and find_package(CUDA), followed by if(CUDA_FOUND) and if(Boost_FOUND) to check if those packages were ...
Ali Aghaeifar's user avatar
0 votes
0 answers
54 views

Why does my boost.asio server accept data from host but not from vm?

I am new to Boost.asio and C++. I am trying to create a simple program which listens on a certain port for data and displays that data on the terminal. When the simple server (my C++, boost.asio code) ...
jari85's user avatar
  • 81
1 vote
1 answer
74 views

how to use boost::wave to expand nested macros

I am developing a boost wave applicaton to map unexpanded macro instantiations in a 'C' source file to the corresponding expanded macro text. The mapping needs to work for both function & object-...
johnco3's user avatar
  • 2,564
0 votes
0 answers
32 views

Does boost asio guarantee a handler callback when async operation is pending?

To handle timeouts, let's assume I set up a steady_timer to go off right before async_resolve, async_connect, async_write, async_read_some... When the timer fires, I shutdown & close the socket. ...
equipped_mandingo's user avatar
2 votes
1 answer
31 views

Trying to Implement Idle Timeout by cancelling current async_read and continuing with next read/write operation

I am using a timer and an async_read, so whenever the timer runs out it cancels the async_read by doing ws_.next_layer().cancel() so that i can continue with my next operation. but when I catch the ...
Manish I's user avatar
0 votes
0 answers
40 views

How to build `boost_stacktrace_backtrace` in vcpkg?

I want to use Boost.stacktrace library to call boost::stacktrace::stacktrace::from_current_exception(). I read configuration_and_build page but I don't understand what kind of macros is and where to ...
Alexey Subbota's user avatar
0 votes
1 answer
51 views

Boost Beast Websocket verify client certificate more than once on connection

I have a Boost Beast asio based websocket server, which (in abbreviated form) starts like this ssl_context_.set_options( boost::asio::ssl::context::default_workarounds | boost::asio::ssl::...
Paul Grinberg's user avatar

1
2 3 4 5
559