• Advertisement
Sign in to follow this  

Unknown variable type problems

This topic is 3004 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[Background info] C++ Visual studio 2008 SP1 I'm having a little problem figuring out how to program my scripting engine. I have most of it planned out but the one thing that I just can't figure out is how to program scripted variables. Currently I am using boost::variant and a class to handle the loading and allocating but that leaves me with the problem of an unknown variable type at runtime. The boost::get function requires me to either know the variable type or go through some kind of switch statement. Boost visitors don't help much either since I don't know the type at compile time. It'd be nice to have the VB's variant type in c++, wouldn't it? Any help would be great Thanks, Jake

Share this post


Link to post
Share on other sites
Advertisement
Can you be more specific with where you encounter the problem? Any possibility of posting the applicable code?

There are a few different approaches to handling the concept of variants, but we'd really need more detail on your situation to know what would work best.

Share this post


Link to post
Share on other sites
Of couse, sorry about that.

Here is my variable class. My original goal was to have the Get() method return whatever type the variable is, eg. variable_type Get(). But of course that doesn't really work at all.


#pragma once

#include <windows.h> // Header File For Windows
#include <math.h> // Math Library Header File
#include <stdio.h> // Header File For Standard Input/Output
#include <mmsystem.h>
#include <fstream>
#include <sstream>
#include <cctype>
#include <iomanip>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <iostream>
#include <boost/variant.hpp>
#include "GhostVars.h"

using namespace std;

typedef boost::variant<int, float, bool, string> Variant;

enum VariableType
{
Variable_Int = 0,
Variable_Float,
Variable_Bool,
Variable_String
};

class cVariable
{
public:
cVariable()
{
Name = "";
}

~cVariable()
{

}

public:
bool New(string Text, string Value = "");

__inline string GetName(string *name = NULL) { if (name) *name = Name; return Name; }
__inline Variant &Get() { return Var; }
__inline int GetType() { return Type; }

private:
Variant Var;
Variant OValue;

string Name;

int Type;
};





So the syntax for using this class would be like this...


cVariable V;

// "float i = 1.0" would be a line in a file
V.New("float i = 1.0");

float a = boost::get<float>(V.Get());





Currently, the way of retrieving the data requires me to know the variable type and to handle different types I'd need a switch statement, if, ect.

When passing one of these variables to a function, this becomes realllly difficult when that function has 2 or more types of variables.

I don't know if that can be done with boost::variant or not. All that matters to me is that I can end up with something like...


cVariable V;

V.New("float x = 1.0");

SomeFunc(V.Get())



Share this post


Link to post
Share on other sites
As far as I'm aware, you have to break down and basically implement a switch somewhere; the very fact that you're parsing script text means that you can't know the needed types at compile time. Since C++ is statically typed, it won't let you keep a type undefined until runtime, meaning that somewhere along the line you need to hardcode a mapping that converts some kind of "type ID number" (generally an enum suffices for this) into instances of the correct variable class. Some template magic can help ease the pain, but you'll have to bite the bullet eventually.

You can see my own personally preferred solution in the Epoch language project (download Release 7, open the Fugue solution in the Source folder, select the FugueDLL project, and look in Virtual Machine/Variables/Variable.h and Variable.cpp). (Actually, just use this link to browse around in the relevant code directly on the web.) It's a little bit cumbersome but very flexible and has served me well so far.

[Edited by - ApochPiQ on December 4, 2009 10:48:36 PM]

Share this post


Link to post
Share on other sites
That is quite the project!

Thanks for the link :D. I think I know what I'm going to do now. This damn game keeps getting bigger and bigger lol. Maybe one day... I'll finish it.

Jake

Share this post


Link to post
Share on other sites
I think, with boost::variant, you could easily end up with all the functions being visitors:


cVariable V;

V.New("float x = 1.0");

apply_visitor(SomeFunc(), V.Get())




Where SomeFunc might be something like:


struct SomeFunc: public boost::static_visitor<void>
{
void operator()(float f) const
{
//do something
}


template <class T>
void operator()(const T& t) const
{
//something generic for other types
}
};



I'm afraid, using variant types just can't be too easy.

Share this post


Link to post
Share on other sites
In your example, how does the compiler know the return type of V.Get()? If the return type is already correct (e.g. float), then there is no need for a visitor, as you can just do float foo = V.Get(); and skip the overhead of the template code generation.

Share this post


Link to post
Share on other sites
Quote:
Original post by visitor
I think, with boost::variant, you could easily end up with all the functions being visitors:

*** Source Snippet Removed ***

Where SomeFunc might be something like:

*** Source Snippet Removed ***

I'm afraid, using variant types just can't be too easy.


No they definatly are not. But how would you go about making visitors for member functions like this?


void SetEmitterEx(const float x, const float y, const int size, const float velocity, const float angle, const float angleLow, const float angleHigh, const int direction, const float rlow, const float rhigh, const float life, float xoffset = 0);



Quote:

In your example, how does the compiler know the return type of V.Get()? If the return type is already correct (e.g. float), then there is no need for a visitor, as you can just do float foo = V.Get(); and skip the overhead of the template code generation.


The Get() function returns a boost::variant type.

Share this post


Link to post
Share on other sites
Quote:
Original post by jake_Ghost
The Get() function returns a boost::variant type.



Ah right, of course [smile]

Either way, it doesn't really help much - if you want to have dynamic, run-time-determined types for your variants, you'll have to use some run-time logic to select the correct compile-time code for each type, i.e. the moral equivalent of a switch. Since C++ has no reflection capabilities, there's not much else you can do.

Share this post


Link to post
Share on other sites
So I have again run into a pickle.

How can I use a switch statement to execute something as simple as this even


//Code in Test.txt
void Test()
{
// assuming b, c have values
float a, b;
int c;

a = b + c;
}





Now to run this in c++ assuming I know each variable type it would look like this


//assuming a b c are now variant types
switch (OperatorType)
{
case PLUS:
a = boost::get<float>(b.Get()) + boost::get<int>(c.Get());
break;
}





Since I need my script engine to "mostly" run functions (I am making a space shooter) I don't think this stuff will need to be tooooooo extensive but it would be nice to do a = b + c lolllll. One way to make this simpler would be to assume that the variable types are all the same as "variable a" so I could use some templates. Of course, this makes it very limiting and prevents me from doing things like string str = "Hello player " + PlayerNum + "!"

One other way that I was think would be to do something like this,


// example of variables and functions in class cOperator
class Test
{
public:
Test()
{
a = 0.0f;
b = 1.5f;
c = 1;
}

Variant a, b, c;

template<typename T0, typename T1, typename T2>
void Plus(Variant &Dest, Variant &A, Variant &B)
{
Dest = (T0)boost::get<T1>(A) + (T0)boost::get<T2>(B);
}
};

// to keep things simple ill assume that only int/float are available
enum
{
INT_ONLY,
FLOAT_ONLY,
INT_FLOAT,
FLOAT_INT
}

// cOperator
Execute()
{
// stuff here determining what the scripted code is doing
// now lets use a = b + c again
switch (operator_type)
{
case PLUS:
switch (destination_type)
{
case FLOAT:
switch(variable_types)
{
case FLOAT_INT:
// actual variable names are a = Dest.Get(), b = Var[n].Get(), c = Var[n+1].Get()
Plus<float, float, int>(a, b, c);
break;
}
break;
}
break;
}
}





To me, this seems very hard to implement when i start adding strings and bools and eventually d3d vectors.

How would I go about making that simpler?

Also for the Plus function I was thinking of replacing that with a member function pointer to get rid of at least 1 switch statement. I just need to make sure i can do that with templates.

Jake

Share this post


Link to post
Share on other sites
It seems that maybe I solved my own problem, I know, amazing lol.


class Test
{
public:
Test()
{
a = 0.0f;
b = 1.5f;
c = 1;

// <float, float, int> would change to the appropriate types
Operator = &Test::Plus<float, float, int>;
}

Variant a, b, c;

void (Test::*Operator)(Variant &, Variant &, Variant &);

template<typename T0, typename T1, typename T2>
void Plus(Variant &Dest, Variant &A, Variant &B)
{
Dest = (T0)boost::get<T1>(A) + (T0)boost::get<T2>(B);
}

void Execute()
{
(*this.*Operator)(a, b, c);
}
};




By adding the member function pointer it seems I have found a way to make my life maybe a bit easier. Of course this is a simple example but by changing that one function pointer to an array I can have all the pointers set up and I only need to go through the array and call them all, i think.

What do you think?

Jake

Share this post


Link to post
Share on other sites
This is delving into the depths of C++ omgareyoucrazy, and it took me over an hour to figure out how to get this to compile due to various compilers' lack of support for SFINAE, but what you can do is the following:


#include <string>
#include <boost/variant.hpp>
#include <boost/utility/enable_if.hpp>

using namespace std;
using namespace boost;

typedef variant<int,float,bool,string> Variant;

//is_addable works by SFINAE. sizeof() does not need to actually do anything,
//so an expression like sizeof(T()+U()) is meaningful at compile time if and
//only if operator+ exists. We dont' care about the result, but this causes
//the compiler to infer the type of the expression, from which it can compute
//the size.

//1582 is a magic number, as long as it's unlikely that sizeof(T()+U()) == 1582
//we're good. You can use something else here too.
struct no_type { char data[1582]; };

//Define an operator+ for EVERYTHING that doesn't already have one. It
//returns no_type so we can compare against the size of the real type
template<typename T, typename U> no_type operator+(T, U);

template<typename T, typename U>
struct is_addable { static const bool value = (sizeof(T() + U()) != sizeof(no_type)); };


struct add_values : public boost::static_visitor<Variant>
{
private:
template<class T, class U>
Variant add(const T& t, const U& u,
typename enable_if<is_addable<T,U> >::type* dummy=0) const
{
return Variant(t+u);
}

//The two overloads must have mutually exclusive enablers. So use
//disable_if on the second one to make sure there's no ambiguity.
template<class T, class U>
Variant add(const T& t, const U& u,
typename disable_if<is_addable<T,U> >::type* dummy=0) const
{
throw exception("Types cannot be added");
}

public:
template<typename First, typename Second>
Variant operator()(const First& lhs, const Second& rhs) const
{
return add(lhs, rhs);
}
};



int _tmain(int argc, _TCHAR* argv[])
{
Variant first = (float)4;;
Variant second = (int)7;
Variant third = std::string("hello");

//Works fine
Variant fourth = apply_visitor(add_values(), first, second);

//Throws an exception because string and float cannot be added.
fourth = apply_visitor(add_values(), first, third);
return 0;
}






This compilers under MSVC 9.0.

boost::variant and visitors are very powerful. What we're doing is templatizing the operator() of the visitor, so that it can accept arguments of any type. Let the variant internals deal with how it gets the raw types and passes them to the function, TBQH I don't understand boost::variant either.

But here, what we're doing is having it call the first function if the two types can be added together, and the second function if the two types cannot be added. There are some intricacies in this code.

For example, is_addable is VERY HARD to write depending on your compiler. There are at least 4 ways I can think of to write it according to the C++ standard, but you're getting into the realm of bad compiler support here.


The private add() function is because operator() must take exactly two arguments, and the only way I could get this to work due to MSVC's shoddiness when it comes to SFINAE was if the enabler / disabler was an argument, so I had to add a helper function.

There's a little problem in this code, in that it lets the compiler auto-infer the type of the expression. If this were C++0x there would be a better solution, but for now, if you need to be able to specify the exact type that the result should be, you can add the return type as a template parameter to add_values(), and change the return statement of the add() helper function to


return Variant(static_cast<ReturnType>(t+u));




I realize this stuff can be difficult. If you run into any other problems trying to get visitors / variants to work like you want feel free to post back

Share this post


Link to post
Share on other sites
Amazing...

Makes my method look like a 5th grader wrote it :P.

Thank you very much for the help


#pragma once

#include <windows.h> // Header File For Windows
#include <math.h> // Math Library Header File
#include <stdio.h> // Header File For Standard Input/Output
#include <mmsystem.h>
#include <fstream>
#include <sstream>
#include <cctype>
#include <iomanip>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <boost/variant.hpp>
#include "GhostVars.h"

#define MAX_OPERATOR_SIZE 10

using namespace std;
class cVariable;

typedef boost::variant<int, float, bool, std::string> Variant;

enum OperatorType
{
PLUS = 0,
MINUS,
MULTIPLY,
DIVIDE
};

class cOperator
{
public:
cOperator(void);
~cOperator(void);

bool New(std::string &ID, std::string &Text, cVariable *GlobalVar = NULL, int gSize = 0, cVariable *BlockVar = NULL, int bSize = 0, cVariable *StatementVar = NULL, int sSize = 0);

void Execute();

private:
cVariable * Search(const string &ID, cVariable *V, int Size);

// Math
template<typename T0, typename T1, typename T2> void Plus(Variant &Dest, Variant &A, Variant &B);
template<typename T0, typename T1, typename T2> void Minus(Variant &Dest, Variant &A, Variant &B);
template<typename T0, typename T1, typename T2> void Multiply(Variant &Dest, Variant &A, Variant &B);
template<typename T0, typename T1, typename T2> void Divide(Variant &Dest, Variant &A, Variant &B);

// Operator function pointers
typedef void (cOperator::*tOperator)(Variant &, Variant &, Variant &);

tOperator *Operator;

// Operator variables
cVariable *Dest;

cVariable *Var[MAX_OPERATOR_SIZE];
int VarSize;

int *OperatorType;
int OSize;
};

template<typename T0, typename T1, typename T2> void cOperator :: Plus(Variant &Dest, Variant &A, Variant &B)
{
Dest = (T0)boost::get<T1>(A) + (T0)boost::get<T2>(B);
}

template<typename T0, typename T1, typename T2> void cOperator :: Minus(Variant &Dest, Variant &A, Variant &B)
{
Dest = (T0)boost::get<T1>(A) - (T0)boost::get<T2>(B);
}

template<typename T0, typename T1, typename T2> void cOperator :: Multiply(Variant &Dest, Variant &A, Variant &B)
{
Dest = (T0)boost::get<T1>(A) * (T0)boost::get<T2>(B);
}

template<typename T0, typename T1, typename T2> void cOperator :: Divide(Variant &Dest, Variant &A, Variant &B)
{
Dest = (T0)boost::get<T1>(A) / (T0)boost::get<T2>(B);
}




That's what I had :P. And I had to go through a bunch of ifs to set the function pointer(s) for every combination!

Jake

*EDIT*
So upon compiling im getting some vector errors


1>------ Build started: Project: Quantum Divergence, Configuration: Debug Win32 ------
1>Compiling...
1>cOperator.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(878) : error C2664: 'std::_Vector_iterator<_Ty,_Alloc>::_Vector_iterator(const std::_Vector_iterator<_Ty,_Alloc> &)' : cannot convert parameter 1 from 'no_type' to 'const std::_Vector_iterator<_Ty,_Alloc> &'
1> with
1> [
1> _Ty=IInt,
1> _Alloc=std::allocator<IInt>
1> ]
1> Reason: cannot convert from 'no_type' to 'const std::_Vector_iterator<_Ty,_Alloc>'
1> with
1> [
1> _Ty=IInt,
1> _Alloc=std::allocator<IInt>
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(875) : while compiling class template member function 'std::_Vector_iterator<_Ty,_Alloc> std::vector<_Ty>::insert(std::_Vector_const_iterator<_Ty,_Alloc>,const _Ty &)'
1> with
1> [
1> _Ty=IInt,
1> _Alloc=std::allocator<IInt>
1> ]
1> .\Engine\Script\cOperator.cpp(58) : see reference to class template instantiation 'std::vector<_Ty>' being compiled
1> with
1> [
1> _Ty=IInt
1> ]
1>MainLoop.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(721) : error C2664: 'std::_Vector_iterator<_Ty,_Alloc> std::vector<_Ty>::erase(std::_Vector_const_iterator<_Ty,_Alloc>,std::_Vector_const_iterator<_Ty,_Alloc>)' : cannot convert parameter 1 from 'no_type' to 'std::_Vector_const_iterator<_Ty,_Alloc>'
1> with
1> [
1> _Ty=cParticle,
1> _Alloc=std::allocator<cParticle>
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(717) : while compiling class template member function 'void std::vector<_Ty>::resize(unsigned int,_Ty)'
1> with
1> [
1> _Ty=cParticle
1> ]
1> .\Main\MainLoop.cpp(26) : see reference to class template instantiation 'std::vector<_Ty>' being compiled
1> with
1> [
1> _Ty=cParticle
1> ]
1>Generating Code...
1>Build log was saved at "file://d:\Games\Side Space shooter - Ghost Engine - DirectX\BUILD\Debug\BuildLog.htm"
1>Quantum Divergence - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Share this post


Link to post
Share on other sites
I think my overloaded dummy operator+ is interfering with other external classes. Let me think about it for a bit.

Share this post


Link to post
Share on other sites
How about this?


#include <string>
#include <boost/variant.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/typeof/typeof.hpp>

using namespace std;
using namespace boost;

typedef variant<int,float,bool,string> Variant;

namespace binop_meta_functions { struct no_type { }; }

#define MAKE_BINOP_METAFUNCTIONS(op, binop, traits)
namespace binop_meta_functions {
template<typename T, typename U> no_type operator op (T, U);
template<typename T, typename U>
struct traits
{
typedef BOOST_TYPEOF(T() op U()) type;
};
template<typename T, typename U>
struct binop
{
private:
typedef typename traits<T,U>::type result_type;
public:
static const bool value = !boost::is_same<result_type,no_type>::value;
};
}
template<typename T, typename U>
struct traits
{
typedef typename binop_meta_functions::traits<T,U>::type type;
};
template<typename T, typename U>
struct binop
{
static const bool value = binop_meta_functions::binop<T,U>::value;
};
///END MACRO HERE

MAKE_BINOP_METAFUNCTIONS(+, is_addable, addition_traits);
MAKE_BINOP_METAFUNCTIONS(-, is_subtractable, subtraction_traits);
MAKE_BINOP_METAFUNCTIONS(/, is_dividable, division_traits);
MAKE_BINOP_METAFUNCTIONS(*, is_multipliable, multiplication_traits);





Note that apparently this forum's CPP source highlighter is too smart for its owng ood. It won't let me display the backslash at the end of each line for a multi-line macro without screwing up the formatting of all the code, so I had to remove it. Re-insert them to get it to compile, stopping at the point indicated by the comment.

First thing you can see is that it's macro'ized now so you can easily define lots of other operations. I also added a "traits" class. You can use this to figure out the return type. This actually eliminates the need for the <ReturnType> template argument. I also made a slight change to the type selection. It doesn't compare sizes anymore, it declares no_type as internal to its private namespace so it's not even possible for this type to exist anywhere else. Then, it checks if the result of the addition is the same type as no_type. The only way this should be possible is if it chose the version we provided. Since this catch-all operator+ is in the binop_meta_functions namespace, external code won't be caught by it.


If this still doesn't work, post the code that it's failing on (something related to a vector iterator apparently) and i'll see if I can reproduce it.

Share this post


Link to post
Share on other sites
Yea the rest of the code should be identical. But I'll post it again just for the sake of completeness:


struct add_values : public boost::static_visitor<Variant>
{
private:
template<int> struct dummy { dummy(int) {} };

template<class T, class U>
Variant add(const T& t, const U& u, typename enable_if<is_addable<T,U> >::type* dummy=0) const
{
return Variant(static_cast<addition_traits<T,U>::type>(t+u));
}

template<class T, class U>
Variant add(const T& t, const U& u, typename disable_if<is_addable<T,U> >::type* dummy=0) const
{
throw exception("Types cannot be added");
}

public:
template<typename First, typename Second>
Variant operator()(const First& lhs, const Second& rhs) const
{
return add(lhs, rhs);
}
};



int _tmain(int argc, _TCHAR* argv[])
{
Variant first = (float)4;;
Variant second = (int)7;
Variant third = std::string("hello");

Variant fourth = apply_visitor(add_values(), first, second);
fourth = apply_visitor(add_values(), first, third);
return 0;
}








You can then define subtract_values(), divide_values(), etc similarly.

You'll want to be careful if doing multiplication or division. You'll still probably want to be able to specify the return type explicitly in that case, because it's possible you want to store the result as a float. If you divide 2 integers but want the result as a float, you need to make sure to cast the numerator and denominator first. I'm not sure if this covers all the corner cases, but you could handle it, for example, like this:


//void is just a default so the user doesn't have to specify it. If they use
//the default then we want to use whatever the result of the operation would
//normally be
template<class ReturnType=void>
struct divide_values : public boost::static_visitor<Variant>
{
private:
//Use partial specialization to enumerate the exact cases where
//conversion is necessary. In particular, if the return type is
//non-integral.
template<class R, class Operand> struct convert_operand { typedef Operand operand; };
template<class Operand> struct convert_operand<float, Operand> { typedef float operand; };
template<class Operand> struct convert_operand<double, Operand> { typedef double operand; };

template<int> struct dummy { dummy(int) {} };

template<class T, class U>
Variant divide(const T& t, const U& u, typename enable_if<is_dividable<T,U> >::type* dummy=0) const
{
//Convert t and u to the appropriate type. Unless ReturnType
//is float or double, this ends up being a no-op.
convert_operand<ReturnType, T>::operand num = static_cast<convert_operand<ReturnType, T>::operand>(t);
convert_operand<ReturnType, T>::operand denom = static_cast<convert_operand<ReturnType, T>::operand>(u);

//If the user chose the default (void), figure out the correct
//return type. Otherwise use the one they specified.
typedef boost::mpl::if_<is_same<ReturnType,void>, division_traits<T,U>::type, ReturnType>::type ActualReturnType;

//Do it, and cast the result to the correct value.
return Variant(static_cast<ActualReturnType>(num/denom));
}

template<class T, class U>
Variant divide(const T& t, const U& u, typename disable_if<is_dividable<T,U> >::type* dummy=0) const
{
throw exception("Types cannot be added");
}

public:
template<typename First, typename Second>
Variant operator()(const First& lhs, const Second& rhs) const
{
return divide(lhs, rhs);
}
};

//Divides the values as they are, and automatically deduces the return type.
fourth = apply_visitor(divide_values<>(), first, second);

//Fails to compile, the variant can't hold a double
fourth = apply_visitor(divide_values<double>(), first, second);

//Divides the values as floats, and returns the result as a float.
fourth = apply_visitor(divide_values<float>(), first, second);






Also, you'll probably get a ton of warnings about unsafe operation / applied to type bool. This is due to the the way I checked for divisibility relying on the type system. You'd need to manually define is_dividable<bool, T> and is_dividable<T, bool> to be false and not use the macro. Or make a new macro that allows you to hardcode the value.

Share this post


Link to post
Share on other sites
Now I am getting a whole new host of errors.


1>------ Build started: Project: Quantum Divergence, Configuration: Debug Win32 ------
1>Compiling...
1>MainLoop.cpp
1>using native typeof
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(103) : warning C4512: 'boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>' : assignment operator could not be generated
1> with
1> [
1> Visitor=const add_values,
1> Visitable2=Variant
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(163) : see reference to class template instantiation 'boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>' being compiled
1> with
1> [
1> Visitor=const add_values,
1> Visitable2=Variant
1> ]
1> .\Main\MainLoop.cpp(123) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::apply_visitor<add_values,Variant,Variant>(const Visitor &,Visitable1 &,Visitable2 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=add_values,
1> Visitable1=Variant,
1> Visitable2=Variant
1> ]
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(66) : warning C4512: 'boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>' : assignment operator could not be generated
1> with
1> [
1> Visitor=const add_values,
1> Value1=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(98) : see reference to class template instantiation 'boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>' being compiled
1> with
1> [
1> Visitor=const add_values,
1> Value1=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>::operator ()<T>(Value1 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> T=T0,
1> Value1=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>,
1> T=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> T=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T0,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1769) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl<first_which,first_step,Visitor,VoidPtrCV,boost::variant<T0_,T1,T2,T3>::has_fallback_type_>(const int,const int,Visitor &,VoidPtrCV,boost::mpl::false_,NoBackupFlag,Which *,step0 *)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> Which=first_which,
1> step0=first_step
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1780) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1803) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor<boost::detail::variant::invoke_visitor<Visitor>>(boost::detail::variant::invoke_visitor<Visitor> &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_unary.hpp(56) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::apply_visitor<Visitor>(Visitor &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(165) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::apply_visitor<boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>,Visitable1>(boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2> &,Visitable &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> Visitable1=Variant,
1> Visitable=Variant
1> ]
1> .\Main\MainLoop.cpp(123) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::apply_visitor<add_values,Variant,Variant>(const Visitor &,Visitable1 &,Visitable2 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=add_values,
1> Visitable1=Variant,
1> Visitable2=Variant
1> ]
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(66) : warning C4512: 'boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>' : assignment operator could not be generated
1> with
1> [
1> Visitor=const add_values,
1> Value1=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(98) : see reference to class template instantiation 'boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>' being compiled
1> with
1> [
1> Visitor=const add_values,
1> Value1=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>::operator ()<T>(Value1 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> T=T1,
1> Value1=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>,
1> T=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> T=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T1,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T1
1> ]
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(66) : warning C4512: 'boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>' : assignment operator could not be generated
1> with
1> [
1> Visitor=const add_values,
1> Value1=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(98) : see reference to class template instantiation 'boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>' being compiled
1> with
1> [
1> Visitor=const add_values,
1> Value1=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>::operator ()<T>(Value1 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> T=T2,
1> Value1=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>,
1> T=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> T=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T2,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T2
1> ]
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(66) : warning C4512: 'boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>' : assignment operator could not be generated
1> with
1> [
1> Visitor=const add_values,
1> Value1=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(98) : see reference to class template instantiation 'boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>' being compiled
1> with
1> [
1> Visitor=const add_values,
1> Value1=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>::operator ()<T>(Value1 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> T=T3,
1> Value1=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T3,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_unwrap<const add_values,Variant>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T3
1> ]
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2872: 'exception' : ambiguous symbol
1> could be 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(177) : boost::exception'
1> or 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\exception(95) : std::exception'
1> d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(84) : see reference to function template instantiation 'Variant add_values::add<First,Second>(const T &,const U &,void *) const' being compiled
1> with
1> [
1> First=T0,
1> Second=T3,
1> T=T0,
1> U=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(63) : see reference to function template instantiation 'Variant add_values::operator ()<Value1,Value2>(const First &,const Second &) const' being compiled
1> with
1> [
1> Value1=T0,
1> Value2=T3,
1> First=T0,
1> Second=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>::operator ()<T>(Value2 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T0,
1> T=T3,
1> Value2=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T0>,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T0>>,
1> VoidPtrCV=void *,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T3,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T0>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1769) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl<first_which,first_step,Visitor,VoidPtrCV,boost::variant<T0_,T1,T2,T3>::has_fallback_type_>(const int,const int,Visitor &,VoidPtrCV,boost::mpl::false_,NoBackupFlag,Which *,step0 *)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T0>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> Which=first_which,
1> step0=first_step
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1780) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T0>>,
1> VoidPtrCV=void *
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1803) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor<boost::detail::variant::invoke_visitor<Visitor>>(boost::detail::variant::invoke_visitor<Visitor> &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T0>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_unary.hpp(56) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::apply_visitor<Visitor>(Visitor &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T0>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(100) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::apply_visitor<boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>,Visitable2>(boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1> &,Visitable &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T0,
1> Visitable2=Variant,
1> Visitable=Variant
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>::operator ()<T>(Value1 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> T=T0,
1> Value1=T0
1> ]
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2259: 'boost::exception' : cannot instantiate abstract class
1> due to following members:
1> 'boost::exception::~exception(void) throw()' : is abstract
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(199) : see declaration of 'boost::exception::~exception'
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2872: 'exception' : ambiguous symbol
1> could be 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(177) : boost::exception'
1> or 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\exception(95) : std::exception'
1> d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(84) : see reference to function template instantiation 'Variant add_values::add<First,Second>(const T &,const U &,void *) const' being compiled
1> with
1> [
1> First=T1,
1> Second=T3,
1> T=T1,
1> U=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(63) : see reference to function template instantiation 'Variant add_values::operator ()<Value1,Value2>(const First &,const Second &) const' being compiled
1> with
1> [
1> Value1=T1,
1> Value2=T3,
1> First=T1,
1> Second=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>::operator ()<T>(Value2 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T1,
1> T=T3,
1> Value2=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T1>,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T1>>,
1> VoidPtrCV=void *,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T3,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T1>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1769) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl<first_which,first_step,Visitor,VoidPtrCV,boost::variant<T0_,T1,T2,T3>::has_fallback_type_>(const int,const int,Visitor &,VoidPtrCV,boost::mpl::false_,NoBackupFlag,Which *,step0 *)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T1>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> Which=first_which,
1> step0=first_step
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1780) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T1>>,
1> VoidPtrCV=void *
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1803) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor<boost::detail::variant::invoke_visitor<Visitor>>(boost::detail::variant::invoke_visitor<Visitor> &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T1>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_unary.hpp(56) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::apply_visitor<Visitor>(Visitor &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T1>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(100) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::apply_visitor<boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>,Visitable2>(boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1> &,Visitable &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T1,
1> Visitable2=Variant,
1> Visitable=Variant
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>::operator ()<T>(Value1 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> T=T1,
1> Value1=T1
1> ]
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2259: 'boost::exception' : cannot instantiate abstract class
1> due to following members:
1> 'boost::exception::~exception(void) throw()' : is abstract
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(199) : see declaration of 'boost::exception::~exception'
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2872: 'exception' : ambiguous symbol
1> could be 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(177) : boost::exception'
1> or 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\exception(95) : std::exception'
1> d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(84) : see reference to function template instantiation 'Variant add_values::add<First,Second>(const T &,const U &,void *) const' being compiled
1> with
1> [
1> First=T2,
1> Second=T3,
1> T=T2,
1> U=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(63) : see reference to function template instantiation 'Variant add_values::operator ()<Value1,Value2>(const First &,const Second &) const' being compiled
1> with
1> [
1> Value1=T2,
1> Value2=T3,
1> First=T2,
1> Second=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>::operator ()<T>(Value2 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T2,
1> T=T3,
1> Value2=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T2>,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T2>>,
1> VoidPtrCV=void *,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T3,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T2>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T3
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1769) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl<first_which,first_step,Visitor,VoidPtrCV,boost::variant<T0_,T1,T2,T3>::has_fallback_type_>(const int,const int,Visitor &,VoidPtrCV,boost::mpl::false_,NoBackupFlag,Which *,step0 *)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T2>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> Which=first_which,
1> step0=first_step
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1780) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T2>>,
1> VoidPtrCV=void *
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1803) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor<boost::detail::variant::invoke_visitor<Visitor>>(boost::detail::variant::invoke_visitor<Visitor> &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T2>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_unary.hpp(56) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::apply_visitor<Visitor>(Visitor &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T2>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(100) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::apply_visitor<boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>,Visitable2>(boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1> &,Visitable &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T2,
1> Visitable2=Variant,
1> Visitable=Variant
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>::operator ()<T>(Value1 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> T=T2,
1> Value1=T2
1> ]
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2259: 'boost::exception' : cannot instantiate abstract class
1> due to following members:
1> 'boost::exception::~exception(void) throw()' : is abstract
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(199) : see declaration of 'boost::exception::~exception'
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2872: 'exception' : ambiguous symbol
1> could be 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(177) : boost::exception'
1> or 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\exception(95) : std::exception'
1> d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(84) : see reference to function template instantiation 'Variant add_values::add<First,Second>(const T &,const U &,void *) const' being compiled
1> with
1> [
1> First=T3,
1> Second=T0,
1> T=T3,
1> U=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(63) : see reference to function template instantiation 'Variant add_values::operator ()<Value1,Value2>(const First &,const Second &) const' being compiled
1> with
1> [
1> Value1=T3,
1> Value2=T0,
1> First=T3,
1> Second=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>::operator ()<T>(Value2 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T3,
1> T=T0,
1> Value2=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>,
1> T=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>>,
1> VoidPtrCV=void *,
1> T=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T0,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T0
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1769) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl<first_which,first_step,Visitor,VoidPtrCV,boost::variant<T0_,T1,T2,T3>::has_fallback_type_>(const int,const int,Visitor &,VoidPtrCV,boost::mpl::false_,NoBackupFlag,Which *,step0 *)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> Which=first_which,
1> step0=first_step
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1780) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>>,
1> VoidPtrCV=void *
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(1803) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::internal_apply_visitor<boost::detail::variant::invoke_visitor<Visitor>>(boost::detail::variant::invoke_visitor<Visitor> &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_unary.hpp(56) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::variant<T0_,T1,T2,T3>::apply_visitor<Visitor>(Visitor &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(100) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::apply_visitor<boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>,Visitable2>(boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1> &,Visitable &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T3,
1> Visitable2=Variant,
1> Visitable=Variant
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>::operator ()<T>(Value1 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Visitable2=Variant,
1> T=T3,
1> Value1=T3
1> ]
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2259: 'boost::exception' : cannot instantiate abstract class
1> due to following members:
1> 'boost::exception::~exception(void) throw()' : is abstract
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(199) : see declaration of 'boost::exception::~exception'
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2872: 'exception' : ambiguous symbol
1> could be 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(177) : boost::exception'
1> or 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\exception(95) : std::exception'
1> d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(84) : see reference to function template instantiation 'Variant add_values::add<First,Second>(const T &,const U &,void *) const' being compiled
1> with
1> [
1> First=T3,
1> Second=T1,
1> T=T3,
1> U=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(63) : see reference to function template instantiation 'Variant add_values::operator ()<Value1,Value2>(const First &,const Second &) const' being compiled
1> with
1> [
1> Value1=T3,
1> Value2=T1,
1> First=T3,
1> Second=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>::operator ()<T>(Value2 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T3,
1> T=T1,
1> Value2=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>,
1> T=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>>,
1> VoidPtrCV=void *,
1> T=T1
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T1,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T1
1> ]
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2259: 'boost::exception' : cannot instantiate abstract class
1> due to following members:
1> 'boost::exception::~exception(void) throw()' : is abstract
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(199) : see declaration of 'boost::exception::~exception'
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2872: 'exception' : ambiguous symbol
1> could be 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(177) : boost::exception'
1> or 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\exception(95) : std::exception'
1> d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(84) : see reference to function template instantiation 'Variant add_values::add<First,Second>(const T &,const U &,void *) const' being compiled
1> with
1> [
1> First=T3,
1> Second=T2,
1> T=T3,
1> U=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/apply_visitor_binary.hpp(63) : see reference to function template instantiation 'Variant add_values::operator ()<Value1,Value2>(const First &,const Second &) const' being compiled
1> with
1> [
1> Value1=T3,
1> Value2=T2,
1> First=T3,
1> Second=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/variant.hpp(825) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::apply_visitor_binary_invoke<Visitor,Value1>::operator ()<T>(Value2 &)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=const add_values,
1> Value1=T3,
1> T=T2,
1> Value2=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(126) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::invoke_visitor<Visitor>::internal_visit<T>(T &,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>,
1> T=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(169) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke_impl<Visitor,VoidPtrCV,T>(int,Visitor &,VoidPtrCV,T *,boost::mpl::true_)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>>,
1> VoidPtrCV=void *,
1> T=T2
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/variant/detail/visitation_impl.hpp(252) : see reference to function template instantiation 'boost::variant<T0_,T1,T2,T3> boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,T2,NoBackupFlag>(int,Visitor &,VoidPtrCV,T *,NoBackupFlag,int)' being compiled
1> with
1> [
1> T0_=int,
1> T1=float,
1> T2=bool,
1> T3=std::string,
1> Visitor=boost::detail::variant::invoke_visitor<boost::detail::variant::apply_visitor_binary_invoke<const add_values,T3>>,
1> VoidPtrCV=void *,
1> NoBackupFlag=boost::variant<int,float,bool,std::string>::has_fallback_type_,
1> T=T2
1> ]
1>d:\games\side space shooter - ghost engine - directx\engine\script\VariantVisitors.h(77) : error C2259: 'boost::exception' : cannot instantiate abstract class
1> due to following members:
1> 'boost::exception::~exception(void) throw()' : is abstract
1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\boost/exception/exception.hpp(199) : see declaration of 'boost::exception::~exception'
1>Generating Code...
1>Compiling...
1>cVariable.cpp
1>using native typeof
1>Generating Code...
1>Skipping... (no relevant changes detected)
1>cOperator.cpp
1>cScript.cpp
1>Build log was saved at "file://d:\Games\Side Space shooter - Ghost Engine - DirectX\BUILD\Debug\BuildLog.htm"
1>Quantum Divergence - 12 error(s), 5 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



I have to go to bed though, I'm about to pass out. Thanks for the help man, I really appriciate it!

I'll be back tomorrow incase you still feel like helping me out.

Jake

Share this post


Link to post
Share on other sites
So it seems after I woke up I wasn't completely retarded. Fixed the error.


template<class T, class U>
Variant add(const T& t, const U& u, typename disable_if<is_addable<T,U> >::type* dummy=0) const
{
throw std::exception("Types cannot be added");
}



It seems the compiler was assuming exception was part of boost instead of std so it was trying to initiate an abstract. Adding std:: fixed it :D.

Everything works now :D

Thanks again.

Jake

Share this post


Link to post
Share on other sites
No problem. Glad you found the problem :P


In case you're interested, I also fixed the warnings related to division by bools by explicitly disabling it. All you have to change is the macro related stuff at the top:


namespace binop_meta_functions { struct no_type { }; }

#define DISABLE_BINOP_METAFUNCTIONS(op, disableType, binop, traits)
template<> struct traits<disableType,disableType> { typedef void type; };
template<typename T> struct traits<T,disableType> { typedef void type; };
template<typename T> struct traits<disableType,T> { typedef void type; };
template<> struct binop<disableType,disableType> { static const bool value = false; };
template<typename T> struct binop<T,disableType> { static const bool value = false; };
template<typename T> struct binop<disableType,T> { static const bool value = false; };
///END MACRO HERE

#define MAKE_BINOP_METAFUNCTIONS(op, binop, traits)
namespace binop_meta_functions {
template<typename T, typename U> no_type operator op (T, U);
template<typename T, typename U>
struct traits
{
typedef BOOST_TYPEOF(T() op U()) type;
};
template<typename T, typename U>
struct binop
{
private:
typedef typename traits<T,U>::type result_type;
public:
static const bool value = !boost::is_same<result_type,no_type>::value;
};
}
template<typename T, typename U>
struct traits
{
typedef typename binop_meta_functions::traits<T,U>::type type;
};
template<typename T, typename U>
struct binop
{
static const bool value = binop_meta_functions::binop<T,U>::value;
};
///END MACRO HERE

MAKE_BINOP_METAFUNCTIONS(+, is_addable, addition_traits);
MAKE_BINOP_METAFUNCTIONS(-, is_subtractable, subtraction_traits);
MAKE_BINOP_METAFUNCTIONS(/, is_dividable, division_traits);
MAKE_BINOP_METAFUNCTIONS(*, is_multipliable, multiplication_traits);
DISABLE_BINOP_METAFUNCTIONS(/, bool, is_dividable, division_traits);



Note that again I had to remove the trailing backslash for multi-line comments.

Not the most elegant solution since you have to specify the DISABLE after the MAKE and the metafunction and traits names must match, but I can't come up with a better way.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement