unqualified call to `get<T>` with a non-`boost::optional` type should not match
Open
bug
- Dominant language
- C++
- Stars
- 60
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
`boost::get(boost::optional ...)` overload matches for a non-`boost::optional` type when boost namespace is associated with argument's type of unqualified call to `get`.
```cpp
template
struct X {};
template
inline int get(X const&) { return 0; }
namespace boost {
struct any_type_in_boost_namespace {};
}
#include
class tag;
int main()
{
get(X{});
}
```
https://godbolt.org/z/14d476
The example obviously should compile, but instead it tries to instantiate `boost::optional` and fails the compilation.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.