mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-12-15 07:20:17 +00:00
fix: parse errors
```
/test/memory_resources/_memory_resources.cxx: In member function ‘virtual void {anonymous}::MemoryResources_allocator_Test::TestBody()’:
/test/memory_resources/_memory_resources.cxx:104:12: error: parse error in template argument list
104 | config.SetProperty<string>("session", to_string(session));
| ^~~~~~~~~~~~~~~~~~~
/test/memory_resources/_memory_resources.cxx:104:31: error: no matching function for call to ‘fair::mq::ProgOptions::SetProperty<<expression error> >(const char [8], std::string)’
104 | config.SetProperty<string>("session", to_string(session));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dklein/projects/FairMQ2/test/memory_resources/_memory_resources.cxx:11:
/fairmq/ProgOptions.h:269:6: note: candidate: ‘template<class T> void fair::mq::ProgOptions::SetProperty(const std::string&, T)’
269 | void fair::mq::ProgOptions::SetProperty(const std::string& key, T val)
| ^~~~
/fairmq/ProgOptions.h:269:6: note: template argument deduction/substitution failed:
/test/memory_resources/_memory_resources.cxx:104:31: error: template argument 1 is invalid
104 | config.SetProperty<string>("session", to_string(session));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/test/memory_resources/_memory_resources.cxx: In member function ‘virtual void {anonymous}::MemoryResources_getMessage_Test::TestBody()’:
/test/memory_resources/_memory_resources.cxx:132:12: error: parse error in template argument list
132 | config.SetProperty<string>("session", to_string(session));
| ^~~~~~~~~~~~~~~~~~~
/test/memory_resources/_memory_resources.cxx:132:31: error: no matching function for call to ‘fair::mq::ProgOptions::SetProperty<<expression error> >(const char [8], std::string)’
132 | config.SetProperty<string>("session", to_string(session));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/fairmq/ProgOptions.h:269:6: note: candidate: ‘template<class T> void fair::mq::ProgOptions::SetProperty(const std::string&, T)’
269 | void fair::mq::ProgOptions::SetProperty(const std::string& key, T val)
| ^~~~
/fairmq/ProgOptions.h:269:6: note: template argument deduction/substitution failed:
/test/memory_resources/_memory_resources.cxx:132:31: error: template argument 1 is invalid
132 | config.SetProperty<string>("session", to_string(session));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@@ -101,7 +102,7 @@ TEST(MemoryResources, allocator)
|
|||||||
|
|
||||||
size_t session{tools::UuidHash()};
|
size_t session{tools::UuidHash()};
|
||||||
ProgOptions config;
|
ProgOptions config;
|
||||||
config.SetProperty<string>("session", to_string(session));
|
config.SetProperty<std::string>("session", to_string(session));
|
||||||
|
|
||||||
FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config);
|
FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config);
|
||||||
|
|
||||||
@@ -129,7 +130,7 @@ TEST(MemoryResources, getMessage)
|
|||||||
|
|
||||||
size_t session{tools::UuidHash()};
|
size_t session{tools::UuidHash()};
|
||||||
ProgOptions config;
|
ProgOptions config;
|
||||||
config.SetProperty<string>("session", to_string(session));
|
config.SetProperty<std::string>("session", to_string(session));
|
||||||
config.SetProperty<bool>("shm-monitor", true);
|
config.SetProperty<bool>("shm-monitor", true);
|
||||||
|
|
||||||
FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config);
|
FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config);
|
||||||
|
|||||||
Reference in New Issue
Block a user