Re: Latte : make_unique for gcc <=4.8

2017-11-16 Thread Michail Vourlakos
2017-11-09 10:58 GMT+02:00 Tomaz Canabrava :

>
>
>> regards,
>> [michail]
>>
>>
>> BTW: for every e-mail I send I need moderator approval is that a standard
>> procedure or I can register somewhere to avoid this?
>>
>
> yes, you can: https://mail.kde.org/mailman/listinfo/kde-core-devel
>
>
>
the thing is that I am already subscribed there but all my e-mails to
kde-core-devel need a moderator approval... funny thing is that for
plasma-devel mailing list I dont need such moderator approval.


Απαλλαγμένο
από ιούς. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Re: Latte : make_unique for gcc <=4.8

2017-11-16 Thread Michail Vourlakos
gcc 4.8.5 is used by openSUSE Leap.

 If you check the code now i enable it through cmake if it is needed by
using the flag -DINCLUDE_MAKE_UNIQUE=ON

Στις 9 Νοε 2017 11:56, ο χρήστης "Sven Brauch"  έγραψε:

On 05/11/17 16:12, Michail Vourlakos wrote:
> Do you know any better way to handle this?

You can let cmake do the check:

https://cmake.org/cmake/help/v3.0/module/CheckSymbolExists.html

Not sure if this is the best option, though.

Greetings,
Sven


Re: Latte : make_unique for gcc <=4.8

2017-11-09 Thread Luigi Toscano
Michail Vourlakos ha scritto:
> 
> 
> BTW: for every e-mail I send I need moderator approval is that a standard
> procedure or I can register somewhere to avoid this?

kde-core-devel is moderated even for registered users, but usually after few
posts the moderators put people in the whitelist.

Ciao
-- 
Luigi


Re: Latte : make_unique for gcc <=4.8

2017-11-09 Thread Adriaan de Groot
On Thursday, 9 November 2017 09:58:26 CET Tomaz Canabrava wrote:
> On Sun, Nov 5, 2017 at 4:12 PM, Michail Vourlakos 
> 
> > during the review phase in Latte we removed the following code in case it
> > would conflict in some cases:
> > 
> > #if __GLIBCXX__ <= 20150623
> > namespace std {
> > template
> > unique_ptr make_unique(Args &&... args)
..
> > #endif
> > 
> > 
> > this was needed for gcc versions that even though they are C++14
> > compatible they dont offer make_unique function. By removing that code we
> > broke compatibility with openSUSE Leap that uses gcc 4.8.5 ... so in order
> > to build latte packages a made a patch to readd that code.

The problem was at least partly (IIRC) that the check doesn't detect Clang, 
and then defines a duplicate (language-lawyering says it's undefined behavior). 
The problem isn't so much with gcc itself, as with the C++ STL version it 
ships with.

I wanted to point you to https://cmake.org/cmake/help/v3.8/prop_gbl/
CMAKE_CXX_KNOWN_FEATURES.html , but has-make-unique is not one other features 
CMake knows about.

As Sven points out, using symbol_exists() might work, or easier might be a 
try_compile() which will definitely tell you if std::make_unique compiles on 
the local system.

[ade]

signature.asc
Description: This is a digitally signed message part.


Re: Latte : make_unique for gcc <=4.8

2017-11-09 Thread Sven Brauch
On 05/11/17 16:12, Michail Vourlakos wrote:
> Do you know any better way to handle this?

You can let cmake do the check:

https://cmake.org/cmake/help/v3.0/module/CheckSymbolExists.html

Not sure if this is the best option, though.

Greetings,
Sven



signature.asc
Description: OpenPGP digital signature


Re: Latte : make_unique for gcc <=4.8

2017-11-09 Thread Tomaz Canabrava
On Sun, Nov 5, 2017 at 4:12 PM, Michail Vourlakos 
wrote:

> Hello everyone,
>
> during the review phase in Latte we removed the following code in case it
> would conflict in some cases:
>
> #if __GLIBCXX__ <= 20150623
> namespace std {
> template
> unique_ptr make_unique(Args &&... args)
> {
> return std::unique_ptr(new T(std::forward(args)...));
> }
> }
> #endif
>
>
> this was needed for gcc versions that even though they are C++14
> compatible they dont offer make_unique function. By removing that code we
> broke compatibility with openSUSE Leap that uses gcc 4.8.5 ... so in order
> to build latte packages a made a patch to readd that code.
>
> Do you know any better way to handle this?
>

I would say "just drop it altogether" because 4.8.5 is too old and broken
(it's a 2013 release, after all. four years have passed and for programming
this is an eternity) - require a newer compiler.


> regards,
> [michail]
>
>
> BTW: for every e-mail I send I need moderator approval is that a standard
> procedure or I can register somewhere to avoid this?
>

yes, you can: https://mail.kde.org/mailman/listinfo/kde-core-devel