aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Michaël Celerier <jeanmichael.celerier@gmail.com>2016-09-23 16:39:58 +0200
committerJean-Michaël Celerier <jeanmichael.celerier@gmail.com>2016-09-24 21:10:11 +0200
commit9ec3bea2d6e2c4e92798dad6dc4679d287202f61 (patch)
tree879d5b0abf776839a398157a955390424bcc61c2
parent1fb0586b065c4202e976528a6bdc6384dc56dc04 (diff)
downloadfmtlib-9ec3bea2d6e2c4e92798dad6dc4679d287202f61.tar.gz
Add FMT_OVERRIDE macro to allow specifying overriding functions in c++11 compilers
-rw-r--r--fmt/format.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/fmt/format.h b/fmt/format.h
index 0f471cc4..55361ecd 100644
--- a/fmt/format.h
+++ b/fmt/format.h
@@ -194,6 +194,17 @@ typedef __int64 intmax_t;
# endif
#endif
+#ifndef FMT_OVERRIDE
+# if FMT_USE_OVERRIDE || FMT_HAS_FEATURE(cxx_override) || \
+ (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \
+ FMT_MSC_VER >= 1900
+# define FMT_OVERRIDE override
+# else
+# define FMT_OVERRIDE
+# endif
+#endif
+
+
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#ifndef FMT_USE_DELETED_FUNCTIONS
@@ -678,7 +689,7 @@ class MemoryBuffer : private Allocator, public Buffer<T> {
}
protected:
- void grow(std::size_t size);
+ void grow(std::size_t size) FMT_OVERRIDE;
public:
explicit MemoryBuffer(const Allocator &alloc = Allocator())