summaryrefslogtreecommitdiff
path: root/cpp/include
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2013-04-17 22:48:02 +0000
committerAndrew Stitcher <astitcher@apache.org>2013-04-17 22:48:02 +0000
commitcaeb25f145d08eb086696ef2cba7fd70ac103515 (patch)
tree777ca8f6c9455f8d6607dceee377700c5cad8841 /cpp/include
parenta85ec7bc89b5e658df7e23b299c6c2fcde98daf1 (diff)
downloadqpid-python-caeb25f145d08eb086696ef2cba7fd70ac103515.tar.gz
QPID-3689: Change tcp nodelay to be the default
This change also alters the implementation of simple switch like options when using boost version 1.35 and later. We now allow these switches to also take an optional "=yes" or "=no" (and similar) argument. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1469088 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
-rw-r--r--cpp/include/qpid/Options.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/include/qpid/Options.h b/cpp/include/qpid/Options.h
index feef5d8b98..993e024f3d 100644
--- a/cpp/include/qpid/Options.h
+++ b/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.