Re: [PATCH] unique_ptr and some clean-up

2016-06-15 Thread Pavel Sanda
Guillaume Munch wrote: > Le 14/06/2016 21:49, Georg Baum a écrit : >> Guillaume Munch wrote: >> >>> What error is it? >> >> ../../src/MetricsInfo.cpp:61:4: error: type ???lyx::MetricsBase??? is not >> a direct base of ???lyx::MetricsBase??? > > Thanks for the clues. I was not even aware that delega

Re: [PATCH] unique_ptr and some clean-up

2016-06-15 Thread Guillaume Munch
Le 14/06/2016 21:49, Georg Baum a écrit : Guillaume Munch wrote: What error is it? ../../src/MetricsInfo.cpp:61:4: error: type ‘lyx::MetricsBase’ is not a direct base of ‘lyx::MetricsBase’ Thanks for the clues. I was not even aware that delegate constructors was a C++11 feature. Master must

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Jean-Marc Lasgouttes
Full day of teaching in Rouen. But yes, RER is on strike :) JMarc Le 14 juin 2016 21:41:12 GMT+02:00, Guillaume Munch a écrit : >Le 14/06/2016 20:16, Jean-Marc Lasgouttes a écrit : >> I will not be able to test until Thursday afternoon. >> > >RER is on strike ? ;)

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Georg Baum
Guillaume Munch wrote: > What error is it? ../../src/MetricsInfo.cpp:61:4: error: type ‘lyx::MetricsBase’ is not a direct base of ‘lyx::MetricsBase’ BTW, if it is possible to keep gcc 4.6 supported for a while with little effort I am in favour of this as well, and I can do also some testing o

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Guillaume Munch
Le 14/06/2016 20:55, Georg Baum a écrit : Guillaume Munch wrote: Le 14/06/2016 16:38, Jean-Marc Lasgouttes a écrit : but of course RefChange proved more difficult. I tried to define it as a subclass of unique_ptr>, but then my C++11 default skills showed their weakness. What errors does it

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Georg Baum
Guillaume Munch wrote: > Le 14/06/2016 16:38, Jean-Marc Lasgouttes a écrit : > >> but of course RefChange >> proved more difficult. I tried to define it as a subclass of >> unique_ptr>, but then my C++11 default skills showed >> their weakness. > > What errors does it give with the attached? On

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Guillaume Munch
Le 14/06/2016 20:16, Jean-Marc Lasgouttes a écrit : Le 14/06/16 à 18:41, Guillaume Munch a écrit : but of course RefChange proved more difficult. I tried to define it as a subclass of unique_ptr>, but then my C++11 default skills showed their weakness. What errors does it give with the attach

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Jean-Marc Lasgouttes
Le 14/06/16 à 18:41, Guillaume Munch a écrit : but of course RefChange proved more difficult. I tried to define it as a subclass of unique_ptr>, but then my C++11 default skills showed their weakness. What errors does it give with the attached? I will not be able to test until Thursday after

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Guillaume Munch
Le 14/06/2016 16:38, Jean-Marc Lasgouttes a écrit : Le 14/06/2016 à 16:39, Guillaume Munch a écrit : I am a little short on ideas so we could try the attached, and if it does not work try the commented version below it, and if it does not work, revert e87febd0 for the moment. What I am concerned

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Jean-Marc Lasgouttes
Le 14/06/2016 à 16:39, Guillaume Munch a écrit : I am a little short on ideas so we could try the attached, and if it does not work try the commented version below it, and if it does not work, revert e87febd0 for the moment. What I am concerned about is future breakages, about which I will ask th

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Guillaume Munch
Le 14/06/2016 10:38, Jean-Marc Lasgouttes a écrit : Le 13/06/2016 à 23:15, Guillaume Munch a écrit : I am not in charge for the machines around me and given 12.04 LTS ends up 2017-04 I don't expect any migration happening soon :) I am in a similar situation (although as I said, clang works). M

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Jean-Marc Lasgouttes
Le 13/06/2016 à 23:15, Guillaume Munch a écrit : I am not in charge for the machines around me and given 12.04 LTS ends up 2017-04 I don't expect any migration happening soon :) I am in a similar situation (although as I said, clang works). My fatest machine runs 12.04, only updated in terms o

Re: [PATCH] unique_ptr and some clean-up

2016-06-14 Thread Kornel Benko
Am Montag, 13. Juni 2016 um 22:15:02, schrieb Guillaume Munch > Le 13/06/2016 21:54, Pavel Sanda a écrit : > > Guillaume Munch wrote: > >> Starting from 2.3, LyX will require a C++11 compiler, and g++ 4.6 fails > >> (it seems) at a feature as elementary as generating a default move > >> constructo

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Guillaume Munch
Le 13/06/2016 21:54, Pavel Sanda a écrit : Guillaume Munch wrote: Starting from 2.3, LyX will require a C++11 compiler, and g++ 4.6 fails (it seems) at a feature as elementary as generating a default move constructor, even when told so explicitly (which we cannot really blame it for, given that

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Guillaume Munch
Le 13/06/2016 21:40, Stephan Witt a écrit : gcc-Version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) IMO it’s not dead and end of life is 2020-11-30 I do not know what can be done at the LyX level for CentOS 6. It seems that it is very easy to obtain gcc 4.8 on CentOS 6 provided one has access to

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Pavel Sanda
Stephan Witt wrote: > IMO it?s not dead and end of life is 2020-11-30 CentOs/Redhat has extremely long LTS (e.g. clusters around here still have gcc 4.4). On the other hand no one sane would use it for GUI development, it's more for server/clusters deployment. So we shouldn't really strive to supp

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Pavel Sanda
Guillaume Munch wrote: > Starting from 2.3, LyX will require a C++11 compiler, and g++ 4.6 fails > (it seems) at a feature as elementary as generating a default move > constructor, even when told so explicitly (which we cannot really blame > it for, given that it does not claim C++11 compliance in

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Stephan Witt
Am 13.06.2016 um 22:26 schrieb Guillaume Munch : > > Le 13/06/2016 20:50, Pavel Sanda a écrit : >> Guillaume Munch wrote: >>> Then if we are dropping g++ 4.6, does anyone know whether it makes >>> sense >> >> Sorry I might got lost somewhere in the threads around. What reasons >> do we have for d

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Guillaume Munch
Le 13/06/2016 20:50, Pavel Sanda a écrit : Guillaume Munch wrote: Then if we are dropping g++ 4.6, does anyone know whether it makes sense Sorry I might got lost somewhere in the threads around. What reasons do we have for dropping gcc 4.6? Starting from 2.3, LyX will require a C++11 compil

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Pavel Sanda
Guillaume Munch wrote: > Then if we are dropping g++ 4.6, does anyone know whether it makes sense Sorry I might got lost somewhere in the threads around. What reasons do we have for dropping gcc 4.6? Pavel

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Guillaume Munch
Le 13/06/2016 12:53, Jean-Marc Lasgouttes a écrit : Le 13/06/2016 à 10:14, Guillaume Munch a écrit : Le 12/06/2016 09:29, Pavel Sanda a écrit : Guillaume Munch wrote: I do not clearly see the situation wrt gcc 4.6. Which are the distributions that currently lack gcc > 4.6 ? this is ubuntu 12

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Jean-Marc Lasgouttes
Le 13/06/2016 à 18:01, Kornel Benko a écrit : I don't understand, why _my_ clang 3.6 accepts parameter '-std=c++14'. I am not sure that I understand your question. Here example (without source file) gcc4.8 # g++ -std=c++14 g++: error: unrecognized command line option

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Kornel Benko
Am Montag, 13. Juni 2016 um 17:49:07, schrieb Jean-Marc Lasgouttes > Le 13/06/2016 à 17:34, Kornel Benko a écrit : > >> The posting you refer to seems to imply that it is a C++14 problem. What > >> about enforcing C++11 mode instead? > > > > Hm, yes. But if we want to support 'std::make_unique' w

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Jean-Marc Lasgouttes
Le 13/06/2016 à 17:34, Kornel Benko a écrit : The posting you refer to seems to imply that it is a C++14 problem. What about enforcing C++11 mode instead? Hm, yes. But if we want to support 'std::make_unique' we need C++14 test. At least, that was my impression while working with 4.8 and 5.3.1

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Kornel Benko
Am Montag, 13. Juni 2016 um 16:22:56, schrieb Jean-Marc Lasgouttes > Le 13/06/2016 à 14:11, Kornel Benko a écrit : > > I had no problems with clang 3.3. But using clang 3.6 with installed libs > > from gcc4.8 > > has problems while compiling cstdio. > > According to page > > http://stackoverflo

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Jean-Marc Lasgouttes
Le 13/06/2016 à 16:50, Stephan Witt a écrit : Am 13.06.2016 um 16:25 schrieb Jean-Marc Lasgouttes : Le 13/06/2016 à 14:27, Stephan Witt a écrit : Stephan, I'd be interested to know what clang version is returned by the Apple version. I hope it does not return the XCode version. Why not? ch

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Stephan Witt
Am 13.06.2016 um 16:25 schrieb Jean-Marc Lasgouttes : > > Le 13/06/2016 à 14:27, Stephan Witt a écrit : >>> Stephan, I'd be interested to know what clang version is returned by the >>> Apple version. I hope it does not return the XCode version. >> >> Why not? >> >> checking whether the compiler

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Jean-Marc Lasgouttes
Le 13/06/2016 à 14:27, Stephan Witt a écrit : Stephan, I'd be interested to know what clang version is returned by the Apple version. I hope it does not return the XCode version. Why not? checking whether the compiler is clang... yes checking for clang version... 7.3.0 Because I'd like to k

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Jean-Marc Lasgouttes
Le 13/06/2016 à 14:11, Kornel Benko a écrit : I had no problems with clang 3.3. But using clang 3.6 with installed libs from gcc4.8 has problems while compiling cstdio. According to page http://stackoverflow.com/questions/17775390/clang-3-3-in-c1y-mode-cannot-parse-cstdio-header this snipped so

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Stephan Witt
Am 13.06.2016 um 13:53 schrieb Jean-Marc Lasgouttes : > > Le 13/06/2016 à 10:14, Guillaume Munch a écrit : >> Le 12/06/2016 09:29, Pavel Sanda a écrit : >>> Guillaume Munch wrote: >> I do not clearly see the situation wrt gcc 4.6. Which are the >> distributions that currently lack gcc > 4.

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Kornel Benko
Am Montag, 13. Juni 2016 um 13:53:43, schrieb Jean-Marc Lasgouttes > Le 13/06/2016 à 10:14, Guillaume Munch a écrit : > > Le 12/06/2016 09:29, Pavel Sanda a écrit : > >> Guillaume Munch wrote: > > I do not clearly see the situation wrt gcc 4.6. Which are the > > distributions that current

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Jean-Marc Lasgouttes
Le 13/06/2016 à 10:14, Guillaume Munch a écrit : Le 12/06/2016 09:29, Pavel Sanda a écrit : Guillaume Munch wrote: I do not clearly see the situation wrt gcc 4.6. Which are the distributions that currently lack gcc > 4.6 ? this is ubuntu 12.04.p I see. I has assumed g++-4.7 was there since

Re: [PATCH] unique_ptr and some clean-up

2016-06-13 Thread Guillaume Munch
Le 12/06/2016 09:29, Pavel Sanda a écrit : Guillaume Munch wrote: I do not clearly see the situation wrt gcc 4.6. Which are the distributions that currently lack gcc > 4.6 ? this is ubuntu 12.04.p I see. I has assumed g++-4.7 was there since there is gcc-4.7. How does clang fare? it has g

Re: [PATCH] unique_ptr and some clean-up

2016-06-12 Thread Pavel Sanda
Guillaume Munch wrote: >>> I do not clearly see the situation wrt gcc 4.6. Which are the >>> distributions that currently lack gcc > 4.6 ? >> >> this is ubuntu 12.04.p >> > > I see. I has assumed g++-4.7 was there since there is gcc-4.7. How does > clang fare? it has gcc 4.6.3. clang is not and w

Re: [PATCH] unique_ptr and some clean-up

2016-06-11 Thread Guillaume Munch
Le 12/06/2016 00:58, Pavel Sanda a écrit : Guillaume Munch wrote: I do not clearly see the situation wrt gcc 4.6. Which are the distributions that currently lack gcc > 4.6 ? this is ubuntu 12.04.p I see. I has assumed g++-4.7 was there since there is gcc-4.7. How does clang fare?

Re: [PATCH] unique_ptr and some clean-up

2016-06-11 Thread Pavel Sanda
Guillaume Munch wrote: > I do not clearly see the situation wrt gcc 4.6. Which are the > distributions that currently lack gcc > 4.6 ? this is ubuntu 12.04.p

Re: [PATCH] unique_ptr and some clean-up

2016-06-11 Thread Guillaume Munch
Le 11/06/2016 21:05, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: Le 07/06/2016 ?? 19:05, Guillaume Munch a écrit : It says that it picked the wrong constructor for the pair, that requires a copyable object. Which precise version of g++ 4.6 do you have? In 4.6.3 pairs accept movable objec

Re: [PATCH] unique_ptr and some clean-up

2016-06-11 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > Le 07/06/2016 ?? 19:05, Guillaume Munch a écrit : > >> It says that it picked the wrong constructor for the pair, that requires >> a copyable object. Which precise version of g++ 4.6 do you have? In >> 4.6.3 pairs accept movable objects. Maybe it fails to generate the

Re: [PATCH] unique_ptr and some clean-up

2016-06-10 Thread Guillaume Munch
Le 10/06/2016 11:19, Jean-Marc Lasgouttes a écrit : Le 07/06/2016 à 19:05, Guillaume Munch a écrit : It says that it picked the wrong constructor for the pair, that requires a copyable object. Which precise version of g++ 4.6 do you have? In 4.6.3 pairs accept movable objects. Maybe it fails to

Re: [PATCH] unique_ptr and some clean-up

2016-06-10 Thread Jean-Marc Lasgouttes
Le 07/06/2016 à 19:05, Guillaume Munch a écrit : It says that it picked the wrong constructor for the pair, that requires a copyable object. Which precise version of g++ 4.6 do you have? In 4.6.3 pairs accept movable objects. Maybe it fails to generate the default move constructor. Can you try a

Re: [PATCH] unique_ptr and some clean-up

2016-06-09 Thread Jean-Marc Lasgouttes
Le 09/06/2016 à 16:49, Guillaume Munch a écrit : Where does this problem comes from? My patches are not touching these files. I suspect that other headers used to include these (needed for std::count and std::sort), but they don't anymore. JMarc

Re: [PATCH] unique_ptr and some clean-up

2016-06-09 Thread Guillaume Munch
Le 07/06/2016 15:23, Jean-Marc Lasgouttes a écrit : diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp index 725320b..2fd2a20 100644 --- a/src/frontends/qt4/GuiPainter.cpp +++ b/src/frontends/qt4/GuiPainter.cpp @@ -29,6 +29,8 @@ #include "support/lassert.h" #incl

Re: [PATCH] unique_ptr and some clean-up

2016-06-07 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > Le 06/06/2016 22:26, Georg Baum a écrit : > > Why do you remove the code that checks for C++11? At some time my idea > was to do > > for arg in "" "-std c++11" "-std c++0x" ; do >if $CXX $arg is a C++11 compiler then > break > done > if $CXX $arg is not C++

Re: [PATCH] unique_ptr and some clean-up

2016-06-07 Thread Guillaume Munch
Le 07/06/2016 15:23, Jean-Marc Lasgouttes a écrit : Le 05/06/2016 à 01:01, Guillaume Munch a écrit : Dear List, I have recently started using c++11 features, and, one thing leading to another, some cleaning of the tree happened. Apparently most of the changes below are supported by old compile

Re: changes (Re: [PATCH] unique_ptr and some clean-up)

2016-06-07 Thread Guillaume Munch
Le 07/06/2016 08:09, Jean-Marc Lasgouttes a écrit : Le 05/06/2016 01:01, Guillaume Munch a écrit : 13. This one is more for Jean-Marc I think (but not exclusively). There are three changes detailed in the log which are a bit less important than the ones above, but for which I would nevertheless

Re: [PATCH] unique_ptr and some clean-up

2016-06-07 Thread Jean-Marc Lasgouttes
Le 05/06/2016 à 01:01, Guillaume Munch a écrit : Dear List, I have recently started using c++11 features, and, one thing leading to another, some cleaning of the tree happened. Apparently most of the changes below are supported by old compilers (exceptions below), i.e. MSVC 2012 and maybe MSVC

changes (Re: [PATCH] unique_ptr and some clean-up)

2016-06-07 Thread Jean-Marc Lasgouttes
Le 05/06/2016 01:01, Guillaume Munch a écrit : 13. This one is more for Jean-Marc I think (but not exclusively). There are three changes detailed in the log which are a bit less important than the ones above, but for which I would nevertheless be happy to have comments. This one looks good, alt

changer (was: Re: [PATCH] unique_ptr and some clean-up)

2016-06-07 Thread Jean-Marc Lasgouttes
Le 05/06/2016 01:01, Guillaume Munch a écrit : 12. This is a new helper class that I wrote because the Changer class from MetricsInfo was too cumbersome (essentially a TeX \def with shadowing). This commit entirely replaces the latter with a better alternative. While I am not sure that the Change

remove boost stuff (was: Re: [PATCH] unique_ptr and some clean-up)

2016-06-06 Thread Jean-Marc Lasgouttes
Le 05/06/2016 01:01, Guillaume Munch a écrit : 4-11. Replace Boost features with std equivalents when possible. The result is more consistency across plaforms and fewer dependencies on Boost. More details down below. For your reading convenience, patches 1-11 are also attached together in batch0.

unique_ptr (was: Re: [PATCH] unique_ptr and some clean-up)

2016-06-06 Thread Jean-Marc Lasgouttes
Le 05/06/2016 01:01, Guillaume Munch a écrit : Dear List, I have recently started using c++11 features, and, one thing leading to another, some cleaning of the tree happened. Apparently most of the changes below are supported by old compilers (exceptions below), i.e. MSVC 2012 and maybe MSVC 20

Re: [PATCH] unique_ptr and some clean-up

2016-06-06 Thread Jean-Marc Lasgouttes
Le 06/06/2016 22:26, Georg Baum a écrit : It turned out that it was too difficult to retain the stuff for some hypothetical future C++14 checks. I will commit the attached unless nobody objects. This is simply the unconditional use of C++11. After this patch it would be possible to get rid of par

Re: [PATCH] unique_ptr and some clean-up

2016-06-06 Thread Georg Baum
Guillaume Munch wrote: > Le 05/06/2016 12:54, Georg Baum a écrit : >> Therefore I would vote to support MSVC 2013 and later, but nothing >> earlier. > > In light of the lack of support of unicode string literals in MSVC 2013, > the availability of mingw and the fact that a last-minute switch to M

Re: [PATCH] unique_ptr and some clean-up

2016-06-06 Thread Jean-Marc Lasgouttes
Le 06/06/16 à 21:04, Guillaume Munch a écrit : Le 06/06/2016 10:22, Jean-Marc Lasgouttes a écrit : Le 05/06/2016 à 13:54, Georg Baum a écrit : Looks good, I have only one minor comment: Please do not use _MSC_VER in the sources. This code is better located in config.h, like that: #if (__cplusp

boost:regex & gcc (was: [PATCH] unique_ptr and some clean-up)

2016-06-06 Thread Pavel Sanda
Guillaume Munch wrote: > 11. boost:regex. We have learnt the pitfalls of having two regex > libraries at the same time. However, according to a comment in the > source, gcc < 4.9.0 supports std::regex badly. Do we still care about > gcc < 4.9.0 ? (no hurry, and the patch is trivial) I think that r

Re: [PATCH] unique_ptr and some clean-up

2016-06-06 Thread Guillaume Munch
Le 06/06/2016 10:35, Jean-Marc Lasgouttes a écrit : Le 05/06/2016 à 13:54, Georg Baum a écrit : I won't comment on the other items. IMHO, discussing all these in one message makes things more complicated. I would prefer to go step by step. I agree with Georg on that. It would be better to have

Re: [PATCH] unique_ptr and some clean-up

2016-06-06 Thread Guillaume Munch
Le 06/06/2016 10:22, Jean-Marc Lasgouttes a écrit : Le 05/06/2016 à 13:54, Georg Baum a écrit : Looks good, I have only one minor comment: Please do not use _MSC_VER in the sources. This code is better located in config.h, like that: #if (__cplusplus >= 201402L) || (defined(_MSC_VER)&&(_MSC_VER

Re: [PATCH] unique_ptr and some clean-up

2016-06-06 Thread Jean-Marc Lasgouttes
Le 05/06/2016 à 13:54, Georg Baum a écrit : I won't comment on the other items. IMHO, discussing all these in one message makes things more complicated. I would prefer to go step by step. I agree with Georg on that. It would be better to have distinct threads, at least for groups of patches th

Re: [PATCH] unique_ptr and some clean-up

2016-06-06 Thread Jean-Marc Lasgouttes
Le 05/06/2016 à 13:54, Georg Baum a écrit : Looks good, I have only one minor comment: Please do not use _MSC_VER in the sources. This code is better located in config.h, like that: #if (__cplusplus >= 201402L) || (defined(_MSC_VER)&&(_MSC_VER>=1800)) // C++14, MSVC >= 2013 #define HAVE_STD_MAKE

Re: [PATCH] unique_ptr and some clean-up

2016-06-05 Thread Guillaume Munch
Le 05/06/2016 12:54, Georg Baum a écrit : Therefore I would vote to support MSVC 2013 and later, but nothing earlier. In light of the lack of support of unicode string literals in MSVC 2013, the availability of mingw and the fact that a last-minute switch to MSVC 2015 was already necessary for

Re: [PATCH] unique_ptr and some clean-up

2016-06-05 Thread Georg Baum
Guillaume Munch wrote: > Dear List, > > > I have recently started using c++11 features, and, one thing leading to > another, some cleaning of the tree happened. Apparently most of the > changes below are supported by old compilers (exceptions below), i.e. > MSVC 2012 and maybe MSVC 2010 (if luck