Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: Source/wtf/MemoryInstrumentation.h

Issue 13824006: Make a metaprogramming hack more C++11-compatible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 }; 131 };
132 132
133 struct BaseMixin { 133 struct BaseMixin {
134 void reportMemoryUsage(MemoryObjectInfo*) const { } 134 void reportMemoryUsage(MemoryObjectInfo*) const { }
135 }; 135 };
136 136
137 #if COMPILER(MSVC) 137 #if COMPILER(MSVC)
138 #pragma warning(push) 138 #pragma warning(push)
139 #pragma warning(disable: 4624) // Disable warning: destructor could not be gener ated because a base class destructor is inaccessible. 139 #pragma warning(disable: 4624) // Disable warning: destructor could not be gener ated because a base class destructor is inaccessible.
140 #endif 140 #endif
141 struct Base : public Type, public BaseMixin { }; 141 struct Base : public Type, public BaseMixin {
142 ~Base() {}
143 };
142 #if COMPILER(MSVC) 144 #if COMPILER(MSVC)
143 #pragma warning(pop) 145 #pragma warning(pop)
144 #endif 146 #endif
145 147
146 template <typename T, T t> class Helper { }; 148 template <typename T, T t> class Helper { };
147 149
148 template <typename U> static no deduce(U*, Helper<void (BaseMixin::*)(Me moryObjectInfo*) const, &U::reportMemoryUsage>* = 0); 150 template <typename U> static no deduce(U*, Helper<void (BaseMixin::*)(Me moryObjectInfo*) const, &U::reportMemoryUsage>* = 0);
149 static yes deduce(...); 151 static yes deduce(...);
150 152
151 public: 153 public:
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 360
359 class ParsedURL; 361 class ParsedURL;
360 void reportMemoryUsage(const ParsedURL*, MemoryObjectInfo*); 362 void reportMemoryUsage(const ParsedURL*, MemoryObjectInfo*);
361 363
362 class URLString; 364 class URLString;
363 void reportMemoryUsage(const URLString*, MemoryObjectInfo*); 365 void reportMemoryUsage(const URLString*, MemoryObjectInfo*);
364 366
365 } // namespace WTF 367 } // namespace WTF
366 368
367 #endif // !defined(MemoryInstrumentation_h) 369 #endif // !defined(MemoryInstrumentation_h)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698