Namespace:
I liked to know which of this two methods is more common to you, A or B:
Both ways work. I usually prefer the first one because it's more DRY. I use external functions when I write functions that are meant to work on more different structs, or to reduce template bloat when a function works only on not templated values.
Note that fields and methods are public on default in structs, so you don't need the "public:" tag.
Bye, bearophile