Tag: C++

Cpp breakpoint in template vs15

By default breakpoint inside template method will not by hit. Because the actual source code is different (template is just template not the actual code).   To make it work got to the settings (gear icon) and tick the option

Tagged with: ,

Cpp template constraint

template <typename T> T* GetComponent() { static_assert(std::is_base_of<Component, T>::value, “The function call GetComponent<T>() requires T to inherit from Component!”); return (T*)components.at(0); }  

Tagged with: ,

Overloading operators in C++

Tagged with: