Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader.map(PointerToMemberFunction) does not work on MinGW #199

Open
tusooa opened this issue Feb 4, 2024 · 0 comments
Open

Reader.map(PointerToMemberFunction) does not work on MinGW #199

tusooa opened this issue Feb 4, 2024 · 0 comments

Comments

@tusooa
Copy link
Contributor

tusooa commented Feb 4, 2024

Environment: MinGW64 13.2.1 on Fedora (can be generated from the Dockerfile here)

#include <lager/reader.hpp>
#include <lager/state.hpp>
#include <optional>
struct Foo
{
  int a;
  const int &getA() const { return a; }
  int getAVal() const { return a; }
};

const int &getFooA(const Foo &f)
{
  return f.a;
}

int main()
{
  auto s = lager::make_state(Foo{1});
  // lager::reader<int> sa0 = s[&Foo::a];
  // lager::reader<int> sa1 = s.map(&Foo::getA);
  // lager::reader<int> sa2 = s.map(&Foo::getAVal);
  // lager::reader<int> sa3 = s.map(&getFooA);
}

The lines with sa0 and sa3 compile fine.

If I uncomment sa1, I get:

# x86_64-w64-mingw32-g++ -I/opt/libkazv-deps/include/ test.cpp 
In file included from /opt/libkazv-deps/include/lager/with.hpp:22,
                 from /opt/libkazv-deps/include/lager/reader.hpp:20,
                 from test.cpp:1:
/opt/libkazv-deps/include/zug/transducer/map.hpp: In instantiation of 'zug::map_t<const int& (Foo::*)() const>::operator()<const zug::last_t&>(const zug::last_t&) const::<lambda(auto:64&&, auto:65&& ...)> mutable [with auto:64 = zug::meta::bottom; auto:65 = {Foo}]':
/opt/libkazv-deps/include/zug/meta.hpp:65:14:   required from 'struct zug::result_of<zug::composed<zug::map_t<const int& (Foo::*)() const> >, Foo>'
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:74:7:   required from 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:151:27:   required from 'auto lager::detail::make_xform_reader_node(Xform&&, std::tuple<std::shared_ptr<Parents>...>) [with Xform = zug::composed<zug::map_t<const int& (Foo::*)() const> >; Parents = {state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:290:38:   required from 'auto lager::detail::with_xform_expr<Xform, Nodes>::make_reader_node_() && [with Xform = zug::composed<zug::map_t<const int& (Foo::*)() const> >; Nodes = {lager::detail::state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:224:75:   required from 'auto lager::detail::with_expr_base<Deriv>::make_node_() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:207:45:   required from 'auto lager::detail::with_expr_base<Deriv>::make() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:182:23:   required by substitution of 'template<class T, class U, typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> > lager::detail::with_expr_base<lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> > >::operator lager::reader<T>() && [with T = int; U = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >; typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> = <missing>]'
test.cpp:20:44:   required from here
/opt/libkazv-deps/include/zug/transducer/map.hpp:23:24: error: no match for call to '(const zug::last_t) (zug::meta::bottom, const int& (Foo::)() const)'
   23 |             return step(ZUG_FWD(s), compat::invoke(mapping, ZUG_FWD(is)...));
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/libkazv-deps/include/zug/meta.hpp:12,
                 from /opt/libkazv-deps/include/lager/detail/lens_nodes.hpp:19,
                 from /opt/libkazv-deps/include/lager/with.hpp:15:
/opt/libkazv-deps/include/zug/reducing/last.hpp:19:20: note: candidate: 'template<class StateT, class ... InputTs> decltype(auto) zug::last_t::operator()(StateT&&, InputTs&& ...) const'
   19 |     decltype(auto) operator()(StateT&&, InputTs&&... ins) const
      |                    ^~~~~~~~
/opt/libkazv-deps/include/zug/reducing/last.hpp:19:20: note:   template argument deduction/substitution failed:
/opt/libkazv-deps/include/zug/transducer/map.hpp:23:24: note:   member function type 'const int& (Foo::)() const' is not a valid template argument
   23 |             return step(ZUG_FWD(s), compat::invoke(mapping, ZUG_FWD(is)...));
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/libkazv-deps/include/lager/with.hpp:17:
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp: In instantiation of 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>':
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:151:27:   required from 'auto lager::detail::make_xform_reader_node(Xform&&, std::tuple<std::shared_ptr<Parents>...>) [with Xform = zug::composed<zug::map_t<const int& (Foo::*)() const> >; Parents = {state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:290:38:   required from 'auto lager::detail::with_xform_expr<Xform, Nodes>::make_reader_node_() && [with Xform = zug::composed<zug::map_t<const int& (Foo::*)() const> >; Nodes = {lager::detail::state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:224:75:   required from 'auto lager::detail::with_expr_base<Deriv>::make_node_() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:207:45:   required from 'auto lager::detail::with_expr_base<Deriv>::make() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:182:23:   required by substitution of 'template<class T, class U, typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> > lager::detail::with_expr_base<lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> > >::operator lager::reader<T>() && [with T = int; U = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >; typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> = <missing>]'
test.cpp:20:44:   required from here
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:98:10: error: 'void lager::detail::xform_reader_node<Xform, zug::meta::pack<Ts2 ...>, Base>::recompute() [with Xform = zug::composed<zug::map_t<const int& (Foo::*)() const> >; Parents = {lager::detail::state_node<Foo, lager::transactional_tag>}; Base = lager::detail::reader_node]' marked 'final', but is not virtual
   98 |     void recompute() final
      |          ^~~~~~~~~
In file included from /opt/libkazv-deps/include/lager/reader.hpp:19:
/opt/libkazv-deps/include/lager/watch.hpp: In instantiation of 'class lager::watchable_base<lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node> >':
/opt/libkazv-deps/include/lager/reader.hpp:83:7:   required from 'class lager::reader_base<lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node> >'
/opt/libkazv-deps/include/lager/with.hpp:210:29:   required from 'auto lager::detail::with_expr_base<Deriv>::make() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:182:23:   required by substitution of 'template<class T, class U, typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> > lager::detail::with_expr_base<lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> > >::operator lager::reader<T>() && [with T = int; U = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >; typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> = <missing>]'
test.cpp:20:44:   required from here
/opt/libkazv-deps/include/lager/watch.hpp:24:7: error: no type named 'signal_type' in 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'
   24 | class watchable_base : private NodeT::signal_type::forwarder_type
      |       ^~~~~~~~~~~~~~
/opt/libkazv-deps/include/lager/watch.hpp:28:11: error: no type named 'signal_type' in 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'
   28 |     using base_t       = typename NodeT::signal_type::forwarder_type;
      |           ^~~~~~
/opt/libkazv-deps/include/lager/watch.hpp:32:31: error: no type named 'signal_type' in 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'
   32 |     std::vector<connection_t> conns_;
      |                               ^~~~~~
test.cpp: In function 'int main()':
test.cpp:20:33: error: conversion from 'lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >' to non-scalar type 'lager::reader<int>' requested
   20 |   lager::reader<int> sa1 = s.map(&Foo::getA);
      |                            ~~~~~^~~~~~~~~~~~
In file included from /opt/libkazv-deps/include/lager/reader.hpp:16:
/opt/libkazv-deps/include/lager/detail/nodes.hpp: In instantiation of 'std::shared_ptr<_Tp> lager::detail::link_to_parents(std::shared_ptr<_Tp>) [with Node = xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<state_node<Foo, lager::transactional_tag> >, reader_node>]':
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:151:27:   required from 'auto lager::detail::make_xform_reader_node(Xform&&, std::tuple<std::shared_ptr<Parents>...>) [with Xform = zug::composed<zug::map_t<const int& (Foo::*)() const> >; Parents = {state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:290:38:   required from 'auto lager::detail::with_xform_expr<Xform, Nodes>::make_reader_node_() && [with Xform = zug::composed<zug::map_t<const int& (Foo::*)() const> >; Nodes = {lager::detail::state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:224:75:   required from 'auto lager::detail::with_expr_base<Deriv>::make_node_() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:207:45:   required from 'auto lager::detail::with_expr_base<Deriv>::make() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:182:23:   required by substitution of 'template<class T, class U, typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> > lager::detail::with_expr_base<lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> > >::operator lager::reader<T>() && [with T = int; U = lager::detail::with_xform_expr<zug::composed<zug::map_t<const int& (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >; typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> = <missing>]'
test.cpp:20:44:   required from here
/opt/libkazv-deps/include/lager/detail/nodes.hpp:320:69: error: 'using std::__shared_ptr_access<lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>, __gnu_cxx::_S_atomic, false, false>::element_type = class lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>' {aka 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<const int& (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'} has no member named 'parents'
  320 |     std::apply([&](auto&&... ps) { noop((ps->link(n), 0)...); }, n->parents());
      |                                                                  ~~~^~~~~~~

If I uncomment sa2, I get:

# x86_64-w64-mingw32-g++ -I/opt/libkazv-deps/include/ test.cpp 
In file included from /opt/libkazv-deps/include/lager/with.hpp:22,
                 from /opt/libkazv-deps/include/lager/reader.hpp:20,
                 from test.cpp:1:
/opt/libkazv-deps/include/zug/transducer/map.hpp: In instantiation of 'zug::map_t<int (Foo::*)() const>::operator()<const zug::last_t&>(const zug::last_t&) const::<lambda(auto:64&&, auto:65&& ...)> mutable [with auto:64 = zug::meta::bottom; auto:65 = {Foo}]':
/opt/libkazv-deps/include/zug/meta.hpp:65:14:   required from 'struct zug::result_of<zug::composed<zug::map_t<int (Foo::*)() const> >, Foo>'
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:74:7:   required from 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:151:27:   required from 'auto lager::detail::make_xform_reader_node(Xform&&, std::tuple<std::shared_ptr<Parents>...>) [with Xform = zug::composed<zug::map_t<int (Foo::*)() const> >; Parents = {state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:290:38:   required from 'auto lager::detail::with_xform_expr<Xform, Nodes>::make_reader_node_() && [with Xform = zug::composed<zug::map_t<int (Foo::*)() const> >; Nodes = {lager::detail::state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:224:75:   required from 'auto lager::detail::with_expr_base<Deriv>::make_node_() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:207:45:   required from 'auto lager::detail::with_expr_base<Deriv>::make() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:182:23:   required by substitution of 'template<class T, class U, typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> > lager::detail::with_expr_base<lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> > >::operator lager::reader<T>() && [with T = int; U = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >; typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> = <missing>]'
test.cpp:21:47:   required from here
/opt/libkazv-deps/include/zug/transducer/map.hpp:23:24: error: no match for call to '(const zug::last_t) (zug::meta::bottom, int (Foo::)() const)'
   23 |             return step(ZUG_FWD(s), compat::invoke(mapping, ZUG_FWD(is)...));
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/libkazv-deps/include/zug/meta.hpp:12,
                 from /opt/libkazv-deps/include/lager/detail/lens_nodes.hpp:19,
                 from /opt/libkazv-deps/include/lager/with.hpp:15:
/opt/libkazv-deps/include/zug/reducing/last.hpp:19:20: note: candidate: 'template<class StateT, class ... InputTs> decltype(auto) zug::last_t::operator()(StateT&&, InputTs&& ...) const'
   19 |     decltype(auto) operator()(StateT&&, InputTs&&... ins) const
      |                    ^~~~~~~~
/opt/libkazv-deps/include/zug/reducing/last.hpp:19:20: note:   template argument deduction/substitution failed:
/opt/libkazv-deps/include/zug/transducer/map.hpp:23:24: note:   member function type 'int (Foo::)() const' is not a valid template argument
   23 |             return step(ZUG_FWD(s), compat::invoke(mapping, ZUG_FWD(is)...));
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/libkazv-deps/include/lager/with.hpp:17:
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp: In instantiation of 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>':
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:151:27:   required from 'auto lager::detail::make_xform_reader_node(Xform&&, std::tuple<std::shared_ptr<Parents>...>) [with Xform = zug::composed<zug::map_t<int (Foo::*)() const> >; Parents = {state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:290:38:   required from 'auto lager::detail::with_xform_expr<Xform, Nodes>::make_reader_node_() && [with Xform = zug::composed<zug::map_t<int (Foo::*)() const> >; Nodes = {lager::detail::state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:224:75:   required from 'auto lager::detail::with_expr_base<Deriv>::make_node_() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:207:45:   required from 'auto lager::detail::with_expr_base<Deriv>::make() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:182:23:   required by substitution of 'template<class T, class U, typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> > lager::detail::with_expr_base<lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> > >::operator lager::reader<T>() && [with T = int; U = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >; typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> = <missing>]'
test.cpp:21:47:   required from here
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:98:10: error: 'void lager::detail::xform_reader_node<Xform, zug::meta::pack<Ts2 ...>, Base>::recompute() [with Xform = zug::composed<zug::map_t<int (Foo::*)() const> >; Parents = {lager::detail::state_node<Foo, lager::transactional_tag>}; Base = lager::detail::reader_node]' marked 'final', but is not virtual
   98 |     void recompute() final
      |          ^~~~~~~~~
In file included from /opt/libkazv-deps/include/lager/reader.hpp:19:
/opt/libkazv-deps/include/lager/watch.hpp: In instantiation of 'class lager::watchable_base<lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node> >':
/opt/libkazv-deps/include/lager/reader.hpp:83:7:   required from 'class lager::reader_base<lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node> >'
/opt/libkazv-deps/include/lager/with.hpp:210:29:   required from 'auto lager::detail::with_expr_base<Deriv>::make() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:182:23:   required by substitution of 'template<class T, class U, typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> > lager::detail::with_expr_base<lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> > >::operator lager::reader<T>() && [with T = int; U = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >; typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> = <missing>]'
test.cpp:21:47:   required from here
/opt/libkazv-deps/include/lager/watch.hpp:24:7: error: no type named 'signal_type' in 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'
   24 | class watchable_base : private NodeT::signal_type::forwarder_type
      |       ^~~~~~~~~~~~~~
/opt/libkazv-deps/include/lager/watch.hpp:28:11: error: no type named 'signal_type' in 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'
   28 |     using base_t       = typename NodeT::signal_type::forwarder_type;
      |           ^~~~~~
/opt/libkazv-deps/include/lager/watch.hpp:32:31: error: no type named 'signal_type' in 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'
   32 |     std::vector<connection_t> conns_;
      |                               ^~~~~~
test.cpp: In function 'int main()':
test.cpp:21:33: error: conversion from 'lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >' to non-scalar type 'lager::reader<int>' requested
   21 |   lager::reader<int> sa2 = s.map(&Foo::getAVal);
      |                            ~~~~~^~~~~~~~~~~~~~~
In file included from /opt/libkazv-deps/include/lager/reader.hpp:16:
/opt/libkazv-deps/include/lager/detail/nodes.hpp: In instantiation of 'std::shared_ptr<_Tp> lager::detail::link_to_parents(std::shared_ptr<_Tp>) [with Node = xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<state_node<Foo, lager::transactional_tag> >, reader_node>]':
/opt/libkazv-deps/include/lager/detail/xform_nodes.hpp:151:27:   required from 'auto lager::detail::make_xform_reader_node(Xform&&, std::tuple<std::shared_ptr<Parents>...>) [with Xform = zug::composed<zug::map_t<int (Foo::*)() const> >; Parents = {state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:290:38:   required from 'auto lager::detail::with_xform_expr<Xform, Nodes>::make_reader_node_() && [with Xform = zug::composed<zug::map_t<int (Foo::*)() const> >; Nodes = {lager::detail::state_node<Foo, lager::transactional_tag>}]'
/opt/libkazv-deps/include/lager/with.hpp:224:75:   required from 'auto lager::detail::with_expr_base<Deriv>::make_node_() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:207:45:   required from 'auto lager::detail::with_expr_base<Deriv>::make() && [with Deriv = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >]'
/opt/libkazv-deps/include/lager/with.hpp:182:23:   required by substitution of 'template<class T, class U, typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> > lager::detail::with_expr_base<lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> > >::operator lager::reader<T>() && [with T = int; U = lager::detail::with_xform_expr<zug::composed<zug::map_t<int (Foo::*)() const> >, lager::detail::state_node<Foo, lager::transactional_tag> >; typename std::enable_if<is_same_v<typename decltype (declval<U>().make())::value_type, T>, int>::type <anonymous> = <missing>]'
test.cpp:21:47:   required from here
/opt/libkazv-deps/include/lager/detail/nodes.hpp:320:69: error: 'using std::__shared_ptr_access<lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>, __gnu_cxx::_S_atomic, false, false>::element_type = class lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>' {aka 'class lager::detail::xform_reader_node<zug::composed<zug::map_t<int (Foo::*)() const> >, zug::meta::pack<lager::detail::state_node<Foo, lager::transactional_tag> >, lager::detail::reader_node>'} has no member named 'parents'
  320 |     std::apply([&](auto&&... ps) { noop((ps->link(n), 0)...); }, n->parents());
      |                                                                  ~~~^~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant