Is it a good pratice to make constructor explicit
<p>When designing a public API, is it a good practice to make the constructor as explicit?</p>

<pre><code>class A {
public:
    //explicit A(int i){}
    A(int i){}
};

void fun(const A&amp; a) {}

int main() {
    // If I use explicit for A constructor, I can prevent this mistake.
    // (Or shall I call it as feature?)
    fun(10);
}
</code></pre>

<p>Or shall I allow implicit conversion, to allow user to call my API with less typing?</p>
