1
0
forked from Alepha/Alepha
Commit Graph

381 Commits

Author SHA1 Message Date
3f5b5f692e Fix the off-by-one computation for empty bases.
Instead of counting as we go, just build it, and then count.
2021-10-28 03:34:02 -04:00
bdd222c4d5 Document the aggregate analysis algorithm.
(I still don't actually deal with the weird case of bases also
being members... but that's fairly rare.)
2021-10-28 03:32:18 -04:00
439fbb1433 StaticValue helper.
Incorporated into `Testing`, for now.  Semi-threadsafe statics,
initialize them before going multithreaded.
2021-10-26 05:10:40 -04:00
7b7e8a1b67 Partially on the way to complete 17 reflection.
I can't figure out why my computation on empty bases is 1 higher
than it should be -- so I'm punting, for now.  I'll revisit it
when I have more time.
2021-10-26 05:04:25 -04:00
304640d76b Experiment with constexpr traits in enable_if.
So the `constexpr` traits do not really look better here.  But
they may be better for writing linear code in complex trait
processing, as opposed to complicated recursive code.  Still
to be determined.  However, If I stay with this and if
`std::find_if` and friends are `constexpr`, then the `Mata`
algorithms can be removed, and `std::` forms will just work.
That's a nice bonus.

Otherwise, we need something more like `boost::mpl`, which is
kinda annoying.  Still, `Meta::Container::vector` is very
nice -- it side-steps some issues with using `std::tuple` as
a type-list.
2021-10-26 02:05:57 -04:00
70a23059b0 Make comparisons constexpr.
The generated operators should be `constexpr`.  The `ordering_magma`
code should be as well.
2021-10-26 02:04:22 -04:00
cf3f77ba6e Well this whole () base TMP experiment kinda works.
It's a lot of heavy lifting.  I'm not sure it actually
adds any useful value yet, but I'll continue to play
with it.  It is nice that we can *sometimes* use
loops.  Sometimes we can't though.  And we have
to make some blind-corner evaluations that throw
dummy failures to keep the compiler from complaining
about missing cases -- despite the fact that they;ll
never be reached at compiletime.  (Runtime evaluation
could be different, of course.)

I think, perhaps, a universal representation of a
dereferenced iterator might solve some of this, but
I also don't want to sink too much effort into this,
despite how much fun I'm having.
2021-10-26 01:53:47 -04:00
e3d7bbe616 Comparison test builds again.
Now to extend the functionalization.
2021-10-25 02:08:12 -04:00
f2ae99f648 I added the lens-based comparison code.
The metaprogramming is still based upon the angle-bracket
type-form.  Now to rewrite it in terms of the constexpr systems.
2021-10-25 02:02:12 -04:00
3c11d6af74 Move the colours stuff out of Testing and into console. 2021-10-25 02:01:07 -04:00
77532ca8ee These types might help main declarations cleaner. 2021-10-25 01:58:54 -04:00
4538a8d943 Add a bunch of TMP support.
I'm still on the fence about going full `constexpr` functions
for meta-code.  Overall, I think there's potential here.  I'm
not aiming to replicate what `boost::mpl` or `boost::hana` do
though.  This is more of an internal support mechanism for
Alepha code.  As-needed I'll implement things.
2021-10-25 01:58:16 -04:00
83aa3f9e61 Fix lifetime issues for table testing params. 2021-10-19 22:39:38 -04:00
424ccfd6b7 Fix compile. 2021-10-19 22:31:01 -04:00
744e02fb01 Concept-like overloading of functions support.
When using `enable_if` clauses in templates, we need an NTTP
in the mix to let us get good overloading support.  The boolean
true/false trick of the `enable_if` second parameter actually
doesn't work for many situations.
2021-10-19 22:28:45 -04:00
d870367f76 I added the type_traits header. 2021-10-16 23:43:44 -04:00
d976ff90b8 I added is_functional. 2021-10-16 23:41:34 -04:00
61841561f9 Try eliminating a nesting depth. 2021-10-16 23:27:39 -04:00
6110f618d8 AutoRAII facility. 2021-10-16 23:21:28 -04:00
76c7eaf1b7 Test harness improvements. 2021-10-16 23:21:04 -04:00
6de408590e Meta traits for set and map. 2021-10-15 05:20:08 -04:00
525c5b7be8 Pairs !- tuples, so add some better Meta support
I usually use `tuple` for all product types, but some STL bits
use pair, which is a distinct type.  So here's some helpful
meta helpers for them.
2021-10-15 05:19:09 -04:00
6dcc093af6 Add test functionality harness.
Now you can `test.demand` and `test.expect`.

Expect delays failure reports until the end.  Demand creates
an immediate failure.
2021-10-15 05:17:02 -04:00
5ecf387a76 Lambaste. 2021-10-15 05:16:53 -04:00
9e0132185f Fix base makefile.
Still need to make a cleaner build solution.
2021-10-15 05:16:27 -04:00
698f8cceb1 Fix up tuple decay. 2021-10-15 05:16:11 -04:00
f7bdba6072 Add console colour support. 2021-09-07 18:45:43 -04:00
2bbb612df1 A few more meta programming bits. 2021-07-03 01:21:48 -04:00
741c0dcdcf Table testing created.
Haven't tested `VectorCases` yet.
2021-07-02 01:12:00 -04:00
ec07dcc83a Added Sequence and optional detection.
This is part of the larger `Meta` library.  Need to implement
tuple-for-each and more.
2021-07-01 22:28:24 -04:00
7ceef7e1b1 Starting out Alepha from scratch, as a C++17 effort.
This one is going to be prepped for GitHub private, from the get
go.  This initial commit has some evaluation helpers and the
unit testing infrastructure.  `TableTest` will come next.
2021-07-01 01:42:11 -04:00