Skip to content

Commit

Permalink
Merge pull request #412 from jwillemsen/jwi-bitsetfields
Browse files Browse the repository at this point in the history
Silence warnings
  • Loading branch information
jwillemsen authored Nov 22, 2024
2 parents 46da099 + 93baf0f commit 6b8e775
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ridlbe/c++11/templates/cli/hdr/bitset.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 %>
Expand Down

0 comments on commit 6b8e775

Please sign in to comment.