Commit 5928c2f9 authored by thakis's avatar thakis Committed by Commit bot

Use a C++11 feature in a single file, to discover if this works everywhere.

Similar to https://codereview.chromium.org/385743002 , but in a file
that's also built in host targets. Depends on r#294584.

If your bot can't deal with this, please let me know!

BUG=none

Review URL: https://codereview.chromium.org/443483002

Cr-Commit-Position: refs/heads/master@{#294687}
parent fe992229
...@@ -137,30 +137,14 @@ ...@@ -137,30 +137,14 @@
// method in the parent class. // method in the parent class.
// Use like: // Use like:
// virtual void foo() OVERRIDE; // virtual void foo() OVERRIDE;
#if defined(__clang__) || defined(COMPILER_MSVC)
#define OVERRIDE override #define OVERRIDE override
#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700
// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled.
#define OVERRIDE override
#else
#define OVERRIDE
#endif
// Annotate a virtual method indicating that subclasses must not override it, // Annotate a virtual method indicating that subclasses must not override it,
// or annotate a class to indicate that it cannot be subclassed. // or annotate a class to indicate that it cannot be subclassed.
// Use like: // Use like:
// virtual void foo() FINAL; // virtual void foo() FINAL;
// class B FINAL : public A {}; // class B FINAL : public A {};
#if defined(__clang__) || defined(COMPILER_MSVC)
#define FINAL final #define FINAL final
#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700
// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled.
#define FINAL final
#else
#define FINAL
#endif
// Annotate a function indicating the caller must examine the return value. // Annotate a function indicating the caller must examine the return value.
// Use like: // Use like:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment