Results 47 comments of Nir Friedman

Np :-). The thing is that probably the single biggest thing that this library achieves is avoiding repeating all the enumerator names. The enumerator name itself doesn't matter much, so...

@andoks Ok, you raise good points. What would you say to declaring the enum plainly, and then having the adapt macro take optional strings for each enum? You'd have to...

Did you try using a type that prints something in its constructor, instead of an enum, to see if it's actually constructed? What you're doing here is extremely questionable, I...

Can you reproduce this on clang on a linux system? To me it looks like a compiler bug but it's hard for me to be sure without reproducing.

Sorry I've let this linger so long; I'm going to take a look at it. It may indeed be a basic limitation of the approach as @jesse-k said. Over the...

Okay, I reproduced this with simply: ``` #include namespace lib { template struct tag{}; template constexpr inline auto range = detail_array(tag{}); template constexpr inline auto size = range.size(); } struct...

Update on this, it's actually possible to partly workaround this limitation. While fully reflection in the class body is impossible, at least accessing the size is actually possible, because it...

from_number meaning, you pass the underlying value of the enum? For ostream, are you saying that operator

@karol-koczwara-ig @madmongo1 I kind of want to be careful here because obviously there are infinite things that could be added. My main goal is to keep a relatively small set...

Hey sorry it took me a while to respond. Implementation is straightforward, I would just generate it with the macros similar to the to_stuff. I actually considered implementing the to_string...