[Bug c++/80243] New: c++ doesn't allow function to return a struct (or object?) - same thing
jmichae3 at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 28 20:44:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80243
Bug ID: 80243
Summary: c++ doesn't allow function to return a struct (or
object?) - same thing
Product: gcc
Version: 6.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jmichae3 at yahoo dot com
Target Milestone: ---
c++ doesn't allow function to return a struct. and notice a class is a struct
with a constructur function and destructor function but has auto-start.
#include <string>
#include <initializer_list>
typedef struct {std::string s;int i;} Structsb;
Structsb fn(std::string s1, int i1) {
return {s1,i1};
}
I should be able to do this with objects which are instantiations of a class
too.
More information about the Gcc-bugs
mailing list