Skip to content

Commit

Permalink
cpp: Move VM construction implementation out of class definition
Browse files Browse the repository at this point in the history
This workarounds a bug in doxygen which incorrectly parses the implementation with for range loop.
  • Loading branch information
chfast committed Sep 19, 2019
1 parent a9b1c65 commit 57082ec
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions include/evmc/evmc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,8 @@ class VM

/// The constructor that captures a VM instance and configures the instance
/// with provided list of options.
VM(evmc_instance* instance, std::initializer_list<std::pair<const char*, const char*>> options)
noexcept : m_instance{instance}
{
for (auto option : options)
set_option(option.first, option.second);
}
inline VM(evmc_instance* instance,
std::initializer_list<std::pair<const char*, const char*>> options) noexcept;

/// Checks if contains a valid pointer to the VM instance.
explicit operator bool() const noexcept { return m_instance != nullptr; }
Expand Down Expand Up @@ -415,6 +411,15 @@ class VM
evmc_instance* m_instance = nullptr;
};

inline VM::VM(evmc_instance* instance,
std::initializer_list<std::pair<const char*, const char*>> options) noexcept
: m_instance{instance}
{
for (const auto& option : options)
set_option(option.first, option.second);
}


/// The EVMC Host interface
class HostInterface
{
Expand Down

0 comments on commit 57082ec

Please sign in to comment.