mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
FairMQ: Support Apple Compiler 8.0
In fact, this commit will workaround a bug with template alias compilation from Clang 3.4 to Clang 3.8.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
b63e2ee153
commit
b7d97f6306
@@ -16,7 +16,7 @@ namespace
|
||||
using namespace std;
|
||||
using namespace fair::mq;
|
||||
|
||||
struct TestEvent : fair::mq::Event<std::string> {};
|
||||
struct TestEvent : fair::mq::Event<const std::string&> {};
|
||||
|
||||
TEST(EventManager, Basics)
|
||||
{
|
||||
@@ -26,14 +26,14 @@ TEST(EventManager, Basics)
|
||||
int value = 0;
|
||||
string value2;
|
||||
|
||||
EventManager::Callback<TestEvent, int> callback{
|
||||
[&](TestEvent::KeyType& key, int newValue){
|
||||
std::function<void(typename TestEvent::KeyType, int)> callback{
|
||||
[&](TestEvent::KeyType key, int newValue){
|
||||
++call_counter;
|
||||
if (key == "test") value = newValue;
|
||||
}
|
||||
};
|
||||
EventManager::Callback<TestEvent, string> callback2{
|
||||
[&](TestEvent::KeyType& key, string newValue){
|
||||
std::function<void(typename TestEvent::KeyType, string)> callback2{
|
||||
[&](TestEvent::KeyType key, string newValue){
|
||||
++call_counter2;
|
||||
if (key == "test") value2 = newValue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user