| 10081 | #if ((__cplusplus >= 201403L) || (_MSVC_LANG >= 201703L)) |
| 10082 | template <typename... Args> |
| 10083 | bool Inform(Args... args) |
| 10084 | { |
| 10085 | // using T = std::variant<Args...>; // FIXME: remove type duplicates |
| 10086 | using T = std::variant<std::string, const char*, uint64_t, Ref<Architecture>>; |
| 10087 | std::vector<T> unpackedArgs {args...}; |
| 10088 | Json::Value request(Json::arrayValue); |
| 10089 | for (auto& arg : unpackedArgs) |
| 10090 | std::visit(overload {[&](Ref<Architecture> arch) { request.append(Json::Value(arch->GetName())); }, |
| 10091 | [&](uint64_t val) { request.append(Json::Value(val)); }, |
| 10092 | [&](auto& val) { |
| 10093 | request.append(Json::Value(std::forward<decltype(val)>(val))); |
| 10094 | }}, |
| 10095 | arg); |
| 10096 | |
| 10097 | return Inform(Json::writeString(m_builder, request)); |
| 10098 | } |
| 10099 | #endif |
| 10100 | }; |
| 10101 |
nothing calls this directly
no test coverage detected