boostorg / boostorg/bimap

transparent operator like `less<void>` is not functionally usable with bimap

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
26
Forks
49
PR merge metrics
No merged PRs in 30d

Description

The current implementation is not allow to use transparent comparator/hash operator functionality.

```
boost::bimap>> test;

std::string stg;
test.right.find(stg); // error
```

The compile error message is [the following](https://godbolt.org/z/1sKaWEM3x):
```
/opt/compiler-explorer/libs/boost_1_80_0/boost/bimap/container_adaptor/associative_container_adaptor.hpp:194:17: error: no matching function for call to object of type 'boost::bimaps::container_adaptor::detail::key_to_base_identity'
this->template functor()(k)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure from the provided Godbolt example, then inspect boost/bimap/container_adaptor/associative_container_adaptor.hpp at line 194 and the key_to_base_identity call mentioned in the diagnostic. Trace how test.right.find(stg) handles the transparent comparator and verify that this expression compiles successfully with the reported bimap declaration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.