Skip to content

Instantly share code, notes, and snippets.

View ldionne's full-sized avatar

Louis Dionne ldionne

View GitHub Profile
@ldionne
ldionne / main.cpp
Last active August 29, 2015 14:23
Making Tick's IntegralConstant a Constant for Hana
#include <boost/hana.hpp>
#include <tick/integral_constant.h>
namespace hana = boost::hana;
template <typename T>
struct TickIntegralConstant { using value_type = T; };
namespace boost { namespace hana {
template <typename T, T n>
ldionne in ~/Desktop/ellcc-tests % ./ellcc/bin/ecc++ -v -target arm-none-eabi -isystem ${PWD}/ellcc/libecc/include/c++ -isystem ${PWD}/ellcc/libecc/include/arm main.cpp
ecc 0.1.17 based on clang version 3.8.0 (trunk) (based on LLVM 3.8.0svn)
Target: arm-none--eabi
Thread model: posix
InstalledDir: /Users/ldionne/Desktop/ellcc-tests/./ellcc/bin
"/Users/ldionne/Desktop/ellcc-tests/ellcc/bin/ecc" -cc1 -triple armv4t-none--eabi -emit-obj -mrelax-all -disable-free -main-file-name main.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu arm7tdmi -target-feature +soft-float-abi -target-feature +strict-align -target-abi aapcs -mfloat-abi soft -target-linker-version 253.3.3 -v -dwarf-column-info -resource-dir /Users/ldionne/Desktop/ellcc-tests/ellcc/bin/../libecc -isystem /Users/ldionne/Desktop/ellcc-tests/ellcc/libecc/include/c++ -isystem /Users/ldionne/Desktop/ellcc-tests/ellcc/libecc/include/arm -fdeprecated-macro -fdebug-compilation-dir
@ldionne
ldionne / moved.md
Last active December 28, 2015 15:29
Comparison of techniques to implement compile-time logical conjunction and disjunction.
@ldionne
ldionne / moved.md
Last active December 28, 2015 16:29
Comparison of techniques to implement lookup in compile-time structures.
@ldionne
ldionne / moved.md
Last active December 28, 2015 17:59
Comparison between different ways of instantiating the same number of templates.
@ldionne
ldionne / lazy_and.cpp
Last active January 18, 2016 23:21
Implementation of a lazy conjunction based on SFINAE (see DR 1227: http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1227)
// Note: This original idea was shown to me by Eric Fiselier. All credits where due.
#include <type_traits>
template <typename Condition, typename T = void>
struct enable_if
: std::enable_if<Condition::value, T>
{ };
@ldionne
ldionne / anonymous.erb.cpp
Created February 7, 2016 18:35
Benchmark of different compile-time string representations
// Copyright Louis Dionne 2013-2016
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
template <char ...s>
static auto string_maker = [] {
struct local { char data[sizeof...(s)] = {s...}; };
return local{};
};
@ldionne
ldionne / metabench-index.html
Created April 20, 2016 16:12
Copy of Metabench's index.html file, as generated on GitHub Pages
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Metabench</title>
@ldionne
ldionne / .gitignore
Last active April 20, 2016 21:32
Benchmarking the compile-time of multi-visitation on variants
build/
@ldionne
ldionne / CMakeLists.txt
Last active April 30, 2016 16:41
Benchmarking different patterns of overload resolution
# Copyright Louis Dionne 2016
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
cmake_minimum_required(VERSION 3.2)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(metabench)