[GRASS-dev] [GRASS GIS] #1533: mm.cc fails to build with GCC 4.7

#1533: mm.cc fails to build with GCC 4.7
--------------------------+----------------------------------------------
  Reporter: volter | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.2
Component: Compiling | Version: 6.4.1
Resolution: fixed | Keywords: libiostream, r.terraflow, gcc4.7
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by wenzeslaus):

In [changeset:"68818" 68818]:
{{{
#!CommitTicketReference repository="" revision="68818"
use exception specifiers only for C++ versions older than C++11

Tested using GCC 5.2.1.

No exception specifiers (throw(...)) fail with -std=c++98 -fexceptions.
Omitting noexcept (or throw()) fails with -std=c++11 and -std=c++14.

Using __cplusplus to get C++ standard version which defines
how the definitions in the standard library look like
and using GRASS_MM_USE_EXCEPTION_SPECIFIER we then use the right ones.

This contains old fix for -fexceptions with GCC 4.7 (see #1533, r50130)
and new fix for GCC 6 where -std=gnu++14 is by default (see #2871
and Debian Bug 811886).

Works also with clang++ -std=c++14.
}}}

--
Ticket URL: </ticket/1533#comment:4>
GRASS GIS <https://grass.osgeo.org>