E2065 Using namespace symbol 'symbol' conflicts with intrinsic of the same name (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

If you define a function in a namespace, which has a name that might be replaced by a call to an intrinsic when -Oi is on, it is not permitted to have a "using" declaration which refers to that member.

For example, calls to "strcmp" are replaced by the intrinsic "__strcmp__" when -Oi is on. This means that the declaration "using N::strcmp;" would become "using N::__strcmp__", since the token replacement happens before the compiler's parser ever sees the tokens.

An error displays in this case, because the compiler doesn't know how to process "N::__strcmp__".