Coder Social home page Coder Social logo

Comments (4)

jzmaddock avatar jzmaddock commented on June 27, 2024

OK, I assume this is a new C++20 feature - and one that breaks existing code given that u8"xyz" was previously of type char[N]? Is there an SD6 macro for this change - I can't see anything on the "official" SD6 page yet which seems not to have caught up with C++20?

Thanks, John.

from config.

CaseyCarter avatar CaseyCarter commented on June 27, 2024

Hey John, Casey Carter here from MSVC.

Is there an SD6 macro for this change

My understanding is that WG21 is no longer maintaining SD-6 now that the feature-test macros are being formally standardized and have moved into the working draft for C++20. There are two feature-test macros related to char8_t: __cpp_char8_t indicates compiler support for char8_t as a type, and __cpp_lib_char8_t indicates standard library support for e.g. u8string, u8string_view, char_traits<char8_t>, etc.

And yes, u8"foo" has type const char8_t[4] in C++20 instead of const char[4] as in C++17. It's a breaking change, albeit one that WG21 thinks is for the best, but purity of motivation doesn't make it any less problematic to support in libraries that need to be portable between C++17 and C++20.

Let me know if you have any questions or if there's anything I can do to ease the fix.

from config.

jzmaddock avatar jzmaddock commented on June 27, 2024

Many thanks for the clarification - the commit referenced above should hopefully fix this now.

from config.

CaseyCarter avatar CaseyCarter commented on June 27, 2024

Many thanks for the clarification - the commit referenced above should hopefully fix this now.

Looks right to me. Thanks for the quick response.

from config.

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.