While attempting to pass a vector by const reference I'm receiving the following intellisense error (project builds successfully):
no instance of constructor "ObjOne::ObjOne" matches the argument list argument types are: (std::vector<int, std::allocator<int>>) I have commented in the below minimal reproducible example where the error occurs. Is there a known way to resolve issues such as these within visual studio 2017?
#include <vector> #include <string> #include <optional> class ObjOne { public: ObjOne(const std::vector<int>& p1) {} }; class ObjTwo { private: std::vector<int> testVec = { 1,2,3,4,5 }; std::optional<ObjOne> optObjOne; public: ObjTwo() {} void makeObjOne() { this->optObjOne = ObjOne(this->testVec); // Issue arises here } }; int main() { auto myObjTwo = ObjTwo(); myObjTwo.makeObjOne(); return 0; } 
vertex.hortexture.hheaders, so those should be added to the question. Also check and make sure you don't have multiple copies of those headers sitting around in different directories.minimal reproducible exampleas requested. Apologies for not having done this from the start./permissive- /GSwhich I believe was enabled by default and/std:c++ latest