X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e18a7b043d161b29d0bf3f5743cb7a570241576a..68fddbaeb8d7a332bec9eb09ef0e7e548ac1850c:/src/xbt/config.cpp diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index d2f380be0c..cb6c810de6 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -96,30 +96,34 @@ static long int parseLong(const char* value) // ***** ConfigType ***** /// A trait which define possible options types: -template struct ConfigType; +template class ConfigType; -template<> struct ConfigType { +template <> class ConfigType { +public: static constexpr const char* type_name = "int"; static inline double parse(const char* value) { return parseLong(value); } }; -template<> struct ConfigType { +template <> class ConfigType { +public: static constexpr const char* type_name = "double"; static inline double parse(const char* value) { return parseDouble(value); } }; -template<> struct ConfigType { +template <> class ConfigType { +public: static constexpr const char* type_name = "string"; static inline std::string parse(const char* value) { return std::string(value); } }; -template<> struct ConfigType { +template <> class ConfigType { +public: static constexpr const char* type_name = "boolean"; static inline bool parse(const char* value) { @@ -519,7 +523,6 @@ void xbt_cfg_set_parse(const char *options) /* Pass the following blank chars */ *(option++) = '\0'; while (option - name < (len - 1) && (*option == ' ' || *option == '\n' || *option == '\t')) { - /* fprintf(stderr,"Ignore a blank char.\n"); */ option++; } if (option - name == len - 1)