Nathan Hourt
c69ea32613
Improve reflection system and static_variant
...
Previously, fc reflection generated visitor infrastructure capable of
visiting each field of a struct; however, this is only useful for run-
time operations on structures. No compile-time information was preserved
about the fields of a struct, making compile-time introspection of types
impossible.
Now FC reflection generates rich compile-time information about the
members of structs, including types, names, and structure, allowing
code to be written to explore types in detail at compile-time and fetch
arbitrary fields at runtime without needing to iterate over the unwanted
fields.
To make this a reality, a new `typelist` type was added to store this
compile-time information. This type is also useful within the context of
`static_variant`, as SV previously used implementation detail types in a
private namespace to provide this functionality. Now `static_variant`
uses the reusable functionality of `typelist` to operate, dramatically
reducing the amount of code dedicated to `static_variant` and also
making `static_variant` types more flexible to work with since their
infrastructure is now based on the `typelist` public interface.
2019-08-30 14:21:36 -05:00
Nathan Hourt
9f7f1b4790
Replace improper static_variant operator overloads with comparators
2019-08-28 15:51:14 -05:00
Peter Conrad
d8bec3d847
Resolved another begin/data inconsistency
2019-08-05 21:27:53 +02:00
Peter Conrad
6ed94317ab
Merge pull request #137 from pmconrad/1584_more_simplification
...
More simplifications
2019-06-19 18:34:59 +02:00
crypto-ape
f29248d139
extend static_variant with is_type() method
2019-06-11 18:00:01 +02:00
Peter Conrad
a8337ecc42
Added constexpr where applicable
2019-06-06 14:41:47 +02:00
Peter Conrad
632a90709e
Replace fc::array with std::array
2019-06-06 14:41:47 +02:00
John Jones
843e000b74
value initialize result
2019-03-25 08:25:43 -05:00
Nathan Hourt
c59c36e006
Make static_variant::tag_type public
...
It's used in the public interface, so it needs to be a publicly
defined type
2019-03-19 13:06:46 -05:00
Peter Conrad
1aecf3ccc8
Merge pull request #85 from crypto-ape/static-variant-memory-optimizations
...
Memory optimization of static_variant
2018-11-17 10:43:03 +01:00
Peter Conrad
ed4a300fd5
Added missing include
2018-11-04 21:14:29 +01:00
Peter Conrad
3c3b76920e
Use function pointers instead of std::function objects in static variant visitors
2018-11-04 13:54:05 +01:00
crypto-ape
f8b86fc757
added testcase types_edge_cases_test for static_variant
2018-10-31 10:59:51 +01:00
crypto-ape
93a0316607
Dynamic memory allocation of static_variant & other small changes.
2018-10-31 10:59:26 +01:00
Peter Conrad
8174d63fb4
More line wrapping
2018-10-10 14:36:19 +02:00
Peter Conrad
bcce353b8f
Check tag >= 0, shortened long lines
2018-10-10 00:07:21 +02:00
Peter Conrad
b4da12643f
Replaced visitors with constant-time implementations
2018-10-09 17:55:34 +02:00
abitmore
b83108c41a
Added static visit(...) methods to static_variant
2018-09-30 10:11:28 -04:00
John Jones
48901cd1a4
correct templating of static variant
2018-08-10 14:40:47 -05:00
Wei Yang
e609d70334
Remove unnecessary structure definition in static_variant.hpp
2018-07-05 13:50:40 +08:00
Peter Conrad
a91822616e
Added max_depth to remaining variant conversions
2018-03-18 10:49:44 +01:00
Anton Autushka
7d7872cb7b
some minor fixes
2018-02-06 15:37:14 +03:00
Anton Autushka
bf86466be1
In static_variant use int64_t as a tag type
2018-02-06 13:00:51 +03:00
Alexey Frolov
5138c58e09
sanitize, remove warnings
2018-02-02 15:29:46 +03:00
Abit
dffe2a444e
static_variant::set_which() rejects negative param
2018-01-20 16:54:09 +01:00
cwyyprog
e754b4940e
Update static_variant.hpp
2017-11-14 17:09:08 +08:00
Vikram Rajkumar
6d386e442b
Revert "...Fix build?"
...
This reverts commit 908762d687 .
2017-04-25 20:22:31 -05:00
Nathan Hourt
908762d687
...Fix build?
2017-04-25 15:39:42 -05:00
Daniel Larimer
99e1c1fd52
fix warnings
2015-09-11 08:54:51 -04:00
Daniel Larimer
63677c47d9
helper for smart_ref
2015-07-08 16:43:25 -04:00
Daniel Larimer
e2e0f38dc6
Merge branch 'master' of https://github.com/cryptonomex/fc
2015-07-07 18:30:49 -04:00
Daniel Larimer
7c3260e965
Made static variants compareable based upon type.
2015-07-07 18:30:18 -04:00
Eric Frias
d462be0e92
Quiet harmless compiler warnings
2015-07-01 11:21:15 -04:00
Daniel Larimer
2cbb00426c
adding ability to get the count of items in a static variant
2015-05-19 11:40:47 -04:00
Daniel Larimer
73c2c1de90
fix static_variant to/from variant
2015-03-05 09:54:33 -05:00
Daniel Larimer
3a120c0f7f
fix bugs in static_variant
2015-03-05 08:58:29 -05:00
Daniel Larimer
0caac3fee9
update exceptions in static_variant and add header gaurd
2015-03-05 08:22:41 -05:00
Nathan Hourt
d0803ec9cd
Fixes circa safe and static_variant
2015-03-02 18:24:37 -05:00
Daniel Larimer
3917a8d6a0
fix static_variant
2015-02-27 16:53:55 -05:00
Daniel Larimer
f9f965809b
bug fixes
2015-02-27 16:07:50 -05:00
Daniel Larimer
c0a4ed77b1
adding static_variant type
2015-02-27 13:41:55 -05:00