trivial_ctor.h 531 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef TRIVIAL_CTOR_H_
  5. #define TRIVIAL_CTOR_H_
  6. // Mocked for testing:
  7. namespace std {
  8. template<typename T>
  9. struct atomic {
  10. T i;
  11. };
  12. typedef atomic<int> atomic_int;
  13. } // namespace std
  14. struct MySpinLock {
  15. MySpinLock();
  16. ~MySpinLock();
  17. MySpinLock(const MySpinLock&);
  18. MySpinLock(MySpinLock&&);
  19. std::atomic_int lock_;
  20. };
  21. #endif // TRIVIAL_CTOR_H_