[LLVMdev] next

David Vandevoorde daveed at vandevoorde.com
Mon Nov 16 06:37:31 PST 2009


On Nov 16, 2009, at 3:32 AM, Sebastian Redl wrote:

>
> On Sun, 15 Nov 2009 22:49:42 -0800, Evan Cheng <evan.cheng at apple.com>
> wrote:
>> I am pretty sure the .cpp files always explicitly use "llvm"  
>> namespace.
>> Look for:
>> using namespace llvm;
>>
>> Is that sufficient?
>>
>
> No. To prevent ADL from finding std::next, you need an explicitly
> qualified name at the call site.


An alternative is to parenthesize the function name.  E.g.:

	MBBI = (next)(MBBI);  // Disables ADL


	Daveed




More information about the llvm-dev mailing list