tylerh111 / vitta Goto Github PK
View Code? Open in Web Editor NEWA C++ variadic template type aggregation tool.
License: GNU General Public License v3.0
A C++ variadic template type aggregation tool.
License: GNU General Public License v3.0
There is an issue where there is no recursive checking of the new types that are added to the aggregation. It occurs in the second recursive case of variant_aggregate_recursive. The NewTs...
of the input variant are directly added to the final variant type. These types should be each be recursively checked in case a variant type is one of the NewTs
types.
The same is true for the initial call to variant_aggregate_t
. If the first argument is a variant, there is no check on its alternatives Ts...
. This should be recursively checked before adding any other inputs.
The following is an examples does not compile.
using t1 = int;
using t2 = variant<variant<int>>;
// example of `variant_aggregate` not checking given variant alternatives
static_assert(is_same_v<
variant < t1 >,
variant_aggregate < t2 >
>);
// example of `variant_aggregate_recursive` not checking new variant alternatives
static_assert(is_same_v<
variant < int, t1 >,
variant_aggregate < int, t2 >
>);
The same is true for tuple_aggregate
and tuple_aggregate_recursive
There is no difference between variant_aggregate.hpp
and tuple_aggregate.hpp
aside from variant
and tuple
. This can be generically represented as a type_trait that takes a variadic type as a template. Something along lines of the following could be possible. Here Agg
could be variant
or tuple
and V
is of type Agg
.
template < template class<...> Agg, typename V, typename NewTV, typename... NewTVs >
struct aggregate;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.