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

warning: ‘CLASS’ has a field ‘CLASS::spline_’ whose type uses the anonymous namespace #7

Open
strotz opened this issue Aug 14, 2017 · 3 comments

Comments

@strotz
Copy link

strotz commented Aug 14, 2017

Usage of spline as a member of class creates warning.

#include "spline/spline.h"
class CLASS {
tk::spline spline_;
}

@ttk592
Copy link
Owner

ttk592 commented Feb 22, 2021

Unfortunately, I can't reproduce that warning. The above example as well as examples/tests/myfunc1.cpp compiles for me without any warnings. Let me know if you have another example or which compiler causes this.

@mutluit
Copy link

mutluit commented Aug 5, 2023

I have an older version of spline.h (haven't checked yet the difference to the latest version),
and there I too get such a funny warning (btw, the line numbers below can be different due to additions of dbg code and comments):

$ g++ -O2 -Wall -Wextra -std=c++20 -o spline_demo.exe spline_demo.cpp
In file included from spline_demo.cpp:13:
spline.h:277:6: warning: ‘void {anonymous}::tk::spline::set_boundary({anonymous}::tk::spline::bd_type, double, {anonymous}::tk::spline::bd_type, double, bool)’ defined but not used [-Wunused-function]
277 | void spline::set_boundary(spline::bd_type left, double left_value,
| ^~~~~~

OS is Linux and Compiler is g++ version this below:
$ g++ --version
g++ (Debian 10.2.1-6) 10.2.1 20210110
...

@SprintKeyz
Copy link

I have the same issue, although the code itself compiles fine.

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

4 participants