The situation is that I\'ve spent some time messing around with some experimental code. I now want to move part of that code - about 500 lines - into another file, but I don\'t
Can't you leave the code in its own file (after trimming the parts you don't want to keep) and include this file into your 'real' source file?
// file foo.cpp: ... namespace { # include "util_code.inc" }
Not really orthodox, but should work...