InvokeArgument doesn't work with boost::function on GTest 1.10
- Dominant language
- C++
- Stars
- 39.5k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
Trying to compile code using` InvokeArgument<>` that points to `boost::function` fails with error:
> boost_1_73_0/boost/function/function_template.hpp:1086:16: error: use of deleted function ‘constexpr std::tuple< >::tuple(const std::tuple< >&) [with _Elements = {boost::function&&}]’ base_type(f)
I've managed to reproduce this error using boost 1.73, gcc 6.3 and 9.3, with GTest 1.10 and sources from master.
Error does not occur on GTest 1.8 and earlier, my investigation shows that commit [9494c45](https://github.com/google/googletest/commit/9494c45e75a55547f3f183a1161fbd39d29b994e) is responsible for the problem.
Reproduction:
```
#include
#include
#include
class M{
public:
MOCK_METHOD1(f, void(boost::function));
};
TEST(A,B){
M m;
ON_CALL(m, f(::testing::_))
.WillByDefault(::testing::InvokeArgument<0>());
}
int main(){
return 0;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.