Commit 7d41577
Pankaj Raghav
Corrected the func definition for vector emplace
The emplace member function of std::vector should take const_iterator and variadic list of arguments as their input for perfect forwarding (https://en.cppreference.com/w/cpp/container/vector/emplace). This document had rvalue reference instead of variadic list of arguments. I also checked the std::vector implementation MSVC, it is now according to the changes proposed.
Probably why it still had rvalue reference is explained in this link (https://stackoverflow.com/questions/4303513/push-back-vs-emplace-back).1 parent 2c85088 commit 7d41577
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
| 797 | + | |
797 | 798 | | |
798 | 799 | | |
799 | | - | |
| 800 | + | |
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
803 | 804 | | |
804 | 805 | | |
805 | 806 | | |
806 | 807 | | |
807 | | - | |
808 | | - | |
| 808 | + | |
| 809 | + | |
809 | 810 | | |
810 | 811 | | |
811 | 812 | | |
| |||
0 commit comments