1
0
forked from Alepha/Alepha
Commit Graph

394 Commits

Author SHA1 Message Date
9ccfb1dd7a Add dep_value helper. 2023-02-04 17:40:23 -05:00
9a944f593b Fix comment in reflection. 2022-11-08 13:04:42 -05:00
b1d83a4bf0 Add a thread primitive which has support for notifications.
Now you can send an `Alepha::Notification` into a thread as an
interrupt.  You have to use the Alepha threading primitives.
2022-10-17 22:53:45 -04:00
0a1ecce9ec Permit user-specification of the real namespace of boost.
This way `Alepha` can be used in a binary-only library project which
uses boost or a codebase which mangles boost.
2022-10-17 22:53:45 -04:00
72b316d0e2 Flesh out more automatic exception class generation.
Also improved the tests.
2022-10-17 22:49:49 -04:00
d5684b8d51 Boolean tests have to actually run.
This just checked that they exist, not that they passed.
2022-10-17 18:23:34 -04:00
5c1d821bc2 Moving towards type-linked exception storage. 2022-10-16 11:36:09 -04:00
8a75be721e First draft of more streamlined tagged Exceptions. 2022-10-16 01:52:16 -04:00
e170f3f172 Boolean test lambdas can now be used properly. 2022-10-16 01:36:13 -04:00
deeb27cb9f Fix building with pair_decay and tuple_decay. 2022-10-15 16:40:55 -04:00
e62a28de95 A successful experiment with type codes!
I've used `constexpr` semantics on `__PRETTY_FUNCTION__` along
with a simple compiletime hash function to create a way to represent
types as NTTP values and then rehydrate them.

This should let me rewrite a lot of things more simply.  We can
now have arrays of regular values which can be representative
codes for types.
2021-12-03 06:38:53 -05:00
7de08953c8 Beginnings of support for default_lens.
The `default_lens` would be used for anything and everything.
And `tuplizeAggregate` can then be used to make a defaulted
`default_lens`.  This simplifies most lens oriented code, as
I move forward.
2021-12-03 01:47:44 -05:00
5f15b0ee38 Document that I'm punting on the aggregate inspection. 2021-10-28 03:41:49 -04:00
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