summaryrefslogtreecommitdiff
path: root/qpid/cpp/include
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/include')
-rw-r--r--qpid/cpp/include/qpid/Options.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/qpid/cpp/include/qpid/Options.h b/qpid/cpp/include/qpid/Options.h
index feef5d8b98..993e024f3d 100644
--- a/qpid/cpp/include/qpid/Options.h
+++ b/qpid/cpp/include/qpid/Options.h
@@ -90,7 +90,13 @@ po::value_semantic* optValue(std::vector<T>& value, const char* name) {
}
/** Create a boolean switch value. Presence of the option sets the value. */
-inline po::value_semantic* optValue(bool& value) { return po::bool_switch(&value); }
+inline po::value_semantic* optValue(bool& value) {
+#if (BOOST_VERSION >= 103500)
+ return (new OptionValue<bool>(value, ""))->implicit_value(true);
+#else
+ return po::bool_switch(&value);
+#endif
+}
/**
* Base class for options.