I currently have a member function defined as such:
template<typename T> bool updateParameter(const std::string& name, const T& data);
With overload for pointers.
template<typename T> bool updateParameter(const std::string& name, T* data);
I would like to use this function as such:
int test = 20;
updateParameter<int>("name", 0);
updateParameter<int>("Referenced parameter", &test);
Thus, I can have a parameter object that either owns the data that it represents, or points to an element that belongs to the user.
MSVC const 0 "name" , , . , const char [] std::string name.
, MSVC GCC, , , , const T & T *