Declaring statements are pure data. "int add(int, int);" is a piece of data, not a series of instructions. It may as well be a 4-tuple: (int, "add", int, int). You could convert each class declaration to a series of 4-tuples and put it in a CSV file. Database rights are much weaker than copyright.
> Take a program that works and remove the declaring code.
Actually, it will work just fine, because you the implementation necessarily has declarations in them, and you can generate declarations from the implementation.