Skip to content

Commit aa1894f

Browse files
committed
fix(Mapping): allow to copy Mappings
1 parent 3709873 commit aa1894f

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

include/geode/basic/mapping.hpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@ namespace geode
3232
{
3333
template < typename T1,
3434
typename T2,
35-
template < typename >
36-
class StorageType >
35+
template < typename > class StorageType >
3736
class MappingBase
3837
{
39-
OPENGEODE_DISABLE_COPY( MappingBase );
40-
4138
public:
4239
template < typename T >
4340
using Storage = typename StorageType< T >::Type;
@@ -88,8 +85,10 @@ namespace geode
8885

8986
protected:
9087
MappingBase() = default;
91-
MappingBase( MappingBase&& other ) = default;
92-
MappingBase& operator=( MappingBase&& other ) = default;
88+
MappingBase( MappingBase& ) = default;
89+
MappingBase& operator=( MappingBase& ) = default;
90+
MappingBase( MappingBase&& ) noexcept = default;
91+
MappingBase& operator=( MappingBase&& ) noexcept = default;
9392

9493
[[nodiscard]] index_t size_input() const
9594
{
@@ -127,8 +126,10 @@ namespace geode
127126
{
128127
public:
129128
BijectiveMapping() = default;
130-
BijectiveMapping( BijectiveMapping&& other ) = default;
131-
BijectiveMapping& operator=( BijectiveMapping&& other ) = default;
129+
BijectiveMapping( BijectiveMapping& ) = default;
130+
BijectiveMapping& operator=( BijectiveMapping& ) = default;
131+
BijectiveMapping( BijectiveMapping&& ) noexcept = default;
132+
BijectiveMapping& operator=( BijectiveMapping&& ) noexcept = default;
132133

133134
void map( const T1& in, const T2& out )
134135
{
@@ -189,8 +190,10 @@ namespace geode
189190
{
190191
public:
191192
GenericMapping() = default;
192-
GenericMapping( GenericMapping&& other ) = default;
193-
GenericMapping& operator=( GenericMapping&& other ) = default;
193+
GenericMapping( GenericMapping& ) = default;
194+
GenericMapping& operator=( GenericMapping& ) = default;
195+
GenericMapping( GenericMapping&& ) noexcept = default;
196+
GenericMapping& operator=( GenericMapping&& ) noexcept = default;
194197

195198
void map( const T1& in, const T2& out )
196199
{

0 commit comments

Comments
 (0)