I have created a client-server architecture using Boost Asio.
The entire thing works, I can send and receive messages, etc, so there is no question about the correctness. However, when I implement it in a real network, all of a sudden it becomes VERY slow. When I run the server and client on the same computer itgoes blazingly fast, but ...
Hi,
I have a vector string of dates in the from "dd-mmm-yyyy" so for example
todays date would be:
std::string today("07-Sep-2010");
I'd like to use the date class in boost but to create a date object the
constructor for date needs to be called as follows:
date test(2010,Sep,07);
Is there any easy/elegant way of passing da...
When building Boost binary libraries with bjam, one may specify which compiler to use, without specifying a particular compiler version, by using certain values for the --toolset= option. For example:
bjam --with-serialization --toolset=msvc
the toolset value msvc tells bjam to search your system for some version of Microsoft Visual C...
Is there an option in boost memory maps that forces it to start bringing the entire file into memory without pagefaulting first? Is that operating system dependent or is will it be mostly portable? I need to bring entire files into memory and while I don't care about the actual contents I am concerned by the time it takes. I kind of don'...
I want to parse a string with a sequence of double pairs into an std::map
with Boost Spirit.
I adapted the example from
http://svn.boost.org/svn/boost/trunk/libs/spirit/example/qi/key_value_sequence.cpp
but I have a problem with difining a proper qi::rule for key and value:
template <typename Iterator>
struct keys_and_values : qi::gra...
Hi,
About 3 months ago I managed to build boost libs and left myself the following instructions:
Extract boost to ->
cd C:\Program Files\boost\boost_1_43_0
Build bjam ->
bootstrap.bat
Issue the following command ->
bjam --toolset=msvc-9.0 stage variant=debug threading=multi link=static runtime-link=static --with-filesystem --wit...
So it is easy to create a win 32 project and use boost. I did not tried it yet but I plan to. I wonder If I can use boost in CLR mode. Is it possible? Has any one tried?
...
We needed serialization of quite large C++ class hierarchy with lots of inheritance, contraction, shared pointers, etc. I decided to use boost::serialization library.
My problem is that while compilation of this library on VS 2008 cl takes over 1 GB of RAM memory. I suppose this is caused by template-based serialization in Boost. This c...
I'm adding HTTPS support to code that does input and output using boost tcp::iostream (acting as an HTTP server).
I've found examples (and have a working toy HTTPS server) that do SSL input/output using boost::asio::read/boost::asio::write, but none that use iostreams and the << >> operators. How do I turn an ssl::stream into an iostre...
Using the boost serialization library I have a very simple serialize() member function, something like:
template <class Archive>
void serialize( Archive& ar, unsigned version )
{
ar & m_Searcher;
}
... and I want to keep it such simple (I don't want to use splitting in particular). But in a case of writing I want to do some...
In many cases I have classes that act like active objects (have a thread). And to avoid access violations I always have to wait for join in the destructor. Which is usually not a problem.
However imagine a release build with some bug (deadlock, livelock etc.) that causes join() not to return on time or at all, this would cause the enti...
Setup: I installed Cygwin with the GNU programming lineup (gcc, g++, make, and gdb) and successfully compiled an ran a program that I was working on. Then I decided to install boost into Cygwin because I will need to use typical boost stuff as my program develops. So, using the Cywing setup.exe, I installed boost. After this, the pro...
I want to record the std::type_info of a variable so that on load I will be able to re-create the appropriate type variable.
Saving will look like this:
friend class boost::serialization::access;
template<class Archive>
void save(Archive & ar, const unsigned int version) const
{
...
ar & BOOST_SERIALIZATION_NVP(typeid(value)); ...
I haven't done work in C/C++ for a little bit and was just wondering if any one can help me with porting this .Net C# code into C++ using Boost library (Boost.Asio)
So I have one function:
private const int bufferSize = 8192;
/// <summary>
/// The entry point of the application.
/// </summary>
/// <param name="args">The input argumen...
boost::regex re("^\\s*([_\\w\\.]+)\\s*=\\s*([^\\s]+)$");
if(re.empty()){
std::cout<<"How is this possible?"<<std::endl;
}
That line prints in my release builds! (The debug builds are fine)
Working with MSVC 2008 (vc 9.0)
Compiler options for DEBUG:
/Od /I "C:\Program Files\boost\boost_1_44_0" /I "C:\gtest-1.5.0\include" /I "includ...
Hi all!
example:
template<typename T>
struct type_of {
typedef boost::mpl::if_<boost::is_pointer<T>,
typename boost::remove_pointer<T>::type,
T
>::type type;
};
int main() {
int* ip;
type_of<ip>::type iv = 3; // error: 'ip' cannot appear in a constant-expression
}
thenks!
...
As the title might convey, I'm having problems seeing how Boost Bind, Boost Function, Boost Signals and C++ function pointers all play together.
From my understanding, Boost Bind and Boost Function in conjunction work like Signals while Signals is an abstraction above Bind and Function.
Also, compared to standard C++ function pointers...
As a personal exercise, I want to implement the visitor pattern using shared_ptr. I am familiar with Robert Martin's acyclic visitor paper but find the intrusive nature of the virtual accept() and necessary creation of an {X}Visitor class for each {X} class unpleasant. I like the boost::static_visitor class as it encapsulates all the l...
Hello all,
I'm implementing a few graph algorithms at the moment and am wanting a container with the complexity of a fibonacci heap or a relaxed heap (specifically I want at least O(logN) for push and pop and O(1) for reduce_key).
I'm not keen on implementing this myself if at all possible (development and testing overhead and time) an...
I'm trying to learn how to test programs so I tried Boost. I've started reading it and here I've met this line:
Now I can compile it and link with the unit test framework.
From where and how am I suppose to get unit test framework? And what it is?
I just do not know what to eat it with. Could someone please provide some steps how to ...