Movatterモバイル変換


[0]ホーム

URL:


Issue 1683 - WG21 CWG Issues
Title
Incorrect example after constexpr changes
Status
cd4
Section
7.7 [expr.const]
Submitter
Daniel Krügler

Created on2013-05-15.00:00:00 last changed109 months ago

Messages

msg4609 (view)
Date: 2013-09-15.00:00:00

Notes from the September, 2013 meeting:

This issue is being handled editorially and is being placed in"review" status to ensure that the change has been made.

msg4496 (view)
Date: 2013-05-15.00:00:00

The example in 7.7 [expr.const] paragraph 6,

  struct A {    constexpr A(int i) : val(i) { }    constexpr operator int() { return val; }    constexpr operator long() { return 43; }  private:    int val;  };  template<int> struct X { };  constexpr A a = 42;  X<a> x;               // OK: unique conversion toint  int ary[a];           // error: ambiguous conversion

is no longer correct now thatconstexpr does not implyconst for member functions, since the conversion functionscannot be invoked for the constanta.

History
DateUserActionArgs
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-04-13 00:00:00adminsetstatus: review -> drwp
2013-10-14 00:00:00adminsetmessages: +msg4609
2013-10-14 00:00:00adminsetstatus: open -> review
2013-05-15 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp