Project

General

Profile

Bug #949

complex(double real) should be marked as explicit

Added by Rogers, Chris over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
common_cpp
Target version:
Start date:
21 March 2012
Due date:
% Done:

0%

Estimated time:
Workflow:
New Issue

Description

Related to 948 - now compiler is trying to call

sqrt(Complex z)

even when I do

double x(sqrt(16.));

because C++ has this weird, broken behaviour where it automatically calls constructors to do type conversions in function headers. Use explicit keyword to stop this please (it's in the style guide).

Also available in: Atom PDF