summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDerek Bailey <derekbailey@google.com>2021-11-11 10:31:15 -0800
committerGitHub <noreply@github.com>2021-11-11 10:31:15 -0800
commit3fab0c6ee47bb7f737f68c43f0494e293ab8fa5b (patch)
treec56de6fe56985e62022f9c764571adf855e3029b /include
parent6c8c291559053f90a35c138499053449a40e3b9a (diff)
downloadflatbuffers-3fab0c6ee47bb7f737f68c43f0494e293ab8fa5b.tar.gz
flatbuffers-3fab0c6ee47bb7f737f68c43f0494e293ab8fa5b.tar.bz2
flatbuffers-3fab0c6ee47bb7f737f68c43f0494e293ab8fa5b.zip
move [[ ]] to calling sites (#6914)
Diffstat (limited to 'include')
-rw-r--r--include/flatbuffers/base.h2
-rw-r--r--include/flatbuffers/flatbuffer_builder.h4
-rw-r--r--include/flatbuffers/vector.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h
index 5f5a009c..f1eb312f 100644
--- a/include/flatbuffers/base.h
+++ b/include/flatbuffers/base.h
@@ -294,7 +294,7 @@ template<typename T> FLATBUFFERS_CONSTEXPR inline bool IsConstTrue(T t) {
#if ((__cplusplus >= 201703L) \
|| (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
// All attributes unknown to an implementation are ignored without causing an error.
- #define FLATBUFFERS_ATTRIBUTE(attr) [[attr]]
+ #define FLATBUFFERS_ATTRIBUTE(attr) attr
#define FLATBUFFERS_FALLTHROUGH() [[fallthrough]]
#else
diff --git a/include/flatbuffers/flatbuffer_builder.h b/include/flatbuffers/flatbuffer_builder.h
index caba8db6..5aa358f8 100644
--- a/include/flatbuffers/flatbuffer_builder.h
+++ b/include/flatbuffers/flatbuffer_builder.h
@@ -194,7 +194,7 @@ class FlatBufferBuilder {
/// @warning Do NOT attempt to use this FlatBufferBuilder afterwards!
/// @return A `FlatBuffer` that owns the buffer and its allocator and
/// behaves similar to a `unique_ptr` with a deleter.
- FLATBUFFERS_ATTRIBUTE(deprecated("use Release() instead"))
+ FLATBUFFERS_ATTRIBUTE([[deprecated("use Release() instead")]])
DetachedBuffer ReleaseBufferPointer() {
Finished();
return buf_.release();
@@ -430,7 +430,7 @@ class FlatBufferBuilder {
return vtableoffsetloc;
}
- FLATBUFFERS_ATTRIBUTE(deprecated("call the version above instead"))
+ FLATBUFFERS_ATTRIBUTE([[deprecated("call the version above instead")]])
uoffset_t EndTable(uoffset_t start, voffset_t /*numfields*/) {
return EndTable(start);
}
diff --git a/include/flatbuffers/vector.h b/include/flatbuffers/vector.h
index 55feb0e0..820c59c2 100644
--- a/include/flatbuffers/vector.h
+++ b/include/flatbuffers/vector.h
@@ -162,7 +162,7 @@ template<typename T> class Vector {
uoffset_t size() const { return EndianScalar(length_); }
// Deprecated: use size(). Here for backwards compatibility.
- FLATBUFFERS_ATTRIBUTE(deprecated("use size() instead"))
+ FLATBUFFERS_ATTRIBUTE([[deprecated("use size() instead")]])
uoffset_t Length() const { return size(); }
typedef typename IndirectHelper<T>::return_type return_type;