X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Floader.h;h=85e26d938b0aba5ac8a5efb67d5593e8c7137f45;hb=daca21051927eabee098e422fe5a0990acacfb96;hp=574ecce0c11b5bac9af56d82b6a0782a5288d8b6;hpb=9c95942d24a92abea14bb9e11d33daae2d017321;p=libs%2Fdatafile.git diff --git a/source/loader.h b/source/loader.h index 574ecce..85e26d9 100644 --- a/source/loader.h +++ b/source/loader.h @@ -1,6 +1,7 @@ #ifndef MSP_DATAFILE_LOADER_H_ #define MSP_DATAFILE_LOADER_H_ +#include #include #include #include "loaderaction.h" @@ -115,7 +116,7 @@ protected: /** Adds a keyword that is loaded by calling a function with a bound first argument. */ template - void add(const std::string &k, void (L::*func)(B0, Args...), const typename RemoveReference::Type &b0) + void add(const std::string &k, void (L::*func)(B0, Args...), const typename std::remove_reference::type &b0) { add(k, new LoaderFuncNBound1(func, b0)); } /** Adds a keyword that is loaded into a member of the loaded object. */ @@ -129,7 +130,7 @@ protected: /** Adds a keyword that is recognized but ignored. */ void add(const std::string &k) - { add(k, 0); } + { add(k, nullptr); } private: void add(const std::string &, LoaderAction *); @@ -191,7 +192,7 @@ Loads an object from a file stored in a collection. The object must havea public Loader class. Any extra arguments are passed to the Loader constructor. */ template -typename EnableIf::value, void>::No load(T &obj, C &coll, const std::string &fn, Args &... args) +typename std::enable_if::value>::type load(T &obj, C &coll, const std::string &fn, Args &... args) { RefPtr in = coll.open_raw(fn); if(!in)