Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用g++11等高版本的编译器去编译master分支,会出现编译错误 #296

Open
ZsGyao opened this issue Apr 9, 2023 · 9 comments

Comments

@ZsGyao
Copy link

ZsGyao commented Apr 9, 2023

Describe the bug (描述bug)
compile failed with error "error: macro "__has_attribute" requires an identifier".

我提交了一个方法去避免这种错误

@bethebest0622
Copy link

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

@gooker
Copy link

gooker commented Jan 30, 2024

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

c++20 没问题.gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

@bethebest0622
Copy link

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

c++20 没问题.gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

我是centos stream 8 gcc-toolset-13

报了一堆

/opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/ios_base.h:208:38: error: expected an identifier for the attribute name
  208 |   [[__nodiscard__, __gnu__::__const__]]

这种问题

@gaowanlu
Copy link

大家有解决掉吗

@paradiseforgithub
Copy link

paradiseforgithub commented Sep 25, 2024 via email

@gaowanlu
Copy link

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

c++20 没问题.gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

我是centos stream 8 gcc-toolset-13

报了一堆

/opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/ios_base.h:208:38: error: expected an identifier for the attribute name
  208 |   [[__nodiscard__, __gnu__::__const__]]

这种问题

centos stream 10 ,gcc14 -std=c++同样报错

@gaowanlu
Copy link

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

c++20 没问题.gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

我是centos stream 8 gcc-toolset-13
报了一堆

/opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/ios_base.h:208:38: error: expected an identifier for the attribute name
  208 |   [[__nodiscard__, __gnu__::__const__]]

这种问题

centos stream 10 ,gcc14 -std=c++同样报错

暂时解决了问题,屏蔽一个宏 #312

@lygin
Copy link

lygin commented Oct 29, 2024

CMakeLIst删掉-D__const__=即可

@paradiseforgithub
Copy link

paradiseforgithub commented Oct 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants