Without seeing minimal example of *your* code that does not
compile it is rather hard to tell what is wrong with it. WHAT
could be wrong with that are ...
* that 'DiskIndex_LeafNode<T>' is not completely defined at
the spot of 'offsetof' since definitions have moved during
refactoring.
* that 'DiskIndex_LeafNode<T>' is not a standard layout class
for example since that T is not standard layout but is
something else.
* your code does contain some odd non-standard construct
instead of 'offsetof(DiskIndex_LeafNode<T>,BranchCount)'
* some other thing like that.
Hopefully it helps you somehow.