You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/10/27 03:19:44 UTC

[GitHub] jinfagang opened a new issue #8444: /include/mxnet-cpp/operator.hpp:157:31: error: expected ';' at end of declaration std::vector outputs{output};

jinfagang opened a new issue #8444: /include/mxnet-cpp/operator.hpp:157:31: error:        expected ';' at end of declaration   std::vector<NDArray> outputs{output};
URL: https://github.com/apache/incubator-mxnet/issues/8444
 
 
   I built mxnet with cpp, and copied libmxnet.so and libmxnet_static.a to my project as well as the headers, but when build the error says:
   ```
   /Volumes/xs/CodeSpace/ng/ai/frameworks/mxnet_space/mxnet_cpp_test/./include/mxnet-cpp/operator.hpp:128:43: error: 
         expected expression
         std::back_inserter(output_handles), [](NDArray& a) {
                                             ^
   /Volumes/xs/CodeSpace/ng/ai/frameworks/mxnet_space/mxnet_cpp_test/./include/mxnet-cpp/operator.hpp:145:36: error: 
         expected expression
         std::back_inserter(outputs), [](const NDArrayHandle& handle) {
                                      ^
   /Volumes/xs/CodeSpace/ng/ai/frameworks/mxnet_space/mxnet_cpp_test/./include/mxnet-cpp/operator.hpp:157:31: error: 
         expected ';' at end of declaration
     std::vector<NDArray> outputs{output};
                                 ^
                                 ;
   In file included from /Volumes/xs/CodeSpace/ng/ai/frameworks/mxnet_space/mxnet_cpp_test/fuck.cpp:10:
   In file included from /Volumes/xs/CodeSpace/ng/ai/frameworks/mxnet_space/mxnet_cpp_test/./include/mxnet-cpp/MxNetCpp.h:34:
   In file included from /Volumes/xs/CodeSpace/ng/ai/frameworks/mxnet_space/mxnet_cpp_test/./include/mxnet-cpp/optimizer.hpp:37:
   In file included from /Volumes/xs/CodeSpace/ng/ai/frameworks/mxnet_space/mxnet_cpp_test/./include/mxnet-cpp/op.h:17:
   /usr/local/include/dmlc/optional.h:28:3: error: unknown type name 'constexpr'
     constexpr nullopt_t(int a) {}
     ^
   /usr/local/include/dmlc/optional.h:28:13: error: constructor cannot have a return type
     constexpr nullopt_t(int a) {}
               ^~~~~~~~~
   /usr/local/include/dmlc/optional.h:33:1: error: unknown type name 'constexpr'
   constexpr const nullopt_t nullopt = nullopt_t(0);
   ^
   /usr/local/include/dmlc/optional.h:33:11: error: expected unqualified-id
   constexpr const nullopt_t nullopt = nullopt_t(0);
             ^
   /usr/local/include/dmlc/optional.h:124:52: error: 'T' does not refer to a value
     typename std::aligned_storage<sizeof(T), alignof(T)>::type val;
                                                      ^
   /usr/local/include/dmlc/optional.h:42:19: note: declared here
   template<typename T>
                     ^
   /usr/local/include/dmlc/optional.h:124:57: error: non-friend class member 'type' cannot have a
         qualified name
     typename std::aligned_storage<sizeof(T), alignof(T)>::type val;
   
   
   ```
   
   What exactly why this happened?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services