-
Notifications
You must be signed in to change notification settings - Fork 39
Register: error: use of deleted function #124
Comments
Hm, I think you have to cast it to I ran into this problem before, I couldn't find a solution for it back then. |
See the workaround for outside a struct or class: typedef xpcc::Flags8<Enum> Enum_t;
XPCC_TYPE_FLAGS(Enum_t); The only difference is a Unfortunately C++ sucks here, because even though it's a |
When I change
to
With
Same with
|
This isn't a compiler issue, Configs and Values just can't be ORed, the operators are missing. I'm not sure why this didn't come up earlier. This is definitely a design bug. |
The initial examples given above still does not work. Or'ing Flags with Flags still does not work.
Same with gcc version 4.9.3 20150529 on Linux
|
ORing the flags will create a value of the type You can either do cast to an integer |
Trying to use
CtrlMeas::Mode1 | CtrlMeas::Mode0
withregister.hpp
in the plain blink example:With
gcc version 5.2.1 20151202
yields to
IMHO the usage is the same as in this example but is not covered by the unittest. Shall the example work?
When leaving out the
| CtrlMeas::Mode0
part the compiler is happy.It shall be noted that
XPCC_FLAGS8
is only usable inside astruct
orclass
, so putting astruct
around your register definitions is necessary.The text was updated successfully, but these errors were encountered: