Skip to content

Instantly share code, notes, and snippets.

@bkerley

bkerley/.gitignore

Last active May 8, 2019
Embed
What would you like to do?
cxx_goofin
main.dSYM
main
/*
> clang++ --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> clang++ -o main -std=c++1y -g main.cpp
> ./main
asdf
*/
#include <iostream>
#include <string_view>
struct __attribute__((packed)) cool_struct {
int first;
char second;
int third;
};
constexpr int x = 69;
constexpr char bort[] = "bort";
constexpr int y = 420;
constexpr struct cool_struct cool2 = {
.first = 32,
.second = 'x',
.third = 65535
};
int cool(std::ostream& w) {
struct cool_struct cool3 = {
.first = 15,
.second = 'y',
.third = 0xF00F
};
w << x << bort << y << cool2.second << cool3.second << std::endl;
return 1234;
}
int main() {
std::cout << "asdf" << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment