This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/29131] [DR 225] Bad name lookup for templates due to fundamental types namespace for ADL.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29131

Nikos Platis <nplatis at freemail dot gr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nplatis at freemail dot gr

--- Comment #20 from Nikos Platis <nplatis at freemail dot gr> 2012-04-25 17:33:24 UTC ---
I am having a problem using code similar to the one in comment #5, but using
glm::vec3, from the glm library (http://glm.g-truc.net/), as the type used to
instanciate the template.

Then I get an error message that "âfâ was not declared in this scope, and no
declarations were found by argument-dependent lookup at the point of
instantiation"

glm::vec3 does not seem like a fundamental type.


#include "glm/glm.hpp"

template<class T>
int t(T i)
{
  return f (i);
}

int
f (glm::vec3 i)
{
  return 0;
}

int
main()
{
  glm::vec3 b;
  return t(b);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]