From 6c6e0995d3473338c80c361a1610f24665a9ef08 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 20 Jan 2021 15:11:28 +1100 Subject: [PATCH] Added const overload of utils::get_if for the boost path --- src/utils/variant.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/variant.hpp b/src/utils/variant.hpp index 7a247e7fa7de..b69d26d27a26 100644 --- a/src/utils/variant.hpp +++ b/src/utils/variant.hpp @@ -67,6 +67,12 @@ inline T* get_if(V* variant) return boost::get(variant); } +template +inline const T* get_if(const V* variant) +{ + return boost::get(variant); +} + #endif template