explicit in class

i was reading a source and hit to following syntax
in a class

1
2
3
4
5
6
7
8
 class Hello {

	public:
		explicit Hello(){}



};

why the person who has written this class use this syntax?
Last edited on
There's a good explanation here:
http://www.cplusplus.com/forum/general/168292/
It's useless because there are no parameters to the default constructor.
If the constructor marked explicit has parameters, then it will work normally.
Last edited on
Topic archived. No new replies allowed.