472,811 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

c++/cli and boost::function

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<Commandinterpret(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<Commandinterpret(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>(ne w 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<Commandcmd = (*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\co mmand.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\co mmand.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\co mmand.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<Signatureas I've included the proper headers and
am using the appropriate namespace. Any ideas?
Feb 12 '07 #1
1 5483
Joe
Here's a thread a ways back on this issue. I think the bottom line is that
you cannot compile boost code to MSIL managed code. But you can compile
boost code to native code and interop between manage and unmanage code. >
http://www.boost.org/tools/build/v1/vc-8_0-tools.html

Joe

"Joe" <ju**@junk.comwrote in message
news:80**************************@KNOLOGY.NET...
>
<gf****@gmail.comwrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
>Has anyone tried to use Boost.Filesystem with C++/CLI? I'm trying to
get some code that worked correctly in my native application to work on
my C++/CLI program. The code is in a header file in a native C++ static
library.

Boost does not support the CLR platform.
That just means you can't get pure managed code. C++/CLI lets you mix
managed code with native, and the native code can use the full C++ language
essentially without restrictions.
>
http://www.boost.org/tools/build/v1/vc-8_0-tools.html


>>
inline void execute_files(std::string const& dir, std::string
const& match, bool recursive = true, lua_State* interpreter = 0)
{
namespace bfs = boost::filesystem;

bfs::path dirpath(dir); // (1)

if (!bfs::exists(dirpath)) return;
if (!interpreter) interpreter = lua_interpreter();

bfs::directory_iterator end_itr;
for (bfs::directory_iterator itr(dirpath); itr != end_itr;
++itr)
{
if (!bfs::is_directory(*itr))
{
if (itr->leaf().find(match) != std::string::npos)
execute_file(itr->string());
}
else if (recursive)
{
execute_files(itr->string(), match, recursive,
interpreter);
}
}
}

The problem I'm having happens in the constructor of bfs::path (namely
line (1)) at the first recursive call. An exception is thrown which I
can't seem to get a helpful message from. It seems the string returned
from itr->string() is invalid. Has anyone tried to use Boost.Filesystem
in C++/CLI before? Any ideas on what could be causing this problem?

Thanks,
George Faraj



"Noah Roberts" <us**@example.netwrote in message
news:eq**********@aioe.org...
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<Commandinterpret(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<Commandinterpret(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>(ne w 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<Commandcmd = (*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(...)'
1C:\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\co mmand.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\co mmand.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\co mmand.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<Signatureas I've included the proper headers and am
using the appropriate namespace. Any ideas?

Feb 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: P G | last post by:
I hope this is on topic here. I have a problem compiling a simple example of the use of boost::bind. Please take a look at the program below. ...
13
by: Russell Hind | last post by:
I'm trying to use boost::bind and boost::function inside managed code, but there appears to be some code generation problems. The following code compiles fine, but the function object throws an...
8
by: Lars Schouw | last post by:
Guys, Is there anyway in C++ to setup a callback for a member function that takes two arguments I am trying to use boost::function but that only works with std::bind1st that does only take one...
2
by: Martin Herbert Dietze | last post by:
Hi, in a project I am using callbacks which are called like ordinary functions but in fact are Loki::Functor's encapsulating calls to non-static member functions on instances of different...
3
by: ryan.mitchley | last post by:
Hi all I have a class (cPort) that is designed to receive objects and, depending on the type, call a handler (callback) in any descendant of a cProcessBlock class. Callback functions take a...
2
by: Faheem Mitha | last post by:
Hi, The following bit of code compiles fine with gcc 3.3 or later, but has problems with the Intel C++ compiler version 9.1, which produces the following error message. Is this a compiler...
3
by: er | last post by:
hi, class Gen{ public: Gen(double (*fun_)()):fun(fun_){}; private: double (*fun)(); }; class Op{ public:
3
by: Giovanni Gherdovich | last post by:
Hello, in the following code I have a pointer (to function), say p, of type double (*)(double, double, void*) and I try to fix the second argument of the function *p to a given value (using...
19
by: =?ISO-8859-1?Q?Nordl=F6w?= | last post by:
I am currently designing a synchronized queue used to communicate between threads. Is the code given below a good solution? Am I using mutex lock/unlock more than needed? Are there any resources...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.