On Thursday, 1 January 2015 at 13:09:21 UTC, Suliman wrote:
But why variant:
static const int PGSQL_UNITTEST_PORT = 5432;

do not require of implicit convert to!short() at connection string?

As I said the compiler infers that 5432 is between short.min and short.max. Try it with something out of this range.

BTW: If you just want to have a global constant, I'd use enum or immutable:

enum PGSQL_UNITTEST_PORT = 5432;
immutable PGSQL_UNITTEST_PORT = 5432;

Reply via email to