Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Is it valid to have a comparator taking parameters of different type?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Juha Nieminen, post: 3809219"] I know that the iterator template parameter and the value template parameter are not forced to be related to the same type, and that because of how a function like std::equal_range has been implemented, it compiles and works like a marvel. However, does the C++ standard guarantee that an algorithm like std::equal_range must always work correctly even if the iterators and the value (and thus also the comparator) refer to completely unrelated types, as long as the comparator has been implemented properly to accept these two different types? Why does MSVC++ complain about this when enough concept checks have been turned on? Is it a compiler bug? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Is it valid to have a comparator taking parameters of different type?
Top