Language
C++
Compiler
gcc HEAD 9.0.0 20181010 (experimental)
Options
Warnings
Optimization
Don't Use Boost
C++14(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=gnu++14
***tests of universal reference of std::make_pair***
std::make_pair test rval-A, case 1:
A() is called.
move-ctor of A is called!
std::make_pair test lval-A:
A() is called.
copy-ctor of A is called...
std::make_pair test rval-A, case 2:
A() is called.
move-ctor of A is called!
***tests of std::map::emplace***
std::map::emplace test with rval-A, case-1:
A() is called.
move-ctor of A is called!
std::map::emplace test with lval-A:
A() is called.
copy-ctor of A is called...
std::map::emplace test with rval-A, case-2:
A() is called.
move-ctor of A is called!
***tests of std::map::insert***
std::map::insert test with std::make_pair and rval-A, case-1:
A() is called.
move-ctor of A is called!
move-ctor of A is called!
std::map::insert test with std::make_pair and lval-A:
A() is called.
copy-ctor of A is called...
move-ctor of A is called!
std::map::insert test with std::make_pair and rval-A, case-2:
A() is called.
move-ctor of A is called!
move-ctor of A is called!
Exit Code:
0