January 2020
Intermediate to advanced
454 pages
11h 25m
English
The following defines our default constructor:
container() noexcept(noexcept(Allocator())) { std::cout << "1\n"; }
Since the default constructor for std::vector produces an empty vector, there is no additional logic that we must add as an empty vector is sorted by default. Next, we must define a constructor that takes a custom allocator.