From 93baf0feb1490bcd6923ef325fb1fca39972580f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 22 Nov 2024 15:29:13 +0100 Subject: [PATCH] Silence warnings * ridlbe/c++11/templates/cli/hdr/bitset.erb: --- ridlbe/c++11/templates/cli/hdr/bitset.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ridlbe/c++11/templates/cli/hdr/bitset.erb b/ridlbe/c++11/templates/cli/hdr/bitset.erb index d5e2117d..9d15ac8d 100644 --- a/ridlbe/c++11/templates/cli/hdr/bitset.erb +++ b/ridlbe/c++11/templates/cli/hdr/bitset.erb @@ -5,6 +5,7 @@ class <%= cxxname %><% unless base.nil? %> : public <%= base.cxxname %><% end %> { public: +%# With C++17 we need to initialize all bitfield members explicitly <%= cxxname %> () = default; ~<%= cxxname %> () noexcept = default; <%= cxxname %> (const <%= cxxname %>&) = default; @@ -41,9 +42,10 @@ public: private: struct { +%# Using {} for bitfields is only part of C++20 %bitfields.each do |bitfield| /// @copydoc <%= bitfield.doc_scoped_name %> - <%= bitfield.cxx_member_type %> <%= bitfield.cxxname %> : <%= bitfield.bits %><%= bitfield.cxxname.empty? ? '' : ' {}' %>; + <%= bitfield.cxx_member_type %> <%= bitfield.cxxname %> : <%= bitfield.bits %><%= bitfield.cxxname.empty? ? '' : '' %>; %end } _taox11_<%= cxxname.downcase %>; }; // <%= cxxname %>