This gist was moved to the benchmarks in the MPL11 repository.
This gist was moved to the benchmarks in the MPL11 repository.
This gist was moved to the benchmarks in the MPL11 repository.
This file contains 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
/*! | |
* Barebones zip_with and fmap for std::tuple and std::integer_sequence. | |
* | |
* Copyright Louis Dionne 2014 | |
* Distributed under the Boost Software License, Version 1.0. | |
* (See accompanying file LICENSE.md or copy at | |
* http://www.boost.org/LICENSE_1_0.txt) | |
*/ | |
// Compiled with: |
This file contains 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
/* | |
@copyright Louis Dionne 2014 | |
Distributed under the Boost Software License, Version 1.0. | |
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | |
*/ | |
#ifndef BOOST_HANA_BENCHMARK_MEASURE_HPP | |
#define BOOST_HANA_BENCHMARK_MEASURE_HPP | |
#include <chrono> |
- Document Number: NXXXX
- Date: 2014-10-07
- Programming Language C++, Library Evolution Working Group
- Reply-to: Louis Dionne ldionne.2@gmail.com
Introduction
This file contains 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
template <typename ...T> | |
struct _tuple_t { | |
struct _; | |
}; | |
template <typename ...T> | |
struct _tuple_t<T...>::_ | |
: _tuple_t<T...> | |
{ }; |
This file contains 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 <type_traits> | |
#include <boost/hana.hpp> | |
#include <boost/hana/ext/std/type_traits.hpp> | |
#include <iostream> | |
using namespace hana; | |
constexpr auto formats = hana::make_map( | |
hana::make<hana::Pair>(hana::type<int>, hana::string<'%', 'd'>), | |
hana::make<hana::Pair>(hana::type<float>, hana::string<'%', 'f'>), |
This file contains 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
› ~/code/gcc5/bin/g++ -std=c++1y ~/code/hana/test/worksheet.cpp | |
/Users/ldionne/code/hana/test/worksheet.cpp: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = std::is_same<T, T>{}(); _Tp = void]’: | |
/Users/ldionne/code/hana/test/worksheet.cpp:1411:25: required from here | |
/Users/ldionne/code/hana/test/worksheet.cpp:1408:50: in constexpr expansion of ‘((std::integral_constant<bool, true>*)(& std::is_same<T, T>()))->std::integral_constant<_Tp, __v>::operator()<bool, true>()’ | |
/Users/ldionne/code/hana/test/worksheet.cpp:1411:25: internal compiler error: in cxx_eval_call_expression, at cp/constexpr.c:1358 | |
auto ICE_HERE = __func__; | |
^ | |
/Users/ldionne/code/hana/test/worksheet.cpp:1411:25: internal compiler error: Abort trap: 6 | |
g++: internal compiler error: Abort trap: 6 (program cc1plus) |
The goal of this project is to improve the compile-time associative data structures present in the Hana C++14 metaprogramming library. I aim to provide a richer interface than what is currently available and also to improve the compile-time performance of those data structures, while keeping the runtime performance on-par with non-naive hand-written code.
Background information
OlderNewer