Answer the question
In order to leave comments, you need to log in
Is it possible to overload base types in C++?
Is it possible to implement base type overloading in C++?
For example overload the comparison operators < > == for char/char*.
I need this in order to conveniently work with a template tree, and not remake it under char*.
Answer the question
In order to leave comments, you need to log in
No. In your case, you can write your own comparator and pass it as a template parameter to your tree.
If it doesn't support custom comparators, add support, it's very useful.
This is definitely a bad idea. If you want to conveniently compare strings, use std::string.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question