I had a bug which is resolved recently but I want to understand why. I have a cmake project using c++11.
This works on mac osx but not on ubuntu. It returns null on ubuntu.
obj *getPointer(){
obj test = obj(1,2,3);
return &test;
}
This works on both:
obj *getPointer(){
obj* ptr;
obj test = obj(1,2,3);
ptr = &test
return &ptr;
}