Skip to content

Instantly share code, notes, and snippets.

View yuxuanchen1997's full-sized avatar

Yuxuan Chen yuxuanchen1997

View GitHub Profile
@yuxuanchen1997
yuxuanchen1997 / Crash.cpp
Last active July 10, 2024 00:07
clang++ -std=c++20 Crash.cpp
template <bool v>
struct BC {
static constexpr bool value = v;
};
template <typename B> struct __and_ : B {
static constexpr bool value = true;
};
template <typename A>
@yuxuanchen1997
yuxuanchen1997 / Illformed.cpp
Created July 9, 2024 01:20
Illformed test case for clang crash
template <bool v>
struct __bool_constant {
static constexpr bool value = v;
};
__bool_constant<true>;
template <int>
struct conditional {};
@yuxuanchen1997
yuxuanchen1997 / call_overhead.cpp
Last active September 6, 2024 15:43
Pure Call Overhead Benchmark for folly::coro::Task. Credit to original author @keshpr
#include <coroutine>
#include <folly/experimental/coro/BlockingWait.h>
#include <folly/experimental/coro/Task.h>
#include <folly/init/Init.h>
#include <benchmark/benchmark.h>
#include <gflags/gflags.h>
DEFINE_int32(numThreads, 1, "");

Keybase proof

I hereby claim:

  • I am yuxuanchen1997 on github.
  • I am yuxuanchen1997 (https://keybase.io/yuxuanchen1997) on keybase.
  • I have a public key ASANpWqniZvrmpdUYPciQjV69JZ3Mp-h8Th_VmD4Yk87Xgo

To claim this, I am signing this object: