[Bug c++/88026] Explicit deduction guide fails for move-only type

2018-11-14 Thread toe-ger at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88026 --- Comment #2 from toe-ger at web dot de --- Workaround that seems to generally work: Change deduction guide to template S(T&&)->S>;

[Bug c++/88026] Explicit deduction guide fails for move-only type

2018-11-14 Thread toe-ger at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88026 --- Comment #1 from toe-ger at web dot de --- Godbolt decided to swap the output from gcc and msvc again. Sorry for that.

[Bug c++/88026] New: Explicit deduction guide fails for move-only type

2018-11-14 Thread toe-ger at web dot de
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: toe-ger at web dot de Target Milestone: --- *Example code*: struct move_only { move_only() = default; move_only(const move_only &) = delete; }; template struct S { S(T &){} }; template S(T)->S

[Bug c++/88020] Deduction guides fail inside sizeof

2018-11-14 Thread toe-ger at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88020 --- Comment #1 from toe-ger at web dot de --- The godbolt link is a bit confusing because the output window is in the wrong place. https://godbolt.org/z/OvlkUA is better.

[Bug c++/88020] New: Template argument deduction fails inside sizeof

2018-11-14 Thread toe-ger at web dot de
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: toe-ger at web dot de Target Milestone: --- *Minimal example*: template struct S{ S(T){} }; static_assert(sizeof(S{0})); *Expected output*: *Actual output*: :5:22: error: missing template arguments after 'S