Visual Studio 2012 don't like this template

Visual Studio 2012 don't like this template

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
velteyn
Posts: 40
Joined: 25 Jan 2012, 10:53

Visual Studio 2012 don't like this template

Post by velteyn »

Hi all, Im on compile spring using visual studio 2012 but microsoft cannot understand this structure

Code: Select all

template<class F, class... Args>
	static auto enqueue(F&& f, Args&&... args)
	-> std::shared_ptr<boost::unique_future<typename std::result_of<F(Args...)>::type>>;
Can someone give a VS 2012 version ?

the errors are:
12>R:\springWIN\spring\rts\System/ThreadPool.h(95): error C2332: 'class' : missing tag name (..\..\Game\UI\ProfileDrawer.cpp)
12>R:\springWIN\spring\rts\System/ThreadPool.h(95): error C2993: '': illegal type for non-type template parameter '<unnamed-tag>' (..\..\Game\UI\ProfileDrawer.cpp)
12>R:\springWIN\spring\rts\System/ThreadPool.h(95): error C2143: syntax error: ',' missing before '...' (..\..\Game\UI\ProfileDrawer.cpp)
12>R:\springWIN\spring\rts\System/ThreadPool.h(96): error C2061: syntax error: identifier 'Args' (..\..\Game\UI\ProfileDrawer.cpp)
12>R:\springWIN\spring\rts\System/ThreadPool.h(97): error C2065: 'Args': undeclared identifier (..\..\Game\UI\ProfileDrawer.cpp)
velteyn
Posts: 40
Joined: 25 Jan 2012, 10:53

Re: Visual Studio 2012 don't like this template

Post by velteyn »

I changed F to KABUBI and it passed.... :mrgreen:

Is F a reserved ms name ??


edit---- false alarm .. the error reappears
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Visual Studio 2012 don't like this template

Post by abma »

please double-check if your VS is setup correctly:
http://springrts.com/wiki/Building_Spri ... rted.21.29

especially check if "Visual C++ Compiler November 2012 CTP" is installed and selected in project settings. Then update to latest spring develop branch and try to compile again.
Post Reply

Return to “Engine”