Fix C++11 Properties::set with a const char* value
@@ -94,6 +94,7 @@ namespace celix {
bool end{false};
};
+
/**
* @brief A collection of strings key values mainly used as meta data for registered services.
*
@@ -358,19 +359,19 @@ namespace celix {
}
/**
- * @brief Sets a T property. Will use (std::) to_string to convert the value to string.
+ * @brief Sets a const char* property
*/
- template<typename T>
- void set(const std::string& key, T value) {
- using namespace std;
- celix_properties_set(cProps.get(), key.c_str(), to_string(value).c_str());
+ void set(const std::string& key, const char* value) {
+ celix_properties_set(cProps.get(), key.c_str(), value);
}
/**
- * @brief Sets a const char* property.
+ * @brief Sets a T property. Will use (std::) to_string to convert the value to string.
*/
- void set(const std::string& key, const char* value) {
- celix_properties_set(cProps.get(), key.c_str(), value);
+ template<typename T>
+ void set(const std::string& key, T&& value) {
+ using namespace std;
+ celix_properties_set(cProps.get(), key.c_str(), to_string(value).c_str());
}
#endif
