Git Product home page Git Product logo

Comments (3)

dunhor avatar dunhor commented on August 26, 2024 1

Regarding your first question:

  • Not all consumers of WIL have access to the STL, so any code that uses STL types must be guarded, limiting their usefulness. This has a cascading effect where any functions using those functions must also be guarded
  • For input, none of the Windows APIs accept std::basic_string, so using that for input params would needlessly require consumers to construct one, wasting time and memory
  • For output, std::basic_string is a terrible API to use for output buffers due to the lack of some form of uninitialized_resize that would allow us to change the underlying buffer size without needlessly writing zeros to the soon-to-be overwritten or discarded memory

from wil.

Fulgen301 avatar Fulgen301 commented on August 26, 2024

due to the lack of some form of uninitialized_resize

For the sake of completion: C++23 has introduced resize_and_overwrite, although this doesn't help with older C++ standards of course.

from wil.

dunhor avatar dunhor commented on August 26, 2024

Huh, good to know, I missed that. But yeah, the C++ version requirement (the Windows codebase is still on C++17 as the default AFAIK) and all other issues still apply.

from wil.

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.