Hi,
I'm making a cross plateform program that embbed a small RARP server (implemented with winpcap/pcap) and runs 2 TCP IP servers. I have to use C++.
So i will have at least 4 threads, the main one wich countain the controller, 2 TCP/IP async socket, and the RARP server.
I planned to use c++ BOOST Asio and Thread, because i need to r...
do i need virtual destructor when iam using boost::ublas matrix ? btw my class is a template class
...
Say I have strings like these:
bunch of other html<a href="http://domain.com/133742/The_Token_I_Want.zip" more html and stuff
bunch of other html<a href="http://domain.com/12345/another_token.zip" more html and stuff
bunch of other html<a href="http://domain.com/0981723/YET_ANOTHER_TOKEN.zip" more html and stuff
What is the regular exp...
At work we have a base class, let's call it IntrusiveBase, that acts something like a mixin to allow a class to be stored in a boost:intrusive_ptr. That is, it provides its subclasses with a ref count and defines intrusive_ptr_add_ref and intrusive_ptr_release overloads. The problem is that it is too easy for someone to forget that a par...
I'm trying to generate a random 64bit unsigned integer using boost random,
but I'm getting an assertion failure with uniform_int.
struct timeval tv;
boost::mt19937 randGen(tval.tv_usec);
boost::uniform_int<> uInt64Dist(0, std::numeric_limits<uint64_t>::max());
boost::variate_generator<boost::mt19937&, boost::uniform_int<> > getRand(rand...
In our application, there are a bunch of unit test console applications that have been written using the boost unit test framework. These test applications form part of the Visual Studio Solution (we are using VS2008 Professional).
Is it possible to run these as part of a Teamcity build?
So far I have configured Teamcity to check out ...
While trying to answer this question I wanted to suggest the use of enable_if + disable_if to allow the overload of a method based on the fact that a type was (or not) polymorphic.
So I created a small test file:
template <class T>
void* address_of(T* p,
boost::enable_if< boost::is_polymorphic<T> >* dummy = 0)
{ return...
Hi,
I want to measure the code coverage of an unit test with aqtime. The application to test uses a lot of boost functionality. Now these boost methods appear in the test report. With these methods in the report, it is nearly impossible to interpret it since I did not test boost but the classes using boost.
Is there a fast way to exclu...
So far I haven't found this in the cmake documentation, but I need to link a program against a 32bit boost library on my mac and I couldn't figure out how to tell cmake to look for the 32bit version using find_package..
...
I'm exploring boost::tribool and was surprised by the following behaviour.
{
using namespace boost;
boost::tribool t(indeterminate);
assert(t==indeterminate); // This assertion fails!
}
However, if I do this, the assert passes.
assert(indeterminate(t));
No compiler warnings or errors in either case. Anyone have a good explanati...
I have been using VS 2005 (VC8) with Boost.TR1 in the std::tr1 namespace by setting the Include Directories of VS to prioritize the boost tr1 headers as described here.
Now I am moving over to VS 2010 (VC10) and I seem to be getting compilation errors using the same include method.
The Include Directories are set to:
[boost-root]\boo...
I'm putting together a class I'm going to call a file.
The file object simply contains a pointer to a memory mapped file and a link.
The constructor takes a file and maps the file onto memory range. In summary it looks
a bit like this:
class file
{
public:
file(unsigned char* filename) { open(filename); }
open(unsig...
Is there any way to use "strings" or some otehr command to decide what version of Boost was used to compile a particular executable or .so? All I have is the executable/.so itself.
...
This code compiles and works as expected (it throws at runtime, but never mind):
#include <iostream>
#include <boost/property_tree/ptree.hpp>
void foo(boost::property_tree::ptree &pt)
{
std::cout << pt.get<std::string>("path"); // <---
}
int main()
{
boost::property_tree::ptree pt;
foo(pt);
return 0;
}
But as soon a...
Hi,
I want to test a regular expression with boost:
const wregex regex_comment(L"^\\s*#.*"); //regexpr for comment
My problem - it does not match a widestring consisting of: #This is a comment
can someone give me a hint why or where I can look for the error?
hm - it seems to work in the non-Unicode version.
I'm using boost 1.42, s...
I'm currently migrating from Visual Studio 2008 to 2010. My software makes heavy use of Boost and it's TR1 features. I now get a lot of compiler errors, because VC10 has it's own TR1 implementation.
I know I can disable Microsoft's TR1 implementation with the _HAS_CPP0X switch (see here), but I'm not sure if this also disables other fea...
I am using boost for tr1 instead of gcc 4.5's native tr1 libraries (by prioritizing boost tr1 headers over gcc headers). There is a compile problem specializing std::tr1::hash.
#include <functional>
#include <memory>
template <class A>
struct std::tr1::hash< std::tr1::shared_ptr<A> >
: public unary_function< std::tr1::shared_ptr<A>...
I am considering starting to use the Boost.Log logging library. Is anyone using Boost.Log? Please share your experiences in this regard.
The other libraries I am considering are Apache log4cxx (it seems tedious to install but my team mates want something simple to get started) and Pantheios (the same problem since it works with extra fr...
I have a linked list structure:
struct SomeLinkedList
{
const char* bar;
int lots_of_interesting_stuff_in_here;
DWORD foo;
SomeLinkedList* pNext;
};
It is part of an existing API and I cannot change it.
I would like to add iterator support. The boost::iterator_facade<> library seemed ideal for the purpose.
class Some...
hi may i know where is the ublass::vector push_back or what ever does the same ?
p.s (i'm not talking about std::vector)
...