From acf0e00b9e45615c5f10777d764100c2c086acab Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 20 Apr 2014 12:53:33 +0300 Subject: [PATCH] Use dynamic_cast to support Collection as virtual base class --- source/collection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/collection.h b/source/collection.h index 5f0650c..174c7fc 100644 --- a/source/collection.h +++ b/source/collection.h @@ -380,7 +380,7 @@ private: Creator(FuncPtr f): func(f) { } virtual T *create(Collection &coll, const std::string &name) const - { return (static_cast(coll).*func)(name); } + { return (dynamic_cast(coll).*func)(name); } }; template -- 2.43.0