Jump to content
  • Advertisement
Sign in to follow this  
Miatar

Error at Tutorial Compilation

This topic is 3103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

New to AS. Trying to compile Tutorial. Gets Error at RegisterSTDString(engine); [BCC32 Error] scriptstdstring.cpp(430): E2335 Overloaded 'operator string::=' ambiguous in this context [BCC32 Error] scriptstdstring.cpp(431): E2335 Overloaded 'operator string::+=' ambiguous in this context [BCC32 Error] scriptstdstring.cpp(441): E2335 Overloaded 'string::resize' ambiguous in this context [BCC32 Error] scriptstdstring.cpp(446): E2335 Overloaded 'string::resize' ambiguous in this context C++ Builder 2010. Can anyone help?

Share this post


Link to post
Share on other sites
Advertisement
This is strange. The method pointers are fully specified with the asMETHODPR macro on these lines, there shouldn't be any ambiguity at all here.

Does the C++ Builder manual say how you're supposed to take the address of overloaded class methods? There may be a slight syntax difference for the C++ Builder.

Currently the asMETHODPR macro uses the following syntax to get the correct class method:


static_cast<r (c::*)p>(&c::m)


Where r is the return type, c is the class name, p is the parameter list, and m is the method name. For the resize method for example you would get:


static_cast<void (string::*)(size_t)>(&string::resize)


As far as I know this is the correct way of taking the address of a class method with overloads.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!