Liberasure - A no-dependencies C++ extensible type erasure library

Overview

erasure

Build Status

A no-dependencies C++ extensible type erasure library

Basic Usage

LICENSE

This work is distributed under the terms of the Apache 2.0 licence, as described in the LICENSE file in this distribution.

This code was originally developed by Gašper Ažman for a series of lectures on template metaprogramming and type erasure, while he was working for A9.com. The original copyright therefore belonged to Amazon.com, inc. However, as part of internal ticket https://tt.amazon.com/0093001587, the copyright for this code was assigned directly to Gašper Ažman in October 2016, and Amazon.com, inc. no longer claims ownership of the code.

The code henceforth belongs to the AUTHORS as detailed in the Github history.

Issues
  • Questions

    Questions

    Hi

    This align confused me: https://github.com/atomgalaxy/liberasure/blob/a0ff84d2e890de61c7e78feabb0d2e09552625b3/include/erasure/small_buffer.hpp#L50

    I thought that when you do placement new, you should automatically get the aligned address. And also that aligned_storage should have sufficient size to store anything of that size or less.

    Is this to support custom aligned types and arbitrary buffer sizes? What are you trying to achieve?

    Why do you use RTTI instead of strategy pattern? https://github.com/atomgalaxy/liberasure/blob/a0ff84d2e890de61c7e78feabb0d2e09552625b3/include/erasure/erasure.hpp#L266

    opened by DenisYaroshevskiy 2
Owner
Gašper Ažman
C++, Computer Vision, Sound processing, and Legacy Code Wrangler.
Gašper Ažman
variant lite - A C++17-like variant, a type-safe union for C++98, C++11 and later in a single-file header-only library

variant lite: A single-file header-only version of a C++17-like variant, a type-safe union for C++98, C++11 and later Contents Example usage In a nuts

Martin Moene 208 Jun 9, 2022
Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

?? Index What is Libft? List of Functions Technologies ✨ What is Libft? Libft is an individual project at 42 that requires us to re-create some standa

Paulo Rafael Ramalho 7 Jan 17, 2022
Library that simplify to find header for class from STL library.

Library that simplify to find header for class from STL library. Instead of searching header for some class you can just include header with the class name.

null 6 Jun 7, 2022
Thrust is a C++ parallel programming library which resembles the C++ Standard Library.

Thrust: Code at the speed of light Thrust is a C++ parallel programming library which resembles the C++ Standard Library. Thrust's high-level interfac

NVIDIA Corporation 4k Jun 22, 2022
jkds is a modern header-only C++20 library that complements the standard library.

jkds is a modern header-only C++20 library that complements the standard library. It provides generic atypical data structures, ergonomic functional programming abstractions, and then some.

Alberto Schiabel 5 May 24, 2022
Bionic BSD-3-ClauseBionic - Google's standard library, developed for Android. BSD-3-Clause

bionic bionic is Android's C library, math library, and dynamic linker. Using bionic as an app developer See the user documentation. Working on bionic

Android Open Source Project 547 Jun 23, 2022
CloudABI's standard C library

NOTE: This project is unmaintained CloudABI is no longer being maintained. It was an awesome experiment, but it never got enough traction to be sustai

Nuxi 272 Jun 7, 2022
libcu++: The C++ Standard Library for Your Entire System

libcu++, the NVIDIA C++ Standard Library, is the C++ Standard Library for your entire system. It provides a heterogeneous implementation of the C++ Standard Library that can be used in and between CPU and GPU code.

NVIDIA Corporation 2k Jun 26, 2022
D++ Extremely Lightweight C++ Discord Library

D++ An incredibly lightweight C++ Discord library This project is in alpha stages of development. Completed so far: Websocket connection with heartbea

brainbox.cc 380 Jun 28, 2022
EASTL stands for Electronic Arts Standard C++ Template Library

EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.

Electronic Arts 6.5k Jun 27, 2022
An open source standard C library that includes useful functions && (Reimplementation of libc functions + own functions).

?? LIBFT-42 : Artistic view of LIBC: ?? HOW DOES IT FEEL HAVING YOUR OWN LIB: SUBJECT : ENGLISH PDF ℹ️ What is LIBFT : This project aims to code a C l

Abdessamad Laamimi 10 Mar 24, 2022
expected lite - Expected objects in C++11 and later in a single-file header-only library

expected lite: expected objects for C++11 and later expected lite is a single-file header-only library for objects that either represent a valid value

Martin Moene 216 Jun 18, 2022
Guidelines Support Library

GSL: Guidelines Support Library The Guidelines Support Library (GSL) contains functions and types that are suggested for use by the C++ Core Guideline

Microsoft 5k Jun 20, 2022
gsl-lite – A single-file header-only version of ISO C++ Guidelines Support Library (GSL) for C++98, C++11, and later

gsl-lite: Guidelines Support Library for C++98, C++11 up metadata build packages try online gsl-lite is an implementation of the C++ Core Guidelines S

gsl-lite 741 Jun 27, 2022
Your standard library for metaprogramming

Boost.Hana Your standard library for metaprogramming Overview #include <boost/hana.hpp> #include <cassert> #include <string> namespace hana = boost::h

Boost.org 1.4k Jun 23, 2022
C++11 metaprogramming library

Mp11, a C++11 metaprogramming library Mp11 is a C++11 metaprogramming library based on template aliases and variadic templates. It implements the appr

Boost.org 175 Jun 20, 2022
optional lite - A C++17-like optional, a nullable object for C++98, C++11 and later in a single-file header-only library

optional lite: A single-file header-only version of a C++17-like optional, a nullable object for C++98, C++11 and later Contents Example usage In a nu

Martin Moene 345 Jun 20, 2022
Range library for C++14/17/20, basis for C++20's std::ranges

range-v3 Range library for C++14/17/20. This code was the basis of a formal proposal to add range support to the C++ standard library. That proposal e

Eric Niebler 3.4k Jun 27, 2022
span lite - A C++20-like span for C++98, C++11 and later in a single-file header-only library

span lite: A single-file header-only version of a C++20-like span for C++98, C++11 and later Contents Example usage In a nutshell License Dependencies

Martin Moene 396 Jun 22, 2022