Fixed ambiguous function call for clang

This commit is contained in:
John Wellbelove 2021-06-14 13:11:03 +01:00
parent fb54f23e5d
commit e4e61cfe69
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
name: clang
on:
push:
branches: [ master ]
branches: [ master, feature/mem_cast ]
pull_request:
branches: [ master ]

View File

@ -529,7 +529,9 @@ namespace etl
//***********************************
ETL_NODISCARD size_t alignment() const
{
const uintptr_t p = reinterpret_cast<uintptr_t>(pbuffer);
typedef typename etl::smallest_uint_for_bits<sizeof(uintptr_t)* CHAR_BIT>::type type;
const uintptr_t p = reinterpret_cast<type>(pbuffer);
return 1U << etl::count_trailing_zeros(p);
}