X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Floader.h;fp=source%2Floader.h;h=926a2a16a4adbf2d542701867a47358ad09a3467;hp=574ecce0c11b5bac9af56d82b6a0782a5288d8b6;hb=7e81da8d9a6e689e271f4f0450a69d8a14f515bb;hpb=708ef339d3e4d3661c8b3a75e3b01bafbed0f568 diff --git a/source/loader.h b/source/loader.h index 574ecce..926a2a1 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. */ @@ -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)