Skip to content

[BUG] sw::redis::Subscriber is move-assignable/constructable but does not have a default constructor #409

@RnMss

Description

@RnMss

Describe the bug
sw::redis::Subscriber has an empty state, but does not have a default constructor (sw::redis::Subscriber::Subscriber()) to make one.

sw::redis::Subscriber does not have Subscriber(), but does have Subscriber& operator= (Subscriber&& other) and Subscriber(Subscriber&& other) which is expected to make the other object an empty Subscriber.

If the class has an empty state, user should be allow to create one.

So that the following code could be valid.

class Foo {
public:
    do_something() {
         subscriber = redis_client.subscribe();
    }
private:
    sw::redis::Subscriber subscriber;
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions