diff --git a/languages/cpp/templates/result-instantiation/tuple.cpp b/languages/cpp/templates/result-instantiation/tuple.cpp index c94a7054..9ba6f3af 100644 --- a/languages/cpp/templates/result-instantiation/tuple.cpp +++ b/languages/cpp/templates/result-instantiation/tuple.cpp @@ -1,2 +1,5 @@ - ${property}.first = jsonResult.Get(0); - ${property}.second = jsonResult.Get(1); \ No newline at end of file + ASSERT((jsonResult.Length() == 0) || (jsonResult.Length() == 2)); + if (jsonResult.Length() == 2) { + ${property}.first = jsonResult.Get(0); + ${property}.second = jsonResult.Get(1); + }