N
Noah Roberts
Trying to use boost::function in a C++/CLI program. Here is code:
pragma once
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>
using namespace System;
class Command
{
friend class CommandInterpreter;
virtual boost::shared_ptr<Command> interpret(String ^ cmd) = 0; //
returns 0 if not interpreted, a clone of itself otherwise.
public:
virtual void operator() (System::Net::Sockets::NetworkStream ^
stream) = 0;
};
class Echo : public Command
{
boost::shared_ptr<Command> interpret(String ^ cmd)
{
return boost::shared_ptr<Command>(new Echo());
}
public:
void operator() (System::Net::Sockets::NetworkStream ^ stream)
{
String ^ str = "I SHOULD BE ECHOING SOMETHING.";
stream->Write(Text::Encoding::ASCII->GetBytes(str), 0, str->Length);
}
};
class CommandInterpreter
{
std::vector< boost::shared_ptr<Command> > prototypes;
CommandInterpreter()
{
prototypes.push_back(boost::shared_ptr<Command>(new Echo));
}
boost::function<void (System::Net::Sockets::NetworkStream ^)>
find_command(String ^ str)
{
for (std::vector< boost::shared_ptr<Command> >::iterator it =
prototypes.begin();
it != prototypes.end();
++it)
{
boost::shared_ptr<Command> cmd = (*it)->interpret(str);
if (cmd)
return *cmd;
}
return boost::function<void (System::Net::Sockets::NetworkStream ^)>();
}
public:
static boost::function<void (System::Net::Sockets::NetworkStream^)>
interpret(String ^ str)
{
static CommandInterpreter interpreter;
return interpreter.find_command(str);
}
};
Here is output:
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(85)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(88)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(91)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(94)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(183)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(186)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(189)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(192)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(281)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(284)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(287)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(290)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(379)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(382)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(385)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(388)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(477)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(480)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(483)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(486)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(575)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(578)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(581)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(584)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(673)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(676)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(679)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(682)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(771)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(774)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(777)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(780)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(869)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(872)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(875)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(878)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(967)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(970)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(973)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(976)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1065)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1068)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1071)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1074)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1163)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1166)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1169)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1172)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1261)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1264)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1267)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1270)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1359)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1362)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1365)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1368)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1457)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1460)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1463)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1466)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1555)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1558)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1561)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1564)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1653)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1656)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1659)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1662)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1751)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1754)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1757)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1760)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1849)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1852)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1855)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1858)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1947)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1950)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1953)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1956)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2045)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2048)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2051)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2054)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2143)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2146)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2149)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2152)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2241)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2244)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2247)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2250)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2339)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2342)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2345)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2348)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2437)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2440)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2443)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2446)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2535)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2538)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2541)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2544)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/function/function_base.hpp(689) :
warning C4793: 'vararg' : causes native code generation for function
'bool boost::detail::function::has_empty_target(...)'
1>
C:\Boost\include\boost-1_33_1\boost/function/function_base.hpp(686) :
see declaration of 'boost::detail::function::has_empty_target'
1>C:\Boost\include\boost-1_33_1\boost/shared_ptr.hpp(92) : warning
C4793: 'vararg' : causes native code generation for function 'void
boost::detail::sp_enable_shared_from_this(const
boost::detail::shared_count &,...)'
1> C:\Boost\include\boost-1_33_1\boost/shared_ptr.hpp(90) : see
declaration of 'boost::detail::sp_enable_shared_from_this'
1>c:\projects\utilities\test_worker\test_worker\command.h(45) : error
C2027: use of undefined type 'boost::function<Signature>'
1> with
1> [
1> Signature=void (System::Net::Sockets::NetworkStream ^)
1> ]
1>c:\projects\utilities\test_worker\test_worker\command.h(54) : error
C2514: 'boost::function<Signature>' : class has no constructors
1> with
1> [
1> Signature=void (System::Net::Sockets::NetworkStream ^)
1> ]
1>c:\projects\utilities\test_worker\test_worker\command.h(59) : error
C2027: use of undefined type 'boost::function<Signature>'
1> with
1> [
1> Signature=void (System::Net::Sockets::NetworkStream ^)
1> ]
Seems to me the warnings should be fine and I see no reason why it can't
find boost::function<Signature> as I've included the proper headers and
am using the appropriate namespace. Any ideas?
pragma once
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>
using namespace System;
class Command
{
friend class CommandInterpreter;
virtual boost::shared_ptr<Command> interpret(String ^ cmd) = 0; //
returns 0 if not interpreted, a clone of itself otherwise.
public:
virtual void operator() (System::Net::Sockets::NetworkStream ^
stream) = 0;
};
class Echo : public Command
{
boost::shared_ptr<Command> interpret(String ^ cmd)
{
return boost::shared_ptr<Command>(new Echo());
}
public:
void operator() (System::Net::Sockets::NetworkStream ^ stream)
{
String ^ str = "I SHOULD BE ECHOING SOMETHING.";
stream->Write(Text::Encoding::ASCII->GetBytes(str), 0, str->Length);
}
};
class CommandInterpreter
{
std::vector< boost::shared_ptr<Command> > prototypes;
CommandInterpreter()
{
prototypes.push_back(boost::shared_ptr<Command>(new Echo));
}
boost::function<void (System::Net::Sockets::NetworkStream ^)>
find_command(String ^ str)
{
for (std::vector< boost::shared_ptr<Command> >::iterator it =
prototypes.begin();
it != prototypes.end();
++it)
{
boost::shared_ptr<Command> cmd = (*it)->interpret(str);
if (cmd)
return *cmd;
}
return boost::function<void (System::Net::Sockets::NetworkStream ^)>();
}
public:
static boost::function<void (System::Net::Sockets::NetworkStream^)>
interpret(String ^ str)
{
static CommandInterpreter interpreter;
return interpreter.find_command(str);
}
};
Here is output:
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(85)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(88)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(91)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(94)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(183)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(186)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(189)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(192)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(281)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(284)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(287)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(290)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(379)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(382)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(385)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(388)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(477)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(480)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(483)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(486)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(575)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(578)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(581)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(584)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(673)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(676)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(679)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(682)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(771)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(774)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(777)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(780)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(869)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(872)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(875)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(878)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(967)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(970)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(973)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(976)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1065)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1068)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1071)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1074)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1163)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1166)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1169)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1172)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1261)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1264)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1267)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1270)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1359)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1362)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1365)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1368)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1457)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1460)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1463)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1466)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1555)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1558)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1561)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1564)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1653)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1656)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1659)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1662)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1751)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1754)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1757)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1760)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1849)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1852)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1855)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1858)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1947)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1950)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1953)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1956)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2045)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2048)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2051)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2054)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2143)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2146)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2149)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2152)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2241)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2244)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2247)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2250)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2339)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2342)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2345)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2348)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2437)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2440)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2443)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2446)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2535)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2538)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2541)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2544)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/function/function_base.hpp(689) :
warning C4793: 'vararg' : causes native code generation for function
'bool boost::detail::function::has_empty_target(...)'
1>
C:\Boost\include\boost-1_33_1\boost/function/function_base.hpp(686) :
see declaration of 'boost::detail::function::has_empty_target'
1>C:\Boost\include\boost-1_33_1\boost/shared_ptr.hpp(92) : warning
C4793: 'vararg' : causes native code generation for function 'void
boost::detail::sp_enable_shared_from_this(const
boost::detail::shared_count &,...)'
1> C:\Boost\include\boost-1_33_1\boost/shared_ptr.hpp(90) : see
declaration of 'boost::detail::sp_enable_shared_from_this'
1>c:\projects\utilities\test_worker\test_worker\command.h(45) : error
C2027: use of undefined type 'boost::function<Signature>'
1> with
1> [
1> Signature=void (System::Net::Sockets::NetworkStream ^)
1> ]
1>c:\projects\utilities\test_worker\test_worker\command.h(54) : error
C2514: 'boost::function<Signature>' : class has no constructors
1> with
1> [
1> Signature=void (System::Net::Sockets::NetworkStream ^)
1> ]
1>c:\projects\utilities\test_worker\test_worker\command.h(59) : error
C2027: use of undefined type 'boost::function<Signature>'
1> with
1> [
1> Signature=void (System::Net::Sockets::NetworkStream ^)
1> ]
Seems to me the warnings should be fine and I see no reason why it can't
find boost::function<Signature> as I've included the proper headers and
am using the appropriate namespace. Any ideas?