[Bug c++/83818] g++ class template parameter deduction discards const qualifier

2018-01-12 Thread bugzilla.gcc.karo at cupdev dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83818 --- Comment #2 from Karolin varner --- Comment on attachment 43119 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43119 Test case >template >struct tstruct { > T x; > tstruct(const T &x_) : x{x_} {} >}; > >int main() { > const tstruct s

[Bug c++/83818] g++ class template parameter deduction discards const qualifier

2018-01-12 Thread bugzilla.gcc.karo at cupdev dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83818 --- Comment #1 from Karolin varner --- Created attachment 43119 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43119&action=edit Test case

[Bug c++/83818] New: g++ class template parameter deduction discards const qualifier

2018-01-12 Thread bugzilla.gcc.karo at cupdev dot net
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bugzilla.gcc.karo at cupdev dot net Target Milestone: --- The following code should fail to compile, since `s` is declared const; the assignment to u should fail because it discards the