Jean-Marc Lasgouttes wrote:

> This following patch improves the autotools detection of std::regex. It
> fixes several issues there and makes code more readable IMO.
> 
> Georg, I'd like to have your review on this, especially since my
> previous commit e1938aa2 on the subject was a bit buggy.
> 
> Tested with gcc 4.3, gcc 5.1, gcc 4.8, clang 3.7 + libc++

Works with gcc 4.9 as well.

> There is still a potential problem that I cannot test because my system
> is too new: when clang is used with a stdlibc++ from gcc 4.8 or older, I
> suspect that we will use the bad regex.
> 
> I do not know how to handle that since in this case libstdc++ will not
> giv us any version number we can rely on. Anyway, the patch here does
> not make matters worse in this regard.

It will never be possible to detect every compiler and lib combination 
correctly (otherwise the switches to override the automatism would not be 
needed). This is a rare combination, so it is not too important IMHO.

The patch is definitely better than the old version. Please commit.


Georg

Reply via email to