Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 | 2 |
| 3 Copyright (C) 2010 Apple Inc. All rights reserved. | 3 Copyright (C) 2010 Apple Inc. All rights reserved. |
| 4 | 4 |
| 5 Redistribution and use in source and binary forms, with or without | 5 Redistribution and use in source and binary forms, with or without |
| 6 modification, are permitted provided that the following conditions | 6 modification, are permitted provided that the following conditions |
| 7 are met: | 7 are met: |
| 8 1. Redistributions of source code must retain the above copyright | 8 1. 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 2. Redistributions in binary form must reproduce the above copyright | 10 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 namespace std { | 42 namespace std { |
| 43 typedef decltype(nullptr) nullptr_t; | 43 typedef decltype(nullptr) nullptr_t; |
| 44 } | 44 } |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #else | 47 #else |
| 48 | 48 |
| 49 namespace std { | 49 namespace std { |
| 50 class nullptr_t { | 50 class nullptr_t { |
| 51 public: | 51 public: |
| 52 // Required to create uninitialized const nullptr's. | |
|
Peter Kasting
2014/06/09 23:07:00
Nit: Do not use an apostrophe to make something pl
Mostyn Bramley-Moore
2014/06/09 23:33:30
Rephrased to avoid the apostrophe, hopefully it's
| |
| 53 nullptr_t() { } | |
| 54 | |
| 52 // Make nullptr convertible to any pointer type. | 55 // Make nullptr convertible to any pointer type. |
| 53 template<typename T> operator T*() const { return 0; } | 56 template<typename T> operator T*() const { return 0; } |
| 54 // Make nullptr convertible to any member pointer type. | 57 // Make nullptr convertible to any member pointer type. |
| 55 template<typename C, typename T> operator T C::*() { return 0; } | 58 template<typename C, typename T> operator T C::*() { return 0; } |
| 56 private: | 59 private: |
| 57 // Do not allow taking the address of nullptr. | 60 // Do not allow taking the address of nullptr. |
| 58 void operator&(); | 61 void operator&(); |
| 59 }; | 62 }; |
| 60 } | 63 } |
| 61 WTF_EXPORT extern const std::nullptr_t nullptr; | 64 WTF_EXPORT extern const std::nullptr_t nullptr; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 72 #else | 75 #else |
| 73 #define WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(ClassName) \ | 76 #define WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(ClassName) \ |
| 74 private: \ | 77 private: \ |
| 75 ClassName(int) | 78 ClassName(int) |
| 76 #define WTF_DISALLOW_ZERO_ASSIGNMENT(ClassName) \ | 79 #define WTF_DISALLOW_ZERO_ASSIGNMENT(ClassName) \ |
| 77 private: \ | 80 private: \ |
| 78 ClassName& operator=(int) | 81 ClassName& operator=(int) |
| 79 #endif | 82 #endif |
| 80 | 83 |
| 81 #endif | 84 #endif |
| OLD | NEW |