{"action":"created","issue":{"url":"https://api.github.com/repos/QuantStack/xtensor/issues/1037","repository_url":"https://api.github.com/repos/QuantStack/xtensor","labels_url":"https://api.github.com/repos/QuantStack/xtensor/issues/1037/labels{/name}","comments_url":"https://api.github.com/repos/QuantStack/xtensor/issues/1037/comments","events_url":"https://api.github.com/repos/QuantStack/xtensor/issues/1037/events","html_url":"https://github.com/QuantStack/xtensor/issues/1037","id":347114826,"node_id":"MDU6SXNzdWUzNDcxMTQ4MjY=","number":1037,"title":"Error upon compiling small .so program on g++8","user":{"login":"OneRaynyDay","id":7191678,"node_id":"MDQ6VXNlcjcxOTE2Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/7191678?v=4","gravatar_id":"","url":"https://api.github.com/users/OneRaynyDay","html_url":"https://github.com/OneRaynyDay","followers_url":"https://api.github.com/users/OneRaynyDay/followers","following_url":"https://api.github.com/users/OneRaynyDay/following{/other_user}","gists_url":"https://api.github.com/users/OneRaynyDay/gists{/gist_id}","starred_url":"https://api.github.com/users/OneRaynyDay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OneRaynyDay/subscriptions","organizations_url":"https://api.github.com/users/OneRaynyDay/orgs","repos_url":"https://api.github.com/users/OneRaynyDay/repos","events_url":"https://api.github.com/users/OneRaynyDay/events{/privacy}","received_events_url":"https://api.github.com/users/OneRaynyDay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-02T17:57:45Z","updated_at":"2018-08-02T18:01:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Simple reproducible example:\r\n\r\n`logreg.h`:\r\n\r\n```\r\n#pragma once\r\n#include <iostream>\r\n#include <xtensor/xarray.hpp>\r\n#include <xtensor/xio.hpp>\r\n#include <xtensor/xview.hpp>\r\n#include <xtensor/xexpression.hpp>\r\n#include <xtensor/xnpy.hpp>\r\n#include <xtensor/xsort.hpp>\r\n#include <xtensor-blas/xlinalg.hpp>\r\n\r\nxt::xarray<float> run(const xt::xarray<float>&);\r\n```\r\n\r\n`logreg.cpp`:\r\n\r\n```\r\n#include \"logreg.h\"\r\n\r\nxt::xarray<float> run(const xt::xarray<double>& x){\r\n    xt::xarray<float> y { {1, 2.5} };\r\n    return y;\r\n}\r\n```\r\n\r\nRunning it with the following flags on apple clang with following configs:\r\n\r\n```\r\n(cling) ❯ g++ --version\r\nConfigured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1\r\nApple LLVM version 9.1.0 (clang-902.0.39.2)\r\nTarget: x86_64-apple-darwin17.7.0\r\nThread model: posix\r\nInstalledDir: /Library/Developer/CommandLineTools/usr/bin\r\n```\r\n\r\nGives us:\r\n\r\n```\r\n(cling) ❯ make\r\ng++ -shared -fPIC -std=c++17 -Wall -I/Users/ray_zhang/anaconda3/envs/cling/include -o libxnor.so logreg.cpp\r\nIn file included from logreg.cpp:1:\r\nIn file included from ./logreg.h:3:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:19:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:23:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xmath.hpp:26:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xslice.hpp:109:50: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        XTENSOR_GLOBAL_CONSTEXPR rangemaker<> _r{0, 0, 0};\r\n                                                 ^~~~~~~\r\n                                                 {      }\r\nIn file included from logreg.cpp:1:\r\nIn file included from ./logreg.h:3:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:19:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:23:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xmath.hpp:27:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xstrided_view.hpp:26:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xstrided_view_base.hpp:877:25: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n                return{ 0, 0, 0 };\r\n                        ^~~~~~~\r\n                        {      }\r\nIn file included from logreg.cpp:1:\r\nIn file included from ./logreg.h:3:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:19:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:23:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xmath.hpp:27:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xstrided_view.hpp:966:72: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        return squeeze(std::forward<E>(e), std::array<std::size_t, 1>{ axis }, check_policy);\r\n                                                                       ^~~~\r\n                                                                       {   }\r\nIn file included from logreg.cpp:1:\r\nIn file included from ./logreg.h:3:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:19:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:23:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xmath.hpp:1875:137: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        return sum(std::forward<E>(e) * reshape_view(std::forward<W>(weights), std::move(broadcast_shape)), std::array<std::size_t, 1>({ax})) / std::move(div);\r\n                                                                                                                                        ^~\r\n                                                                                                                                        { }\r\nIn file included from logreg.cpp:1:\r\nIn file included from ./logreg.h:9:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:300:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> vN = {N};\r\n                                         ^\r\n                                         {}\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:303:43: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 2> shp = {N, N};\r\n                                          ^~~~\r\n                                          {   }\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:350:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> vN = {N};\r\n                                         ^\r\n                                         {}\r\n  1 CC=g++-8\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:353:41: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 2> shp({N, N});\r\n                                        ^~~~\r\n                                        {   }\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:382:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> vN = {N};\r\n                                         ^\r\n                                         {}\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:403:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> vN = {N};\r\n                                         ^\r\n                                         {}\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:429:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> vN = {N};\r\n                                         ^\r\n                                         {}\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:434:41: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 2> shp({N, N});\r\n                                        ^~~~\r\n                                        {   }\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:457:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> vN = {N};\r\n                                         ^\r\n                                         {}\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:461:41: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 2> shp({N, N});\r\n                                        ^~~~\r\n                                        {   }\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:486:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> vN = {N};\r\n                                         ^\r\n                                         {}\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:507:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> vN = {N};\r\n                                         ^\r\n                                         {}\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:936:13: warning: unused variable 'res' [-Wunused-variable]\r\n        int res = lapack::getrf(LU, piv);\r\n            ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:1088:47: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 2> tau_shp = {K, 1};\r\n                                              ^~~~\r\n                                              {   }\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:1443:53: warning: suggest braces around initialization of subobject [-Wmissing-braces]\r\n        std::array<std::size_t, 1> residuals_shp = {0};\r\n                                                    ^\r\n                                                    {}\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:1441:13: warning: unused variable 'info' [-Wunused-variable]\r\n        int info = lapack::gelsd(dA, db, s, rank, rcond);\r\n            ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:1443:36: warning: unused variable 'residuals_shp' [-Wunused-variable]\r\n        std::array<std::size_t, 1> residuals_shp = {0};\r\n                                   ^\r\nIn file included from logreg.cpp:1:\r\nIn file included from ./logreg.h:9:\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:29:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp:482:15: warning: unused type alias 'xtype' [-Wunused-local-typedef]\r\n        using xtype = xtensor<value_type, 2, layout_type::column_major>;\r\n              ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp:540:15: warning: unused type alias 'xtype' [-Wunused-local-typedef]\r\n        using xtype = xtensor<value_type, 2, layout_type::column_major>;\r\n              ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp:596:15: warning: unused type alias 'xtype' [-Wunused-local-typedef]\r\n        using xtype = xtensor<value_type, 2, layout_type::column_major>;\r\n              ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp:652:15: warning: unused type alias 'xtype' [-Wunused-local-typedef]\r\n        using xtype = xtensor<value_type, 2, layout_type::column_major>;\r\n              ^\r\nIn file included from logreg.cpp:1:\r\nIn file included from ./logreg.h:9:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:345:15: warning: unused type alias 'underlying_type' [-Wunused-local-typedef]\r\n        using underlying_type = typename value_type::value_type;\r\n              ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:1080:15: warning: unused type alias 'result_xtype' [-Wunused-local-typedef]\r\n        using result_xtype = xtensor<value_type, 2>;\r\n              ^\r\n27 warnings generated.\r\n```\r\n\r\nHowever, running the SAME command with `g++-8`, with details:\r\n\r\n```\r\n(cling) ❯ g++-8 --version\r\ng++-8 (Homebrew GCC 8.1.0) 8.1.0\r\nCopyright (C) 2018 Free Software Foundation, Inc.\r\nThis is free software; see the source for copying conditions.  There is NO\r\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n```\r\n\r\n```\r\n(cling) ❯ make\r\ng++-8 -shared -fPIC -std=c++17 -Wall -I/Users/ray_zhang/anaconda3/envs/cling/include -o libxnor.so logreg.cpp\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:29,\r\n                 from logreg.h:9,\r\n                 from logreg.cpp:1:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp: In function 'int xt::lapack::geev(E&, char, char, W&, W&, V&, V&)':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp:482:72: warning: typedef 'using xtype = xt::xtensor<typename E::value_type, 2, (xt::layout_type)2>' locally defined but not used [-Wunused-local-typedefs]\r\n         using xtype = xtensor<value_type, 2, layout_type::column_major>;\r\n                                                                        ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp: In function 'int xt::lapack::syevd(E&, char, char, W&)':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp:540:72: warning: typedef 'using xtype = xt::xtensor<typename E::value_type, 2, (xt::layout_type)2>' locally defined but not used [-Wunused-local-typedefs]\r\n         using xtype = xtensor<value_type, 2, layout_type::column_major>;\r\n                                                                        ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp: In function 'int xt::lapack::geev(E&, char, char, W&, V&, V&)':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp:596:72: warning: typedef 'using xtype = xt::xtensor<typename E::value_type, 2, (xt::layout_type)2>' locally defined but not used [-Wunused-local-typedefs]\r\n         using xtype = xtensor<value_type, 2, layout_type::column_major>;\r\n                                                                        ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp: In function 'int xt::lapack::heevd(E&, char, char, W&)':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlapack.hpp:652:72: warning: typedef 'using xtype = xt::xtensor<typename E::value_type, 2, (xt::layout_type)2>' locally defined but not used [-Wunused-local-typedefs]\r\n         using xtype = xtensor<value_type, 2, layout_type::column_major>;\r\n                                                                        ^\r\nIn file included from logreg.h:9,\r\n                 from logreg.cpp:1:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp: In function 'auto xt::linalg::eig(const xt::xexpression<E>&)':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:345:64: warning: typedef 'using underlying_type = typename E::value_type::value_type' locally defined but not used [-Wunused-local-typedefs]\r\n         using underlying_type = typename value_type::value_type;\r\n                                                                ^\r\nIn file included from logreg.h:9,\r\n                 from logreg.cpp:1:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp: In function 'auto xt::linalg::qr(const xt::xexpression<E>&, xt::linalg::qrmode)':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor-blas/xlinalg.hpp:1080:52: warning: typedef 'using result_xtype = xt::xtensor<typename T::value_type, 2>' locally defined but not used [-Wunused-local-typedefs]\r\n         using result_xtype = xtensor<value_type, 2>;\r\n                                                    ^\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xstorage.hpp:22,\r\n                 from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xbuffer_adaptor.hpp:20,\r\n                 from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:18,\r\n                 from logreg.h:3,\r\n                 from logreg.cpp:1:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xutils.hpp: In instantiation of 'struct xt::get_strides_type<xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true> >':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xutils.hpp:1094:61:   required by substitution of 'template<class C> using get_strides_t = typename xt::get_strides_type::type [with C = xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>]'\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:34:55:   required from 'struct xt::xcontainer_inner_types<xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >'\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:33:86:   required from 'struct xt::xcontainer_iterable_types<xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >'\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:44:12:   required from 'struct xt::xiterable_inner_types<xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >'\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xiterable.hpp:44:75:   required from 'class xt::xconst_iterable<xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >'\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xiterable.hpp:170:11:   required from 'class xt::xiterable<xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >'\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:72:11:   required from 'class xt::xcontainer<xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >'\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:384:11:   required from 'class xt::xstrided_container<xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >'\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:63:11:   required from 'class xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>'\r\nlogreg.cpp:3:50:   required from here\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xutils.hpp:1081:72: error: ambiguous template instantiation for 'struct xt::rebind_container<long int, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true> >'\r\n         using type = typename rebind_container<std::ptrdiff_t, S>::type;\r\n                                                                        ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xutils.hpp:1073:12: note: candidates are: 'template<class X, template<class, long unsigned int <anonymous> > class C, class T, long unsigned int N> struct xt::rebind_container<X, C<T, N> > [with X = long int; C = xt::svector; T = long unsigned int; long unsigned int N = 4]'\r\n     struct rebind_container<X, C<T, N>>\r\n            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xbuffer_adaptor.hpp:20,\r\n                 from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:18,\r\n                 from logreg.h:3,\r\n                 from logreg.cpp:1:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xstorage.hpp:1231:12: note:                 'template<class X, class T, long unsigned int N, class A> struct xt::rebind_container<X, xt::svector<T, N, A> > [with X = long int; T = long unsigned int; long unsigned int N = 4; A = std::allocator<long unsigned int>]'\r\n     struct rebind_container<X, svector<T, N, A>>\r\n            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xstorage.hpp:22,\r\n                 from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xbuffer_adaptor.hpp:20,\r\n                 from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:18,\r\n                 from logreg.h:3,\r\n                 from logreg.cpp:1:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xutils.hpp:1081:72: error: invalid use of incomplete type 'struct xt::rebind_container<long int, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true> >'\r\n         using type = typename rebind_container<std::ptrdiff_t, S>::type;\r\n                                                                        ^\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xutils.hpp:1063:12: note: declaration of 'struct xt::rebind_container<long int, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true> >'\r\n     struct rebind_container;\r\n            ^~~~~~~~~~~~~~~~\r\nIn file included from /Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:19,\r\n                 from logreg.h:3,\r\n                 from logreg.cpp:1:\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp: In instantiation of 'xt::xstrided_container<D>::xstrided_container() [with D = xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>]':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:338:21:   required from 'xt::xarray_container<EC, L, SC, Tag>::xarray_container(xt::nested_initializer_list_t<typename xt::xstrided_container<xt::xarray_container<EC, L, SC, Tag> >::value_type, 2>) [with EC = xt::uvector<float, std::allocator<float> >; xt::layout_type L = (xt::layout_type)1; SC = xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>; Tag = xt::xtensor_expression_tag; xt::nested_initializer_list_t<typename xt::xstrided_container<xt::xarray_container<EC, L, SC, Tag> >::value_type, 2> = std::initializer_list<std::initializer_list<float> >]'\r\nlogreg.cpp:4:36:   required from here\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:1252:9: error: using invalid field 'xt::xstrided_container<D>::m_strides'\r\n         m_strides = xtl::make_sequence<inner_strides_type>(base_type::dimension(), 0);\r\n         ^~~~~~~~~\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:1253:9: error: using invalid field 'xt::xstrided_container<D>::m_backstrides'\r\n         m_backstrides = xtl::make_sequence<inner_backstrides_type>(base_type::dimension(), 0);\r\n         ^~~~~~~~~~~~~\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp: In instantiation of 'void xt::xstrided_container<D>::resize(S&&, bool) [with S = xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>; D = xt::xarray_container<xt::uvector<float, std::allocator<float> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>]':\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xarray.hpp:340:26:   required from 'xt::xarray_container<EC, L, SC, Tag>::xarray_container(xt::nested_initializer_list_t<typename xt::xstrided_container<xt::xarray_container<EC, L, SC, Tag> >::value_type, 2>) [with EC = xt::uvector<float, std::allocator<float> >; xt::layout_type L = (xt::layout_type)1; SC = xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>; Tag = xt::xtensor_expression_tag; xt::nested_initializer_list_t<typename xt::xstrided_container<xt::xarray_container<EC, L, SC, Tag> >::value_type, 2> = std::initializer_list<std::initializer_list<float> >]'\r\nlogreg.cpp:4:36:   required from here\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:1343:30: error: using invalid field 'xt::xstrided_container<D>::m_strides'\r\n             resize_container(m_strides, m_shape.size());\r\n                              ^~~~~~~~~\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:1344:30: error: using invalid field 'xt::xstrided_container<D>::m_backstrides'\r\n             resize_container(m_backstrides, m_shape.size());\r\n                              ^~~~~~~~~~~~~\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:1345:70: error: using invalid field 'xt::xstrided_container<D>::m_strides'\r\n             size_type data_size = compute_strides(m_shape, m_layout, m_strides, m_backstrides);\r\n                                                                      ^~~~~~~~~\r\n/Users/ray_zhang/anaconda3/envs/cling/include/xtensor/xcontainer.hpp:1345:81: error: using invalid field 'xt::xstrided_container<D>::m_backstrides'\r\n             size_type data_size = compute_strides(m_shape, m_layout, m_strides, m_backstrides);\r\n                                                                                 ^~~~~~~~~~~~~\r\nmake: *** [libxnor.so] Error 1\r\n```\r\n\r\nUsing the new version of xtensor:\r\n\r\n```\r\n(cling) ❯ conda list | grep xtensor\r\nxtensor                   0.17.0               h2d50403_0    conda-forge\r\nxtensor-blas              0.12.0          blas_openblash2d50403_0  [blas_openblas]  conda-forge\r\n```"},"comment":{"url":"https://api.github.com/repos/QuantStack/xtensor/issues/comments/410015905","html_url":"https://github.com/QuantStack/xtensor/issues/1037#issuecomment-410015905","issue_url":"https://api.github.com/repos/QuantStack/xtensor/issues/1037","id":410015905,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDAxNTkwNQ==","user":{"login":"wolfv","id":885054,"node_id":"MDQ6VXNlcjg4NTA1NA==","avatar_url":"https://avatars0.githubusercontent.com/u/885054?v=4","gravatar_id":"","url":"https://api.github.com/users/wolfv","html_url":"https://github.com/wolfv","followers_url":"https://api.github.com/users/wolfv/followers","following_url":"https://api.github.com/users/wolfv/following{/other_user}","gists_url":"https://api.github.com/users/wolfv/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfv/subscriptions","organizations_url":"https://api.github.com/users/wolfv/orgs","repos_url":"https://api.github.com/users/wolfv/repos","events_url":"https://api.github.com/users/wolfv/events{/privacy}","received_events_url":"https://api.github.com/users/wolfv/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T18:01:50Z","updated_at":"2018-08-02T18:01:50Z","author_association":"MEMBER","body":"ok one idea to fix this would be to add the 4th template argument to svector which is a `bool Init` so that the template specialization would look like:\r\n\r\n```\r\ntemplate <class X, class T, std::size_t N, class A, bool B>\r\nstruct rebind_container<X, svector<T, N, A, B>>\r\n```\r\n\r\nNot sure if that would help though. \r\nOtherwise we need to disable the overload using enable_if I guess?"}}
{"actor":{"display_login":"wolfv"}}