[LyX/master] C++11 compilation fix

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Dec 7 17:43:30 UTC 2022


Le 07/12/2022 à 18:29, Jürgen Spitzmüller a écrit :
> Am Mittwoch, dem 07.12.2022 um 18:15 +0100 schrieb Jean-Marc
> Lasgouttes:
>> My comment that it is a C++11 thing is probably wrong. I did not
>> check what level of standard allows QPair without specialization.
>> This issue was the reason why std::pair has a make_pair(), I think.
> 
> I am completely fine with using std::pair, as suggested by Scott, if
> this makes things easier.

It is not easier. The only thing that is easier before C++17 is 
std::make_pair. See good discussion here:
https://stackoverflow.com/questions/9270563/what-is-the-purpose-of-stdmake-pair-vs-the-constructor-of-stdpair

I like the curly braces notation, since it allows to initialize vectors too.

There is also the notation
	MyClass p{12};
which is mysterious to me.

JMarc



More information about the lyx-devel mailing list