poco icon indicating copy to clipboard operation
poco copied to clipboard

Poco::Optional cannot hold classes that don't have a default constructor

Open siren186 opened this issue 6 months ago • 4 comments

Describe the bug

class A {
public:
    A(int n) {}
};

int main(int argc, char** argv)
{
    std::optional<A> a1; // ok
    Poco::Optional<A> a2; // compile error !!!
    return 0;
}

siren186 avatar Aug 21 '24 10:08 siren186