cpp

gracicot,
@gracicot@mastodon.social avatar

While designing an ADL based API, I got bitten by ADL and accidentally called a function from the std namespace. I think I'll switch to deducing this instead #cpp #cplusplus #adl

cppnow,

🚀 Exciting news! Early Access for the C++Now 2024 YouTube videos is now open and is available to anyone who attended C++Now 2024 or who has purchased an early access pass!

Find out more: https://cppnow.org/announcements/2024/06/early-access-now-open-for-cnow-2024-youtube-videos/

#cpp #cplusplus #programming #coding

juulcat,
@juulcat@mastodon.gamedev.place avatar

Moving our games programming videos - currently Runtime Compiled C++ - to the new dedicated enkisoftware Youtube channel. Consider giving it a subscribe https://www.youtube.com/@enkisoftware

#Cpp #GameDev #Programming #Video #Youtube

cmaureir,
@cmaureir@mastodon.social avatar

Wanna join the development team in charge of the official Python bindings for the Qt Framework? 🐍

We have an opening for the Qt for Python team, which is currently developing PySide and Shiboken! 💻

If you know C++, Python, and perhaps a bit of CPython internals,

Join us! https://www.qt.io/open-positions/python-and-c-software-engineer-all-levels

#pyside #qt #shiboken #qtforpython #cpython #cpp #python

sos,
@sos@mastodon.gamedev.place avatar

Just looked up how to do callbacks in C++ and YOU CAN'T (unless you write a bunch of templates and wrappers yourself).

When you pass a pointer to non-static member function, yopu need to handle the class pointer yourself. This is like the simplest thing, why can't C++ have that?

Love how the ISO standard website just tells you "Don't". What a joke.

#cpp #programming

gracicot,
@gracicot@mastodon.social avatar

@sos @morten_skaaning If you want to create a callback just out of a member function and this the STL actually got it for you, no need for templates:

auto callback = std::bind_front(&type::member_function, this);

It's a bit like javascript where you need to bind a class function with an instance to properly use it as callback.

gracicot,
@gracicot@mastodon.social avatar

@sos @morten_skaaning The other answer would be of course "just use a lambda" because they work for pretty much all cases, even for C functions that can get a void*

professorhank,
@professorhank@sfba.social avatar

Come check out my latest C++ video. Leave a note in the YouTube comments letting me know how I did.

https://youtu.be/dArZpIrMftY

#LearnToCode #cpp #programmer #programming

br00t4c,
@br00t4c@mastodon.social avatar

CPP Investments CEO welcomes talk of how to make Canada more of a destination for investment

https://thelogic.co/news/cpp-investments-ceo-welcomes-talk-of-how-to-make-canada-more-of-a-destination-for-investment/

jackwilliambell,
@jackwilliambell@rustedneuron.com avatar
smurthys,
@smurthys@hachyderm.io avatar

Y'all leave reminders like this too in your C++ code at end of day? 🤔

static_assert(false, "Complete this first. Don't get distracted");

#softwareDevelopment #management #focus #prioritization #cpp

gdinwiddie,
@gdinwiddie@mastodon.social avatar

@smurthys
I prefer to leave a failing test of the next thing I plan to implement.

DanielaKEngert,
@DanielaKEngert@hachyderm.io avatar

Dear Fediverse,

in case you care, I'd love if you'd vote for this issue of mine:

https://developercommunity.visualstudio.com/t/Cconstant-evaluationModules-Cons/10661450

Serious constant evaluation and C++ modules seem to live on different planets.

Thanks, much appreciated! 🩷

#cpp #cplusplus #msvc

darkcisum,
@darkcisum@swiss.social avatar

Cross-platform, cross-language development is quite tedious... 🙃

You need to wait for builds to finish, then test on three different OS with different ways to load things.

At least with a Windows machine, you get a Linux environment via WSL2 for free, although it doesn't launch via dotnet run.
And finally you also need access to macOS somehow.

But it's quite satisfying seeing the library build automatically on all the different configurations: https://github.com/SFML/CSFML/pull/249

#SFML #cpp #c #csharp

jbzfn,
@jbzfn@mastodon.social avatar

🧑‍💻 Butano: Modern C++ high level GBA engine
— GValiente

https://github.com/GValiente/butano

sinbad,
@sinbad@mastodon.gamedev.place avatar

Ooh, I do like the new "Sticky Lines" feature in Rider 2024 #jetbrainsrider #cpp

julienbarnoin,
@julienbarnoin@mastodon.gamedev.place avatar

All this time I've been using the return value of snprintf as the number of characters actually written, when it's in fact the number of characters that would be written if the max size passed in were large enough.

In fact: "If the resulting string would be longer than n-1 characters, the remaining characters are discarded and not stored, but counted for the value returned by the function."

BRB, got a bunch of files to go back over... 😓

#c #cpp #programming #gamedev

gfxstrand,
@gfxstrand@mastodon.gamedev.place avatar

@julienbarnoin Yeah, IIRC Windows just returns -1 if there's an overflow.

julienbarnoin,
@julienbarnoin@mastodon.gamedev.place avatar

@gfxstrand Good to know, will definitely be checking that.
Of course to be sure I should check the behaviour on Windows 11, Windows 10... Windows 8.1, Windows 8... Windows XP, 2000... Windows Me, no just kidding on that last one.

cdrmack,
@cdrmack@fosstodon.org avatar

After 10 years of commercial experience in #cpp I think I’m ready for a new chapter. I have played around with #rust #golang #zig and #clojure but most job offers that I see are for people with at least X years of commercial experience in this exact languages. Do you have any hints how to approach this? I would think that my previous experience as a #software engineer would matter. Especially since I do not expect to move to another senior role, I’m checking junior positions too. #jobsearch

deshipu,
@deshipu@fosstodon.org avatar

@cdrmack ignore the requirements, they are copy-pasted by people who have no idea what they are writing about

foonathan,
@foonathan@fosstodon.org avatar

I've written a trip report for C++Now 2024, one of the best conferences I've ever attended: https://www.think-cell.com/en/career/devblog/trip-report-cpp-now-2024

#cpp #cplusplus

jakub_neruda, Czech

Funny. I removed all modules from my C++ codebase (roughly 10% of it) and I got about 10-16% shorter compilation times. Not to mention Intellisense no longer crashing all over the place.

I wonder if it ever be a worthwhile feature to use.

gracicot,
@gracicot@mastodon.social avatar

@jakub_neruda the feature is not ready for prime time. Don't use it if the bleeding crashing edge is not your thing.

For compilation speed, it depends how fine grained your modules are. The smaller your modules are, the longer the compile time. They are not meant to replace headers 1:1. A good example is the STL, where any other splitting than just import std was found to be slower.

gracicot,
@gracicot@mastodon.social avatar

Crashing MSVC is too mainstream. Cool kids crash clang

aks,
@aks@scalie.zone avatar

Ok folks.

Is using static always evil or is having something like game state (paused, running, in menu etc) inside a static variable ok?

Or do i have to pass it around everywhere?

gracicot,
@gracicot@mastodon.social avatar

@aks usually, you should use a static function scope variable to create a singleton. Then you do your stuff through it.

I usually avoid global mutable variables though, or singleton of any form.

aeva,
@aeva@mastodon.gamedev.place avatar

@aks static variables are fine. if it wasn't good, bjarne wouldn't have put it in c++

smurthys,
@smurthys@hachyderm.io avatar

I spent ~hour yesterday fighting an issue with my C++ code, only to later figure out it's a possible GCC bug, because Clang accepts the same code.

The issue is that GCC does not permit a constrained type parameter in a template template parameter of an aliased template. See the simplified code with the issue.

A cursory search of GCC Bugzilla does not readily show any related bug. I'll look carefully but lemme know if this is a known bug (probably is). 🙏🏽

https://sigcpp.godbolt.org/z/bGTnM3v1q

cpponline,

What’s New in Compiler Explorer? 2024 Update – by @mattgodbolt – C++Online 2024

https://www.youtube.com/watch?v=28Gp3TTQYp0

Schlangenmensch, German

Does anybody know when it will be possible to mix #c++ named and classic with ?

gracicot, (edited )
@gracicot@mastodon.social avatar

@Schlangenmensch from what I understood, you can include then import, but not the other way around. Minus bugs of course

Schlangenmensch,

@gracicot I can't get it to work. I have a source file including iostream and importing a module. The module imports Std and uses some stl stuff, e.g. a unique_ptr. And voila, I get redifinition errors in <memory>.

Without the include of <iostream> everything works as expected. And it doesn't matter If include or import comes first.

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

Live++ 2.5.0 OUT NOW for Windows, Xbox Series X|S, and PlayStation®5!
https://liveplusplus.tech/

This is the only solution that supports simultaneous hot-reload for C++ applications across multiple platforms and processes, both locally and over the network.
https://www.youtube.com/watch?v=ewbkdxskl7I

kdab,

With regular uploads on various programming topics, there's always something new to learn on our YouTube channel KDAB TV. Subscribe now and elevate your programming skills with us: https://www.youtube.com/@KDABtv

simontoth,
@simontoth@hachyderm.io avatar

When working with exceptions in C++, there are three main levels of guarantees a function can provide when an exception is thrown.

🧵👇

Compiler Explorer link: https://compiler-explorer.com/z/T9YKKa5oW

  • All
  • Subscribed
  • Moderated
  • Favorites
  • cpp
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • JUstTest
  • everett
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • provamag3
  • anitta
  • tester
  • megavids
  • lostlight
  • All magazines