boost

error: boost.fusion::for_each() and struct derived from boost.tuple

Hi all! on compilation this code: struct any_type: boost::tuple<std::string, std::string, std::string> { ... }; struct functor { void operator()(const std::string& v) { std::cout << v << std::endl; } }; int main() { any_type type; boost::fusion::for_each(type, functor()); } get error: no type named 'category' in...

BOOST_PP_ITERATE() result in "no such file or directory"

Hi, I'm learning the boost preprocessor library (because i need to use it), and I wanted to try the file iteration mechanism. I've set up a minimal project with a.cpp and b.hpp. What I'm trying to do is including many time b.hpp via the boost pp : #include <boost/preprocessor/iteration/iterate.hpp> #define BOOST_PP_ITERATION_LIMITS (0...

Installation problem with Apache Thrift

I am trying to install thrift in solaris, so I can play with it. But unfortunately, I can't get configure working. Here is the command I use to configure. ./configure --prefix=<> CFLAGS='-m64 -O3' CXXFLAGS='-m64 -O3' --with-boost= I get this error as follows. checking for boostlib >= 1.33.1... configure: error: We could not detect the...

Conf file parser

I thought there was a boost library that allowed me to parse unix conf files? I believe it also had other features, i.e. it could parse windows ini files and I think XML based config files might have been done or was on the way too. Any idea what that's called? I'm looking through the program options library and it doesn't look like t...

Boost::process async_wait process

Hi all I am creating a program and I'm doing the most possible asynchronously. I need to run a program and when this program finishes it calls a callback function. I found a version of boost::process and decided to use, but it seems that there is the example but could not find the implementation in the source that I downloaded, could s...

Do boost::shared_ptr<T> and boost::shared_ptr<const T> share the reference count?

There are several interesting questions on pitfalls with boost::shared_ptrs. In one of them, there is the useful tip to avoid pointing boost::shared_ptr<Base> and boost::shared_ptr<Derived> to the same object of type Derived since they use different reference counts and might destroy the object prematurely. My question: Is it safe to ha...

eigen value solver based on BOOST UBLAS

Hi All These days I am starting learning BOOST UBLAS and BOOST MATH for my tasks. I was bit surprised to find that there is no eigenvalue/vector solver in it. Since I would like to stick with Boost libs and their matrix classes, do you know about any library built on top of boost ublas capables to find eigenvalues and other stuff that...

Boost Shared_Ptr assignment

Why can I not do this? boost::shared_ptr<QueuList> next; void QueuList::SetNextPtr(QueuList* Next) { boost::mutex mtx; boost::mutex::scoped_lock lock(mtx); {// scope of lock //if (next == NULL) // is this needed on a shared_ptr?? next = Next; // Why can I not assign a raw ptr to a shared_ptr???? } }...

Installing latest 1.44 boost library under ubuntu 10.04

I have ubuntu 10.04 and want to install the latest boost library 1.44_0 I downloaded the tar.gz file and unpacked it into /usr/local/boost_1_44_0 I already have the boost 1.40 version install from synaptic. So I want to compile and link against 1.44 because I'm wanting to use some new libraries that are not in the older version such a...

How to use shared_ptr in a member which is not a shared_ptr?

Hi! I'm working on a couple of classes and I'm wondering how I can use a normal member in my application class, where the member needs to use shared_from_this()? Here is some code to clarify what I mean (see comments) class Observable { public: void addObserver(boost::shared_ptr<Observer> observer) { // add to a list }...

Differences between tr1::shared_ptr and boost::shared_ptr?

Are there any difference between tr1::shared_ptr and boost::shared_ptr? If so, what? ...

C++ - Clutter 1.0 - calling function from thread causes segfault

Hello! I am struggling with calling a clutter function from an extra thread. I use boost::thread for threading and the clutter library 1.0. To be specific, the thread contains a looped function that emits boost::signals2::signal with parameters of x and y coordinates every once in a while. That signal is connected to a function that ha...

Improve use of alternative parser

I extended the Mini XML example from the spirit manual. The grammar describes a xml tag that can be closed with '/>' and has no child nodes or which is closed like in the example with a closing tag '' and can optionally have children. #include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/phoenix_core.hpp> #include <boost...

boost::thread without all of boost?

is there a way to use boost's threading capabilities without the entire boost library? What are the bare minimum h and cpp files needed for this? Thanks ...

boost threadpool

I'm trying to create a threadpool with the boost threadpool library, but on defining it I keep getting lots of error about template params being wrong. I'm probably doing something fundamentally wrong, but I'm not seeing it? //Threadpool typedef boost::threadpool::thread_pool< boost::threadpool::task_func, boost::threadpool::fi...

How to determine elements count in boost.preprocessor tuple`s ?

Hi all. How to determine elements count in boost.preprocessor tuple`s ? Thanks. ...

Installing C++ Boost library on Windows without Visual Studio

I would like to install Boost library without the need of Visual Studio compiler, preferably by downloading the pre-compiled binaries. We are working on a cross-platform C++ project in Eclipse, so VS is out of option. About a year ago, I found an installer, but it does not longer exists. The best match I have found so far is from: http:...

template vector

Hi All, I'm trying to implement a function that allows me to make a call like this // veca is a vector of tuples in my case columnViewOfTuple<0>(veca); I implemented such function as follows template<int N> struct myfunction { template<typename T, typename R> std::vector<R> operator() (T& container) { std::vector<...

vector template conflicting declaration

I'm trying to implement a function that allows me to make a call like this // vec5 is a vector of tuples in my case // some code that to declare and fill vec5 columnViewOfTuple<0>(vec5); I implemented such function as follows template<int N> struct myfunction { template<typename T, typename R> std::vector<R> opera...

boost::thread assertion error

I'm trying to create a simple test program using boost::thread, but I get a runtime assertion error. Here is the code: #include <iostream> #include <boost/thread.hpp> void hello (void) { std::cout << "Hello, world!" << std::endl; } int main (void) { boost::thread t(&hello); t.join(); // Fails even without this line } T...