I'm trying to use boost::filesystem to copy files and folders (just like a standard copy a folder and paste it in windows explorer).
Although I've been to the boost::filesystem documentation, I still don't really know how to go about doing this.
Do you have to recursively go though each directory (creating it) and find each file copyi...
I have been toying with an example hpp provided in the boost library and I am trying to figure out how to use this parameter_types function correctly.
From the boost doc, parameter_types needs a ClassTypeTransform in order to parse class member function signatures.
I want to parse member function signatures, but I cannot find any doc...
I used this guide to rebuild the boost library in VC++6 under windows XP. But is having problems trying to include the header files. By default, the boost library makes use of point 1 as follows to declare the header files. But if I used point 1, I get "fatal error C1083: Cannot open include file...". I tried using point 2 to declare and...
Is there're way to pass boost::tuple to printf()?
...
i know i can connect multiple slots to the same signal.
but Can I do it the other way round? having 3 signals connected to the same slot?
anyone ever tried this?
thanks a lot!
...
I'm using asio synchronous sockets to read data over TCP from a background thread. This is encapsulated in a "server" class.
However, I want the thread to exit when the destructor of this class is called.
The problem is that a call to any of the read functions does block, so the thread cannot be easily terminated. In Win32 there is an A...
i think it makes sense to use boost::singleton together with a boost::logger, so that all the objects in the executable can access the same logger and dump strings to it.
class logger_singleton
: public boost::mutexed_singleton<logger_singleton>
{
private
boost::logger blogger;
public:
logger_singleton(boost::restricted);...
I'm trying to write a library which unzips a zip file contents to an existing directory, replacing the content of only the folders which exist in the zip file.
In order to do this I am employing the use of the Boost Unit Testing framework.
Before each test I wish make a copy of an existing directory, the copy of which will serve as the...
I'm reading this article on the Boost Unit Testing Framework.
However I'm having a bit of trouble with the first example, my guess is that they left something out (something that would be obvious to hardcore C++ coders) as IBM often does in their articles. Another possibility is that my Visual Studio 2005 C++ compiler is just too old f...
I have mutliple regex expressions, each mapped to a different object. After passing in a string, I want to loop through each regex expression until one evaluates to true, then I would like to return the mapped object.
What is the best way to implement this in C++? Is there a boost object available for this?
...
So let's say you want to build the Boost "Getting Started" examples and link to them using an Xcode project rather than building at the command line. You try the header-only option and it works fine.
But then you take the example source:
#include <boost/regex.hpp>
#include <iostream>
#include <string>
int main()
{
std::string line...
I have some code that 100% works for the use case I have. I'm just wondering if anyone can explain how and why it works.
I have a template class that sits between some code that handles threading and network communication and the library user to pass data received from the server to the user.
template <class Bar,
class Baz...
Consider developing an application where the model will be written in C++ (with Boost), and the view will be written in Objective-C++ (with Cocoa Touch).
Where are some examples showing how to integrate C++ and Objective-C++ for developing iPhone applications?
...
I'm using active object design pattern.
I need a list, which holds user defined objects of the same type. Multiple writers push the objects to the list and readers can wait on the queue in a timed manner.
I know I can wrap an STL list, but maybe there ready solution in boost? I just can't find it.
UPD:
The application runs on Linux ...
I have been using Boost 1.36 for a while without any problems. Had to upgrade to 1.41 to get PropertyTree. Boost appears to build properly but when i try and compile the project that was using boost 1.36 I get this error.
1>LINK : fatal error LNK1104: cannot open file 'C:\dev\3rdparty\boost-build_1_41_0\boost\bin.v2\libs\filesystem\bui...
I am using Ubuntu + Eclipse and installed boost(not sure correct). I installed Boost using apt-get install libboost*
I tested some simple code, it seems the boost working right.
However, when I try to learn the thread part, the code below does not work.
#include <boost/thread/thread.hpp>
#include <iostream>
using namespace std;
voi...
I am trying to specialize some utility code on const member functions, but have problems to get a simple test-case to work.
To simplify the work i am utilizing Boost.FunctionTypes and its components<FunctionType> template - a MPL sequence which should contain the tag const_qualified for const member functions.
But using the test-code be...
How can I split a string with Boost with a regex AND have the delimiter included in the result list?
for example, if I have the string "1d2" and my regex is "[a-z]" I want the results in a vector with (1, d, 2)
I have:
std::string expression = "1d2";
boost::regex re("[a-z]");
boost::sregex_token_iterator i (expression.begin (),
...
I am learning the boost::lambda library and for that I wrote this sample code to convert an vector<A> into vector<int> by extracting the value from A object.
class A
{
public:
A(int n) : m_n(n){}
int get() const {return m_n;}
private:
int m_n;
};
int _tmain(int argc, _TCHAR* argv[])
{
using namespace boost::lambda;
...
How do I get boost::bind to work with array subscripts? Here's what I'm trying to achieve. Please advice.
[servenail: C++Progs]$ g++ -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr /share/info --enable-shared --enable-threads=posix --di...