Doc. no. N3738
Date: 2013-08-27
Project: Programming Language C++
Reply to: Ville Voutilainen <ville.voutilainen@gmail.com>

C++ Standard Evolution Closed Issues List (Revision R03)

Revised 2013-08-27 at 16:08:33 UTC

Reference ISO/IEC IS 14882:2003(E)

Also see:

This document contains only evolution issues which have been closed by the Evolution Working Group as duplicates or not defects. That is, issues which have a status of Dup or NAD. See the Evolution Active Issues List active issues and more information. See the Evolution Complete Issues List for issues considered accepted extensions. The introductory material in that document also applies to this document.

Revision History

Closed Issues


31. [tiny] constexpr functions must work at runtime

Section: 5.19 [expr.const] Status: NAD Submitter: Dave Abrahams Opened: 2012-10-16 Last modified: 2013-04-30

View all other issues in [expr.const].

View all issues with NAD status.

Discussion:

constexpr functions are crippled by the fact that they have to be valid at runtime. Things that are tantalizingly close but you can't quite do include returning a type that depends on the /value/ of a function parameter:

  constexpr auto ptr_array(int N) -> int(*)[N]
  { ... }
If we would allow for constexpr functions that can only be evaluated at compile time, we'd be able to do compile-time computation in a much less template-heavy way.

Bristol 2013: Gregor thought that wrt general direction, constexpr is specifically not to have a constexpr-only model, and this issue would go into the opposite direction. NAD.


36. [tiny] no way to say "prefer this implicit conversion over that"

Section: 12.3 [class.conv] Status: NAD Submitter: Jeffrey Yasskin Opened: 2012-10-24 Last modified: 2013-04-30

View all issues with NAD status.

Discussion:

If a type has two implicit conversions, and I call a function with overloads for both target types, there's no way to disambiguate short of writing the conversion explicitly or adding another overload. It would be nice to be able to extend the partial order on conversions.

Bristol 2013: The group doesn't see this as something that we should pursue, and thinks it's a design error and users are advised just not to do this. NAD.


37. [tiny] Logical xor operator

Section: 5 [expr] Status: NAD Submitter: Alisdair Meredith Opened: 2012-10-28 Last modified: 2013-04-30

View all issues with NAD status.

Discussion:

I have a low-priority issue for adding the (neglected) logical-xor operator, ^^. This has traditionally been dismissed as un-necessary, as it is equivalent to boolean operator!=, and there is no short-circuiting benefit to justify adding it. However, contextual conversions to 'bool' are handled specially for logical operators, and in that context it would be completing a hole in the language. I wish I had a better example, but pulling from the standard library:

   function<void()> a;
   function<void()> b;
   assert(a != b);  // does not compile
   assert(a ^^ b);  // would compile, and assert!

Bristol 2013: EWG doesn't believe reopening this discussion, it's been tried previously and it's unlikely that a new round would lead to anything. NAD.


38. [tiny] Core issue 1542

Section: 5.17 [expr.ass] Status: NAD Submitter: Mike Miller Opened: 2012-11-02 Last modified: 2013-04-30

View all issues with NAD status.

Discussion:

In Portland, CWG categorized a number of issues as "extension," which I presume you will automatically look at for potential EWG involvement once the new revision of the issues list is out. I did want to mention one issue for which we will be resolving part and referring the other part to EWG: issue 1542 raises the question of whether the narrowing rules make sense for a compound assignment, e.g.,

    char c;
    c += {1};
CWG addressed a similar issue (1078) for an ordinary assignment and decided that, although the narrowing error was annoying in that case, it wasn't worth the effort to change the language because the workaround was simply to add a cast. In this case, however, there's no way to avoid the error (no place to put the cast). I think we'd be happy with a revision of the narrowing rules that addressed both this case and the one in 1078; maybe the answer is just "why would you use the { } form in a case like this anyway?"

The Core issue link here.

In Bristol 2013: EWG thinks the answer _is_ just "why would you use the { } form in a case like this anyway?". NAD.


39. [tiny] local class and friendship

Section: 11.3 [class.friend] Status: NAD Submitter: Gabriel Dos Reis Opened: 2012-11-10 Last modified: 2013-04-30

View all issues with NAD status.

Discussion:

When we went from C++98 to C++03 we made nested classes implicitly friend of their enclosing classes. We seem to have missed doing the same for local classes defined at member functions scopes.

Mike Miller explained:

Hmm. I think that's already covered by 11p2:

    A member of a class can also access all the names to which the class
    has access.  A local class of a member function may access the same
    names that the member function itself may access.
By the definition of "private" in 11p1, a nested class has access to the private members of the containing class; a member function of the nested class therefore also has access to the private members of the containing class; a local class of such a member function has the same access as the member function; and a member function of the local class has the same access as the local class, the same access as the containing member function, and the same access as the nested class.


47. [tiny] Fix the relation operators on standard templated types

Section: 17 [library] Status: NAD Submitter: Nevin Liber Opened: 2013-02-05 Last modified: 2013-04-30

View all other issues in [library].

View all issues with NAD status.

Discussion:

In C++11, all the containers, pair, tuple, etc. always have the relation operators defined for them (==, !=, <, >, <=, >=), even if the contained type does not have them; they just fail to compile if one tries to invoke them. It would be better if those operators were SFINAEed out, so that generic code can then detect it and apply alternate strategies.

A use case I've have for this is when holding stateless objects that don't normally have the relation operators defined for them.

Bristol 2013: NAD. The operators have no opportunity for substitution failure.


53. N3526 Uniform initialization for arrays and class aggregate types

Section: 8.5.1 [dcl.init.aggr] Status: NAD Submitter: Michael Price Opened: 2013-01-21 Last modified: 2013-04-30

View all other issues in [dcl.init.aggr].

View all issues with NAD status.

Discussion:

http://open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3526.html

Bristol 2013: Stroustrup thought that the proposal is too aggressive and removes structure, and thought that the existing limitations are deliberate. Stroustrup and Sutton also pointed out that there are existing matrix types that deduce the shape of the matrix from the initializers, and this change would break such existing code. No recommendation to move forward, considered NAD.


54. N3553 Proposing a C++1Y Swap Operator

Section: 13.5 [over.oper] Status: NAD Submitter: Walter Brown Opened: 2013-03-13 Last modified: 2013-04-30

View all issues with NAD status.

Discussion:

http://open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3553.pdf

Bristol 2013:

Point d in "the basics": left operand is a modifiable lvalue expression and the right operand a modifiable glvalue. Why the asymmetry? JC: it's because the operator returns the lhs.

Bjarne: do we really need a new operator?

Matt: Maybe. swap() has annoying ADL problems.

Daveed: does it really solve them? The operator will still be found by ADL. Matt: maybe, since this would use an intrinsic in place of the general std::swap template.

Bjarne: But swap() isn't going away because of backward compatibility, so now we'll have swap() and operator:=:. "Probably a good idea if we had a time machine". Introducing a new operator, it has to be really central and helpful. If it got us out of our swap problem it might be good enough, but it isn't. Libraries aren't going to stop calling swap and if they did then all the specialized swap functions people have written wouldn't get invoked. Problems are real, but the benefits it would have (i.e. what problem it would actually solve) aren't sufficiently explained. Too likely that swap and :=: would coexist indefinitely and that all the problems of swap would persist.

General agreement that this is a real problem but that it's not clear why this would solve them. We will not proceed with this.

No recommendation to move forward, considered NAD.


55. N3578 Proposing the Rule of Five

Section: 12.8 [class.copy] Status: NAD Submitter: Walter Brown Opened: 2013-03-12 Last modified: 2013-04-30

View all other issues in [class.copy].

View all issues with NAD status.

Discussion:

http://open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3578.pdf

Bristol 2013: Considered NAD, too early for such a breaking change after C++11, breaks valid programs that use C++11 semantics (defaulted destructor outside class definition, otherwise generated members, used with various smart pointer members).