I see what you mean about how compiler "automation" can go awry. How about an attribute or #pragma to specify that the enclosed code will be accessed by native code and needs to be wrapped.

I just think it would be great if there was an easy, foolproof(?) way to interface to all the native code libraries out there, particularly Boost. Thanks for your comments.