fw: instantiate strategy of next higher version
When an exact strategy version is unavailable, strategy registry now
instantiates the next higher version which can offer backwards compatibility.
All existing strategies do not support other versions.
refs #3868
Change-Id: Id2cf9ae3a1fa078ce8be815eea9396f5aa81ecbb
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 1f34ce2..b7b7adb 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -47,6 +47,7 @@
static void
registerType(const Name& strategyName = S::getStrategyName())
{
+ BOOST_ASSERT(strategyName.size() > 1);
BOOST_ASSERT(strategyName.at(-1).isVersion());
Registry& registry = getRegistry();
BOOST_ASSERT(registry.count(strategyName) == 0);