Not ok. This is like having 2 definitions for the same function, linker will not accept that.
No. It is like having 2 matching type declarations. The implementation is defined in the C++ source code and is represented as one C++ object/lib file to the linker. The linker will happily accept that.