Questions tagged [c++11]

0 votes
1 replies
OMNET++: error in module cModule during network setup
I'm trying to run my first Castalia/WSN simulation (testRouting) in Omnet++ including folders with .ned and c++/h files (TestRouting.h , TestRout...
asked 1 month ago
0 votes
2 replies
What is difference between std::move and pass by reference in C++? [duplicate]
This question already has an answer here: What is move semantics? 11 answers...
asked 1 month ago
2 votes
0 replies
How to define a vector of a templated using member of a templated class? [duplicate]
In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway? I have the follow...
asked 1 month ago
2 votes
2 replies
Find the unique elements of a vector C++
Is there a fast way to find all the single elements (only appeared once) in a vector of elements? All the elements in the vector is either single...
asked 1 month ago
1 votes
1 replies
C++: std::remquo not giving expected output [duplicate]
This question already has an answer here: remquo Results Not Making Sense 2 answ...
asked 1 month ago
2 votes
2 replies
Call std::function with list of variant types
I am working with a third party library that passes values using a custom vector and variant types. These vectors however map 1:1 to my functions...
asked 1 month ago
-4 votes
0 replies
Cannot convert argument 1 from 'Work' to std::nullptr_t [closed]
I'm trying to convert a String to a uint8 vector contained in a shared_ptr but am currently getting the Cannot convert argument 1 from 'Work' to...
asked 1 month ago
0 votes
0 replies
Segfault inserting 64 bit number into stringstream on 32 bit Linux
I have some code as follows: uint64_t now; std::stringstream timestamp; ... now = GetElapsedTime(); timestamp << "@"...
asked 1 month ago
0 votes
1 replies
How to pass a constexpr array into a function
I need to perform a check on a constexpr array, but can't figure out how to pass the array into the check function. #include <cstdlib> co...
asked 1 month ago
0 votes
0 replies
C++ boost asio deadline timer and steady timer crashes giving segmentation fault when system time is not synchornised
I am using linux machine with: clang version : 3.5.0 boost version : 1.68.0 i am using raspberry pi3 as my build machine. Twist is sometimes rpi...
2 votes
1 replies
libxl library use in c++
When I create a project visual studio 2015 I can work this libxl library hovewer I could not be able to work that library on visual studio qt gui...
asked 1 month ago
1 votes
1 replies
How to use unique_ptr for iteration?
I have a binary search tree implementation where each node of the tree has this structure. struct node { T data; std::unique_ptr...
asked 1 month ago
0 votes
0 replies
Template Argument Deduction which function which is no where used/declared/defined [duplicate]
At http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx, the VC++ team officially declare that they have not yet implemented the C++11...
asked 1 month ago
-1 votes
0 replies
cpp wrong number of template arguments
I have writtne the function below which iterates through a map whose primary key is a pair and secondary pair is a string. The goal is to get all...
asked 1 month ago
0 votes
1 replies
Would the C++11 targeted constructor allow me to safely initialize derived class from template constructor?
I have a variety of objects created from template class bar (below). Each object has a data member with different data type (eg std::string, boo...
asked 1 month ago
1 votes
0 replies
Linker errors involving std::__cxx11 namespace - Dual ABI Issue
I am currently experiencing linker errors that involve types in the std::__cxx11 namespace. Here is my code: #include <iostream> #include...
asked 1 month ago
1 votes
1 replies
What is the standard way in C++11 to access the pointer to element n in a std::vector?
What is the standard way in C++11 to access the pointer to element n in a std::vector ? vec.data() + n or &vec[n] comes to mind. 1...
asked 1 month ago
0 votes
2 replies
pointer get wrong value in different thread
I am writing a piece of code to demonstrate the multi-threading share memory writing. However, my code gets a strange 0xffffffff pointer I can't...
asked 1 month ago
3 votes
1 replies
stringstream operator<< doesn't work as expected with bitwise negation
I would like to use a bitwise negation for a data which is stored in stringstream object. The following code works fine: std::uint8_t x = 0x01;...
asked 1 month ago
0 votes
0 replies
Categorical features in mlpack
I have been trying to implement random forest in C++ using mlpack. My data has some features as categorical. I have been trying to use DatasetIn...
asked 1 month ago
0 votes
0 replies
Floating point types with explicit sizes (like integers) [duplicate]
This question already has an answer here: Fixed-size floating point types 4 answ...
asked 1 month ago
3 votes
2 replies
Sequencing between the destruction of local automatic function variables vs the construction of the return value
There exists code that relies on the fact that local automatic function variables are destroyed after the return value has been created, for exam...
asked 1 month ago
0 votes
1 replies
How to search in a Set of vectors of integers
I am trying to form a set of vectors of integers and on checking if the same solution already exists in the set, I am not getting correct answer....
asked 1 month ago
0 votes
1 replies
Passing const reference pointer fails to match method signature
The following code passes a const pointer reference to a size() helper function. It only works if I remove the const or the & reference opera...
asked 1 month ago
5 votes
2 replies
alias template for member template
let's say I have a template: template<typename T> struct Outer { template<typename T1> struct Inner { }; }; I'd like...
asked 1 month ago