Giter Club home page Giter Club logo

Comments (4)

Chlorie avatar Chlorie commented on June 12, 2024

可以在 include 对应的头文件之前

#define _HAS_FEATURES_REMOVED_IN_CXX20 // 或者 _HAS_DEPRECATED_RESULT_OF 如果不想把别的 C++20 删除的东西也还原
#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS

或者自己造个线程池轮子(((

from mirai-cpp.

cyanray avatar cyanray commented on June 12, 2024

可以在 include 对应的头文件之前

#define _HAS_FEATURES_REMOVED_IN_CXX20 // 或者 _HAS_DEPRECATED_RESULT_OF 如果不想把别的 C++20 删除的东西也还原
#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS

或者自己造个线程池轮子(((

原来还有这种黑科技……

好像也可以直接用

decltype(f(args...))

来代替

typename std::result_of<F(Args...)>::type

from mirai-cpp.

Chlorie avatar Chlorie commented on June 12, 2024

可以在 include 对应的头文件之前

#define _HAS_FEATURES_REMOVED_IN_CXX20 // 或者 _HAS_DEPRECATED_RESULT_OF 如果不想把别的 C++20 删除的东西也还原
#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS

或者自己造个线程池轮子(((

原来还有这种黑科技……

好像也可以直接用

decltype(f(args...))

来代替

typename std::result_of<F(Args...)>::type

MSVC 在删除旧功能上很积极,gcc 和 clang 倒是更看重后向兼容而不是符合标准……

如果是自己的代码肯定会改成新的,但是问题来自第三方库的话还是尽量不要动不属于自己的代码吧,用比如上面那种方法绕过去我觉得比较 OK(

from mirai-cpp.

cyanray avatar cyanray commented on June 12, 2024

可以在 include 对应的头文件之前

#define _HAS_FEATURES_REMOVED_IN_CXX20 // 或者 _HAS_DEPRECATED_RESULT_OF 如果不想把别的 C++20 删除的东西也还原
#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS

或者自己造个线程池轮子(((

原来还有这种黑科技……
好像也可以直接用

decltype(f(args...))

来代替

typename std::result_of<F(Args...)>::type

MSVC 在删除旧功能上很积极,gcc 和 clang 倒是更看重后向兼容而不是符合标准……

如果是自己的代码肯定会改成新的,但是问题来自第三方库的话还是尽量不要动不属于自己的代码吧,用比如上面那种方法绕过去我觉得比较 OK(

那个库没人维护了,所以我fork一份自己维护,这样就可以修改了 hhhhh

from mirai-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.