#SFINAE

Guillaume Racicotgracicot
2025-04-24

Concepts and sfinae are conspiring against me pls help 😭

C++Nowcppnow
2025-04-17

C++Now 2025 SESSION ANNOUNCEMENT: A View for Any Occasion by Patrick Roberts

schedule.cppnow.org/session/20

Register now at cppnow.org/registration/

C++Nowcppnow
2025-03-25

C++Now 2025 SESSION ANNOUNCEMENT: A View for Any Occasion by Patrick Roberts

schedule.cppnow.org/session/20

Register now at cppnow.org/registration/

2023-09-19

The latest feature for #FormaK: a managed #KalmanFilter runtime!

I'd been stuck trying to simplify the complexity of managing a process and multiple sensor models since I introduced calibration (which added more complexity... not helping...). In the end I landed on a single tick function call with a dose of #SFINAE that handles sensors of any type and takes care of the rest under the hood.

As always, it comes in #Python and #Cpp

Github: github.com/buckbaskin/formak/p

2023-08-08

New feature launch for #FormaK: a managed #KalmanFilter runtime!

I'd been stuck trying to simplify the complexity of managing a process and multiple sensor models since I introduced calibration (which added more complexity... not helping...). In the end I landed on a single tick function call with a dose of #SFINAE that handles sensors of any type and takes care of the rest under the hood.

As always, it comes in #Python and #Cpp

Blog: buckbaskin.com/blog/formak-run
Github: github.com/buckbaskin/formak/p

C++ Code with a call to a function named tick. The first argument is a time output_dt, then an argument control, followed by a vector of sensor readings. Each sensor reading is encapsulated into a function call wrap which is templated with the type of the reading called Simple.

Text Code Snippet:
mf.tick(options.output_dt, control,
        {
            mf.wrap<Simple>(options.reading_dt_base + 0.05,
                            SimpleOptions{}),
            mf.wrap<Simple>(options.reading_dt_base + 0.06,
                            SimpleOptions{}),
            mf.wrap<Simple>(options.reading_dt_base + 0.07,
                            SimpleOptions{}),
        });

Full code available at https://github.com/buckbaskin/formak/pull/17/files
Guillaume Racicotgracicot
2023-06-11

False! In some situation, using deduced return type will cause the compiler to instanciate the body of the function, and in my case it was happening a lot with concepts since I checked everything.

Suddently, I had a bunch of instanciated functions that shouldn't have, and try to called (purposefully) unimplemented functions. Those were causing compilation errors where it shouldn't

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst