{"action":"opened","issue":{"url":"https://api.github.com/repos/jfalcou/boost.simd/issues/21","labels_url":"https://api.github.com/repos/jfalcou/boost.simd/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/jfalcou/boost.simd/issues/21/comments","events_url":"https://api.github.com/repos/jfalcou/boost.simd/issues/21/events","html_url":"https://github.com/jfalcou/boost.simd/issues/21","id":113538204,"number":21,"title":"pack type convert error","user":{"login":"saibing","id":5676390,"avatar_url":"https://avatars.githubusercontent.com/u/5676390?v=3","gravatar_id":"","url":"https://api.github.com/users/saibing","html_url":"https://github.com/saibing","followers_url":"https://api.github.com/users/saibing/followers","following_url":"https://api.github.com/users/saibing/following{/other_user}","gists_url":"https://api.github.com/users/saibing/gists{/gist_id}","starred_url":"https://api.github.com/users/saibing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saibing/subscriptions","organizations_url":"https://api.github.com/users/saibing/orgs","repos_url":"https://api.github.com/users/saibing/repos","events_url":"https://api.github.com/users/saibing/events{/privacy}","received_events_url":"https://api.github.com/users/saibing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-27T09:18:49Z","updated_at":"2015-10-27T09:18:49Z","closed_at":null,"body":"# code\r\n\r\n```cpp\r\n\r\n#include <boost/simd/sdk/simd/pack.hpp> \r\n#include <boost/simd/sdk/simd/io.hpp>\r\n#include <boost/simd/include/functions/load.hpp>\r\n#include <boost/simd/include/functions/evaluate.hpp>\r\n#include <boost/simd/operator/include/functions/plus.hpp>\r\n#include <iostream>\r\n\r\nusing namespace std;\r\nusing namespace boost::simd;\r\n\r\n#define SECONDS_IN_ONE_DAY      86400\r\n\r\ntemplate <typename T>\r\nclass op_boost_utc_add\r\n{\r\n    typedef boost::simd::pack<T, 16 / sizeof(T)> p_t;\r\n    const p_t seconds_in_one_day = boost::simd::splat<p_t>(SECONDS_IN_ONE_DAY);\r\n                                                                               \r\npublic:\r\n    p_t operator()(p_t const &a0, p_t const &a1, p_t const &delta)\r\n    {\r\n        return evaluate(a0 + (seconds_in_one_day * a1) + delta);\r\n    }\r\n};\r\n\r\nint main()\r\n{\r\n    typedef boost::simd::pack<long long, 2> p_l_t;\r\n\r\n    p_l_t a(10, 100);\r\n    p_l_t b(10, 100);\r\n    p_l_t c(1, 1);\r\n\r\n    p_l_t r = op_boost_utc_add<long long>()(a, b, c);\r\n\r\n    cout << r << endl;                                                               \r\n    \r\n    return 0;\r\n}   \r\n\r\n```\r\n\r\n# boost.simd version\r\n\r\n3.1.0\r\n\r\n# boost version\r\n\r\n1_59_0\r\n\r\n# compiler version\r\n\r\n* clang++ 3.6\r\n* gcc 4.8.2\r\n\r\n# issue\r\n\r\n**gcc compile error, but clang++ is ok.**\r\n\r\n\r\n```bash\r\n\r\n[d257414 boost]$g++ -g -o add add.cpp -I${BOOST_ROOT_DIR} -I${BOOST_SIMD_DIR}/include -msse4.1 -std=c++11\r\nadd.cpp: In constructor ‘constexpr op_boost_utc_add<long long int>::op_boost_utc_add()’:\r\nadd.cpp:45:7: error: conversion from ‘boost::dispatch::meta::result_of<boost::simd::ext::implement<boost::simd::tag::splat_(boost::dispatch::meta::scalar_<boost::dispatch::meta::fundamental_<int> >, boost::dispatch::meta::target_<boost::dispatch::meta::ast_<boost::dispatch::meta::as_<boost::simd::pack<long long int, 2ul> >, boost::simd::domain> >), boost::dispatch::tag::cpu_, void>(int, boost::dispatch::meta::as_<boost::simd::pack<long long int, 2ul> >), void>::type {aka boost::simd::expression<boost::proto::exprns_::expr<boost::simd::tag::splat_, boost::proto::argsns_::list2<boost::simd::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<int>, 0l>, int>, boost::simd::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::dispatch::meta::as_<boost::simd::native<long long int, boost::simd::tag::sse_, void> > >, 0l>, boost::dispatch::meta::as_<boost::simd::native<long long int, boost::simd::tag::sse_, void> > > >, 2l>, boost::simd::native<long long int, boost::simd::tag::sse_, void> >}’ to non-scalar type ‘const p_t {aka const boost::simd::pack<long long int, 2ul>}’ requested\r\n class op_boost_utc_add\r\n       ^\r\nadd.cpp: In function ‘int main()’:\r\nadd.cpp:66:43: note: synthesized method ‘constexpr op_boost_utc_add<long long int>::op_boost_utc_add()’ first required here \r\n     p_l_t r = op_boost_utc_add<long long>()(a, b, c);\r\n                                           ^\r\n[d257414 boost]$clang++ -g -o add add.cpp -I${BOOST_ROOT_DIR} -I${BOOST_SIMD_DIR}/include -msse4.1 -std=c++11 -stdlib=libc++ -lc++abi\r\n[d257414 boost]"}}