Package: googletest
Version: 1.10.0.20201018-1
Followup-For: Bug #972627

Here is a minimal example that can be used to reproduce the problem:

test.cpp
```
#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <string_view>

class MyMock {
public:
    MOCK_METHOD(void, testPrint, (std::string_view));
};

TEST(Test, test)
{
    constexpr std::string_view param{"test"};
    MyMock mock;
    EXPECT_CALL(mock, testPrint(param))
        .Times(1);
}
```

Building with `g++ -std=c++20 test.cpp -lgmock_main -lgmock -lgtest -pthread`
and version 1.10.0.20201018-1 leads to:

```
/usr/bin/ld: /tmp/ccgTGXuD.o: in function `Test_test_Test::TestBody()':
test.cpp:(.text+0x68): undefined reference to 
`testing::Matcher<std::basic_string_view<char, std::char_traits<char> > 
>::Matcher(std::basic_string_view<char, std::char_traits<char> >)'
collect2: error: ld returned 1 exit status
```

Using the same command, but version 1.10.0-3 works.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.8.0-3-amd64 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information

Reply via email to