Monthly Archives: October 2017


code
Syntax [crayon-5d0b40fcaf16a771348281/] 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-5d0b40fcb01a1329787620/] Definitions List definition [crayon-5d0b40fcb01aa936500131/] Forward list definition [crayon-5d0b40fcb01af660713791/] 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-5d0b40fcb054d123684200/] 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-5d0b40fcb0555395445610/] bind returns a new function object with a different prototype because […]

Miscellaneous: Function / Bind