Skip to content

Commit 0cfb3d1

Browse files
Merge pull request #1085 from Geode-solutions/fix/allow-copy-mapping
fix(Mapping): allow to copy Mappings
2 parents 3709873 + 46e9e9f commit 0cfb3d1

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

include/geode/basic/mapping.hpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ namespace geode
3636
class StorageType >
3737
class MappingBase
3838
{
39-
OPENGEODE_DISABLE_COPY( MappingBase );
40-
4139
public:
4240
template < typename T >
4341
using Storage = typename StorageType< T >::Type;
@@ -88,8 +86,10 @@ namespace geode
8886

8987
protected:
9088
MappingBase() = default;
91-
MappingBase( MappingBase&& other ) = default;
92-
MappingBase& operator=( MappingBase&& other ) = default;
89+
MappingBase( MappingBase& ) = default;
90+
MappingBase& operator=( MappingBase& ) = default;
91+
MappingBase( MappingBase&& ) noexcept = default;
92+
MappingBase& operator=( MappingBase&& ) noexcept = default;
9393

9494
[[nodiscard]] index_t size_input() const
9595
{
@@ -127,8 +127,10 @@ namespace geode
127127
{
128128
public:
129129
BijectiveMapping() = default;
130-
BijectiveMapping( BijectiveMapping&& other ) = default;
131-
BijectiveMapping& operator=( BijectiveMapping&& other ) = default;
130+
BijectiveMapping( BijectiveMapping& ) = default;
131+
BijectiveMapping& operator=( BijectiveMapping& ) = default;
132+
BijectiveMapping( BijectiveMapping&& ) noexcept = default;
133+
BijectiveMapping& operator=( BijectiveMapping&& ) noexcept = default;
132134

133135
void map( const T1& in, const T2& out )
134136
{
@@ -189,8 +191,10 @@ namespace geode
189191
{
190192
public:
191193
GenericMapping() = default;
192-
GenericMapping( GenericMapping&& other ) = default;
193-
GenericMapping& operator=( GenericMapping&& other ) = default;
194+
GenericMapping( GenericMapping& ) = default;
195+
GenericMapping& operator=( GenericMapping& ) = default;
196+
GenericMapping( GenericMapping&& ) noexcept = default;
197+
GenericMapping& operator=( GenericMapping&& ) noexcept = default;
194198

195199
void map( const T1& in, const T2& out )
196200
{

0 commit comments

Comments
 (0)