<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lib.boost.user">
    <title>gmane.comp.lib.boost.user</title>
    <link>http://blog.gmane.org/gmane.comp.lib.boost.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74272"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74271"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74268"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74267"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74264"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74262"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74256"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74251"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74249"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74248"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74247"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74245"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74240"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74239"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74227"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74226"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74222"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74217"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74214"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.boost.user/74207"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74272">
    <title>logger progress?</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74272</link>
    <description>&lt;pre&gt;Hello,

How is the boost logger going for proper inclusion?

Thanks,
Vic
&lt;/pre&gt;</description>
    <dc:creator>Victor Whiskey Yankee</dc:creator>
    <dc:date>2012-05-26T15:28:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74271">
    <title>Apple "Block" closures and boost::function</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74271</link>
    <description>&lt;pre&gt;I'm looking at using Apple's proprietary closure blocks as a substitute for C++ lambda 
functions on a project that needs to be portable between Mac (LLVM 3.1, but not using the 
C++0x dialect compiler switch) and Windows (Visual Studio 10).  The project uses Boost.TR1 
to supply std::tr1::function and related stuff on the Mac build.

Now I found that the compiler handles the nonstandard block objects in Functor-like 
template situations in a manner perfectly analogous to C-style pointers to functions.  I 
can even assign one to a boost::function with no complaint!

The only issue seems to be that it never calls Block_copy/Block_release.  So it works OK 
for passing them to STL algorithms that uses them on the spot, but will probably do bad 
things if used in general.

Does anybody have something ready-made, to efficiently add the copy/destroy semantics to 
functors that hold such "blocks"?  That would be much more efficient than wrapping them in 
another layer.  Or, any pointers to the Boost innerds for doing that myself?

Thanks,
—John

_______________________________________________
Boost-users mailing list
Boost-users&amp;lt; at &amp;gt;lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users&lt;/pre&gt;</description>
    <dc:creator>John M. Dlugosz</dc:creator>
    <dc:date>2012-05-26T14:41:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74268">
    <title>Asynchronous signals library</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74268</link>
    <description>&lt;pre&gt;The signals and signals2 library work with signals ( events ) which are 
handled synchronously. Is there any Boost library, based on the function 
prototyping methods of signals(2), in which the signals are handled 
asynchronously ?
&lt;/pre&gt;</description>
    <dc:creator>Edward Diener</dc:creator>
    <dc:date>2012-05-26T02:56:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74267">
    <title>Why does the fusion::set repeated keys?</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74267</link>
    <description>&lt;pre&gt;Hi,

In this simple code, I expect that the size of the fusion::set is
equal to one, because keys are the same.
Why the size is equal to two?

#include &amp;lt;boost/fusion/container/set.hpp&amp;gt;
#include &amp;lt;boost/fusion/include/set.hpp&amp;gt;
#include &amp;lt;boost/fusion/container/set/set_fwd.hpp&amp;gt;
#include &amp;lt;boost/fusion/include/set_fwd.hpp&amp;gt;
#include &amp;lt;boost/fusion/sequence/intrinsic/size.hpp&amp;gt;
#include &amp;lt;boost/fusion/include/size.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;

int main() {
   typedef boost::fusion::set&amp;lt;int, int&amp;gt; set1;
   set1 s1;

   std::cout
   &amp;lt;&amp;lt; "size1 = " &amp;lt;&amp;lt; boost::fusion::result_of::size&amp;lt;set1&amp;gt;::type::value
   &amp;lt;&amp;lt; ", size2 = " &amp;lt;&amp;lt; boost::fusion::size(s1)
   &amp;lt;&amp;lt; std::endl;
}

http://liveworkspace.org/code/166b54cdd208f7b252bf1f38a1a6ec4b

Thanks!


&lt;/pre&gt;</description>
    <dc:creator>niXman</dc:creator>
    <dc:date>2012-05-26T02:04:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74264">
    <title>[Test] main for BOOST_TEST_DYN_LINK with manualregistration</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74264</link>
    <description>&lt;pre&gt;What from example 15 from the Boost.Test "Manually registered test
suites" documentation[1] needs to change if instead of
   #include &amp;lt;boost/test/included/unit_test.hpp&amp;gt;
one used
   #define BOOST_TEST_DYN_LINK
   #include &amp;lt;boost/test/unit_test.hpp&amp;gt;
?

the unit_test_main, but I'm at a loss for what it would look like...
I don't think I'm running afoul of BOOST_TEST_ALTERNATIVE_INIT_API
from reading &amp;lt;boost/test/unit_test.hpp&amp;gt; where the main() definition
cares nothing about that #define, but I could be wrong.

Help or a known-good example much appreciated,
Rhys

[1] http://www.boost.org/doc/libs/1_49_0/libs/test/doc/html/utf/user-guide/test-organization/manual-test-suite.html
[2] http://www.boost.org/doc/libs/1_49_0/libs/test/doc/html/utf/user-guide/test-runners.html
&lt;/pre&gt;</description>
    <dc:creator>Rhys Ulerich</dc:creator>
    <dc:date>2012-05-25T21:28:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74262">
    <title>"invalid signature" in boost::archive::binary_iarchive</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74262</link>
    <description>&lt;pre&gt;I had to port a multi-process application to 64 bits and I rely on boost
serialization to send messages, that are maps of key-values, into Microsoft
queues to the other modules. It works just fine into 32 bits but when I run
it in 64 the constructor throws an "invalid signature" exception

void Message::fromBinary( const std::string&amp;amp; data )
{
  std::stringstream ss;
  ss &amp;lt;&amp;lt; data;
  boost::archive::binary_iarchive ia(ss); //exception here

  ia &amp;gt;&amp;gt; *this;
}

I managed to debug into basic_binary_iarchive.ipp and this 'if' &amp;lt; at &amp;gt; line 72
fails

if(file_signature != BOOST_ARCHIVE_SIGNATURE())

boost::serialization::throw_exception(archive_exception(archive_exception::invalid_signature));

inside this file I have no debug symbols so I don't know the values of
'file_signature' and 'BOOST_ARCHIVE_SIGNATURE' or where
BOOST_ARCHIVE_SIGNATURE is defined.

Some additional information: the modules are all running on the same
machine, on windows 7 64-bits, and  compiled by visual studio 2010 x64
including static boost libraries 1.45.

What causes this and how can I fix it?
_______________________________________________
Boost-users mailing list
Boost-users&amp;lt; at &amp;gt;lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users&lt;/pre&gt;</description>
    <dc:creator>Ibrahim Beicker</dc:creator>
    <dc:date>2012-05-25T18:44:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74256">
    <title>[container] Compilation failure with clang 3.1</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74256</link>
    <description>&lt;pre&gt;Hello,

When compiling Boost.Container, clang 3.1 (stable release, Mac OS X 10.7.4) 
fails:
 

However gcc 4.7 has no problem with it. Does anyone has experienced the 
same thing and possibly found a workaround?

Thank you!

Alexandre Hamez

_______________________________________________
Boost-users mailing list
Boost-users&amp;lt; at &amp;gt;lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users&lt;/pre&gt;</description>
    <dc:creator>Alexandre Hamez</dc:creator>
    <dc:date>2012-05-25T08:07:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74251">
    <title>[msm] Two identical orthogonal regions?</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74251</link>
    <description>&lt;pre&gt;Hi,

I am trying to put two identical orthogonal regions in a state machine 
(each region would model a "channel" and I can have multiple such 
channels).

One way I can think of is duplicating the states through typedefs and 
duplicating entries in the transition table.

Is there a way to avoid this duplication?

Regards,
a.
&lt;/pre&gt;</description>
    <dc:creator>Aurelian Melinte</dc:creator>
    <dc:date>2012-05-24T18:25:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74249">
    <title>Iterator concept checking</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74249</link>
    <description>&lt;pre&gt;I'm trying to learn to use BOOST_CONCEPT_CHECK for custom iterators,
ranges, and containers.  I've built a simple linked list class with an
iterator (and const_iterator) that, as far as I can tell, satisfies the
forward traversal iterator requirements.  However, g++ gives the
following errors:

concept.cpp:81: error: `*' cannot appear in a constant-expression
concept.cpp:81: error: a call to a constructor cannot appear in a
constant-expression
concept.cpp:81: error: template argument 1 is invalid
concept.cpp:81: error: template argument 1 is invalid
concept.cpp:82: error: `*' cannot appear in a constant-expression
concept.cpp:82: error: a call to a constructor cannot appear in a
constant-expression
concept.cpp:82: error: template argument 1 is invalid
concept.cpp:82: error: template argument 1 is invalid
concept.cpp:83: error: `*' cannot appear in a constant-expression
concept.cpp:83: error: a call to a constructor cannot appear in a
constant-expression
concept.cpp:83: error: template argument 1 is invalid
concept.cpp:83: error: template argument 1 is invalid
concept.cpp:84: error: `*' cannot appear in a constant-expression
concept.cpp:84: error: a call to a constructor cannot appear in a
constant-expression
concept.cpp:84: error: template argument 1 is invalid
concept.cpp:84: error: template argument 1 is invalid

Compiling with -E, lines 81-84 are as follows:

typedef ::boost::concepts::detail::instantiate&amp;lt;
&amp;amp;::boost::concepts::requirement_&amp;lt;void(*)(boost::concepts::ForwardTravers
alIterator&amp;lt;iterator&amp;gt;)&amp;gt;::failed&amp;gt; boost_concept_check81;
typedef ::boost::concepts::detail::instantiate&amp;lt;
&amp;amp;::boost::concepts::requirement_&amp;lt;void(*)(boost::concepts::WritableIterat
or&amp;lt;iterator&amp;gt;)&amp;gt;::failed&amp;gt; boost_concept_check82;
typedef ::boost::concepts::detail::instantiate&amp;lt;
&amp;amp;::boost::concepts::requirement_&amp;lt;void(*)(boost::concepts::ForwardTravers
alIterator&amp;lt;const_iterator&amp;gt;)&amp;gt;::failed&amp;gt; boost_concept_check83;
typedef ::boost::concepts::detail::instantiate&amp;lt;
&amp;amp;::boost::concepts::requirement_&amp;lt;void(*)(boost::concepts::ReadableIterat
or&amp;lt;const_iterator&amp;gt;)&amp;gt;::failed&amp;gt; boost_concept_check84;

That tells me that, regardless of why g++ is having trouble, my iterator
fails to satisfy the concept somehow.  So I wrote some code (see
my_naive_check, below) to try to figure out which requirement is
failing, but my check code is missing the same thing as the iterator,
because the check code runs fine.

Any pointers much appreciated.



// concept.cpp
// What's wrong with the iterators?

#include &amp;lt;cassert&amp;gt;
#include &amp;lt;cstdlib&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;string&amp;gt;

#include &amp;lt;boost/concept_check.hpp&amp;gt;
#include &amp;lt;boost/iterator/iterator_concepts.hpp&amp;gt;
#include &amp;lt;boost/iterator/iterator_facade.hpp&amp;gt;
#include &amp;lt;boost/lambda/lambda.hpp&amp;gt;
#include &amp;lt;boost/range/algorithm.hpp&amp;gt;

template &amp;lt;typename T&amp;gt;
class List {
  struct Node {
    Node(const T&amp;amp; value_, Node *next_): value(value_), next(next_) {}
    T value;
    Node *next;
  } *head;

public:
  List(): head(0) {}

  ~List() {
    Node *node = head;
    while (node) {
      Node *tmp = node-&amp;gt;next;
      delete node;
      node = tmp;
    }
  }

  void push_front(const T&amp;amp; value) { head = new Node(value, head); }

  class iterator:
  public boost::iterator_facade&amp;lt;iterator,
                                T,
                                boost::forward_traversal_tag&amp;gt;
  {
  public:
    iterator(): node(0) {}

  private:
    iterator(Node * const node_): node(node_) {}
    friend class List;

    friend class boost::iterator_core_access;
    T&amp;amp; dereference() const { return node-&amp;gt;value; }
    bool equal(const iterator&amp;amp; rhs) const { return node == rhs.node; }
    void increment() { node = node-&amp;gt;next; }

    Node *node;
  };

  iterator begin() { return iterator(head); }
  iterator end() { return iterator(); }

  class const_iterator:
  public boost::iterator_facade&amp;lt;const_iterator,
                                const T,
                                boost::forward_traversal_tag&amp;gt;
  {
  public:
    const_iterator(): node(0) {}
    const_iterator(const iterator&amp;amp; old): node(old.node) {}

  private:
    friend class boost::iterator_core_access;
    const T&amp;amp; dereference() const { return node-&amp;gt;value; }
    bool equal(const const_iterator&amp;amp; rhs) const { return node ==
rhs.node; }
    void increment() { node = node-&amp;gt;next; }

    const Node *node;
  };

  const_iterator begin() const { return const_iterator(head); }
  const_iterator end() const { return const_iterator(); }

 
BOOST_CONCEPT_ASSERT((boost::concepts::ForwardTraversalIterator&amp;lt;iterator
  BOOST_CONCEPT_ASSERT((boost::concepts::WritableIterator&amp;lt;iterator&amp;gt;));
 
BOOST_CONCEPT_ASSERT((boost::concepts::ForwardTraversalIterator&amp;lt;const_it
erator&amp;gt;));
 
BOOST_CONCEPT_ASSERT((boost::concepts::ReadableIterator&amp;lt;const_iterator&amp;gt;)
);
};

/*
ForwardTraversalIterator must be
  SinglePassIterator
    IncrementableIterator
      Assignable
      Copy Constructible
      &amp;amp;r == &amp;amp;++r
      r++
      *r++
    ==
    !=
    difference_type
  DefaultConstructible
  iterator_traversal&amp;lt;X&amp;gt;::type =&amp;gt; forward_traversal_tag
*/
void my_naive_check(List&amp;lt;std::string&amp;gt;&amp;amp; words) {
  typedef List&amp;lt;std::string&amp;gt;::iterator It;
  It it1 = words.end();
  it1 = words.begin();
  &amp;amp;it1 == &amp;amp;++it1;
  It it2 = it1++;
  std::string word = *it2++;
  assert(it1 == it2);
  assert(words.begin() != words.end());
  It::difference_type distance = 0;
  It it3;
  boost::forward_traversal_tag tag =
boost::iterator_traversal&amp;lt;It&amp;gt;::type();
}

int main() {
  List&amp;lt;std::string&amp;gt; words;
  words.push_front("world");
  words.push_front("Hello");
  my_naive_check(words);
  boost::for_each(words, std::cout &amp;lt;&amp;lt; boost::lambda::_1 &amp;lt;&amp;lt; "\n");
  return EXIT_SUCCESS;
}

________________________________________

This E-Mail (including any attachments) may contain privileged or confidential information.  It is intended only for the addressee(s) indicated above.

The sender does not waive any of its rights, privileges or other protections respecting this information.  

Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited.

If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately. 

This E-Mail (including any attachments) has been scanned for viruses. 

It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened. 

However, it is the responsibility of the recipient to ensure that it is virus free. 

The sender accepts no responsibility for any loss or damage arising in any way from its use.

E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel. 

Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information.

IRS CIRCULAR 230 NOTICE:  TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVICE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER.
_______________________________________________
Boost-users mailing list
Boost-users&amp;lt; at &amp;gt;lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users&lt;/pre&gt;</description>
    <dc:creator>McNamara, Nate</dc:creator>
    <dc:date>2012-05-24T15:39:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74248">
    <title>boost::asio one connectio-per-thread</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74248</link>
    <description>&lt;pre&gt;Hello,
is this a code appropriate?

    boost::asio::io_service io_service;
    tcp::acceptor a(io_service, tcp::endpoint(tcp::v4(),3080));
    for (;;) {
        socket_ptr sock(new tcp::socket(io_service));
        a.accept(*sock);
        emv_clientthread_ptr cli(new axf::server::server_socket(sock));
        boost::thread t(boost::bind(&amp;amp;axf::server::server_socket::start, 
cli));
    }
appreciate any help.
Christer 
&lt;/pre&gt;</description>
    <dc:creator>Christer Borgqvist</dc:creator>
    <dc:date>2012-05-24T08:25:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74247">
    <title>[multi_index] movable only types</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74247</link>
    <description>&lt;pre&gt;Hi,

with boost.move available are there any plans to make multi_index work
with movable-only types?

&lt;/pre&gt;</description>
    <dc:creator>Szymon Gatner</dc:creator>
    <dc:date>2012-05-23T20:40:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74245">
    <title>[Geometry] spatial linestring access along line</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74245</link>
    <description>&lt;pre&gt;Hi all,

before I begin, let me tell that geometry is not exactly my strong
suite so please forgive my probably dumb question.

I have started to work with boost geometry which, I find very neat,
and assembled a line string.

Now I basically need a method that gives me a point to a length value.
Like when my linestring is 100 units long and I say give me the point
at 3 I want the exact position of the point (coordinates) as if I were
following the line for exactly 3 units.

I have an approach that would allow me to implement this myself by
following the segments (possibly after indexing them) but I have a
feeling that one of those many functions provided by the library
itself might do just that and I simply don't know it. If anyone knows
if such is the case, would be nice to give me a heads up.

Thanks,

Stephan
&lt;/pre&gt;</description>
    <dc:creator>Stephan Menzel</dc:creator>
    <dc:date>2012-05-23T15:08:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74240">
    <title>Spirit, StateChart, MSM</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74240</link>
    <description>&lt;pre&gt;Hi,

What are the differences between these three libraries? I feel I can use
any of these libs. Is there any page where the comparison/pros&amp;amp;cons are
listed and so on?

Best regards, Asif
_______________________________________________
Boost-users mailing list
Boost-users&amp;lt; at &amp;gt;lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users&lt;/pre&gt;</description>
    <dc:creator>asif saeed</dc:creator>
    <dc:date>2012-05-23T07:10:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74239">
    <title>[mpi] multithreaded/funneled messaging</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74239</link>
    <description>&lt;pre&gt;Hi all -

Is boost.mpi able to work with MPI_THREAD_MULTIPLE?  If so, how is it specified?

Thanks,
  Brian
&lt;/pre&gt;</description>
    <dc:creator>Brian Budge</dc:creator>
    <dc:date>2012-05-22T20:23:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74227">
    <title>boost::serialization "input stream error" inrelease-build (msvc2010)</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74227</link>
    <description>&lt;pre&gt;Hi!

I'm using boost::serialization to save a structure to a file and read from
a file. My code works perfect in debug-build, but in release-build an
exception is thrown. I'm using MSVC2010 to build the project on Windows 7
64-Bit-Machine. The code is the same. Who could help me out?

You can find the code here: http://boost.codepad.org/8fp6XnC3


Thank you very much!!!!
_______________________________________________
Boost-users mailing list
Boost-users&amp;lt; at &amp;gt;lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users&lt;/pre&gt;</description>
    <dc:creator>Jens Saathoff</dc:creator>
    <dc:date>2012-05-22T08:32:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74226">
    <title>[iostreams] Memory mapped file resize</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74226</link>
    <description>&lt;pre&gt;Hello,

It appears that the implementation of mapped_file in iostreams does
have a resize method, but it isn't documented. If I'm going to be
resizing a mapped_file_sink, are there any issues I need to be aware
of? Particularly around the use of iterators.

Thanks.
&lt;/pre&gt;</description>
    <dc:creator>Vitaly Budovski</dc:creator>
    <dc:date>2012-05-22T07:36:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74222">
    <title>boost::signals2::signal - is a "decimated" versionavailable?</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74222</link>
    <description>&lt;pre&gt;Hi,

I'm using boost::signals2::signal to notify a dialog when the state of
an underlying object has changed.

The signal is sometimes is generated at 100Hz.  Other times it is
generated at 1Hz.  The dialog provides a "slot" for this signal that
updates the controls on the screen.  I'd like to limit the "slot rate"
to 10Hz.  By "slot rate" I mean the rate at which the slot receives
notification from the signal.  This will prevent the screen updates
from happening faster than can be seen.

Has this been done already?  If not, I'm going to implement something
like the pseudocode below.  Currently I'm not sure how I to specify
"arguments" nor how I am going to specify the function "SlotCallback".

Thank you,

Chris

===

Pseudocode:

float MaxPeriod = 0.001; // 10Hz

class SignalDecimator
{

public:

  void Register(signal Signal, slot Slot)
  {
    Signal.connect(&amp;amp;SignalDecimator::SlotCallback, this, _1, _2, _3, _4...);

    mSlot = Slot;
  }

private:

  void SlotCallback(arguments Arguments)
  {
    if (TimeSinceLastCall() &amp;gt; MaxPeriod)
    {
      mSlot(Arguments);
    }
    else
    {
      mArguments = Arguments;

      if (!TimerIsRunning())
      {
        StartTimer(MaxPeriod - TimeSinceLastCall());
      }
    }
  }

  void TimerCallback()
  {
    mSlot(mArguments);
  }

  slot mSlot;

  timer mTimer;

  arguments mArguments;
}
&lt;/pre&gt;</description>
    <dc:creator>Chris Stankevitz</dc:creator>
    <dc:date>2012-05-22T00:01:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74217">
    <title>Deriving custom archive classes from boost::archive::text_oarchive_impl and boost::archive::text_iarchive_impl</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74217</link>
    <description>&lt;pre&gt;*Note:
Boost's archive scheme is based on symmetrical input and output archive
classes.  It's tedious to write about both of them all the time, so I'll
use "?archive" to mean both "oarchive" and "iarchive".*

*Summary:*
After changing the base classes of my custom archives from
binary_?archive_impl to text_?archive_impl, my custom archive classes are
no longer "found" when the compiler is instantiating the serialize(...)
methods in my other classes.

*Background:*
My application was successfully reading and writing files to disk using
subclasses of binary_?archive_impl (the documentation and/or code comments
recommend this over deriving from binary_oarchive).  I needed to switch
from a binary file format to a text format, so I switched the base classes
of my custom archives to text_?archive_impl.  That's when everything blew
up.

*The problem:*
My custom archive classes add functionality, including some additional
methods which do not exist in their Boost base classes; these methods are
called in the serialize(...) methods in many of my classes, and they were
working fine.  After changing the base classes from binary_?archive_impl to
text_?archive_impl, I received compilation errors all over the place
complaining that my custom methods do not exist in text_?archive.  Well,
that's obvious (!!!), but they DO exist in my CUSTOM archives, and they
were working JUST FINE when I was using Boost's binary base classes.
What's the deal?

*What I found, and my temporary - but undesirable - solution:*
After tearing my hair out and going around in circles for about a day, this
is what I found...
1) Some time ago (Boost 1.34 I believe), the files "binary_?archive.hpp"
were split up into "binary_?archive_impl.hpp" and "binary_?archive.hpp"
(the latter #include the former).  This WAS NOT done to
"text_?archive.hpp".  (As a result, I changed my application's #include
lines from "binary_?archive_impl.hpp" to simply "text_?archive.hpp".)
2) If I split up "text_?archive.hpp" into two parts and #include only the
"..._impl.hpp" headers, everything works.  (But I really DON'T want to
modify my Boost installation!)
3) Looking more closely at these headers and fiddling around a bit, I found
that if I use the original, unmodified headers and comment out the line

BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_oarchive)

(and likewise for text_iarchive), then everything works fine again.  (By
the way I have similar lines in my own archive code to "register" my custom
archives.)

*The mystery, and my dilemma:*
A) Why does the presence of those lines foul up the works?  ...and why does
removing them make things work?  ...and what might I have broken (without
knowing it) by doing so?
B) Why were the "text_?archive.hpp" files NOT split up along with the
"binary_?archive.hpp" files a long time ago?  (Is the library broken?
Should it be fixed?)
C) Is there any way to solve this in my application code WITHOUT modifying
my Boost installation?

*P.S. I'm using Boost 1.48 and Visual Studio 2010 SP1 (64-bit)*
_______________________________________________
Boost-users mailing list
Boost-users&amp;lt; at &amp;gt;lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users&lt;/pre&gt;</description>
    <dc:creator>Aldo Longhi</dc:creator>
    <dc:date>2012-05-21T19:57:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74214">
    <title>Problem compiling with boost thread</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74214</link>
    <description>&lt;pre&gt;Hello,

I am trying to compile my application with Boost thread library (1.49.0) on
Ubuntu 11.10 (gcc 4.6.1).

However I see this error:

$(BOOST_PATH)/include/boost/thread/detail/config.hpp:29:24: fatal error:
platform.hpp: No such file or directory
compilation terminated.

In the file $(BOOST_PATH)/include/boost/thread/detail/config.hpp, the
platform.hpp is included as:

#include "platform.hpp"

If I change that to:

#include &amp;lt;boost/thread/detail/platform.hpp&amp;gt;

this error goes away.

However, there are a lot of places where headers are included using
relative path, thereby causing compilation errors.

Is there a workaround for this?

Thanks,
Raj

&lt;/pre&gt;</description>
    <dc:creator>Rajalakshmi Iyer</dc:creator>
    <dc:date>2012-05-21T10:23:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74207">
    <title>First attempt at using Boost::Test is a flop: theprogram ends with an exception related to std::string but Idon't use any</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74207</link>
    <description>&lt;pre&gt;Here is the full output from my program:

 

$ ./decision.test.suite

terminate called after throwing an instance of 'std::logic_error'

  what():  basic_string::_S_construct NULL not valid

Aborted (core dumped)

 

Now, all the code in this program is focussed on number crunching, so none
of it involves strings.  I am guessing that I missed something in setting up
a test suite.

 

After including the headers for the function objects being tested (some of
which are template classes) as well as headers for several boost libraries,
I have the following:

 

 

#define BOOST_TEST_MAIN decision_tests

#include &amp;lt;boost/test/unit_test.hpp&amp;gt;

#include &amp;lt;boost/test/floating_point_comparison.hpp&amp;gt;

 

BOOST_AUTO_TEST_SUITE( test_decisions )

 

BOOST_AUTO_TEST_CASE( test_dist_moments ) {

 

And I have a series of test cases that start the same way.

 

After setting up the required data for each test, I use something like:

 

    BOOST_CHECK_CLOSE( Sm, 0.00000000000, 0.0001 );

 

or something like:

 

  BOOST_CHECK(ibll(x1,i) == true);

  

Of course each test case ends with a closing '}' and the whole program ends
with:

 

BOOST_AUTO_TEST_SUITE_END()

 

Now, I know I can write a suite of unit tests without using Boost::Test, but
I was hoping I'd just missed something obvious.  I don't even know where to
look for the cause of this exception since none of the code I actually wrote
that is involved in these tests makes any use at all of any strings.

 

My guess is that I must have missed some macro required by the unit test
framework that is required in order to ensure whatever string object is
involved in this exception doesn't get a NULL value.  Or maybe I missed a
header.  I really have no idea where to look for the cause of this problem.

 

Any guidance on what to look for or what I may have missed, would be greatly
appreciated.

 

Cheers

 

Ted

 

_______________________________________________
Boost-users mailing list
Boost-users&amp;lt; at &amp;gt;lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users&lt;/pre&gt;</description>
    <dc:creator>Ted Byers</dc:creator>
    <dc:date>2012-05-21T03:50:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.boost.user/74205">
    <title>Rational: [PATCH] Eliminate excessive calls to gcdand add operator%</title>
    <link>http://comments.gmane.org/gmane.comp.lib.boost.user/74205</link>
    <description>&lt;pre&gt;Hi.

I am using boost/rational.hpp in my code to represent musical time with
rational numbers.  I have found some possible improvements.  These
improvements have accumulated into a small patch which I'd like to
present for review.  I think it is worth applying.  There doesn't appear
to be a maintainer for rational.hpp though, so I am writing to the list.

The story: In my application I need a remainder operation. Looking at
rational.hpp and its work-horse operators.hpp it became rather obvious
that rational.hpp can and (in my opinion) should implement operator%=
and friends.  operator%= can easily be defined as

return operator-= (other * rational_cast&amp;lt;int_type&amp;gt;(*this / other));

I have been using this definition for operator%= successfully in my code
for quite a while.  During a profiling session it showed up which made
me think a bit more.  Actually, the current way how rational.hpp
implements mixed-mode operators is a waste of performance.  It calls the
corresponding operator with a temporary rational where the denominator
is always equal to 1.  However, this means that there are excessive
(unnecessary) calls to boost::math::gcd performed by the operators.  For
instance, addition of two rational numbers needs two calls to gcd.  On
the other hand, addition of a rational number and an integer can be
performed without any gcd at all (n += d * i).  Similarily,
multiplication of two rational numbers needs two calls to gcd, while
multiplication of a rational with an integer only needs one call to gcd.
So it is definitely worth it to actually define the mixed mode operators
not in terms of the already existing operators but reimplement them with
the unnecessary calls to gcd removed.

After this, the definition of operator%=(const rational&amp;amp;) results in one
less call to gcd (because there is one mixed-mode multiplication
involved) and the definition of operator%=(param_type) saves two
unnecessary calls to gcd since there is one mixed-mode multiplication
and one mixed-mode division involved.  Obviously, all code that involves
mixed-mode operators benefits from these changes.

As a side effect of reading code I noticed that the definition of
operator=(param_type) (assign from an integer) also does unnecessary
gcd.  It currently calls assign(n, 1) which itself calls normalize()
which does gcd.  However, as above, we know that there is no need to
calculate gcd of (n, 1) since it will always be 1.  So I changed the
definition of operator=(param_type) to directly assign the parameter to
num and set den to 1, instead of calling assign().  Another useless call
of gcd squashed!

On top of these, we can observe that now that boost::rational provides
operator%= it is actually an instance of ordered_euclidean_ring_operators.

Comments and committers welcome.

Index: rational.hpp
===================================================================
--- rational.hpp(Revision 78523)
+++ rational.hpp(Arbeitskopie)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -21,6 +21,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 //    Nickolay Mladenov, for the implementation of operator+=
 
 //  Revision History
+//  05 May 12  Add operator% and reduced use of implicit gcd (Mario Lang)
 //  05 Nov 06  Change rational_cast to not depend on division between different
 //             types (Daryle Walker)
 //  04 Nov 06  Off-load GCD and LCM to Boost.Math; add some invariant checks;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -105,23 +106,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 template &amp;lt;typename IntType&amp;gt;
 class rational :
-    less_than_comparable &amp;lt; rational&amp;lt;IntType&amp;gt;,
-    equality_comparable &amp;lt; rational&amp;lt;IntType&amp;gt;,
-    less_than_comparable2 &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
-    equality_comparable2 &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
-    addable &amp;lt; rational&amp;lt;IntType&amp;gt;,
-    subtractable &amp;lt; rational&amp;lt;IntType&amp;gt;,
-    multipliable &amp;lt; rational&amp;lt;IntType&amp;gt;,
-    dividable &amp;lt; rational&amp;lt;IntType&amp;gt;,
-    addable2 &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
-    subtractable2 &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
-    subtractable2_left &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
-    multipliable2 &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
-    dividable2 &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
-    dividable2_left &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
-    incrementable &amp;lt; rational&amp;lt;IntType&amp;gt;,
-    decrementable &amp;lt; rational&amp;lt;IntType&amp;gt;
-    &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;
+    ordered_euclidean_ring_operators &amp;lt; rational&amp;lt;IntType&amp;gt;,
+    ordered_euclidean_ring_operators2 &amp;lt; rational&amp;lt;IntType&amp;gt;, IntType,
+    unit_steppable &amp;lt; rational&amp;lt;IntType&amp;gt;
+    &amp;gt; &amp;gt; &amp;gt;
 {
     // Class-wide pre-conditions
     BOOST_STATIC_ASSERT( ::std::numeric_limits&amp;lt;IntType&amp;gt;::is_specialized );
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -141,7 +129,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     // Default copy constructor and assignment are fine
 
     // Add assignment from IntType
-    rational&amp;amp; operator=(param_type n) { return assign(n, 1); }
+    rational&amp;amp; operator=(param_type i) { num = i; den = 1; return *this; }
 
     // Assign in place
     rational&amp;amp; assign(param_type n, param_type d);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -155,15 +143,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     rational&amp;amp; operator-= (const rational&amp;amp; r);
     rational&amp;amp; operator*= (const rational&amp;amp; r);
     rational&amp;amp; operator/= (const rational&amp;amp; r);
+    rational&amp;amp; operator%= (const rational&amp;amp; r);
 
-    rational&amp;amp; operator+= (param_type i);
-    rational&amp;amp; operator-= (param_type i);
+    rational&amp;amp; operator+= (param_type i) { num += i * den; return *this; }
+    rational&amp;amp; operator-= (param_type i) { num -= i * den; return *this; }
     rational&amp;amp; operator*= (param_type i);
     rational&amp;amp; operator/= (param_type i);
+    rational&amp;amp; operator%= (param_type i);
 
     // Increment and decrement
-    const rational&amp;amp; operator++();
-    const rational&amp;amp; operator--();
+    const rational&amp;amp; operator++() { num += den; return *this; }
+    const rational&amp;amp; operator--() { num -= den; return *this; }
 
     // Operator not
     bool operator!() const { return !num; }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -205,6 +195,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     void normalize();
 };
 
+// Type conversion
+template &amp;lt;typename T, typename IntType&amp;gt;
+inline T
+rational_cast(const rational&amp;lt;IntType&amp;gt;&amp;amp; r BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+    return static_cast&amp;lt;T&amp;gt;(r.numerator()) / static_cast&amp;lt;T&amp;gt;(r.denominator());
+}
+
 // Assign in place
 template &amp;lt;typename IntType&amp;gt;
 inline rational&amp;lt;IntType&amp;gt;&amp;amp; rational&amp;lt;IntType&amp;gt;::assign(param_type n, param_type d)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -327,50 +325,54 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     return *this;
 }
 
-// Mixed-mode operators
 template &amp;lt;typename IntType&amp;gt;
 inline rational&amp;lt;IntType&amp;gt;&amp;amp;
-rational&amp;lt;IntType&amp;gt;::operator+= (param_type i)
+rational&amp;lt;IntType&amp;gt;::operator%= (const rational&amp;lt;IntType&amp;gt;&amp;amp; r)
 {
-    return operator+= (rational&amp;lt;IntType&amp;gt;(i));
+    return operator-= (r * rational_cast&amp;lt;IntType&amp;gt;(*this / r));
 }
 
+// Mixed-mode operators
 template &amp;lt;typename IntType&amp;gt;
 inline rational&amp;lt;IntType&amp;gt;&amp;amp;
-rational&amp;lt;IntType&amp;gt;::operator-= (param_type i)
-{
-    return operator-= (rational&amp;lt;IntType&amp;gt;(i));
-}
-
-template &amp;lt;typename IntType&amp;gt;
-inline rational&amp;lt;IntType&amp;gt;&amp;amp;
 rational&amp;lt;IntType&amp;gt;::operator*= (param_type i)
 {
-    return operator*= (rational&amp;lt;IntType&amp;gt;(i));
+    // Avoid overflow and preserve normalization
+    IntType gcd = math::gcd(i, den);
+    num *= i / gcd;
+    den /= gcd;
+
+    return *this;
 }
 
 template &amp;lt;typename IntType&amp;gt;
-inline rational&amp;lt;IntType&amp;gt;&amp;amp;
+rational&amp;lt;IntType&amp;gt;&amp;amp;
 rational&amp;lt;IntType&amp;gt;::operator/= (param_type i)
 {
-    return operator/= (rational&amp;lt;IntType&amp;gt;(i));
-}
+    // Avoid repeated construction
+    IntType const zero(0);
 
-// Increment and decrement
-template &amp;lt;typename IntType&amp;gt;
-inline const rational&amp;lt;IntType&amp;gt;&amp;amp; rational&amp;lt;IntType&amp;gt;::operator++()
-{
-    // This can never denormalise the fraction
-    num += den;
+    if (i == zero) throw bad_rational();
+    if (num == zero) return *this;
+
+    // Avoid overflow and preserve normalization
+    IntType const gcd = math::gcd(num, i);
+    num /= gcd;
+    den *= i / gcd;
+
+    if (den &amp;lt; zero) {
+        num = -num;
+        den = -den;
+    }
+
     return *this;
 }
 
 template &amp;lt;typename IntType&amp;gt;
-inline const rational&amp;lt;IntType&amp;gt;&amp;amp; rational&amp;lt;IntType&amp;gt;::operator--()
+inline rational&amp;lt;IntType&amp;gt;&amp;amp;
+rational&amp;lt;IntType&amp;gt;::operator%= (param_type i)
 {
-    // This can never denormalise the fraction
-    num -= den;
-    return *this;
+    return operator-= (i * rational_cast&amp;lt;IntType&amp;gt;(*this / i));
 }
 
 // Comparison operators
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -477,12 +479,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 template &amp;lt;typename IntType&amp;gt;
 bool rational&amp;lt;IntType&amp;gt;::operator&amp;gt; (param_type i) const
 {
-    // Trap equality first
-    if (num == i &amp;amp;&amp;amp; den == IntType(1))
-        return false;
-
-    // Otherwise, we can use operator&amp;lt;
-    return !operator&amp;lt;(i);
+    return operator==(i)? false: !operator&amp;lt;(i);
 }
 
 template &amp;lt;typename IntType&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -583,24 +580,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     return os;
 }
 
-// Type conversion
-template &amp;lt;typename T, typename IntType&amp;gt;
-inline T rational_cast(
-    const rational&amp;lt;IntType&amp;gt;&amp;amp; src BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
-{
-    return static_cast&amp;lt;T&amp;gt;(src.numerator())/static_cast&amp;lt;T&amp;gt;(src.denominator());
-}
-
 // Do not use any abs() defined on IntType - it isn't worth it, given the
 // difficulties involved (Koenig lookup required, there may not *be* an abs()
 // defined, etc etc).
 template &amp;lt;typename IntType&amp;gt;
 inline rational&amp;lt;IntType&amp;gt; abs(const rational&amp;lt;IntType&amp;gt;&amp;amp; r)
 {
-    if (r.numerator() &amp;gt;= IntType(0))
-        return r;
-
-    return rational&amp;lt;IntType&amp;gt;(-r.numerator(), r.denominator());
+    return r.numerator() &amp;gt;= IntType(0)? r: -r;
 }
 
 } // namespace boost


&lt;/pre&gt;</description>
    <dc:creator>Mario Lang</dc:creator>
    <dc:date>2012-05-20T18:58:13</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lib.boost.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lib.boost.user</link>
  </textinput>
</rdf:RDF>

