Monthly Archives: October 2017


code
Syntax [crayon-5d5e8c0e4bc12473653854/] Provide default values Useful for providing default values for its members. This also reduce the number of members that needs to be initialized per constructor. In case the member contains a default initialization and is also set on constructor, the constructor will override the value.   Pitfalls Initialization […]

Classes: In-class member initializers


fw_list
Syntax Defined in header <forward_list> [crayon-5d5e8c0e4d33a818309318/] Definitions List definition [crayon-5d5e8c0e4d343095585878/] Forward list definition [crayon-5d5e8c0e4d348276492536/] The main difference between a list and a forward list is the pointer to the previous node.   About forward list is a container that supports fast insertion and removal of elements from anywhere in the […]

STL Containers: Forward list


code
Syntax [crayon-5d5e8c0e4dcc5108824057/] std::function is a wrapper to a simple function, to a functor or to a lambda expression. std::bind is a template function that returns a std::function object that binds a set of arguments to a function.   [crayon-5d5e8c0e4dccd354140658/] bind returns a new function object with a different prototype because […]

Miscellaneous: Function / Bind