PMIx: Support integer values

This commit is contained in:
Dennis Klein 2019-10-07 12:30:44 +02:00 committed by Dennis Klein
parent 5fc1c47e2a
commit e1134321dd

View File

@ -21,7 +21,7 @@
#include <vector> #include <vector>
#include <FairMQLogger.h> #include <FairMQLogger.h>
// C++ PMIx v2.1 API // C++ PMIx v2.2 API
namespace pmix namespace pmix
{ {
@ -90,12 +90,6 @@ struct value : pmix_value_t
} }
} }
// template<typename T>
// value(const T* val, data_type dt)
// {
// PMIX_VALUE_LOAD(static_cast<pmix_value_t*>(this), const_cast<void*>(val), dt);
// }
template<typename T> template<typename T>
explicit value(T) explicit value(T)
{ {
@ -112,6 +106,11 @@ struct value : pmix_value_t
PMIX_VALUE_LOAD( PMIX_VALUE_LOAD(
static_cast<pmix_value_t*>(this), const_cast<char*>(val.c_str()), PMIX_STRING); static_cast<pmix_value_t*>(this), const_cast<char*>(val.c_str()), PMIX_STRING);
} }
explicit value(int val)
{
PMIX_VALUE_LOAD(static_cast<pmix_value_t*>(this), &val, PMIX_INT);
}
}; };
struct info : pmix_info_t struct info : pmix_info_t