OLD | NEW |
| (Empty) |
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 public: | |
14 | |
15 private: | |
16 MySpinLock lock_; | |
17 }; | |
18 | |
19 int main() { | |
20 TrivialTemplateOK one; | |
21 return 0; | |
22 } | |
OLD | NEW |