🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #309710

Re: futures, wielokrotne templaty, lambdy i standard c++17

#309710
From: bartekltg
Date: Thu, 21 Jun 2018 16:02
39 lines
2214 bytes
On 21.06.2018 17:48, Borneq wrote:
> Zobaczyłem czym się różnią wersje folly:
> 
> /usr/local/include/folly/futures/Future.h
> na starej wersji:
> 
> template <typename F, typename R = futures::detail::callableResult<T, F>>
>    typename R::Return then(F&& func) {
>      return thenImplementation<F, R>(std::forward<F>(func), typename 
> R::Arg());
>    }
> 
> i nowa :
> 
>    template <typename F, typename R = futures::detail::callableResult<T, 
> F>>
>    typename R::Return then(F&& func) {
>      return this->template thenImplementation<F, R>(
>          std::forward<F>(func), typename R::Arg());
>    }
> 
> co oznacza "this->template" dla kodu, który używa tego szablonu?
> 
> nowe folly używa również:
> /usr/local/include/folly/functional/Invoke.h
> or /usr/include/c++/8/type_traits
>    /// std::invoke_result_t
>    template<typename _Fn, typename... _Args>
>      using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;
> 
> Na czym mają polegać zmiany w kodzie?

Jesteś pewien, że kod biblioteki jest zły? To dość duża i popularna
biblioteka, ludzie ją kompilują i działa;)

Spróbuj skompilować w c++14 w wersji koszernej i gnu.

pzdr
bartekltg
Technical Details
Message-ID: <pggi6h$csb$1@node1.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <pgenie$nce$1@node2.news.atman.pl> <pggcqu$7jl$1@node2.news.atman.pl> <pgghcg$bj9$1@node2.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: bartekltg <bartekltg@gmail.com>
Newsgroups: pl.comp.lang.c
Subject: Re: futures, wielokrotne templaty, lambdy i standard c++17
Date: Thu, 21 Jun 2018 18:02:25 +0200
Organization: ATMAN - ATM S.A.
Lines: 40
Message-ID: <pggi6h$csb$1@node1.news.atman.pl>
References: <pgenie$nce$1@node2.news.atman.pl> <pggcqu$7jl$1@node2.news.atman.pl> <pgghcg$bj9$1@node2.news.atman.pl>
NNTP-Posting-Host: 89-70-113-215.dynamic.chello.pl
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1529596946 13195 89.70.113.215 (21 Jun 2018 16:02:26 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Thu, 21 Jun 2018 16:02:26 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
In-Reply-To: <pgghcg$bj9$1@node2.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit