what is an explicit function

Could any one explain me what is an explicit function ?
In C++ only a constructor can be explicit:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class A
{
     A ( int ) {}; // not explicit constructor
};
class B
{
    explicit B ( int ) {};
};


A a = 1; // valid
A aa ( 2 ); // valid
B b = 1; // error, you can't use = with explicit constructor
B bb ( 2 ); // valid 
Topic archived. No new replies allowed.