Project

General

Profile

Bug #1861

Chare constructors cannot take noncopyable types as arguments

Added by Sam White 10 days ago. Updated 3 days ago.

Status:
Merged
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
04/13/2018
Due date:
% Done:

0%

Tags:

Description

Currently chare constructors take their arguments by const l-value reference, which prohibits passing non-copyable types to them. Instead they should take their arguments by value and std::move internally, to allow users to std::move the arguments.

Spectre currently has to work around this by editing our generated headers. They do so here:

spectre/cmake/SetupCharmModuleFunctions.cmake (line 33) does the modification.

build/src/Parallel/ConstGlobalCache.def.h is the generated and edited file.

This same file contains other uses of std::move on types after they are deserialized for efficiency, that we should also take into mainline charm.

This file also contains more uses of std::move similarly: build/src/Parallel/Algorithms/ArrayAlgorithm.def.h

History

#1 Updated by Sam White 10 days ago

  • Tags set to #spectre

#2 Updated by Evan Ramos 10 days ago

Wouldn't taking them by value defeat the purpose of std::move?

#3 Updated by Evan Ramos 4 days ago

  • Assignee set to Evan Ramos

#4 Updated by Evan Ramos 3 days ago

  • Assignee changed from Evan Ramos to Phil Miller
  • Status changed from New to Merged

Also available in: Atom PDF