DARMA-tasking-internal / darma-frontend

Header library providing the frontend programming model for the DARMA asynchronous many-task model
Other
7 stars 0 forks source link

std::string in create_concurrent_work #8

Closed jjwilke closed 7 years ago

jjwilke commented 7 years ago

strings passed to ccw either as string literal or std::string lvalue do not compile

struct work {
  void operator()(
    Index1D<int> index,
    std::string name,
    AccessHandleCollection<int, Range1D<int>> c1){
    std::cout << "got index " << index.value << std::endl;
  }
};

  std::string msg = "you broke me";
  auto ahc = initial_access_collection<int>(index_range=Range1D<int>(size));
  create_concurrent_work<work>(msg, ahc, index_range=Range1D<int>(size));
/Users/jjwilke/Programs/install/darma/threads/cmake/../include/darma/impl/serialization/tuple.h:167:71: error: 
      no matching member function for call to 'unpack'
          typename std::decay_t<decltype(item_ser_get)>::serializer().unpack(
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/jjwilke/Programs/install/darma/threads/cmake/../include/darma/impl/meta/splat_tuple.h:63:12: note: 
dhollman commented 7 years ago

I think this must have gotten fixed in a drive-by; perhaps in d0c9f0d27ad0de5ae1c57e9754b2682e814ef81c but could have been substantially earlier than that. Either way, it's fixed now and there's an explicit test for it in test_task_collection.cc