skip to Main Content

Visual Studio Code – Is it false positive here: warning C4172: returning address of local variable or temporary?

In the following code: #include <execution> #include <vector> template<typename T> class Index { public: const std::string& text; const std::vector<T>& index; decltype(index.begin())& begin() { return index.begin(); } // No warning decltype(index.end())& end() { return index.end(); } // No warning const decltype(index.cbegin())&…

VIEW QUESTION
Back To Top
Search