Hi guys :)
Pardon me if I have not framed the question clearly :/
I was reading through Herb Shutter's blog and found this
guideline for class designing.
"Guideline: When you design a class, avoid providing a constructor that ambiguously overloads with an initializer_list constructor, so that users won’t need to use ( ) to reach such a hidden constructor."
could someone please explain what does
"avoid providing a constructor that ambiguously overloads with an initializer_list constructor"
mean...
Kindly help me with two examples - one which violates this guideline
and other which doesn't (the corrected version of violation case)
Here is the link for article :
https://herbsutter.com/2013/05/09/gotw-1-solution/
Last guideline, just above the acknowledgement.
Thanks for the help :)