[ https://issues.apache.org/jira/browse/THRIFT-5135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jano Svitok updated THRIFT-5135: -------------------------------- Description: Log: {code:java} cd /.../thrift/compiler/cpp /.../thrift/compiler/cpp/src/thrift/generate/t_d_generator.cc:754:31: error: non-aggregate type 'vector<std::__1::string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char> > >') cannot be initialized with an initializer list vector<string> t_d_generator::d_reserved_words = { ^ ~ 1 error generated. * ** BUILD FAILED ** {code} [Stackoverflow|https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize] [ |https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize]suggest to enable C++11. PR: https://github.com/apache/thrift/pull/2051 -- this enables C++11 only on mac. Since the code indeed uses C++ (std::vector initializer list, see https://en.cppreference.com/w/cpp/language/list_initialization), it might be appropriate to enable it for all targets (remove the if() and endif() lines). was: Log: {code} cd /.../thrift/compiler/cpp /.../thrift/compiler/cpp/src/thrift/generate/t_d_generator.cc:754:31: error: non-aggregate type 'vector<std::__1::string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char> > >') cannot be initialized with an initializer list vector<string> t_d_generator::d_reserved_words = { ^ ~ 1 error generated. * ** BUILD FAILED ** {code} [Stackoverflow|https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize] [ |https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize]suggest to enable C++11. > Thrift compiler can't be compiled by CMAKE on OSX > ------------------------------------------------- > > Key: THRIFT-5135 > URL: https://issues.apache.org/jira/browse/THRIFT-5135 > Project: Thrift > Issue Type: Bug > Components: Compiler (General) > Affects Versions: 0.14.0 > Reporter: Jano Svitok > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > Log: > {code:java} > cd /.../thrift/compiler/cpp > /.../thrift/compiler/cpp/src/thrift/generate/t_d_generator.cc:754:31: error: > non-aggregate type 'vector<std::__1::string>' (aka 'vector<basic_string<char, > char_traits<char>, > allocator<char> > >') cannot be initialized with an initializer list > vector<string> t_d_generator::d_reserved_words = { > ^ ~ > 1 error generated. > * > ** BUILD FAILED ** > {code} > [Stackoverflow|https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize] > [ > |https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize]suggest > to enable C++11. > PR: https://github.com/apache/thrift/pull/2051 -- this enables C++11 only on > mac. Since the code indeed uses C++ (std::vector initializer list, see > https://en.cppreference.com/w/cpp/language/list_initialization), it might be > appropriate to enable it for all targets (remove the if() and endif() lines). -- This message was sent by Atlassian Jira (v8.3.4#803005)