Lemmy.one
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
nodeluna@programming.dev to C++@programming.devEnglish ·
edit-2
2 months ago

a small implementation for std::expected for C++11

github.com

external-link
message-square
8
fedilink
14
external-link

a small implementation for std::expected for C++11

github.com

nodeluna@programming.dev to C++@programming.devEnglish ·
edit-2
2 months ago
message-square
8
fedilink
GitHub - nodeluna/expected: an implementation of std::expected for C++11
github.com
external-link
an implementation of std::expected for C++11. Contribute to nodeluna/expected development by creating an account on GitHub.
  • bollybing@lemmynsfw.com
    link
    fedilink
    arrow-up
    3
    ·
    2 months ago

    I dont get it?

    • nodeluna@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      what don’t u get it? why did I make this? or what is the point of this type?

      if you are unfamiliar with std::expected then check out https://en.cppreference.com/w/cpp/utility/expected.html

      it’s basically a type that let you return either a “value” or an “error” and the caller of the function has to check which did the function return. it’s a modern way of handling errors in C++ that was introduced in C++23

C++@programming.dev

cpp@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !cpp@programming.dev

The center for all discussion and news regarding C++.

Rules

  • Respect instance rules.
  • Don’t be a jerk.
  • Please keep all posts related to C++.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 6 users / day
  • 6 users / week
  • 26 users / month
  • 208 users / 6 months
  • 14 local subscribers
  • 2.09K subscribers
  • 317 Posts
  • 641 Comments
  • Modlog
  • mods:
  • farados@vlemmy.net
  • Nihili0@programming.dev
  • lysdexic@programming.dev
  • BE: 0.19.7
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org