Skip to content

Commit 2ecd4fd

Browse files
committed
Change string comparison test to compile on MSVC
Error from MSVC: > a parenthesized type followed by an initializer list is a non-standard > explicit type conversion syntax
1 parent b9dd936 commit 2ecd4fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/ffi/tests.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ extern "C" const char *cxx_run_test() noexcept {
660660
rust::String first = "first", second = "second", sec = "sec";
661661
bool (rust::String::*cmp)(const rust::String &) const;
662662
bool first_first, first_second, sec_second, second_sec;
663-
for (auto test : (std::tuple<decltype(cmp), bool, bool, bool, bool>[]) {
663+
for (auto test : {
664+
std::tuple<decltype(cmp), bool, bool, bool, bool>
664665
{&rust::String::operator==, true, false, false, false},
665666
{&rust::String::operator!=, false, true, true, true},
666667
{&rust::String::operator<, false, true, true, false},

0 commit comments

Comments
 (0)