From 4fd6d4886ffc6a12b1a4b27234f9d7104ff1080f Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Wed, 17 Apr 2013 22:48:02 +0000 Subject: 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@1469088 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/include/qpid/Options.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'qpid/cpp/include') 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& 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(value, ""))->implicit_value(true); +#else + return po::bool_switch(&value); +#endif +} /** * Base class for options. -- cgit v1.2.1