Merge pull request #144 from rschu1ze/rs/fix-libcxx16

Fix compilation with libcxx 16
This commit is contained in:
Konstantinos Margaritis 2023-03-29 12:55:48 +03:00 committed by GitHub
commit d05491117c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -204,6 +204,15 @@ void RoseProgram::add_block(RoseProgram &&block) {
make_move_iterator(block.prog.end()));
}
template<class Iter>
void RoseProgram::replace(Iter it, std::unique_ptr<RoseInstruction> ri) {
assert(!prog.empty());
const RoseInstruction *old_ptr = it->get();
*it = move(ri);
update_targets(prog.begin(), prog.end(), old_ptr, it->get());
}
bytecode_ptr<char> writeProgram(RoseEngineBlob &blob,
const RoseProgram &program) {
u32 total_len = 0;

View File

@ -124,13 +124,7 @@ public:
* \brief Replace the instruction pointed to by the given iterator.
*/
template<class Iter>
void replace(Iter it, std::unique_ptr<RoseInstruction> ri) {
assert(!prog.empty());
const RoseInstruction *old_ptr = it->get();
*it = move(ri);
update_targets(prog.begin(), prog.end(), old_ptr, it->get());
}
void replace(Iter it, std::unique_ptr<RoseInstruction> ri);
};
bytecode_ptr<char> writeProgram(RoseEngineBlob &blob,