boost Questions

4

Solved

I am working to implement a code which was written in MATLAB into C++. In MATLAB you can slice an Array with another array, like A(B), which results in a new array of the elements of A at the index...
Gessner asked 6/5, 2021 at 22:4

4

Solved

I know, I know, the title of my message may seem provocative, since boost::mutex purposefuly do not expose lock / unlock (in order to avoid dead locks). However the boost documentation is quite s...
Telemetry asked 15/12, 2009 at 1:35

1

As pointed out in answers to Generic hash for tuples in unordered_map / unordered_set and elsewhere, Boost has an implementation of boost::hash<tuple<string, string>>. So, we can do thi...
Philippopolis asked 9/7, 2021 at 16:25

2

Solved

How can I serialize a class (with boost::serialization) that contains a boost::optional? I.e. the following code will give an error when instantiated. error C2039: 'serialize' : is not a member...
Placia asked 26/9, 2014 at 14:27

4

Solved

Consider, say, a collection of account balances. And then you have a complex function that needs to check the balances of a few different accounts and then adjust the balances of a few different ac...
Huckaback asked 11/11, 2011 at 4:31

4

Solved

Let's assume we would like to use boost::file_system library in our cmake multiplatform project (ios, macos, android, windows, linux). One way to do it is to directly copy boost source code into ou...
Himyaritic asked 8/7, 2022 at 14:57

3

Solved

I am hoping for some guidance regarding C++ templates. I have been using the boost::asio library for communication over TCP. Thus far, I have been using storage containers built into the boost::asi...
Iolanthe asked 1/6, 2011 at 14:17

9

Solved

I have a problem that I would like to merge a large number of images using ImageMagick's convert.exe, but under Windows I have a 8192 byte long command line limit. My solution to this is to split...
Ummersen asked 28/7, 2011 at 14:57

3

How to run boost asio with cmake? Havint this simple project layout: c1 ├── c1 │   └── main.cpp └── CMakeLists.txt CMakeLists.txt: cmake_minimum_required(VERSION 3.20.0) project(c1) add_executabl...
Fairlead asked 24/3, 2022 at 23:11

6

I am currently trying to start a project in React Native version 0.73, but I'm having an issue when I do pod install in the iOS directory, specifically with installing Boost version 1.83.0. (node:6...
Birdsong asked 31/12, 2023 at 5:27

1

I have hugely imbalanced data where around 96% is class 1 and the rest is class 2, I read a lot online to solution to above problem, In XGBOOST documentation they suggested scale_pos_weight and max...
Celebrant asked 12/10, 2016 at 6:36

7

I am using CMake and Boost. I am using Boost 1.68.0 and CMake 3.11.0. I cannot upgrade to newer versions of CMake as cotire prevents moc files from being generated on CMake 3.12.0 and onwards. Howe...
Prepared asked 8/8, 2019 at 14:41

5

Solved

How can I skip a BOOST unit test? I would like to programatically skip some of my unit tests depending on, (for instance) the platform on which I am executing them. My current solution is: #define...
Sayer asked 4/6, 2013 at 23:13

3

Solved

The only way I could see how to do this was to try to access it and catch the exception that gets thrown if it isn't there. bool exists() { using namespace boost::interprocess; try { managed_s...
Packhorse asked 29/8, 2014 at 18:44

4

While including boost headers, I am getting not found error like the following- fatal error: boost/config.hpp: No such file or directory #include <boost/config.hpp> I am using Mac OS X 1...
Stingo asked 21/1, 2015 at 23:58

15

Solved

Is there a quick way to determine the version of the Boost C++ libraries on a system?
Esra asked 14/9, 2010 at 12:8

3

Solved

Is there anything like boost::thread_group in C++11? I'm just trying to port my program from using boost:thread to C++11 threads and wasn't able to find anything equivalent.
Slacken asked 27/3, 2012 at 17:5

8

Solved

when I use 'react-native run-ios', there is some error, 'boost/operators.hpp' file not found. I can not build and run my project: react-native-cli: 2.0.1 react-native: 0.59.9 npm: 6.9.0 yarn: 1.16...
Tuddor asked 15/6, 2019 at 22:53

5

Solved

I was exploring the boost::stacktrace by trying a simple example to print the call stack of a recursive function. #include "boost/stacktrace.hpp" int factorial(int x){ if (x < 2) { std::cou...
Banking asked 1/10, 2018 at 1:23

6

In most of the examples I had seen: time_zone_ptr zone( new posix_time_zone("MST-07") ); But I just want to get the current time zone for the machine that runs the code. I do not want to hard c...
Matronage asked 26/1, 2010 at 1:16

2

I wrote an operator<< specialization that handles boost::multi_array, and used ConstMultiArrayConcept so that it would work on both the outer array and the sub-arrays. I'm wondering, though, ...
Art asked 28/8, 2012 at 16:40

4

Solved

I have a n-dimensional Boost.MultiArray I initialize as follows: const int n=3, size=4; //# of dimensions and size of one dimension boost::multi_array<char,n> arr; boost::array<size_t,n&g...
Photogram asked 11/1, 2012 at 17:58

4

Solved

I am trying to enable link time optimization in g++. My program compiles fine without the -flto option. When I add it to my Makefile the object files compile without errors, e.g. g++ main.cpp -I ....
Confessor asked 6/4, 2012 at 22:53

7

Solved

In short: How to write a test, that checks that my class is not copyable or copy-assignable, but is only moveable and move-assignable? In general: How to write a test, that makes sure that a spe...
Allpurpose asked 8/5, 2014 at 16:46

4

Solved

How do I create a thread pool using boost in C++, and how do I assign tasks to the threadpool?
Leaden asked 21/10, 2013 at 16:55

© 2022 - 2025 — McMap. All rights reserved.