Add default template parameter to array accessor

This commit is contained in:
Serge Lamikhov-Center 2021-08-14 16:09:51 +03:00
parent 95eec4f592
commit 7dcfe3d86d
2 changed files with 3 additions and 3 deletions

View File

@ -77,9 +77,9 @@ template <class S, typename T> class array_section_accessor_template
S* array_section;
};
template <typename T>
template <typename T = Elf32_Word>
using array_section_accessor = array_section_accessor_template<section, T>;
template <typename T>
template <typename T = Elf32_Word>
using const_array_section_accessor =
array_section_accessor_template<const section, T>;

View File

@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE( array_read_32 )
section* array_sec = reader.sections[".ctors"];
BOOST_REQUIRE_NE( array_sec, nullptr );
const_array_section_accessor<Elf32_Addr> array( reader, array_sec );
const_array_section_accessor<> array( reader, array_sec );
BOOST_REQUIRE_EQUAL( array.get_entries_num(), (Elf_Xword)2 );
Elf64_Addr addr;
BOOST_CHECK_EQUAL( array.get_entry( 0, addr ), true );