in the code below, it has the following line
base_list(const base_list &tmp) :memory::SqlAlloc()
base_list is a method, memory is a namespace, SqlAlloc is a class, so what does it mean when combine them together?
class base_list :public memory::SqlAlloc
{
public:
base_list(const base_list &tmp) :memory::SqlAlloc()
{
elements= tmp.elements;
first= tmp.first;
last= elements ? tmp.last : &first;
}
Uses
Initializer listto call constructor of classSqlAllocinside namespacememory.For more information on advantages of using
Initializer Listin C++, See this.