[LLVMdev] next

Howard Hinnant hhinnant at apple.com
Mon Nov 16 12:11:17 PST 2009


On Nov 16, 2009, at 2:54 PM, Sebastian Redl wrote:

> Howard Hinnant wrote:
>> On Nov 16, 2009, at 1:43 PM, Dale Johannesen wrote:
>> 
>>  
>>> "next" is a popular name; if it breaks llvm, I'd expect this standards change to break a lot of existing code.  Do you really want to do that?
>>>    
>> 
>> I'm happy to open an LWG issue for you on this subject.  Here are directions on submitting an issue:
>> 
>> http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#submit_issue
>>  
> It may be premature, but a resolution for the issue would be the same thing Boost does in this case: put the function in a subnamespace and introduce it to std via using declaration. I believe this should prevent it from being found via ADL. (Or does that only work the other way round?)

I believe that solution would prevent ADL as you intend, and if someone submits an issue, it is not premature for the submitter to propose wording which does that.  Whether or not the LWG would accept that solution is not something I could speculate on.

For background:

Here is a paper which mentions next/prev within the context of backwards compatibility:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2270.html

And here is the proposal that contains next/prev:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2246.html

which was voted in on 2007-04-20.

-Howard





More information about the llvm-dev mailing list