The Finite Difference Time Domain Method (FDTD) is a full-wave electromagnetic solution. FDTD is computationally intensive with performance depending critically on optimizations of instruction and memory access patterns. We examine the use of compile-time type selection for the optimization of data layouts for different processors to allow for better software maintainability in the context of rapidly evolving computing architectures. The method employs C++ templated meta-programming to enable to the greatest extent possible the use of an optimizing compiler while maintaining a single-source implementation of the computational kernels.