Add constants for tuple fields
Add constants for use with std::get.
Tested: Run unit tests
Change-Id: Ic09c13feeda69d61c98f63d227cae8f08d1bf50e
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/src/elog.hpp b/src/elog.hpp
index 3f8ae3b..234ef6f 100644
--- a/src/elog.hpp
+++ b/src/elog.hpp
@@ -171,7 +171,7 @@
* @brief Builds a metadata string with property information
*
* Finds all of the properties in the index that have
- * their condition pass/fail fields (get<1>(storage))
+ * their condition pass/fail fields (get<resultIndex>(storage))
* set to true, and then packs those paths, names, and values
* into a metadata string that looks like:
*
@@ -185,16 +185,17 @@
for (const auto& n : index)
{
- const auto& storage = std::get<2>(n.second).get();
- const auto& result = std::get<1>(storage);
+ const auto& storage = std::get<storageIndex>(n.second).get();
+ const auto& result = std::get<resultIndex>(storage);
if (!result.empty() && any_ns::any_cast<bool>(result))
{
- const auto& path = std::get<0>(n.first).get();
- const auto& propertyName = std::get<2>(n.first).get();
+ const auto& path = std::get<pathIndex>(n.first).get();
+ const auto& propertyName = std::get<propertyIndex>(
+ n.first).get();
auto value = ToString<propertyType>::op(
any_ns::any_cast<propertyType>(
- std::get<0>(storage)));
+ std::get<valueIndex>(storage)));
metadata += path + ":" + propertyName +
'=' + value + '|';