Adds a macro to SWIG to ignore the override and final C++11 keywords in older version...
authorTim King <taking@cs.nyu.edu>
Fri, 27 Oct 2017 03:13:25 +0000 (20:13 -0700)
committerAndres Noetzli <andres.noetzli@gmail.com>
Fri, 27 Oct 2017 03:13:25 +0000 (20:13 -0700)
src/cvc4.i
src/smt/command.h

index e1138649ca5f47c3df6a6087aa1d60e64db51883..58dceb6b17541bc90df516d9816ca3239143a8e9 100644 (file)
@@ -1,3 +1,10 @@
+// We safely ignore some C++11 keywords that older versions of SWIG cannot
+// handle.
+#if SWIG_VERSION < 0x030000
+%define final %enddef
+%define override %enddef
+#endif
+
 %import "bindings/swig.h"
 
 %include "stdint.i"
index dcd818f83eee8ced34ac11f68321c0e4163e7939..f5be9ddfee195225a2be8f0ee63e541c12c5fa4b 100644 (file)
@@ -474,13 +474,13 @@ class CVC4_PUBLIC SetUserAttributeCommand : public Command {
                           const std::vector<Expr>& values) throw();
   SetUserAttributeCommand(const std::string& attr, Expr expr,
                           const std::string& value) throw();
-  ~SetUserAttributeCommand() throw() {}
+  ~SetUserAttributeCommand() throw() override {}
 
-  void invoke(SmtEngine* smtEngine);
+  void invoke(SmtEngine* smtEngine) override;
   Command* exportTo(ExprManager* exprManager,
-                    ExprManagerMapCollection& variableMap);
-  Command* clone() const;
-  std::string getCommandName() const throw();
+                    ExprManagerMapCollection& variableMap) override;
+  Command* clone() const override;
+  std::string getCommandName() const throw() override;
 
  private:
   SetUserAttributeCommand(const std::string& attr, Expr expr,