Skip to content

Instantly share code, notes, and snippets.

Avatar

Eric EricWF

View GitHub Profile
View v4l2-compliance --verbose
v4l2-compliance SHA: not available, 64 bits
Compliance test for uvcvideo device /dev/video0:
Driver Info:
Driver name : uvcvideo
Card type : Live Streaming USB Device: Live
Bus info : usb-0000:00:14.0-6
Driver version : 5.2.17
Capabilities : 0x84a00001
View gist:0c62c271f6c3912df8b04cb639904707
// RUN: $CXX -c %s -o /tmp/first.o -std=c++17 -g
// RUN: $CXX -c %s -o /tmp/second.o -std=c++17 -g -DWITH_MAIN
// RUN: $CXX -o /tmp/test.out /tmp/first.o /tmp/second.o
// RUN: /tmp/test.out
#include <cassert>
#define ABSL_INTERNAL_UNIQUE_SMALL_NAME2(x) #x
#define ABSL_INTERNAL_UNIQUE_SMALL_NAME1(x) ABSL_INTERNAL_UNIQUE_SMALL_NAME2(x)
#define ABSL_INTERNAL_UNIQUE_SMALL_NAME() \
View gist:71170c173bdca4825065817992507ce7
// RUN: $CXX -c %s -o /tmp/first.o -std=c++17 -g
// RUN: $CXX -c %s -o /tmp/second.o -std=c++17 -g -DWITH_MAIN
// RUN: $CXX -o /tmp/test.out /tmp/first.o /tmp/second.o
// RUN: /tmp/test.out
#include <cassert>
namespace {
__attribute__((noinline))
int bar() asm(".my-name");
View test_header.hpp
#ifdef SYS_HEADER
#pragma GCC system_header
#endif
template <class Ret, class Fn, class ...Args>
constexpr Ret foo(Fn fn, Args... args) { return fn(args...); }
View after.out
32000 : __front_spare() == 384 : __back_spare() == 383 : __capacity() == 32767 : bytes allocated == 32840
31000 : __front_spare() == 884 : __back_spare() == 883 : __capacity() == 32767 : bytes allocated == 32840
30000 : __front_spare() == 1384 : __back_spare() == 1383 : __capacity() == 32767 : bytes allocated == 32840
29000 : __front_spare() == 1884 : __back_spare() == 1883 : __capacity() == 32767 : bytes allocated == 32840
28000 : __front_spare() == 2384 : __back_spare() == 2383 : __capacity() == 32767 : bytes allocated == 32840
27000 : __front_spare() == 2884 : __back_spare() == 2883 : __capacity() == 32767 : bytes allocated == 32840
26000 : __front_spare() == 3384 : __back_spare() == 3383 : __capacity() == 32767 : bytes allocated == 32840
25000 : __front_spare() == 3884 : __back_spare() == 3883 : __capacity() == 32767 : bytes allocated == 32840
24000 : __front_spare() == 288 : __back_spare() == 287 : __capacity() == 24575 : bytes allocated == 24648
23000 : __front_spare() == 788 : __back_spare() == 787 : _
View gist:83b352471c999655859f75f60c9061a8
Passing Tests (481):
libc++ :: std/algorithms/alg.c.library/tested_elsewhere.pass.cpp
libc++ :: std/atomics/atomics.fences/atomic_signal_fence.pass.cpp
libc++ :: std/atomics/atomics.fences/atomic_thread_fence.pass.cpp
libc++ :: std/atomics/atomics.flag/atomic_flag_clear.pass.cpp
libc++ :: std/atomics/atomics.flag/atomic_flag_clear_explicit.pass.cpp
libc++ :: std/atomics/atomics.flag/atomic_flag_test_and_set.pass.cpp
libc++ :: std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp
libc++ :: std/atomics/atomics.flag/clear.pass.cpp
View test.cpp
// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -fresumable-functions -emit-llvm -o - %s -fexceptions -std=c++17 | FileCheck %s
resumable int foo() {
return 42;
}
void bar() {
resumable auto r = foo();
bool b = r.ready();
int x = r.result();
@EricWF
EricWF / DefaultInitIssue.md
Last active Jul 10, 2018
Fixes for the specification of default-initialization and value-initialization.
View DefaultInitIssue.md

Unify the behavior of value-initialization and default-initialization.

Introduction

Currently default-initialization and value-initialization act bizzarely compared to each other. Specifically default-initialization is required to call trivial constructors when value-initialization is not.

For example:

struct T { int x; };
// default_init is initialized by a call to the trivial default ctor.
@EricWF
EricWF / constinit.md
Last active Jul 16, 2020
A Proposal to add [[constinit]] to C++
View constinit.md
Document Number: P1143r3
Date: 2019-06-18
Project: Programming Language C++, Evolution
Revises: P1143r2
Reply to: eric@efcs.ca

Adding the constinit keyword