Skip to content

missing functional header in Configuration.h #1

@pi3076021fdt

Description

@pi3076021fdt

Using GCC 7.1 the following errors were thrown
n file included from /home/build/temp/TeeTime-Cpp/src/Configuration.cpp:16:0: /home/build/temp/TeeTime-Cpp/src/../include/teetime/Configuration.h:146:90: error: ‘std::function’ has not been declared static shared_ptr<FunctionObjectStage<TIn, TOut>> createStageFromFunctionObject(std::function<TOut(TIn)> f, const char* name = "function_object") ^~~~~~~~ /home/build/temp/TeeTime-Cpp/src/../include/teetime/Configuration.h:146:98: error: expected ‘,’ or ‘...’ before ‘<’ token static shared_ptr<FunctionObjectStage<TIn, TOut>> createStageFromFunctionObject(std::function<TOut(TIn)> f, const char* name = "function_object") ^ /home/build/temp/TeeTime-Cpp/src/../include/teetime/Configuration.h: In static member function ‘static std::shared_ptr<teetime::FunctionObjectStage<TIn, TOut> > teetime::Configuration::createStageFromFunctionObject(int)’: /home/build/temp/TeeTime-Cpp/src/../include/teetime/Configuration.h:148:58: error: ‘f’ was not declared in this scope return createStage<FunctionObjectStage<TIn, TOut>>(f, name); ^ /home/build/temp/TeeTime-Cpp/src/../include/teetime/Configuration.h:148:61: error: ‘name’ was not declared in this scope return createStage<FunctionObjectStage<TIn, TOut>>(f, name); ^~~~
Upon inspection of Configuration.h, it is clear that functional is missing. I searched through the implicitly included header and couldn't find functional. I added #include <functional> to Configuration.h and compilation succeeded.. It strange, because my VS2017 compiles fine without the functional header. I some sort of implicit include occurs in VS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions