Hi,
There is a scenario that i need to solve with shared_ptr and weak_ptr smart pointers.
Two threads, thread 1 & 2, are using a shared object called A. Each of the threads have a reference to that object. thread 1 decides to delete object A but at the same time thread 2 might be using it. If i used shared_ptr to hold object A's refere...
Hello stack overflowers, I have a desing that uses the flyweight pattern to share bitmaps that are shared between bitmap objects which manage drawing ops, etc. and integrate in the gui library. This is an embedded device so memory is at a premium. Currently I have done a working implementation with a std::vector of auto_ptr of a light cl...
I'm looking at using Boost Graph Library as the basis for a dag graph. I haven't really used it all that much before, so not too familiar with how it works.
Although I don't need edge weights and clever traversing algorithms, I would quite like to get the serialisation for free, plus the constraints enforcing dag graphs and disallowing ...
I'm trying to decide between going with a pre-made graph/node network library or to roll my own.
I'm implementing some graph search algorithms which might require some significant customization to the class structure of the node and/or edges.
The reason I'm not sure what to do is that I'm unsure if customization of a pre-made might be...
Hello,
I'm wondering if there is a boost equivalent of ManualResetEvent? Basically, I'd like a cross-platform implementation... Or, could someone help me mimic ManualResetEvent's functionality using Boost::thread? Thanks guys
...
Possible Duplicate:
Building a subset of boost in windows
I'm using Visual c++ 6.0, and I'd like to use boost::random. I can't find any examples showing how I would go about just using this and only this library. Can I just include it in my source?
...
I'd like to bind operator new (see example below). If the constructor doesn't have any arguments, it works fine, but if it does have arguments, I apparently have trouble getting the bind syntax correct.
#include <map>
#include <boost\function.hpp>
#include <boost\lambda\lambda.hpp>
#include <boost\lambda\construct.hpp>
#include <boost\...
According to the documentation of boost::asio::ip::tcp::resolver::query in order to resolve host it should receive service
as well.
What if I want to resolve host without relation to port? How should I do it at all? Should
I specify dummy port?
...
Hi,
I have set up the latest eclipse+cdt + mingw + qt + qt-eclipse-integration.
I have 2 Problems:
When i create "New -> Qt Gui Project" it doesn't add the mingw includes (when i click new c++ project it adds them)
I would like to use boost, too. How do I tell eclipse/qmake to add the .lib's ?
Thank you
Chris
...
Hey all,
Is there a boost equivalent for memcpy? Thanks!
EDIT: Sorry, I didn't realize memcpy was in the standard library :)
I thought it was an OS call :(
...
Can boost::shared_ptr release the stored pointer without deleting it?
I can see no release function exists in the documentation, also in the FAQ is explained why it does not provide release function, something like that the release can not be done on pointers that are not unique. My pointers are unique. How can I release my pointers ?
O...
I'm trying to optimize my application by reducing round-trips to my database. As part of that effort, I've been moving some of the tables into memory, storing them as Boost.MultiIndex containers.
As a side-effect of this process, I've lost the ability to do wild-card matching on my strings. For example, when the table was stored in My...
I know this question has been asked before but I still haven't seen a satisfactory answer, or a definitive "no, this cannot be done", so I'll ask again!
All I want to do is get the path to the currently running executable, either as an absolute path or relative to where the executable is invoked from, in a platform-independent fashion. ...
I need to search through a DAG graph, but I don't want to advance past a node before I have seen all of the other nodes that have directed links pointing to it.
Is there an existing algorithm to handle this particular situation, the depth first search and breath first search don't work for this order of traversal.
Ie:
A -> B
B -> C
C ...
Hi,
How can I retrieve null-terminated string from socket using boost::asio library?
Thanks in advance
...
I've been battling with Boost to make it compile as only 32 bit on 10.6, rather than 64 bit.
Is there an easy edit I can make to the darwin-specific bjam config file?
Thanks,
Jon
...
I have a memory leak, and I guess it's caused by a wrong usage of scoped_lock (Boost). I however don't manage to find the exact problem, and I do believe that the way the code has been written is not completely right neither.
The code is in this class there:
http://taf.codeplex.com/SourceControl/changeset/view/31767#511225
The main imp...
Hi,
I get a warning when compiling below code in VS2008 with MFC turned on. Boost version 1.39
include "boost/flyweight.hpp"
include "boost/flyweight/key_value.hpp"
class Foo
{
public:
Foo(const CString}
private:
const CString mfoo;
};
struct Conversion
{
const CString}
};
using namespace boost::flyweights;
flyweight<...
Hi, Does anyone have any idea why the following code would output "no match"?
boost::regex r(".*\\.");
std::string s("app.test");
if (boost::regex_match(s, r))
std::cout << "match" << std::endl;
else
std::cout << "no match" << std::endl;
...
There is a signal and several objects with slots. I want to implement the behavior when one object calls signal and blocks its own connection. I guess a small snippet will be more informative:
typedef boost::signal<void()> TSignal;
template<class TSignal>
class SlotObject
{
public:
void Connect(boost::shared_ptr<TSignal> pSignal...