Skip to content

Commit

Permalink
thread: MSVC doesn't allow __builtin_assume_aligned() in constexpr …
Browse files Browse the repository at this point in the history
…functions
  • Loading branch information
lhmouse committed Jan 18, 2024
1 parent 2429a07 commit e14fe33
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mcfgthread/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,15 @@ _MCF_thread_new(_MCF_thread_procedure* __proc, const void* __data_opt, size_t __
return _MCF_thread_new_aligned(__proc, 0, __data_opt, __size);
}

__MCF_THREAD_INLINE __MCF_CXX11(constexpr)
__MCF_THREAD_INLINE
__MCF_CXX(const) void*
_MCF_thread_get_data(const _MCF_thread* __thrd) __MCF_NOEXCEPT
{
return __builtin_assume_aligned(__thrd->__data_opt, __MCF_THREAD_DATA_ALIGNMENT);
}

#ifdef __cplusplus
extern "C++"
inline __MCF_CXX11(constexpr)
extern "C++" inline
void*
_MCF_thread_get_data(_MCF_thread* __thrd) __MCF_NOEXCEPT
{
Expand Down

0 comments on commit e14fe33

Please sign in to comment.