Move ltr_pop down, so that GCC can see the right instantiations of the functions it needs.
GCC is still not compiling, complaining about detail::ltr_pop and not being able to find a proper overload. I'm not sure why it's complaining, I'll have to look in more detail soon.