{"action":"created","issue":{"url":"https://api.github.com/repos/edouarda/brigand/issues/227","repository_url":"https://api.github.com/repos/edouarda/brigand","labels_url":"https://api.github.com/repos/edouarda/brigand/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/edouarda/brigand/issues/227/comments","events_url":"https://api.github.com/repos/edouarda/brigand/issues/227/events","html_url":"https://github.com/edouarda/brigand/issues/227","id":197921490,"number":227,"title":"Fold Regression in 1.3.0","user":{"login":"robertmaynard","id":215756,"avatar_url":"https://avatars.githubusercontent.com/u/215756?v=3","gravatar_id":"","url":"https://api.github.com/users/robertmaynard","html_url":"https://github.com/robertmaynard","followers_url":"https://api.github.com/users/robertmaynard/followers","following_url":"https://api.github.com/users/robertmaynard/following{/other_user}","gists_url":"https://api.github.com/users/robertmaynard/gists{/gist_id}","starred_url":"https://api.github.com/users/robertmaynard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertmaynard/subscriptions","organizations_url":"https://api.github.com/users/robertmaynard/orgs","repos_url":"https://api.github.com/users/robertmaynard/repos","events_url":"https://api.github.com/users/robertmaynard/events{/privacy}","received_events_url":"https://api.github.com/users/robertmaynard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-28T21:52:23Z","updated_at":"2016-12-29T16:43:42Z","closed_at":null,"body":"Hi,\r\n\r\nI have an example of using ```brigand::fold``` to build a ```brigand::list``` that previously working in brigand 1.2.0. I have attached the code below, but the issue seem to be when the fold operator requires more than 2 template parameters\r\n\r\n```cpp\r\n#include \"brigand/brigand.hpp\"\r\n\r\ntemplate <class T, class U, class ParamCausesBrigandToFail>\r\nstruct listify\r\n{\r\n  using type = brigand::push_back<T, brigand::list<U> >;\r\n};\r\n\r\ntemplate <class L>\r\nstruct build_list\r\n{\r\n  using type =\r\n    brigand::fold< L,\r\n                    brigand::list<>,\r\n                    listify< brigand::_state, brigand::_element, L>\r\n                   >;\r\n};\r\n\r\nint main()\r\n{\r\n  //example of using cross product\r\n  using l1 = brigand::list<int*, char, double*, long long>;\r\n\r\n  using cp = build_list<l1>::type;\r\ncp &cc = \"cp\";\r\n  return 0;\r\n}\r\n\r\n```\r\n\r\nerror message:\r\n```\r\n/Users/robert/Work/brigand/src/brigand/functions/lambda/apply.hpp:51:70: error: no type named 'type' in\r\n      'brigand::detail::apply<brigand::list<int, char, float, double, long, long long, unsigned int, unsigned char,\r\n      unsigned long>, brigand::list<brigand::list<>, int> >'\r\n  struct apply<F<Ts...>, L, Ls...> : F<typename apply<Ts, L, Ls...>::type...>\r\n                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~\r\n/Users/robert/Work/brigand/src/brigand/functions/lambda/apply.hpp:108:1: note: in instantiation of template class\r\n      'brigand::detail::apply<listify<brigand::_1, brigand::_2, brigand::list<int, char, float, double, long, long long,\r\n      unsigned int, unsigned char, unsigned long> >, brigand::list<brigand::list<>, int> >' requested here\r\nusing apply = typename detail::apply<Lambda, brigand::list<Args...>>::type;\r\n^\r\n/Users/robert/Work/brigand/src/brigand/algorithms/detail/fold.hpp:153:44: note: in instantiation of template type alias\r\n      'apply' requested here\r\n                                  brigand::apply<Functor,\r\n                                           ^\r\n/Users/robert/Work/brigand/src/brigand/algorithms/fold.hpp:23:1: note: in instantiation of template class\r\n      'brigand::detail::fold_impl<listify<brigand::_1, brigand::_2, brigand::list<int, char, float, double, long, long\r\n      long, unsigned int, unsigned char, unsigned long> >, brigand::list<>, brigand::list<int, char, float, double,\r\n      long, long long, unsigned int, unsigned char, unsigned long> >' requested here\r\nusing fold = typename ::brigand::lazy::fold<Sequence, State, Functor>::type;\r\n^\r\n/Users/robert/Work/Sandbox/src/CompileTimeIntersect/test.cpp:57:14: note: in instantiation of template type alias 'fold'\r\n      requested here\r\n    brigand::fold< L,\r\n             ^\r\n/Users/robert/Work/Sandbox/src/CompileTimeIntersect/test.cpp:69:14: note: in instantiation of template class\r\n      'build_list<brigand::list<int, char, float, double, long, long long, unsigned int, unsigned char, unsigned long>\r\n      >' requested here\r\n  using cp = build_list<l1>::type;\r\n```"},"comment":{"url":"https://api.github.com/repos/edouarda/brigand/issues/comments/269657254","html_url":"https://github.com/edouarda/brigand/issues/227#issuecomment-269657254","issue_url":"https://api.github.com/repos/edouarda/brigand/issues/227","id":269657254,"user":{"login":"robertmaynard","id":215756,"avatar_url":"https://avatars.githubusercontent.com/u/215756?v=3","gravatar_id":"","url":"https://api.github.com/users/robertmaynard","html_url":"https://github.com/robertmaynard","followers_url":"https://api.github.com/users/robertmaynard/followers","following_url":"https://api.github.com/users/robertmaynard/following{/other_user}","gists_url":"https://api.github.com/users/robertmaynard/gists{/gist_id}","starred_url":"https://api.github.com/users/robertmaynard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertmaynard/subscriptions","organizations_url":"https://api.github.com/users/robertmaynard/orgs","repos_url":"https://api.github.com/users/robertmaynard/repos","events_url":"https://api.github.com/users/robertmaynard/events{/privacy}","received_events_url":"https://api.github.com/users/robertmaynard/received_events","type":"User","site_admin":false},"created_at":"2016-12-29T16:43:42Z","updated_at":"2016-12-29T16:43:42Z","body":"@odinthenerd wrapping ```L``` in ```brigand::pin``` does solve the problem.\r\n\r\nIt would be great if the fold test had an example of using ```brigand::pin```. At least for me, after reading the wiki entries, I have been using the tests as a reference guide."}}
{"actor":{"display_login":"robertmaynard"}}