Giter VIP home page Giter VIP logo

expected's Introduction

Expected

Expected has been proposed to the C++ standard committee. The current document is N4109 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4109.pdf).

A library for expected objects for C++17. This is the reference implementation of proposal N4109 (see see https://github.com/ptal/std-expected-proposal).

Supported compilers

  • Clang 3.2
  • G++ 4.8.0 (and probably later)
  • VS14 CTP 3. Note that this compiler cannot do enough constexpr for Expected (or Boost for that matter) to turn it on, but it appears that MSVC doesn't mind and all unit tests pass anyway. It is possible VS14 RTM will do enough constexpr that it can be turned on.
  • VS2013 which has the same limitations as VS14 (no constexpr). This uses an unrestricted union emulation which works well enough.

Usage

For usage examples and the overview see https://github.com/ptal/std-expected-proposal

Differences from N4109

  • The constructor taking initializer_list argument is not constexpr. This is because initializer_list operations are not constexpr in C++11.
  • Member function value_or does not have rvalue reference overload in GCC inferior to 4.8.1. This is because rvalue overloading on *this is not supported until GCC 4.8.1.

expected's People

Contributors

faithandbrave avatar garyfurnish avatar hrobeers avatar jenkins-nedprod avatar macmason avatar ptal avatar viboes avatar vtnerd avatar

Watchers

 avatar  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.