diff --git a/cpp/src/strings/regex/regexec.cu b/cpp/src/strings/regex/regexec.cu index 99f6692f023..2ee1901c32d 100644 --- a/cpp/src/strings/regex/regexec.cu +++ b/cpp/src/strings/regex/regexec.cu @@ -109,7 +109,7 @@ std::unique_ptr> reprog_devic auto d_end = d_ptr + (classes_count * sizeof(reclass_device)); // place each class and append the variable length data for (int32_t idx = 0; idx < classes_count; ++idx) { - auto h_class = h_prog.class_at(idx); + auto const& h_class = h_prog.class_at(idx); reclass_device d_class{h_class.builtins, static_cast(h_class.literals.size()), reinterpret_cast(d_end)};