IVGCVSW-4519 Remove Boost Variant and apply_visitor variant
* replace boost::variant with mapbox::util::variant
* replace boost::apply_visitor with mapbox::util::apply_visitor
* replace boost::get with mapbox::util::get
Signed-off-by: James Ward <james.ward@arm.com>
Change-Id: I38460cabbcd5e56d4d61151bfe3dcb5681ce696e
diff --git a/tests/InferenceTest.inl b/tests/InferenceTest.inl
index 88ce352..e10bb38 100644
--- a/tests/InferenceTest.inl
+++ b/tests/InferenceTest.inl
@@ -26,7 +26,7 @@
namespace test
{
-using TContainer = boost::variant<std::vector<float>, std::vector<int>, std::vector<unsigned char>>;
+using TContainer = mapbox::util::variant<std::vector<float>, std::vector<int>, std::vector<unsigned char>>;
template <typename TTestCaseDatabase, typename TModel>
ClassifierTestCase<TTestCaseDatabase, TModel>::ClassifierTestCase(
@@ -49,7 +49,7 @@
{
}
-struct ClassifierResultProcessor : public boost::static_visitor<>
+struct ClassifierResultProcessor
{
using ResultMap = std::map<float,int>;
@@ -118,7 +118,7 @@
const auto testCaseId = this->GetTestCaseId();
ClassifierResultProcessor resultProcessor(m_QuantizationParams.first, m_QuantizationParams.second);
- boost::apply_visitor(resultProcessor, output);
+ mapbox::util::apply_visitor(resultProcessor, output);
ARMNN_LOG(info) << "= Prediction values for test #" << testCaseId;
auto it = resultProcessor.GetResultMap().rbegin();
@@ -130,7 +130,7 @@
}
unsigned int prediction = 0;
- boost::apply_visitor([&](auto&& value)
+ mapbox::util::apply_visitor([&](auto&& value)
{
prediction = armnn::numeric_cast<unsigned int>(
std::distance(value.begin(), std::max_element(value.begin(), value.end())));