Skip to content

Commit fdc7333

Browse files
committed
gcc/clang, template err fix.
1 parent e234e86 commit fdc7333

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

RTLTestRunApp/src/RObjectTests/RObjectReflecting_strings.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,20 +348,20 @@ namespace unit_test
348348
EXPECT_EQ(robj.getTypeId(), robjcp.getTypeId());
349349
{
350350
// Check if the value can be accessed as 'std::string'.
351-
ASSERT_TRUE(robjcp.canViewAs<std::string>());
351+
ASSERT_TRUE(robjcp.template canViewAs<std::string>());
352352

353353
// Try to obtain a view as 'std::string' and verify it is present.
354-
auto view = robjcp.view<std::string>();
354+
auto view = robjcp.template view<std::string>();
355355
ASSERT_TRUE(view.has_value());
356356

357357
// Validate the string content matches the original input.
358358
const std::string& str_cref = view->get();
359359
ASSERT_EQ(str_cref, STR_STD_STRING);
360360
} {
361-
ASSERT_TRUE(robjcp.canViewAs<char>());
361+
ASSERT_TRUE(robjcp.template canViewAs<char>());
362362

363363
// Try to obtain a view as 'const char*' and verify it is present.
364-
auto view = robjcp.view<char>();
364+
auto view = robjcp.template view<char>();
365365
ASSERT_TRUE(view.has_value());
366366

367367
// Validate the base address are different, since RObject is reflecting a copy.
@@ -370,7 +370,10 @@ namespace unit_test
370370
}
371371
};
372372
testWithAlloc.operator()<rtl::alloc::Stack>();
373-
//TODO: This fails. Fix it.
373+
// TODO: This fails. Fix it.
374+
// Should even std::string to 'char' conversion be allowed implicitly?
375+
// Need to re-think it. The implicit conversions are not used in core dispatch yet.
376+
// will sit on it for a while.
374377
//testWithAlloc.operator()<rtl::alloc::Heap>();
375378
}
376379

0 commit comments

Comments
 (0)