Jean-Marc Lasgouttes wrote:

> Le 27/08/2015 22:00, Georg Baum a écrit :
>>>> One problem that we have is that the compiler has to be in c++11 mode
>>>> _and_ the configure script has to be aware of it. Currently weird
>>>> compilers are not handled at all.
>>
>> We can at least turn c++11 on automatically for "non-weird" compilers
>> (and I think we should do it).
> 
> It occurred to me that it is possible to detect C++11 even with gcc
> 4.[3-6] using whatever is defined by the compiler.
> 
> Georg, does this make sense to you? Also I use c++11 mode instead of
> gnu++11; we do not need any extension.

Yes, the automatic detection by preprocessor macros is the best method IMHO. 
However, since we do not know whether we'll need to modify the #ifdef for 
other compilers again, could we not have this in config.h.in

#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#define LYX_USE_CXX11
#endif

and then keeping everything in src/ unchanged? That looks even cleaner to 
me.


Georg


Reply via email to