fork download
  1.  
  2.  
  3. template<typename WriterPolicy, typename ReaderPolicy>
  4. struct RW : WriterPolicy, ReaderPolicy
  5. {
  6. };
  7.  
  8. struct SharedData
  9. {
  10. int n;
  11. };
  12.  
  13. struct FancyWriter : virtual SharedData
  14. {
  15. };
  16.  
  17. struct FancyReader : virtual SharedData
  18. {
  19. };
  20.  
  21. typedef RW<FancyWriter, FancyReader> FancyRW;
  22.  
  23. int main() {}
Success #stdin #stdout 0.02s 2720KB
stdin
Standard input is empty
stdout
Standard output is empty