progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.63k stars 2.21k forks source link

Make Failed when include ThreadPool.h #77

Closed mzss0 closed 4 years ago

mzss0 commented 4 years ago

make: Warning: File `Makefile' has modification time 708 s in the future g++ -std=c++11 -g -Dmacro -c -o main.o main.cpp In file included from main.cpp:15:0: ThreadPool.h:19:57: error: macro "F" requires 3 arguments, but only 1 given -> std::future<typename std::result_of<F(Args...)>::type>; ^ ThreadPool.h:64:53: error: macro "F" requires 3 arguments, but only 1 given -> std::future<typename std::result_of<F(Args...)>::type> ^ ThreadPool.h:66:58: error: macro "F" requires 3 arguments, but only 1 given using return_type = typename std::result_of<F(Args...)>::type;

wilx commented 4 years ago

There is no F macro in the ThreadPool.h header. Your compiler or your application is defining the F macro and that breaks things.

mzss0 commented 4 years ago

There is no F macro in the ThreadPool.h header. Your compiler or your application is defining the F macro and that breaks things.

How can I fix it? I just include this file to my main func; this is my Make file CXX = g++ CXXFLAGS = -std=c++11 -g CPPS = $(wildcard vad_stdaln/.cpp) $(wildcard ./.cpp) OBJS = $(patsubst %.cpp,%.o,$(CPPS))

%.o: %.cpp $(CXX) $(CXXFLAGS) $(INCLUDE) -c -o $@ $<

.........................

mzss0 commented 4 years ago

There is no F macro in the ThreadPool.h header. Your compiler or your application is defining the F macro and that breaks things. oh...i change f to other lable...I fix it ..thx

mzss0 commented 4 years ago

There is no F macro in the ThreadPool.h header. Your compiler or your application is defining the F macro and that breaks things. u nice gay May the virus stay away from you