Fails to build it on Ubuntu 17.xx
Created by: rubinliudongpo
I added following contents into CMakeLists.txt: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") add_definitions(-std=c++11)
on issue command 'python setup.py bdist_wheel', we still can see:
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h:32:23: error: ‘function’ in namespace ‘std’ does not name a template type
using task_t = std::function<bool()>;
^~~~~~~~
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h:42:19: error: ‘task_t’ has not been declared
void operator()(task_t&& task, int msec) {
^~~~~~
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h: In lambda function:
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h:48:19: error: ‘task’ cannot be used as a function
if (!task()) break;
^
In file included from /home/dongpo/repo/python/VisualDL/visualdl/utils/concurrency.h:18:0,
from /home/dongpo/repo/python/VisualDL/visualdl/logic/im.h:22,
from /home/dongpo/repo/python/VisualDL/visualdl/logic/im.cc:17:
/home/xxx/repo/python/VisualDL/visualdl/utils/logging.h: In destructor ‘visualdl::logging::LogStreamFatal::~LogStreamFatal()’:
/home/xxx/repo/python/VisualDL/visualdl/utils/logging.h:79:27: warning: throw will always call terminate() [-Wterminate]
throw Error(ss.str());
^
/home/xxx/repo/python/VisualDL/visualdl/utils/logging.h:79:27: note: in C++11 destructors default to noexcept
In file included from /home/dongpo/repo/python/VisualDL/visualdl/logic/im.h:22:0,
from /home/dongpo/repo/python/VisualDL/visualdl/logic/im.cc:17:
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h: At global scope:
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h:32:23: error: ‘function’ in namespace ‘std’ does not name a template type
using task_t = std::function<bool()>;
^~~~~~~~
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h:42:19: error: ‘task_t’ has not been declared
void operator()(task_t&& task, int msec) {
^~~~~~
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h: In lambda function:
/home/xxx/repo/python/VisualDL/visualdl/utils/concurrency.h:48:19: error: ‘task’ cannot be used as a function
if (!task()) break;