mirror of
https://github.com/serge1/ELFIO.git
synced 2024-11-02 02:26:47 +00:00
Add default template parameter to array accessor
This commit is contained in:
parent
95eec4f592
commit
7dcfe3d86d
@ -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>;
|
||||
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user