Monthly Archives: October 2017

Syntax [crayon-5cb9e78660092850446586/] 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

Syntax Defined in header <forward_list> [crayon-5cb9e7866182d360487951/] Definitions List definition [crayon-5cb9e78661836072222186/] Forward list definition [crayon-5cb9e7866183c850719061/] 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

Syntax [crayon-5cb9e78661c62978752421/] 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-5cb9e78661c6b367823205/] bind returns a new function object with a different prototype because […]

Miscellaneous: Function / Bind