Skip to content

Instantly share code, notes, and snippets.

Created Oct 4, 2020
What would you like to do?
// inline.h
// With inline everything compiles, without it is a linkage error failure
/* inline */ int f(int x) {
return x + 42;
// TU1.cpp
#include "inline.h"
int g1() {
return f(10);
// TU2.cpp
#include "inline.h"
int g2() {
return f(20);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment