Replace auto with function template for c++17. (#2754)

In #2443, a helper function was added test new print functionality, but it used auto for the function parameter types.

We need to support c++17 for downstream libraries, so we cannot use auto there. This PR replaces it witht the equivalent function template implementation.
This commit is contained in:
John Shumway
2025-08-27 17:10:39 -07:00
committed by GitHub
parent 0ac908fb57
commit 9751583f95

View File

@@ -12,13 +12,15 @@ namespace ck_tile {
class PrintStaticEncodingPatternTest : public PrintTest
{
protected:
void TestY0Y1Y2(const std::string& output, auto Y0, auto Y1, auto Y2)
template <typename T0, typename T1, typename T2>
void TestY0Y1Y2(const std::string& output, T0 Y0, T1 Y1, T2 Y2)
{
std::stringstream expected;
expected << "<Y0, Y1, Y2>: <" << Y0 << ", " << Y1 << ", " << Y2 << ">";
EXPECT_TRUE(output.find(expected.str()) != std::string::npos);
}
void TestX0X1(const std::string& output, auto X0, auto X1)
template <typename T0, typename T1>
void TestX0X1(const std::string& output, T0 X0, T1 X1)
{
std::stringstream expected;
expected << "<X0, X1>: <" << X0 << ", " << X1 << ">";