Hajo Kirchhoff | 20 Aug 11:04

[filesystem] temp filenames?

Hi all,
I found an old (year 2003) feature request for filesystem: create
temporary files, but do not see any methods in the current (1.36) version.

Can anyone tell me what is the status on this?

Best regards

Hajo
gast128 | 20 Aug 10:38

multi_array, resize and default constructable

Dear all,

from the documentation I read that if a multi_array is reshaped new elements 
are default constructed:

"Resizing an Array
The boost::multi_array class provides an element-preserving resize operation.
...Any new elements in the array are default constructed..."

It is thus not possible providing a default fill element?
Markus Werle | 20 Aug 09:21

[tr1] tuple / autoconversion problem

> [ignore this line: it makes gmane stop complaining about top-posting]

Hi!

Trying to migrate existing code from boost::xxx to std::tr1::xxx using
the boost::tr1 implementation for Visual Studio 2005 SP1
In the presence of some exotic autoconversion utility the 
the std::tr1::tuple version of my code fails on vc8. 
The error messages indicate that the conversion operator
is not considered by the compiler.

Below is code that fails to compile on vc8 if USE_TR1 is defined
Do you have an idea how to fix this?

Thanx, Markus

---snip---
#include <boost/tr1/memory.hpp>

#ifdef USE_TR1
  #include <boost/tr1/tuple.hpp>
#else
  #include <boost/tuple/tuple.hpp>
#endif

#include <boost/any.hpp>

#include <iostream>

namespace Core
(Continue reading)

Arno | 20 Aug 08:26

[filesystem] Changes to filesystem_error

Hi all,

I moved now from 1.31 to 1.35 and have some problem to understand what I have to
change in the area of filesystem_error.
I applied all the changes belongs to the iterator stuff and the class itself,
but in my special error handling I use the 'who', 'error' and 'native_error'
methods which I can not find in the actual model.
Can you give me a clue, how I can get this information in 1.35.

regards
Arno
Ross Wightman | 20 Aug 05:56

1.35/1.36 thread library and date_time dependency

After looking through the new 1.35/1.36 threading library (with a lot
of nice changes), I am wondering why the decision to tie it to
boost::date_time was made?

I love date_time as a library, but I believe it's is too large and
cumbersome to be tied to a core threading library. It pulls in an
excessively large include tree whenever I want to use a mutex or
conditional variable. The call tree for doing simple comparisons and
calculations at second to nanosecond scales is also excessive. There
will always be unnecessary converting from seconds and nanoseconds,
into the date_time's internal date + ticks format, and back to seconds
and nanoseconds.

A more fully realized 'xtime' with functions for easy conversion
to/from date_time in an optional header would be a much better
approach in my opinion. The C++0x draft standard looks like it uses a
lean 'system_time' class which is a small subset of date_time.

Regards,

Ross
Ross Wightman | 20 Aug 05:35

Bug in 1.35/1.36 thread absolute timed waits

There is an integer arithmetic bug in get_due_time() used by
conditional variables in the boost 1.35/1.36 threading library. On
line 343 in thread/src/win32/thread.cpp, integer division is performed
before multiplication leaving the possibility of an erroneous 0 result
in the case where ticks_per_second is larger than
hundred_nanoseconds_in_one_second. Moving the brackets around the
multiply or removing them altogether will fix this problem.

I think this may only show itself if boost::date_time is setup so that
BOOST_DATE_TIME_HAS_NANOSECONDS is true (the way I need it).
e r | 20 Aug 05:26

dereference problems with iterator_facade

hello,

i have a build error when i try to use an iterator derived from
iterator_facade<Iter> with Iter an iterator over a const Range. It's the
const that causes the error. See the *.hpp below and an example.

any other suggestion to improve the *hpp also appreciated.

thanks!

///////////////////////////////////////////////////////////////////////////////
// boost::skip_one_step_iterator.hpp
//
//  Copyright 2008 Erwann Rogard. Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_ITERATOR_SKIP_ONE_STEP_ITERATOR_HPP_ER200808
#define BOOST_ITERATOR_SKIP_ONE_STEP_ITERATOR_HPP_ER200808
#include <iterator>
#include <stdexcept>
#include <boost/iterator/iterator_facade.hpp>

#include <boost/iterator/iterator_traits.hpp>
#include <boost/range.hpp>
#include <boost/assert.hpp>
#include <boost/type_traits.hpp>
namespace boost{

namespace{
(Continue reading)

Neil Fang | 20 Aug 04:40

Boost-users] [python]How to pass C++ object reference to python code?

I'm trying embedding python using boost::python. Just as the same way
as the boost::python quick start "embedding.cpp".
I have a C++ base class, with a virtual function do something on
another C++ object:
struct MyClass
{
	void printThis()
	{
		std::cout << "0x" << this << std::endl;
	}
};

// An abstract base class
class Base : public boost::noncopyable
{
public:
	virtual ~Base() {};
	virtual void printMyClass(MyClass& myObj) = 0;
};

Than, I want to write some Python derived class code:
"from embedded_hello import *        \n"
"class PythonDerived(Base):          \n"
"    def printMyClass(self, myObj):                \n"
"        myObj.printThis() \n"

But I found that the "myObj" passed to python code is another obj, not
the object created in C++ code. How can use the object created in C++
object rather than a copyed object? Thanks!

(Continue reading)

Mickael Wolff | 19 Aug 19:29

[Boost.Regex] regex_basic subpatterns iterators

  Hi,

  I would like know if they are some method I missed to point
parenthesis expression in basic_regex. For example, I would like to
write something like this :

=== 8< ===
std::pair<std::string::iterator, std::string::iterator> mark ;
boost::regex re("(\w+)") ;

if(re.mark_count() == 2)
{
   first_mark.first = re.marks[1].begin() ;
   first_mark.second = re.marks[1].end() ;
}
=== 8< ===

  My current solution is to do a regex on the regex, but I guess
boost::regex did the work yet.

  Greetings, Mickaël.

PS.: please apologize my english, I'm French.

--

-- 
Mickaël Wolff aka Lupus Michaelis
Racine <http://lupusmic.org>
Blog   <http://blog.lupusmic.org>
_______________________________________________
Boost-users mailing list
(Continue reading)

antonyc | 19 Aug 19:25

boost.python - undefined symbol error


I've just started this morning with boost::python and have been struggling
all day to get the basic 
http://www.boost.org/doc/libs/1_35_0/libs/python/doc/tutorial/doc/html/python/exposing.html
'exposing classes' doc/tutorial:  to link correctly under gcc  4.1.2.  I
would greatly appreciate any help as I'm sure it's probably something simple
and I'm pretty much at a loss at the moment.

So the source file  compiles and the shared object appears to link ok
however when I try and import the module, python reports the following
missing symbol:

ImportError: /test/BoostPython/hello.so: undefined symbol:
_ZN5boost6python9converter8registry6insertEPFPvP7_objectEPFvS5_PNS1_30rvalue_from_python_stage1_dataEENS0_9type_infoE

de-mangled courtesy of c++filt:

boost::python::converter::registry::insert(void* (*)(_object*), void
(*)(_object*, boost::python::converter::rvalue_from_python_stage1_data*),
boost::python::type_info)

Indeed a search through the boost.python headers yields no such function
prototype. Nor does searching the symbols defined in
libboost_python-gcc41-mt.so.
The closest match I can find in libboost_python-gcc41-mt.so is:

boost::python::converter::registry::insert(void* (*)(_object*), void
(*)(_object*, boost::python::converter::rvalue_from_python_stage1_data*),
boost::python::type_info, _typeobject const* (*)())

(Continue reading)

Daniel Mierswa | 19 Aug 17:42

boost.asio async_write/read_until guarantee

Hi,
if i have a threadpool running an io_service and a read_until is invoked
before async_write. Now i wonder what would happen if the string is
written to the socket, will the write handler be called before the
read_handler or is it undefined in which order they will be invoked? If
it's not guaranteed can anyone think of a solution to create such a
guarantee in my own program? (I posted the same question on the asio
mailinglist but i assume there's more activity here)
Thanks in advance

--

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply 
know better than you do.
               --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22

Gmane