Giter VIP home page Giter VIP logo

Comments (6)

lyskov avatar lyskov commented on June 18, 2024

Hmm, i do not see noexcept in an attribute list, so it might be implemented differently. Could you please post code snippet and briefly describe what problem does it trigger?

from binder.

thisiscam avatar thisiscam commented on June 18, 2024
class RuntimeException : public std::exception {
private:
	std::string _message;
public:
	RuntimeException(const std::string &msg = "");
	virtual const char* what() const noexcept override;
};

Notice how there is a noexcept for method what(). The generated code currently doesn't add this attribute and the compiler give a static error saying

error: exception specification of overriding function is more lax than base version const char * what() const override {

from binder.

thisiscam avatar thisiscam commented on June 18, 2024

Ok I think I found the source regarding this

https://clang.llvm.org/doxygen/ExceptionSpecificationType_8h.html

Haven't looked at how to go from decl to this ExceptionSpecification though.

Also, this means that other than noexcept, we shall probably handle exception throwing in general as well.

from binder.

lyskov avatar lyskov commented on June 18, 2024

Thank you @thisiscam , this was very helpful! I pushed the patch which i think should handle both noexcept and throw() cases, could you please test if this works for you?

from binder.

thisiscam avatar thisiscam commented on June 18, 2024

Thanks for the prompt respoonse! works like a charm!

from binder.

lyskov avatar lyskov commented on June 18, 2024

Great, glad it helped!

from binder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.