Subject: Re: [boost] How best to implement a bitfield in C++ 14?
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2016-02-05 22:30:31
On Fri, Feb 5, 2016 at 4:29 AM, Niall Douglas <s_sourceforge_at_[hidden]> wrote:
> On 5 Feb 2016 at 4:50, Gottlob Frege wrote:
>> Well, you could still pass flag::none - the function address - to
>> But of course you could then pass any function - with the same signature -
>> so none() might need a signature like none(some_special_type unused = 0) to
>> prevent mistaken misuse.
>> Does that help?
> I thought of this too (specifically some_special_type<bits set for
> this flag>), but I realised I was getting into metaprogramming land.
> I'm sure a "perfect" typesafe bitfield can finally be implemented as
> of C++ 14, but I think the likely implementation should be submitted
> as a N-paper to WG21 as an excellent example of what needs to be
> fixed in the C++ language. After all, typesafe bitfields ought to in
> a systems programming language!
> A conference talk on building one of these might be very interesting
> ... nudge nudge! :)
Your last nudge nudge was basically "someone should solve the
thread-safe listener / observer-pattern and present it", and I've
fallen for that one already, don't make me do another. You can have
> ned Productions Limited Consulting
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk