Implementing better mesh handling is an excellent exercise for the reader.
As an aside, the book "Physically Based Rendering", which is the source of pbrt, is _by far_ the best programming book I've ever read.
So many books spend a lot of time on trivial stuff, while others dive into the difficult theory and math but doesn't show how to translate it into code.
PBR goes through the difficult theory and math in detail while also showing how to implement it in code, explaining potential pitfalls and tricks along the way. And it does so in an elegant and easy to understand way.
And if you got some questions, the authors answers questions in a Google Group.
I'm joking, thanks for suggesting that book, I don't know much about this stuff but i might actually read it!
Since a physically-based ray tracer involves a lot of different theory and math, it can be quite interesting even if your not in it for the actual ray tracing. For example there's sampling low-discrepancy sequences, kd-trees and other bounding volumes, color representation and conversion etc.
As noted in other comments, this was a case where the pedagogical goals of the system outweighed maximizing performance.
It's really incomplete, and I have had hardly any time to work on it over the many years that it's been around, but the general idea is to type construction to determine the aspects that a scene actually uses and let the compiler sort out what to do about it.
For example, the depth count attached to a ray doesn't appear until it hits a reflective surface so there is no overhead if the scene doesn't need it. As you can probably imagine the template errors can be obscene :)
The next thing would be to constexpr everything so that the scene could be built up in the compiler, I guess ideally in parts and then combined by the linker. I think it'll be really fun to try that with this Moana scene, but don't expect the compilers or linkers will survive let alone the tracer
EDIT to say, I really love your book. I feel hugely inspired every time I look at it, which unfortunately means I can't look too often as I don't have the time to play with these things as much as I'd like.