Is there any possible way for me to access these functions? (Note: I have other functions as well but they don't relate to the issue). I am trying to create an instance of my class in main and none of the other functions are giving me trouble. Just the ones of type void. Any thoughts on how I can access these functions? This is how I am trying to create an instance of the hillClimbing class and calling the placeQueens and moveQueen functions.

See also questions close to this topic

This question is based on the example code below, which is inspired by Sean Parent's talk.
The goal of the code below is to provide an object wrapper similar to boost::any. I wrote this code to educate myself of type erasure. So, there is no practical uses this code intends (considering there is already boost::any).

Before I can really ask my question, let's examine the code in the following aspects:

Concept::getObjPtr_ returns void* because a) Concept cannot be a template otherwise unique_ptr<Concept> Self would not work; b) void* is the only way I know how to return Obj::Data in a type-agnostic way in C++. Please correct me if this is wrong...

T * getObjPtr(ObjWrap O) is a template that needs instantiation separately from the ObjWrap constructor.

The use of ObjWrap basically includes: a) make a new ObjWrap over an existing object; b) retrieve the underlying object given an ObjWrap. For example:

This works but it is obvious that getObjPtr<int>(b) does not work as intended.

So, my question is:

Is there a way to fix the above code so that we can simply use int* p_a = getObjPtr(a) and std::string* p_b = getObjPtr(b)? In other words, is there a way in C++ to instantiate two templates at the same time (if so, we can instantiate the ObjWrap constructor and T* getObjPtr(ObjWrap) at construction time of a ObjWrap object)?

Edit:

Making ObjWrap a templated class does not help since it defeats the purpose of type erasure.

But the MPL version gives me a type I can use to make class members, where as the Hana version gives me a variable that can't be a class member and that I can't seem to use to make class members of a type.

I'm building a snake game derivative with C++ and OpenGL. I'm using following libraries/headers: glew, glfw, glm and stb_image.
I'm programming for both Windows 10 (Visual Studio 2017) and Ubuntu 16.04. I can build and execute both versions without any issues. But if I hand the executables to a friend neither OS version works. Do I do something wrong when building? Or do I have to also ship the libraries!