From 1abcb06bedadfbd40b4ec6f7e5f6a95021df3c96 Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Mon, 26 Feb 2018 09:14:31 -0600 Subject: Add constants for tuple fields Add constants for use with std::get. Tested: Run unit tests Change-Id: Ic09c13feeda69d61c98f63d227cae8f08d1bf50e Signed-off-by: Matt Spinler --- src/elog.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/elog.hpp') 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 @@ class ElogWithMetadataCapture : public IndexedCallback * @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(storage)) * set to true, and then packs those paths, names, and values * into a metadata string that looks like: * @@ -185,16 +185,17 @@ class ElogWithMetadataCapture : public IndexedCallback 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(n.second).get(); + const auto& result = std::get(storage); if (!result.empty() && any_ns::any_cast(result)) { - const auto& path = std::get<0>(n.first).get(); - const auto& propertyName = std::get<2>(n.first).get(); + const auto& path = std::get(n.first).get(); + const auto& propertyName = std::get( + n.first).get(); auto value = ToString::op( any_ns::any_cast( - std::get<0>(storage))); + std::get(storage))); metadata += path + ":" + propertyName + '=' + value + '|'; -- cgit v1.2.1