The file Listener.hpp uses std::runtime_error without including the proper header for it, stdexcept, as described in runtime_error's manual. This results in a compilation error in Visual Studio 2019. This pull request fixes that.
Compilation log before the change:
1>------ Build started: Project: EventBus, Configuration: Debug x64 ------
1>EventBus.cpp
1>PassPerk.cpp
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(72,28): error C2760: syntax error: unexpected token '{', expected 'expression'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(72,28): message : This diagnostic occurred in the compiler generated function 'void dexode::eventbus::Listener<Bus>::listenToCallback(std::function<void(const Event &)> &&)'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(136): message : see reference to class template instantiation 'dexode::eventbus::Listener<Bus>' being compiled
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(85,28): error C2760: syntax error: unexpected token '{', expected 'expression'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(85,28): message : This diagnostic occurred in the compiler generated function 'void dexode::eventbus::Listener<Bus>::listenToCallback(const std::function<void(const Event &)> &)'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(95,28): error C2760: syntax error: unexpected token '{', expected 'expression'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(106,28): error C2760: syntax error: unexpected token '{', expected 'expression'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(106,28): message : This diagnostic occurred in the compiler generated function 'void dexode::eventbus::Listener<Bus>::unlisten(void)'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(116,15): error C2039: 'runtime_error': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\functional(28): message : see declaration of 'std'
1>PerkEventBus.cpp
1>TagPerk.cpp
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(72,28): error C2760: syntax error: unexpected token '{', expected 'expression'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(72,28): message : This diagnostic occurred in the compiler generated function 'void dexode::eventbus::Listener<Bus>::listenToCallback(std::function<void(const Event &)> &&)'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(136): message : see reference to class template instantiation 'dexode::eventbus::Listener<Bus>' being compiled
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(85,28): error C2760: syntax error: unexpected token '{', expected 'expression'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(85,28): message : This diagnostic occurred in the compiler generated function 'void dexode::eventbus::Listener<Bus>::listenToCallback(const std::function<void(const Event &)> &)'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(95,28): error C2760: syntax error: unexpected token '{', expected 'expression'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(106,28): error C2760: syntax error: unexpected token '{', expected 'expression'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(106,28): message : This diagnostic occurred in the compiler generated function 'void dexode::eventbus::Listener<Bus>::unlisten(void)'
1>E:\sources\pcsx\pcsx-redux\third_party\EventBus\lib\src\dexode\eventbus\Listener.hpp(116,15): error C2039: 'runtime_error': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\atomic(134): message : see declaration of 'std'
1>Generating Code...
1>Done building project "EventBus.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The file
Listener.hpp
usesstd::runtime_error
without including the proper header for it,stdexcept
, as described in runtime_error's manual. This results in a compilation error in Visual Studio 2019. This pull request fixes that.Compilation log before the change: