I read few questions here on SO about this topic which seems yet confusing to me. I\'ve just begun to learn C++ and I haven\'t studied templates yet or operator overloading
You can't overload methods based on return types. Your best bet is to create two functions with slightly different syntax, such as in your second code snippet.