Code Monkey home page Code Monkey logo

bit-stl's Introduction

const AUTHOR: &'static github::Author = github::author!()

println!("{}", AUTHOR.greeting());

๐Ÿ‘‹ Hi, I'm @bitwizeshift. By day, I'm a professional Go developer with Verily. By night, I'm a C++ developer with over a decade of experience, a Rust developer/enthusiest, a Software blogger, and hobbiest open-source creator.

I like solving hard problems in fun and interesting ways. Check out some of my projects!

If you like any of my work, please consider becoming a Github sponsor or even just buying me a coffee!

Github stats for bitwizeshift

bit-stl's People

Contributors

bitwizeshift avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bit-stl's Issues

Failing builds with AppVeyor

AppVeyor has not successfully built this library on either of the two target compilers:

  • MSVC
  • clang-cl

Known issues:

clang-cl

  • Doesn't fully support exception handling correctly
    • Fails to compile Catch unit tests (due to try/catch statements)
    • Fails to compile anything that throws

Optimized `optional` type

C++17 introduces optional (of which, bit::stl::optional is based on for pre-c++17 support).

optional satisfies nullable stack values; however it does not play nice when used in composition, since the bool member pushes additional padding when used in arrays, or when a member immedately succeeds an optional member.

For this, there are two proposed types:

  • bit::stl::optional_array -- an array of optional values that behaves like std::array<T,N> where value_type is T* (with nullptr representing not-set). This would allow N optionals to be stored contiguously, with N bools indicating their construction to also be contiguous.
  • bit::stl::optional_tuple -- a tuple of values that may or may not contain a value. This is a generalization of optional_array, where each member may be a different type. The bools indicating initialization is stored contiguously in memory, which optimizes storage.

Implement `variant`

The utility type variant is noticeably absent from this library, and should be added as a future extension

Implement `expected`

The previous implementation of expected was based on Alexandrescu's Expected<T> type. This type, along with the error-code equivalent, checked, have been removed from the version 2 release of this library.

With recent standard proposals, a better alternative of expected<T,E> has been suggested that satisfies nearly all requirements for both of the original expected and checked types. This will supersede the old version.

Remove `bit::stl::byte`

As discovered in the bit-memory library, gsl::byte (which bit::stl::byte is based on) violates c++ strict-aliasing when using it to alias in place of a char*. C++17 fixes this with std::byte and additional wording to single-unit fundamental types -- but without C++17, the byte type is useless.

Any uses of bit::stl::byte will require updating as well, such as bit::stl::span

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.