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

default arguments cannot be added to a function template that has already been declared #2

Open
ryandesign opened this issue Oct 20, 2016 · 3 comments

Comments

@ryandesign
Copy link

iulib cannot be compiled on OS X 10.11 El Capitan using clang. The error is:

g++ -o imglib/imgops.os -c -g -fPIC -fPIC -I. -Icolib -Iimglib -Iimgio -Iimgbits -Iutils -Icomponents -Ividio -I/opt/local/include imglib/imgops.cc
In file included from imglib/imgops.cc:35:
In file included from ./colib/colib.h:37:
colib/env.h:36:17: warning: using directive refers to implicitly-defined namespace 'std'
using namespace std;
                ^
imglib/imgops.cc:136:15: error: default arguments cannot be added to a function template that has already been declared
            V scale=1,int dx=0,int dy=0) {
              ^     ~
imglib/imgops.h:70:10: note: previous template declaration is here
    void addscaled(colib::narray<T> &, colib::narray<T> &, V, int, int);
         ^
imglib/imgops.cc:136:27: error: default arguments cannot be added to a function template that has already been declared
            V scale=1,int dx=0,int dy=0) {
                          ^  ~
imglib/imgops.h:70:10: note: previous template declaration is here
    void addscaled(colib::narray<T> &, colib::narray<T> &, V, int, int);
         ^
imglib/imgops.cc:136:36: error: default arguments cannot be added to a function template that has already been declared
            V scale=1,int dx=0,int dy=0) {
                                   ^  ~
imglib/imgops.h:70:10: note: previous template declaration is here
    void addscaled(colib::narray<T> &, colib::narray<T> &, V, int, int);
         ^
1 warning and 3 errors generated.
scons: *** [imglib/imgops.os] Error 1
scons: building terminated because of errors.

This was reported to the MacPorts project in 2014:

https://trac.macports.org/ticket/42353

And reported to iulib on Google Code:

https://code.google.com/p/iulib/issues/detail?id=45

But then the project moved to GitHub and the Google Code issues do not appear to have been preserved, so I am reporting it here again.

@andydude
Copy link

I am also experiencing the same issue with MacPorts "sudo port install iulib"

@ryandesign
Copy link
Author

I guess this project is dead. Oh well.

@ryandesign
Copy link
Author

#4 fixes this.

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

2 participants