Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
Capital-Asterisk committed Sep 24, 2023
1 parent e0f88df commit 898dcc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/osp/core/copymove_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
*/
#pragma once

//#define OSP_AUX_MOVECOPY_CTOR(type, copy_is, move_is, move_constexpr, copy_constexpr, opt_noexcept) \
// copy_constexpr type(type const& copy) opt_noexcept = copy_is; \
// move_constexpr type(type&& move) opt_noexcept = move_is;

//#define OSP_AUX_MOVECOPY_ASGN(type, copy_is, move_is, move_constexpr, copy_constexpr, opt_noexcept) \
// copy_constexpr type& operator=(type const& copy) opt_noexcept = copy_is; \
// move_constexpr type& operator=(type&& move) opt_noexcept = move_is;

#define OSP_MOVE_COPY_CTOR_ASSIGN(type) \
Type (Type const& copy) = default; \
Type (Type&& move) = default; \
Expand Down
8 changes: 8 additions & 0 deletions src/osp/core/strong_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,17 @@ struct StrongId
using entity_type = INT_T; // Name used for entt compatibility

constexpr StrongId() noexcept = default;

// MSVC errors if this is explicit because lol what?
#ifdef _MSC_VER
constexpr StrongId(INT_T const value) noexcept
: m_value{value}
{ };
#else
constexpr explicit StrongId(INT_T const value) noexcept
: m_value{value}
{ };
#endif

OSP_MOVE_COPY_CTOR_ASSIGN_CONSTEXPR_NOEXCEPT(StrongId);

Expand Down

0 comments on commit 898dcc8

Please sign in to comment.