Skip to content

Instantly share code, notes, and snippets.

@lucasdemarchi
Created September 5, 2018 23:11
Show Gist options
  • Save lucasdemarchi/e3aa05075ca6a0a4d9eb9ffcbf3b2335 to your computer and use it in GitHub Desktop.
Save lucasdemarchi/e3aa05075ca6a0a4d9eb9ffcbf3b2335 to your computer and use it in GitHub Desktop.
#include <stdio.h>
// libraries/AP_HAL_Linux
namespace HAL_Linux {
struct Mutex {
Mutex() {
printf("hello world Linux");
}
};
}
// libraries/AP_HAL_PX4
namespace HAL_PX4 {
struct Mutex {
Mutex() {
printf("hello world PX4");
}
};
}
namespace HAL {
using Mutex = HAL_Linux::Mutex;
}
int main()
{
HAL::Mutex mutex;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment