[gdb/build, c++20] Fix DISABLE_COPY_AND_ASSIGN use in ui_out_emit_type
authorTom de Vries <tdevries@suse.de>
Thu, 17 Aug 2023 08:41:34 +0000 (10:41 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 17 Aug 2023 08:41:34 +0000 (10:41 +0200)
When building gdb with -std=c++20, I run into:
...
include/ansidecl.h:342:9: error: expected unqualified-id before ‘const’
  342 |   TYPE (const TYPE&) = delete;                  \
      |         ^~~~~
gdb/ui-out.h:412:3: note: in expansion of macro ‘DISABLE_COPY_AND_ASSIGN’
  412 |   DISABLE_COPY_AND_ASSIGN (ui_out_emit_type<Type>);
      |   ^~~~~~~~~~~~~~~~~~~~~~~
...

Fix this by using "DISABLE_COPY_AND_ASSIGN (ui_out_emit_type)".

Tested on x86_64-linux.

gdb/ui-out.h

index ba5b1de68abbfcd59dd0c83ac07611b70e00367e..07567a1df3570538c0aef9e00b8628fbb06ca88f 100644 (file)
@@ -409,7 +409,7 @@ public:
     m_uiout->end (Type);
   }
 
-  DISABLE_COPY_AND_ASSIGN (ui_out_emit_type<Type>);
+  DISABLE_COPY_AND_ASSIGN (ui_out_emit_type);
 
 private: