update for object lay out system with samples

It is not compatible in all compiles, and it will cause warnings in unsupported compilers.