awful.systems
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@nodeluna@programming.dev to C++@programming.devEnglish •
edit-2
7 days 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
7 days 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
    3•8 days ago

    I dont get it?

    • @nodeluna@programming.devOP
      link
      fedilink
      English
      1•8 days 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

remote_follow_modal_title

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++.
  • 2 users / day
  • 15 users / week
  • 60 users / month
  • 196 users / 6 months
  • 2.04K subscribers
  • 244 Posts
  • 424 Comments
  • Modlog
  • mods:
  • @lysdexic@programming.dev
  • @Nihili0@programming.dev
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org