Skip to content

Instantly share code, notes, and snippets.

@eschnett
Created July 5, 2014 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eschnett/3ff4c7a8b86dbb775c6c to your computer and use it in GitHub Desktop.
Save eschnett/3ff4c7a8b86dbb775c6c to your computer and use it in GitHub Desktop.
Failing source code
#include <hpx/hpx.hpp>
#include <hpx/hpx_main.hpp>
#include <boost/serialization/access.hpp>
template <typename T>
class HPX_COMPONENT_EXPORT component
: public hpx::components::managed_component_base<component<T> > {
boost::shared_ptr<T> ptr;
public:
component() {}
component(const boost::shared_ptr<T> &ptr) : ptr(ptr) {}
boost::shared_ptr<T> get() const { return ptr; }
HPX_DEFINE_COMPONENT_CONST_ACTION_TPL(component, get, get_action);
};
struct grid_t {
template <class Archive> void serialize(Archive &ar, unsigned int) {}
grid_t() {}
};
HPX_REGISTER_ACTION_DECLARATION(component<grid_t>::get_action,
grid_t_component_get_action);
HPX_REGISTER_ACTION(component<grid_t>::get_action, grid_t_component_get_action);
int main(int argc, char **argv) { return 0; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment