1 // Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
2 // Copyright (C) 2016 Andrzej Krzemienski.
4 // Use, modification, and distribution is subject to the Boost Software
5 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 // See http://www.boost.org/libs/optional for documentation.
10 // You are welcome to contact the author at:
11 // fernando_cacciola@hotmail.com
14 #ifndef BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_FACTORY_SUPPORT_AJK_12FEB2016_HPP
15 #define BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_FACTORY_SUPPORT_AJK_12FEB2016_HPP
17 // Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<>
18 // member template of a factory as used in the optional<> implementation.
19 // He proposed this simple fix which is to move the call to apply<> outside
21 namespace boost_optional_detail
23 template <class T, class Factory>
24 inline void construct(Factory const& factory, void* address)
26 factory.BOOST_NESTED_TEMPLATE apply<T>(address);
32 class in_place_factory_base ;
33 class typed_in_place_factory_base ;
36 #endif // header guard