Compilation error

Hi, what kind of error is this(See below)? My code works, but I received this error which I have never seen before. Can anyone explain what this is and what I should do about this? Thanks.


see reference to function template instantiation 'std::pair<int,int>::pair<size_t,size_t,0>(_Other1 &&,_Other2 &&) noexcept' being compiled
with
[
_Other1=size_t,
_Other2=size_t
]
Last edited on
It's a fragment of an error message.

Any error message should be labelled with "error: " along with the location in the source where the error was detected. You'll need to post the entire error message (or at least the first few lines, if it is very long), and the relevant code.
Last edited on
C:\Users\.....): note: see reference to function template instantiation 'std::pair<int,int>::pair<size_t,size_t,0>(_Other1 &&,_Other2 &&) noexcept' being compiled
with
[
_Other1=size_t,
_Other2=size_t
]
C:\Users\.....: note: while compiling class template member function 'void cs114::RenderingVisitor<T>::visit(cs114::Triangle<T> &)'
with
[
T=`anonymous-namespace'::vector
]


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
namespace cs114
{
	template <typename T>
	class Triangle
	{
	public:
	private:
	};
	template<typename T>
	class RenderVisitors 
	{
	public:
		void visit(Triangle<T>& triangle);

	private:

	};

}

namespace cs114
{
	template<typename T>
	void RenderVisitors<T>::visit(Triangle<T>& triangle)
	{

	}
}

int main()
{
	cs114::RenderVisitors<int> rv;
	cs114::Triangle<int> t;
	rv.visit(t);
}
Your code here compiles fine. It doesn't look like the one that sparked the error. What's with the vector in your error message?
Yes, I am trying to figure that out too. I am having difficulties figuring out why the compiler is saying "anonymous-namespace vector for T".
You still haven't actually posted the error!
Oh, sorry these are not errors. My bad. They are warnings treated as errors.
You still haven't posted the warning!

Also, what compiler are you using?

And is the code you posted above the exact code you are compiling (with nothing missing)?
Last edited on
Topic archived. No new replies allowed.