C++11: gcc-4.6.1 doesn't support delegating constructors

This commit is contained in:
Marius Kintel 2016-06-13 21:38:21 -04:00
parent b509afd4ed
commit f4ddead656
2 changed files with 4 additions and 3 deletions

View file

@ -10,7 +10,8 @@
class Assignment : public ASTNode class Assignment : public ASTNode
{ {
public: public:
Assignment(std::string name, const Location &loc) : Assignment(name, shared_ptr<class Expression>(), loc) { } Assignment(std::string name, const Location &loc)
: ASTNode(loc), name(name) { }
Assignment(std::string name, Assignment(std::string name,
shared_ptr<class Expression> expr = shared_ptr<class Expression>(), shared_ptr<class Expression> expr = shared_ptr<class Expression>(),
const Location &loc = Location::NONE) const Location &loc = Location::NONE)

View file

@ -13,8 +13,8 @@ class AbstractFunction
private: private:
const Feature *feature; const Feature *feature;
public: public:
AbstractFunction(const Feature& feature) : AbstractFunction(&feature) {} AbstractFunction(const Feature& feature) : feature(&feature) {}
AbstractFunction(const Feature *feature = NULL) : feature(feature) {} AbstractFunction() : feature(NULL) {}
virtual ~AbstractFunction(); virtual ~AbstractFunction();
virtual bool is_experimental() const { return feature != NULL; } virtual bool is_experimental() const { return feature != NULL; }
virtual bool is_enabled() const { return (feature == NULL) || feature->is_enabled(); } virtual bool is_enabled() const { return (feature == NULL) || feature->is_enabled(); }