Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the C++17 proposal for uniform call syntax intend to handle namespaces?

As far as I know, there are two propsals for uniform call syntax for C++17 (where the other one is called unified call syntax).

Reading them, I cant see how they intend to handle namespaces.

Example:

class Class {...}
namespace MyNamespace {
  void f(Class x, Class y);
}

Will it be possible to call this method using something like:

Class a, b;
a.MyNamespace::f(b);

Or do both the free function, and the class need to be defined in the same namespace?

References:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4165.pdf

like image 758
Viktor Sehr Avatar asked Dec 20 '15 00:12

Viktor Sehr


1 Answers

Update: C++17 does not get unified call syntax at this time. Motion does not pass. #cpp #cpp17

https://twitter.com/ericniebler/status/705855444049399808

like image 146
Software_Designer Avatar answered Oct 24 '22 05:10

Software_Designer