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

Side by Side Diff: src/base/macros.h

Issue 1123723003: [c++11] Remove remnants of pre-C++11 delete, final and override. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « include/v8config.h ('k') | 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 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_BASE_MACROS_H_ 5 #ifndef V8_BASE_MACROS_H_
6 #define V8_BASE_MACROS_H_ 6 #define V8_BASE_MACROS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 return dest; 227 return dest;
228 } 228 }
229 229
230 230
231 // Put this in the private: declarations for a class to be unassignable. 231 // Put this in the private: declarations for a class to be unassignable.
232 #define DISALLOW_ASSIGN(TypeName) void operator=(const TypeName&) 232 #define DISALLOW_ASSIGN(TypeName) void operator=(const TypeName&)
233 233
234 234
235 // A macro to disallow the evil copy constructor and operator= functions 235 // A macro to disallow the evil copy constructor and operator= functions
236 // This should be used in the private: declarations for a class 236 // This should be used in the private: declarations for a class
237 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ 237 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
238 TypeName(const TypeName&) V8_DELETE; \ 238 TypeName(const TypeName&) = delete; \
239 void operator=(const TypeName&) V8_DELETE 239 void operator=(const TypeName&) = delete
240 240
241 241
242 // A macro to disallow all the implicit constructors, namely the 242 // A macro to disallow all the implicit constructors, namely the
243 // default constructor, copy constructor and operator= functions. 243 // default constructor, copy constructor and operator= functions.
244 // 244 //
245 // This should be used in the private: declarations for a class 245 // This should be used in the private: declarations for a class
246 // that wants to prevent anyone from instantiating it. This is 246 // that wants to prevent anyone from instantiating it. This is
247 // especially useful for classes containing only static methods. 247 // especially useful for classes containing only static methods.
248 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ 248 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
249 TypeName() V8_DELETE; \ 249 TypeName() = delete; \
250 DISALLOW_COPY_AND_ASSIGN(TypeName) 250 DISALLOW_COPY_AND_ASSIGN(TypeName)
251 251
252 252
253 // Newly written code should use V8_INLINE and V8_NOINLINE directly. 253 // Newly written code should use V8_INLINE and V8_NOINLINE directly.
254 #define INLINE(declarator) V8_INLINE declarator 254 #define INLINE(declarator) V8_INLINE declarator
255 #define NO_INLINE(declarator) V8_NOINLINE declarator 255 #define NO_INLINE(declarator) V8_NOINLINE declarator
256 256
257 257
258 // Newly written code should use WARN_UNUSED_RESULT. 258 // Newly written code should use WARN_UNUSED_RESULT.
259 #define MUST_USE_RESULT WARN_UNUSED_RESULT 259 #define MUST_USE_RESULT WARN_UNUSED_RESULT
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 417 }
418 418
419 template <> 419 template <>
420 inline bool is_fundamental<uint8_t>() { 420 inline bool is_fundamental<uint8_t>() {
421 return true; 421 return true;
422 } 422 }
423 } 423 }
424 } // namespace v8::base 424 } // namespace v8::base
425 425
426 #endif // V8_BASE_MACROS_H_ 426 #endif // V8_BASE_MACROS_H_
OLDNEW
« no previous file with comments | « include/v8config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698