This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.
Section: 24.5.8 [complex.transcendentals] Status: NAD Submitter: Matt Austern Opened: 2003-11-05 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [complex.transcendentals].
View all issues with NAD status.
Operations like pow and exp on complex<T> are typically implemented in terms of operations like sin and cos on T. Should implementations write this as std::sin, or as plain unqualified sin?
The issue, of course, is whether we want to use argument-dependent lookup in the case where T is a user-defined type. This is similar to the issue of valarray transcendentals, as discussed in issue 226.
This issue differs from valarray transcendentals in two important ways. First, "the effect of instantiating the template complex for types other than float, double or long double is unspecified." (24.5.1 [complex.syn]) Second, the standard does not dictate implementation, so there is no guarantee that a particular real math function is used in the implementation of a particular complex function.
If you instantiate std::complex for user-defined types, all bets are off.