Home | History | Annotate | Download | only in tests
      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 
      5 #include "trivial_ctor.h"
      6 
      7 // Due to https://bugs.chromium.org/p/chromium/issues/detail?id=663463, we treat
      8 // templated classes/structs as non-trivial, even if they really are trivial.
      9 // Thus, classes that have such a class/struct as a member get flagged as being
     10 // themselves non-trivial, even if (like |MySpinLock|) they are. Special-case
     11 // [std::]atomic_int.
     12 class TrivialTemplateOK {
     13  private:
     14   MySpinLock lock_;
     15 };
     16 
     17 int main() {
     18   MySpinLock lock;
     19   TrivialTemplateOK one;
     20   return 0;
     21 }
     22