6 Feb
2016
6 Feb
'16
9:27 a.m.
Le 04/02/2016 00:47, Vicente J. Botet Escriba a écrit :
Le 03/02/2016 10:01, Niall Douglas a écrit :
AFIO v2's current bitfield has an example of usage at https://goo.gl/LsjSGD or https://gist.github.com/ned14/89ee39c6b8eb5254116a and it takes the following form:
struct flag : bitwise_flags<flag> { flag() = default; constexpr flag(bitwise_flags<flag> v) noexcept : bitwise_flags<flag>(v) { } static constexpr auto none(){ return bit(0);} static constexpr auto delete_on_close(){ return bit(1); } static constexpr auto disable_safety_fsyncs(){ return bit(2); } };
What is the bit above? what is the decltype of bit(0)? Could flag store bit(5)? Please Niall, could you answer to these questions?
Vicente