Probably a duplicate, but not an easy one to search for...
Given a header like:
namespace ns1 { class MyClass { void method(); }; }
Version 3 makes the association between the class and the namespace very explicit at the expense of more typing. Version 1 avoids this but captures the association with a block. Version 2 tends to hide this so I'd avoid that one.