Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-01-23 06:20:29


Trying to compile the code (VC++ 7.1, boost 1.34.1) I faced the problem that
some header files are missing.

boost/utility/singleton.hpp includes:

# include <boost/utility/detail/member_dereference.hpp>

member_dereference.hpp includes:
# include <boost/function_types/is_member_function_pointer.hpp>
# include <boost/function_types/function_arity.hpp>
# include <boost/function_types/result_type.hpp>
# include <boost/function_types/parameter_types.hpp>

I neather have function_types directory in singleton.zip nor in boost
1.34.1distribution. Would be nice if someone could specify if some
other
additional libs are needed.

With Kind Regards,
Ovanes

On Jan 23, 2008 11:58 AM, Ovanes Markarian <om_boost_at_[hidden]> wrote:

> Hello,
>
> I am currently evaluating boost.singleton for our application. I hope it
> is not too late to write a review. As I understood from the docs, Singleton
> instance is immediately (when all global and static variables are
> initilized) created. In our context we need singleton to be created on first
> request (as it is described in GoF).
>
>
> The problem is following: Our application must parse config file which is
> accessible after entering main and store the options/parameters parsed in a
> singleton class. If I initialize singleton immediately (before entering
> main) I can not parse command line options and have to trick around with
> some additional functions which do it for me (but a constructor would be a
> much better choice, when I try for the first time to access the singleton).
>
>
> Is that possible with the current implementation? I know I could overload
> operator-> and check that options are parsed, but I think this is a not so
> obvious scenario for everyone.
>
>
>
> With Kind Regards,
> Ovanes
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net