Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


noatom

Member Since 23 Jun 2012
Offline Last Active Jul 30 2015 04:31 PM

Posts I've Made

In Topic: C++ template specialization problem

07 July 2015 - 03:02 PM

So, yes, the code I had in the first post was badly written, i fixed it now.

 

The problem is, a call to the specialized version created not errors. However, a call to the non specialized version crated the error mentioned in the first post.


In Topic: std::bind method not recognized

21 June 2015 - 03:15 PM

Thanks Andy & SiCrane!


In Topic: std::bind method not recognized

21 June 2015 - 11:56 AM

std::function<uint64_t(uint32_t)> the_method = std::bind(static_cast<uint64_t(sql::ResultSet::*)(uint32_t)>(&sql::ResultSet::getUInt64), resSet, _1);

Even with that, static_cast gives the error that it doesn't know which overloaded instance of the getUInt64  is intended.


In Topic: Get object from std::function

20 June 2015 - 07:06 PM

Yea, that's what I'll do. Thanks for your help rip-off and Alvaro.


In Topic: Get object from std::function

20 June 2015 - 05:45 PM

Well, the situation is kinda like this:

 

Based on a certain value, either:

a method is called on the object(which I already know its name)

another method is called on the object, and I don't know its name, I only know the arguments

 

So I cannot get rid of the std::function and simply replace it with a pointer, because I do need the user to send the actual method to call, if the first method, which I know, is not to be called.

 

I wanted to extract the object from the function, so I could call that first method, which I know its name, in case I wouldn't have to call the second method.


PARTNERS