LA
Size: a a a
LA
RM
RM
RM
A
A
SH
DK
AG
AG
SH
#include <iostream>
#include <sstream>
void* operator new(size_t n)
{
std::cout << “Allocating “ << n << “ bytes;\n”;
return malloc(n);
}
int main()
{
std::stringstream ss;
ss << “...”;
}
SH
V
struct AA {вопросы по нему:
std::string path;
AA(const std::string&& path) {
this->path = path;
}
};
struct BB : public AA{
//но если обертнуть в std::move, то все заработает
BB(const std::string&& path) : AA(path){//std::move(path)
}
};
LA
struct AA {вопросы по нему:
std::string path;
AA(const std::string&& path) {
this->path = path;
}
};
struct BB : public AA{
//но если обертнуть в std::move, то все заработает
BB(const std::string&& path) : AA(path){//std::move(path)
}
};
LA
struct AA {вопросы по нему:
std::string path;
AA(const std::string&& path) {
this->path = path;
}
};
struct BB : public AA{
//но если обертнуть в std::move, то все заработает
BB(const std::string&& path) : AA(path){//std::move(path)
}
};
const Type&&
, а не const Type&
. В любом случае, первое бессмысленно. Мы не можем переместить константное значениеSS
LA
LA
ДЖ
LA