SSL C ++ client without certificate with Boost

I am trying to develop a simple SSL client-server application using boost::asio. I have downloaded, compiled and run the boost example for ssl client-server. Nevertheless, in the mentioned example, a certificate must be provided to the client as file

Modeling an arbitrary tree in C ++ (with iterators)

I am looking for a way to model a tree with an arbitrary amount of childrens per nodes. This answer suggests using the Boost Graph Library for this task: What's a good and stable C++ tree implementation? The main operations that I need to perform are

What is BOOST_SCOPE_EXIT behind the scenes?

Trying to understand where the scope exit blocks would execute with respect to automatic variables' deallocations, I wrote this program: #include <boost/scope_exit.hpp> #include <iostream> class A { public: A() { std::cout << "A's c

boost the library and hold value

I have been using boost for a while but am still a novice. I think I fall for boost::any as I don't need to use template much anymore to handle typed objects used or returned. Yet one thing I find it still inconvenient to me is a smoother function or

C ++: How to check the type of files without extension

I am using boost::filesystem to search and process files in a directory. But instead of processing every file (checked by using boost::filesystem::is_regular_file()) I want to only process text files (or at least ignore binary files). Is there a way

How to use cpp-netlib with Visual Studio 2010?

I'm trying to use cpp-netlib with Visual Studio 2010. I've built cpp-netlib and add .lib files to my project, but I can't compile them. --Environment Windows 7 x64 cpp-netlib 0.11.0 boost 1.55.0 Win32 OpenSSL v1.0.1f My code is here. #include <boost/

Play the sound with OpenAL

I don't understand how I can play sound with OpenAL library. I write program for VoIP. I'm getting every 10ms sound buffer. size_t len = socket.read_some(boost::asio::buffer(buf),error); buf is boost::array <char, 441> buf; And that I need to do wit

random boost in 2 dimensions

I am trying to use a boost random generator to make random points uniformly distributed over a plane surface. I have the following link for doing it in a single dimension: Boost random number generator Here they use boost::uniform_int<> to generate

find_if on the vector and compare member variables

I have a class scene like this: class Renderer; class Scene { public: Scene(const std::string& sceneName); ~Scene(); void Render(Renderer& renderer); Camera& GetSceneCamera() const; SceneNode& GetRootNode() const; const std::string& Ge

Multiple search set

I need a data structure, and I'm unsure of what to choose. Fundamentally, my need is similar to std::set, except I need to look up according to multiple different comparators over the same data at the same time. Right now I've decided to go for some

Detect if an object belongs to a smart pointer

I have a class which derives from enable_shared_from_this and a method which returns a shared pointer by calling shared_from_this(). I would like to in that method detect if the object is owned by a shared_ptr and if not throw. I tried something like

Pass lambda with the parameter

I would like to pass a lambda to a funciton. This boost::function<void()> fncPtr(boost::bind<void>([](){/* something */})); works, but if the lambda had a parameter, I don't know how to do it properly: boost::function<void(bool)> fncPtr(

C ++ Simple Variant Boost

I'm attempting to create a list of objects using the variant boost. #include <string> #include <list> #include <iostream> #include <boost/variant.hpp> using namespace std; using namespace boost; class CSquare; class CRectangle { pu

How can I iterate on a tuple

How can I iterate over a tuple starting from, say, index 1 to 2? The following doesn't work. using boost::fusion::cons; typedef cons<A, cons<B, cons<C, cons<D> > > > MyTuple; MyTuple tuple_; template <class T> struct DoSometh

A way to transform boost :: posix_time :: ptime into a __int64

Does anyone know if there is a good way to turn a boost::posix_time::ptime into an __int64 value. (I have compiled the microsecond version, not the nanosecond version). I need to do this somehow as I am looking to store the resulting __int64 in a uni

Is it possible to use function pointers in processes?

I'm aware that each process creates it's own memory address space, however I was wondering, If Process A was to have a function like : int DoStuff() { return 1; } and a pointer typedef like : typedef int(DoStuff_f*)(); and a getter function like : Do

complex search operation map

I want to do the following: Define a map between a string and any kind of object (may be a list, integer - anything). The keys to the map can be as follow (the values are, again, not important): "AAA/123" ==> 1 "AAA/" ==> 2 "