Код (не удалось скомпилировать):
Код: Выделить всё
#include
using namespace std;
int main() {
map
, vector> M0, M1;
// Assertion fails to compile
assert(M0[{1, 0}].size() == M1[{0, 1}].size());
return 0;
}
Код: Выделить всё
error: macro "assert" passed 3 arguments, but takes just 1
Код: Выделить всё
#include
using namespace std;
int main() {
map
, vector> M0, M1;
// Assertion compiles successfully
assert((M0[{1, 0}].size() == M1[{0, 1}].size()));
return 0;
}
Подробнее здесь: https://stackoverflow.com/questions/793 ... ith-stdmap
Мобильная версия