Skip to content

Why does cpr::Timeout has two chrono bases ctors? #1129

@Chrys4lisfag

Description

@Chrys4lisfag

Timeout(const std::chrono::milliseconds& duration)
Timeout(const std::chrono::seconds& duration)

Due to we have implicitly specified two chrono types, doing this will lead to inability to select proper ctor as mins\hours etc is not implicitly specified:

const cpr::Timeout timeout{ 5min };

Shouldn't we just create only ms ctor as any chrono duration type would be automatically casted to input parameter type?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions