python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Error in implementing emplace_back() binary '=': no operator found which takes a right-hand operand of type 'T *'
Code below, for my linked list implementation and specifically emplace_back below. What am I doing wrong and how to fix?
Error I am getting is:
Build started...
1>------ Build started: Project: so...
Angus Comber
Votes: 0
Answers: 2
C++: insert element into std::map<MyStruct> where MyStruct can only be aggregate initialized and contains const unique pointers
Here is what I am trying to do and what I have tried:
#include <memory>
#include <map>
#include <string>
using namespace std;
struct MyStruct {
const unique_ptr<int> a;
...
Mircode
Votes: 0
Answers: 2
Emplacing an std::pair of strings to an unordered map reusing the string's heap
I have an unordered map of string-pairs that i reference via a message id (key). Now I want to construct the string pair in place using the temporary string objects that the function receives, hence r...
glades
Votes: 0
Answers: 1
c++17 correct moving resource between unique_ptr in containers
How to correct move resource from existed unique_ptr to another created in container?
I want to put to container some unique_ptr with resource from another unique_ptr. Or maybe move one unique_ptr fro...
Pasha
Votes: 0
Answers: 1