Skip to content

Commit 9c066f5

Browse files
committed
Add test case for "Undefined reference to index_tag<0ul>" on clang-17 and later (issue #54, pr #56, thanks @geghamyan)
1 parent 3320965 commit 9c066f5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/variant.t.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,6 +1703,16 @@ CASE("visitor: Visitors can't return references, but they can with std::variant"
17031703
#endif
17041704
}
17051705

1706+
CASE("index_tag<>: Undefined reference to index_tag<0ul> on clang-17 and later" "[.issue-54 pr-56]")
1707+
{
1708+
#if variant_CPP11_OR_GREATER
1709+
nonstd::variant< char, int, long, std::string > var;
1710+
var = 'v' ;
1711+
#else
1712+
EXPECT( !!"index_tag<>: code not present for C++98 (no C++11)" );
1713+
#endif
1714+
}
1715+
17061716
CASE( "tweak header: reads tweak header if supported " "[tweak]" )
17071717
{
17081718
#if variant_HAVE_TWEAK_HEADER

0 commit comments

Comments
 (0)