Overloaded Function Call is Ambiguous
Polytonic opened this issue · comments
Polytonic commented
g++
(4.8
/4.9
) takes issue with the overloaded Worker::execute(...)
variadic template function. This does not occur under clang++
(3.4
).
g++-4.9 -O3 -std=c++11 -Wall -Wextra -Wpedantic -Iheaders sources/chlorine.cpp -o chlorine -framework OpenCL
sources/chlorine.cpp: In function 'int main()':
sources/chlorine.cpp:12:44: error: call of overloaded 'execute(const char [4], std::vector<int>&, std::valarray<float>&, int)' is ambiguous
busybot.execute("add", spam, bacon, 100);
^
sources/chlorine.cpp:12:44: note: candidates are:
In file included from sources/chlorine.cpp:1:0:
headers/chlorine.hpp:129:10: note: void ch::Worker::execute(std::string, T, Params&& ...) [with unsigned int level = 0u; T = std::vector<int>; Params = {std::valarray<float>&, int}; std::string = std::basic_string<char>]
void Worker::execute(std::string kernel_function,
^
headers/chlorine.hpp:152:10: note: void ch::Worker::execute(std::string, std::vector<T>&, Params&& ...) [with unsigned int level = 0u; T = int; Params = {std::valarray<float>&, int}; std::string = std::basic_string<char>]
void Worker::execute(std::string kernel_function,
^
make: *** [chlorine] Error 1