Git Product home page Git Product logo

unionize's Introduction

Unionize

Extended union types in C++11

This C++ library explores advanced definitions of union-types, using C++11 features. As such, your compiler (and standard library) needs to be set to run in C++11 mode. The library has (so far):

  • super_union, a union that has its variant member types listed as template parameters. You can ignore having to recall the name (or name path) for each variant member and just address them by type. There is an option to address them via type index.
  • tagged_union, a union that works like super_union except it also keeps track of which variant member is current. Addressing members must be done through the custom access functions.
  • variant_size and variant_element, analogs to the meta-functions std::tuple_size and std::tuple_element that support the std::tuple (and std::pair and std::array) class templates. These class templates are specialized for the provided advanced union types in this library, and should be specialized for any union-like types you make.

The format of the library is like a prototype Boost library submission, which it may become. As such, the code is under the Boost license.

unionize's People

Contributors

ctmacuser avatar

Stargazers

VirtLands avatar C++1y avatar

Watchers

James Cloos avatar  avatar C++1y avatar

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.