You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by BiteTheDDDDt <px...@qq.com.INVALID> on 2022/05/09 09:16:48 UTC

回复: [DISCUSS] Update backend c++ standard to gnu20

Maybe we can just use the feature just both gcc and clang supported until we decide to use gcc or clang.I think there won't be a lot of code involving new features of the C++20 standard, so it's rare to meet compatibility problems.

 



------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "dev"                                                                                    <yangzhgg@gmail.com&gt;;
发送时间:&nbsp;2022年5月9日(星期一) 下午4:56
收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;

主题:&nbsp;Re: [DISCUSS] Update backend c++ standard to gnu20



I checked the support of gcc[1] and clang[2] for the cxx20 standard, gcc
can partially support it, but the support of clang is poor. If it is
upgraded, how to ensure the compatibility of the code under gcc and clang

[1] https://gcc.gnu.org/projects/cxx-status.html#cxx20
[2] https://clang.llvm.org/cxx_status.html#cxx20
Thanks
Yang Zhengguo


BiteTheDDDDt <pxl290@qq.com.invalid&gt; 于2022年5月9日周一 15:54写道:

&gt; Hello&amp;nbsp;everyone:
&gt; I want to update our c++ standard from gnu17 to gnu20, then we can use
&gt; some new feature such as `concept`,`coroutines`,`template lambda function`.
&gt; Currently our code doesn't need much modification to adapt to the c++20
&gt; standard, this is my pull-request
&gt; https://github.com/apache/incubator-doris/pull/9313.
&gt; welcome to discuss this.

Re:回复: [DISCUSS] Update backend c++ standard to gnu20

Posted by 陈明雨 <mo...@163.com>.
You have to find a way to make sure that the C20 feature you used can be support be both gcc and clang, for now.
Otherwise, it is hard to maintain the code.




--

此致!Best Regards
陈明雨 Mingyu Chen

Email:
chenmingyu@apache.org





在 2022-05-09 17:16:48,"BiteTheDDDDt" <px...@qq.com.INVALID> 写道:
>Maybe we can just use the feature just both gcc and clang supported until we decide to use gcc or clang.I think there won't be a lot of code involving new features of the C++20 standard, so it's rare to meet compatibility problems.
>
> 
>
>
>
>------------------&nbsp;原始邮件&nbsp;------------------
>发件人:                                                                                                                        "dev"                                                                                    <yangzhgg@gmail.com&gt;;
>发送时间:&nbsp;2022年5月9日(星期一) 下午4:56
>收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;
>
>主题:&nbsp;Re: [DISCUSS] Update backend c++ standard to gnu20
>
>
>
>I checked the support of gcc[1] and clang[2] for the cxx20 standard, gcc
>can partially support it, but the support of clang is poor. If it is
>upgraded, how to ensure the compatibility of the code under gcc and clang
>
>[1] https://gcc.gnu.org/projects/cxx-status.html#cxx20
>[2] https://clang.llvm.org/cxx_status.html#cxx20
>Thanks
>Yang Zhengguo
>
>
>BiteTheDDDDt <pxl290@qq.com.invalid&gt; 于2022年5月9日周一 15:54写道:
>
>&gt; Hello&amp;nbsp;everyone:
>&gt; I want to update our c++ standard from gnu17 to gnu20, then we can use
>&gt; some new feature such as `concept`,`coroutines`,`template lambda function`.
>&gt; Currently our code doesn't need much modification to adapt to the c++20
>&gt; standard, this is my pull-request
>&gt; https://github.com/apache/incubator-doris/pull/9313.
>&gt; welcome to discuss this.

Re: [DISCUSS] Update backend c++ standard to gnu20

Posted by Yuxuan Cheng <pl...@gmail.com>.
Looking forward to upgrading to c++20, then we can use atomic<shared_ptr>.

BiteTheDDDDt <px...@qq.com.invalid> 于2022年7月22日周五 20:22写道:

> Hi All,
> &nbsp; The community recently added ci detection for clang build, which
> can avoid build failures caused by some differences
>
> between gcc and clang. I think now we can start talking again about
> whether we should upgrade the C++ standard
>
> from gnu++17 to gnu++20.
>
> &nbsp;
> Over&nbsp;the&nbsp;past&nbsp;few&nbsp;months,&nbsp;some&nbsp;work&nbsp;has&nbsp;been&nbsp;becoming&nbsp;a&nbsp;natural&nbsp;progression.&nbsp;In&nbsp;the&nbsp;past,&nbsp;we&nbsp;needed&nbsp;to&nbsp;patch&nbsp;phmap
>
>
> and&nbsp;introduce&nbsp;the&nbsp;absl&nbsp;library&nbsp;as&nbsp;a&nbsp;dependency.&nbsp;Now&nbsp;the&nbsp;new&nbsp;version&nbsp;of&nbsp;phmap&nbsp;is&nbsp;released&nbsp;to&nbsp;fix&nbsp;its&nbsp;incompatibility&nbsp;with&nbsp;C++20,
>
>
>
> and&nbsp;the&nbsp;dependence&nbsp;on&nbsp;absl&nbsp;can&nbsp;also&nbsp;help&nbsp;us&nbsp;to&nbsp;upgrade&nbsp;the&nbsp;version&nbsp;of&nbsp;tcmalloc.
>
>
>
> ------------------&nbsp;原始邮件&nbsp;------------------
> 发件人:
>                                                   "BiteTheDDDDt"
>                                                                         <
> pxl290@qq.com&gt;;
> 发送时间:&nbsp;2022年5月9日(星期一) 下午5:16
> 收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;
>
> 主题:&nbsp;回复: [DISCUSS] Update backend c++ standard to gnu20
>
>
>
> Maybe we can just use the feature just both gcc and clang supported until
> we decide to use gcc or clang.I think there won't be a lot of code
> involving new features of the C++20 standard, so it's rare to meet
> compatibility problems.
>
>
>
>
>
> ------------------ 原始邮件 ------------------
> 发件人:
>                                                   "dev"
>                                                                 <
> yangzhgg@gmail.com&gt;;
> 发送时间:&nbsp;2022年5月9日(星期一) 下午4:56
> 收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;
>
> 主题:&nbsp;Re: [DISCUSS] Update backend c++ standard to gnu20
>
>
>
> I checked the support of gcc[1] and clang[2] for the cxx20 standard, gcc
> can partially support it, but the support of clang is poor. If it is
> upgraded, how to ensure the compatibility of the code under gcc and clang
>
> [1] https://gcc.gnu.org/projects/cxx-status.html#cxx20
> [2] https://clang.llvm.org/cxx_status.html#cxx20
> Thanks
> Yang Zhengguo
>
>
> BiteTheDDDDt <pxl290@qq.com.invalid&gt; 于2022年5月9日周一 15:54写道:
>
> &gt; Hello&amp;nbsp;everyone:
> &gt; I want to update our c++ standard from gnu17 to gnu20, then we can use
> &gt; some new feature such as `concept`,`coroutines`,`template lambda
> function`.
> &gt; Currently our code doesn't need much modification to adapt to the
> c++20
> &gt; standard, this is my pull-request
> &gt; https://github.com/apache/incubator-doris/pull/9313.
> &gt; welcome to discuss this.

Re: [DISCUSS] Update backend c++ standard to gnu20

Posted by Adonis Ling <ad...@gmail.com>.
Glad to see that we upgrade the C++ standard.

By the way, the latest ldb toolchain (v0.12) involves Clang 14.

On Fri, Jul 22, 2022 at 8:22 PM BiteTheDDDDt <px...@qq.com.invalid> wrote:

> Hi All,
> &nbsp; The community recently added ci detection for clang build, which
> can avoid build failures caused by some differences
>
> between gcc and clang. I think now we can start talking again about
> whether we should upgrade the C++ standard
>
> from gnu++17 to gnu++20.
>
> &nbsp;
> Over&nbsp;the&nbsp;past&nbsp;few&nbsp;months,&nbsp;some&nbsp;work&nbsp;has&nbsp;been&nbsp;becoming&nbsp;a&nbsp;natural&nbsp;progression.&nbsp;In&nbsp;the&nbsp;past,&nbsp;we&nbsp;needed&nbsp;to&nbsp;patch&nbsp;phmap
>
>
> and&nbsp;introduce&nbsp;the&nbsp;absl&nbsp;library&nbsp;as&nbsp;a&nbsp;dependency.&nbsp;Now&nbsp;the&nbsp;new&nbsp;version&nbsp;of&nbsp;phmap&nbsp;is&nbsp;released&nbsp;to&nbsp;fix&nbsp;its&nbsp;incompatibility&nbsp;with&nbsp;C++20,
>
>
>
> and&nbsp;the&nbsp;dependence&nbsp;on&nbsp;absl&nbsp;can&nbsp;also&nbsp;help&nbsp;us&nbsp;to&nbsp;upgrade&nbsp;the&nbsp;version&nbsp;of&nbsp;tcmalloc.
>
>
>
> ------------------&nbsp;原始邮件&nbsp;------------------
> 发件人:
>                                                   "BiteTheDDDDt"
>                                                                         <
> pxl290@qq.com&gt;;
> 发送时间:&nbsp;2022年5月9日(星期一) 下午5:16
> 收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;
>
> 主题:&nbsp;回复: [DISCUSS] Update backend c++ standard to gnu20
>
>
>
> Maybe we can just use the feature just both gcc and clang supported until
> we decide to use gcc or clang.I think there won't be a lot of code
> involving new features of the C++20 standard, so it's rare to meet
> compatibility problems.
>
>
>
>
>
> ------------------ 原始邮件 ------------------
> 发件人:
>                                                   "dev"
>                                                                 <
> yangzhgg@gmail.com&gt;;
> 发送时间:&nbsp;2022年5月9日(星期一) 下午4:56
> 收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;
>
> 主题:&nbsp;Re: [DISCUSS] Update backend c++ standard to gnu20
>
>
>
> I checked the support of gcc[1] and clang[2] for the cxx20 standard, gcc
> can partially support it, but the support of clang is poor. If it is
> upgraded, how to ensure the compatibility of the code under gcc and clang
>
> [1] https://gcc.gnu.org/projects/cxx-status.html#cxx20
> [2] https://clang.llvm.org/cxx_status.html#cxx20
> Thanks
> Yang Zhengguo
>
>
> BiteTheDDDDt <pxl290@qq.com.invalid&gt; 于2022年5月9日周一 15:54写道:
>
> &gt; Hello&amp;nbsp;everyone:
> &gt; I want to update our c++ standard from gnu17 to gnu20, then we can use
> &gt; some new feature such as `concept`,`coroutines`,`template lambda
> function`.
> &gt; Currently our code doesn't need much modification to adapt to the
> c++20
> &gt; standard, this is my pull-request
> &gt; https://github.com/apache/incubator-doris/pull/9313.
> &gt; welcome to discuss this.



-- 
Best regards,
Adonis

回复: [DISCUSS] Update backend c++ standard to gnu20

Posted by BiteTheDDDDt <px...@qq.com.INVALID>.
Hi All,
&nbsp; The community recently added ci detection for clang build, which can avoid build failures caused by some differences 

between gcc and clang. I think now we can start talking again about whether we should upgrade the C++ standard 

from gnu++17 to gnu++20.

&nbsp; Over&nbsp;the&nbsp;past&nbsp;few&nbsp;months,&nbsp;some&nbsp;work&nbsp;has&nbsp;been&nbsp;becoming&nbsp;a&nbsp;natural&nbsp;progression.&nbsp;In&nbsp;the&nbsp;past,&nbsp;we&nbsp;needed&nbsp;to&nbsp;patch&nbsp;phmap 

and&nbsp;introduce&nbsp;the&nbsp;absl&nbsp;library&nbsp;as&nbsp;a&nbsp;dependency.&nbsp;Now&nbsp;the&nbsp;new&nbsp;version&nbsp;of&nbsp;phmap&nbsp;is&nbsp;released&nbsp;to&nbsp;fix&nbsp;its&nbsp;incompatibility&nbsp;with&nbsp;C++20, 

and&nbsp;the&nbsp;dependence&nbsp;on&nbsp;absl&nbsp;can&nbsp;also&nbsp;help&nbsp;us&nbsp;to&nbsp;upgrade&nbsp;the&nbsp;version&nbsp;of&nbsp;tcmalloc.



------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "BiteTheDDDDt"                                                                                    <pxl290@qq.com&gt;;
发送时间:&nbsp;2022年5月9日(星期一) 下午5:16
收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;

主题:&nbsp;回复: [DISCUSS] Update backend c++ standard to gnu20



Maybe we can just use the feature just both gcc and clang supported until we decide to use gcc or clang.I think there won't be a lot of code involving new features of the C++20 standard, so it's rare to meet compatibility problems.

 



------------------ 原始邮件 ------------------
发件人:                                                                                                                        "dev"                                                                                    <yangzhgg@gmail.com&gt;;
发送时间:&nbsp;2022年5月9日(星期一) 下午4:56
收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;

主题:&nbsp;Re: [DISCUSS] Update backend c++ standard to gnu20



I checked the support of gcc[1] and clang[2] for the cxx20 standard, gcc
can partially support it, but the support of clang is poor. If it is
upgraded, how to ensure the compatibility of the code under gcc and clang

[1] https://gcc.gnu.org/projects/cxx-status.html#cxx20
[2] https://clang.llvm.org/cxx_status.html#cxx20
Thanks
Yang Zhengguo


BiteTheDDDDt <pxl290@qq.com.invalid&gt; 于2022年5月9日周一 15:54写道:

&gt; Hello&amp;nbsp;everyone:
&gt; I want to update our c++ standard from gnu17 to gnu20, then we can use
&gt; some new feature such as `concept`,`coroutines`,`template lambda function`.
&gt; Currently our code doesn't need much modification to adapt to the c++20
&gt; standard, this is my pull-request
&gt; https://github.com/apache/incubator-doris/pull/9313.
&gt; welcome to discuss this.