template <class FormatString>
struct expected_types
{
// unspecified
};
FormatString
is a string representing a printf
format string. The function returns the list of argument types the format string expects. The types are boxed using Metamonad's boxing wrapper.
#include <mpllibs/safe_printf/expected_types.hpp>
For any s
boost::metaparse::string
:
mpllibs::safe_printf::expected_types<s>::type
is the list of types printf
needs after the format string. The types are wrapped with mpllibs::metamonad::box
.
using mpllibs::metamonad::box;
BOOST_STATIC_ASSERT((
boost::mpl::equal<
mpllibs::safe_printf::expected_types<
BOOST_METAPARSE_STRING("%d %d\n")
>::type,
boost::mpl::vector<box<int>, box<int>>
>::type::value
));
Copyright Abel Sinkovics (abel at elte dot hu) 2011. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt