gmacros: Guard C++ code with extern "C++"

A number of C++ consumers are (incorrectly) including glib headers in an
extern "C" block, which leads to build failures such as:

/usr/include/c++/11/type_traits:56:3: error: template with C linkage
   56 |   template<typename _Tp, _Tp __v>
      |   ^~~~~~~~

We can easily escape that on the glib side by putting the C++ code in an
extern "C++" block. Which technically it's a bug on the consuming
program's side, I think it's pragmatic here to work this around on the
glib side.
13 jobs for wip/kalev/decltype-extern-Cplusplus in 11 minutes and 18 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Style Check
passed #1138418
check-todos

00:01:53

failed #1138417
allowed to fail
style-check-diff

00:01:45

 
  Build
passed #1138421
cross-android_api21_arm64

00:00:58

passed #1138422
cross-android_api28_arm64

00:01:21

passed #1138423
cross-mingw64

00:01:44

passed #1138420
debian-stable-x86_64

00:01:50

passed #1138419
fedora-x86_64

00:10:18

passed #1138426
freebsd-11
freebsd-11-x86_64

00:06:28

passed #1138427
freebsd-12
freebsd-12-x86_64

00:06:14

passed #1138428
macos
macos

00:04:23

passed #1138424
win32-ps
msys2-mingw32

00:08:33

passed #1138425
win32-ps
vs2017-x64

00:07:48

 
  Coverage
passed #1138429
coverage

00:00:59

76.2%
 
Name Stage Failure
failed
style-check-diff Style Check
 /* C++11 decltype() is close enough for our usage */
-extern "C++" {
+extern "C++"
+{
#include <type_traits>
} /* extern "C++" */
#define glib_typeof(t) typename std::remove_reference<decltype (t)>::type
Cleaning up file based variables
ERROR: Job failed: exit code 1