boostorg / boostorg/callable_traits
Got MSVC error C2248 when I use unique_function with boost::callable_traits::is_invocable
- Dominant language
- C++
- Stars
- 138
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
When I use `boost::callable_traits::is_invocable` with `fu2::unique_function` on msvc v19.33 or older, I got C2248 (cannot access private member) error.
When I replace boost::callable_traits::is_invocable with std::is_invocable (since C++17), then the error is disappeared.
```cpp
#include
#include
#include
using unique_func_t = fu2::unique_function;
int main() {
// no error with std::is_invocable
static_assert(std::is_invocable::value);
// error C2248 with boost::callable_traits::is_invocable
static_assert(boost::callable_traits::is_invocable::value);
}
```
Godbolt link: https://godbolt.org/z/vM19nhfv7
At first, I report the issue to function2.
See https://github.com/Naios/function2/issues/54
The issue happens the combination of `boost::callable_traits::is_invocable`, `fu2::unique_function`, and msvc v19.33 or older.
It is complecated for me but fortunately, we can reproduce the issue on godbolt.
So I report the issue here too.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.