Possibility to pass class method reference
[command.git] / tests / option / handles_float_value.cpp
index e1599f6b3b0f59ff4e37f219a8add2f2270e8155..e04b622da08a1f0f1b4f07bb4f35f4a7a9889989 100644 (file)
@@ -9,18 +9,18 @@ using namespace command;
 #define NAME "test"
 #define VALUE "567890.1234"
 
-#define OPTION NAME"="VALUE
+#define OPTION NAME "=" VALUE
 
 typedef float OptionType;
 
 OptionType test;
 
-void function(OptionType value) {
+void _function(OptionType value) {
     test = value;
 }
 
 int main() {
-    Option<OptionType> option(NAME, "Option with float value", function);
+    Option<OptionType> option(NAME, "Option with float value", _function);
 
     if (option.understand(OPTION)) {
         option.handle();