i have an enum class
enum class Role {
User,
Customer
}
and a class that have a private field of type of this enum
class A {
public:
Role get_role() const;
void set_role(Role r);
private:
Role r;
}
and when i create a column using getter and setter i get this error:
error C2102: '&' requires l-value
and its in file "sqlite_orm.h" in lines containing code:
value = &((o).*(c.getter))();
and by the way i did all the config required for enum binding said in example "enum_binding.cpp"
and when enum is a public field it works correctly
Hi. Yes, the bug exists. It is not related to enum cause it can be reproduced with any other field type. I shall fix it in a few days. Error line exists in update and insert_range functions. I shall fix all of them
It will work correctly for now if getter returns ref or const ref
fixed in https://github.com/fnc12/sqlite_orm/pull/344 . Please check out dev branch
hi again
im sorry i installed the library with vcpkg and i don't know how to install from dev branch via vcpkg!
could you please help me with that?
and by the way thanks for you immediate responses and fixes.
hi. How do you include the lib into your project? I need your line.
vcpkg install sqlite-orm --triplet x64-windows
im using vcpkg with cmake
IDK. I have never used vcpkg and google tells me nothing. Probably @soroshsabz can help. He uses this lib with vcpkg too
Probably we need to add one more configuration here https://github.com/microsoft/vcpkg/tree/master/ports/sqlite-orm . Something like sqlite-orm-dev
@fnc12 as I know if you are resolved important or critical problem in code you can release this library with increasing patch version, ( as you know in semantic versioning) after you create this tag, we can publish new releases in all package manager repository
@soroshsabz Yeah I understand how it works. However I am not ready to publish 1.4 right now. It would be great to have ability of adding package with sqlite-orm-dev for developer's own risk just like we can do with apt-get packages