Skip to content

Fix Clang #29

@chrissexton

Description

@chrissexton

When building with Clang 4 on OS X, several errors are generated when trying to build utils.

$ clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix

Output:

In file included from utils/time.cc:5:
utils/../utils/utils.hpp:284:23: error: no member named 'function' in namespace 'std'
double integrate(std::function<double(double)>, double start, double end, double stepsize);
                 ~~~~~^
utils/../utils/utils.hpp:284:45: error: expected '(' for function-style cast or type construction
double integrate(std::function<double(double)>, double start, double end, double stepsize);
                                      ~~~~~~^
utils/../utils/utils.hpp:284:47: error: expected expression
double integrate(std::function<double(double)>, double start, double end, double stepsize);
                                              ^
utils/time.cc:18:20: error: use of undeclared identifier 'CLOCK_PROCESS_CPUTIME_ID'
        if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) < 0)
                          ^
4 errors generated.
make: *** [utils/time.o] Error 1```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions