Monthly Archives: October 2017

Syntax [crayon-5dab10db5a8be552610664/] 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-5dab10db5bbc4457226124/] Definitions List definition [crayon-5dab10db5bbd1785253384/] Forward list definition [crayon-5dab10db5bbd9452355146/] 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-5dab10db5c130974690120/] 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-5dab10db5c138876281871/] bind returns a new function object with a different prototype because […]

Miscellaneous: Function / Bind