Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error when combining headers #20

Open
pcaspers opened this issue Nov 9, 2018 · 0 comments
Open

compile error when combining headers #20

pcaspers opened this issue Nov 9, 2018 · 0 comments

Comments

@pcaspers
Copy link

pcaspers commented Nov 9, 2018

I am using 1_66. I have two header files in two different libraries which work fine on their own, but when including both headers at once I get a compile error (with clang and msvc). A small example is given by the following code

test.cpp:

// first header file

#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/weighted_kurtosis.hpp>

/* ... */

typedef boost::accumulators::accumulator_set<
    double, boost::accumulators::stats<boost::accumulators::tag::weighted_kurtosis>, double>
    accumulator_set;
accumulator_set acc_;

/* ... */

// second header file

#include <boost/accumulators/statistics.hpp>

/* ... */

Compiling this code with clang++ -c test.cpp yields

In file included from test.cpp:18:
In file included from /usr/local/include/boost/accumulators/statistics.hpp:19:
/usr/local/include/boost/accumulators/statistics/kurtosis.hpp:105:8: error: explicit specialization of 'boost::accumulators::feature_of<boost::accumulators::tag::weighted_kurtosis>' after instantiation
struct feature_of<tag::weighted_kurtosis>
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/accumulators/framework/depends_on.hpp:284:30: note: implicit instantiation first required here
                    typename feature_of<feature_type>::type
                             ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant