Questions tagged [boost-tuples]

A Boost C++ library providing an implementation of tuple, a fixed-sized collection of elements, possibly of different types

54 questions
0
votes
1 answer

retrieving string from boost::tuples::tuple

After reading the article at https://www.boost.org/doc/libs/1_67_0/libs/tuple/doc/html/tuple_users_guide.html The following note is a problem for me. Note that extracting tuples with std::string or C-style string elements does not generally work,…
0
votes
1 answer

copying data between different types of containers

I am trying to copy data from one container type to another container type, the containers are both double dimensional vectors, i am using boost::combine and boost::tie to iterate over the containers, the code builds fine but throws a bad_alloc when…
Ravikumar Tulugu
  • 1,702
  • 2
  • 18
  • 40
0
votes
1 answer

Find position of element in a vector of boost tuples

I am iterating over a vector of boost::tuples in order to find an element. However I would also like to find the exact position of this element in the vector in order to delete it later. This is the code, however the std::distance does not give me…
cateof
  • 6,608
  • 25
  • 79
  • 153
0
votes
1 answer

Map lookup using boost::tuple as key

I would like to understand how a key in the form of boost::tuple is looked up in the map, where Compare=std::less. For instance, this is the snippet of the code I'm working on: typedef boost::tuple Key; void *Data; typedef…
Maddy
  • 1,319
  • 3
  • 22
  • 37
0
votes
1 answer

Append element to boost::python::tuple

I'm trying to remove the second element from a boost::python::tuple object. The tuple from which I want to remove the second element is the list of arguments passed to a Python function call. To remove the element I do like this: BPY::object…
zeb
  • 1,105
  • 2
  • 9
  • 32
0
votes
2 answers

Detecting the reference types in a tuple

I learned about std::forward_as_tuple. I use this tech in my project: template tuple values(Ts&&... ts) // yes, values is renamed forward_as_tupe { return tuple(std::forward(ts)...) } class C_SQL { ...... };…
thomas
  • 505
  • 3
  • 12
0
votes
0 answers

Parsing a Boost:Tuple into a char* (with endianess)

I have many classes with varying implementations of their private member boost::tuple<> structures ie. or . I now need to parse that tuple into a private const char* message (since I want to send it via tcp),…
dos
  • 135
  • 1
  • 6
0
votes
1 answer

boost multi index insertion errors with boost::tuple of references as the key for a ordered_unique index

I have boiled this down to the simplest example code I could think of. I have a boost multi indexed by a member: typedef const boost::tuple key_type; Doing this seems make the multi-index think every item is equal…
user442585
  • 571
  • 1
  • 9
  • 17
-1
votes
1 answer

how to create a complex type using tuples and variadic templates

In first place, I'm not a very skilled programmer in C++11 and templates, I read a lot of posts but I can't figure out how to write my idea (if is even possible), saying that, this is my idea. My idea is create a complex compiler-time type, I'm…
Trungus
  • 165
  • 8
1 2 3
4