From e1134321dd6a5abade50b4e541f54a3021e29ca9 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Mon, 7 Oct 2019 12:30:44 +0200 Subject: [PATCH] PMIx: Support integer values --- fairmq/plugins/PMIx/PMIx.hpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fairmq/plugins/PMIx/PMIx.hpp b/fairmq/plugins/PMIx/PMIx.hpp index 1865ba4c..9e94c01b 100644 --- a/fairmq/plugins/PMIx/PMIx.hpp +++ b/fairmq/plugins/PMIx/PMIx.hpp @@ -21,7 +21,7 @@ #include #include -// C++ PMIx v2.1 API +// C++ PMIx v2.2 API namespace pmix { @@ -90,12 +90,6 @@ struct value : pmix_value_t } } - // template - // value(const T* val, data_type dt) - // { - // PMIX_VALUE_LOAD(static_cast(this), const_cast(val), dt); - // } - template explicit value(T) { @@ -112,6 +106,11 @@ struct value : pmix_value_t PMIX_VALUE_LOAD( static_cast(this), const_cast(val.c_str()), PMIX_STRING); } + + explicit value(int val) + { + PMIX_VALUE_LOAD(static_cast(this), &val, PMIX_INT); + } }; struct info : pmix_info_t