This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _MSC_VER | |
#pragma warning(push, 0) | |
#include <windows.h> | |
#pragma warning(pop) | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stddef.h> | |
static char bom[3] = { 0xEF, 0xBB, 0xBF }; | |
#define error(msg) error__(msg, __LINE__) | |
static int | |
error__(char const *msg, int line) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define 👉 -> | |
struct vec3 { | |
int x, y, z; | |
}; | |
void print_vec(struct vec3 *v) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ dumpbin -symbols main.obj | |
Microsoft (R) COFF/PE Dumper Version 14.00.24213.1 | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
Dump of file main.obj | |
File Type: COFF OBJECT | |
COFF SYMBOL TABLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*- C++ -*- | |
//===----------------------------- coroutine -----------------------------===// | |
// | |
// The LLVM Compiler Infrastructure | |
// | |
// This file is distributed under the University of Illinois Open Source | |
// License. See LICENSE.TXT for details. | |
// | |
//===----------------------------------------------------------------------===// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto PtrLiteral = new (S.Context) CXXNullPtrLiteralExpr( | |
S.Context.NullPtrTy, NTTP->getLocation()); | |
Expr *Value = | |
S.ImpCastExprToType(PtrLiteral, NullPtrType, CK_NullToPointer) | |
.get(); | |
DeducedTemplateArgument NewDeduced(S.Context.getCanonicalTemplateName(Arg)); | |
DeducedTemplateArgument Result = checkDeducedTemplateArguments( | |
S.Context, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# p4.py - p4 offline caching | |
# | |
# Copyright (c) 2017 Arvid Gerstmann | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
VERSION=$(git --version | cut -b13- | sed -n 's/.*[0-9]*\.\([0-9]*\)\.[0-9]*.*/\1/p') | |
if [ "$VERSION" -lt 15 ]; then | |
echo "git version 2.15.0 or higher required" | |
echo "please upgrade your git: brew upgrade git" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ROOT=output | |
CC=x86_64-linux-musl-g++ | |
CFLAGS=" | |
-nostdinc | |
-isystem $ROOT/x86_64-linux-musl/include/c++/7.2.0 | |
-isystem $ROOT/x86_64-linux-musl/include/c++/7.2.0/x86_64-linux-musl | |
-isystem $ROOT/x86_64-linux-musl/include/c++/7.2.0/backward | |
-isystem $ROOT/x86_64-linux-musl/include/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
del /s /q build/* | |
rmdir /s /q build | |
mkdir build | |
cd build | |
cmake .. -G"Visual Studio 16 2019" -A x64 -Thost=x64^ | |
-DCMAKE_BUILD_TYPE:STRING="Release"^ | |
-DCMAKE_INSTALL_PREFIX:STRING="output"^ |