What are the differences in compilability or generated code (if any) between the following two source files:
Exhibit A:
namespace std {};
using namespace std;
#include <vector>
#include <string>
<any code here>
Exhibit B:
#include <vector>
#include <string>
using namespace std;
<any code here>
Assuming the two <any code here> placeholders are replaced with any identical user code.
Put another way: Is there any user visible difference if “using namespace std;” is put before the standard #includes (assuming namespace std has been introduced as above)?
As unlikely as it may be, the following code could possibly be in your implementation’s vector header:
Now with Exhibit A, you’ve got an ambiguity.