On Mon, Dec 16, 2013 at 2:20 PM, Dmitri Gribenko <[email protected]>wrote:

> On Mon, Dec 16, 2013 at 2:07 PM, Richard Trieu <[email protected]> wrote:
> > Is there a more canonical way to detect that the function is std::move
> > instead of another move function?  This would fail to recognize
> > std::__1::move.
>
> Sema::getStdNamespace() could be probably useful in this.  Should it
> be safe to assume that if the function is std::move if it is named
> 'move', and it comes from any namespace under ::std?
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
>

I checked in r197445 which does a namespace walk to find if the highest
namespace is "std".  This will accept both std::move and std::__1::move.

I didn't see a Sema object available to use getStdNamespace.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to