mirror of
https://github.com/boostorg/describe.git
synced 2026-01-20 16:32:36 +00:00
Compare commits
1 Commits
feature/en
...
boost-1.84
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c89e4dd3db |
@@ -34,7 +34,7 @@ template<class C1, class C2, class R, class... A>
|
||||
|
||||
template<class C>
|
||||
boost::json::value
|
||||
call( C & c, boost::string_view method, boost::json::value const & args )
|
||||
call( C & c, boost::string_view method, boost::json::array const & args )
|
||||
{
|
||||
using Fd = boost::describe::describe_members<C,
|
||||
boost::describe::mod_public | boost::describe::mod_function>;
|
||||
@@ -46,7 +46,7 @@ template<class C>
|
||||
|
||||
if( !found && method == D.name)
|
||||
{
|
||||
result = call_impl( c, D.pointer, args.as_array() );
|
||||
result = call_impl( c, D.pointer, args );
|
||||
found = true;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,6 @@ BOOST_DESCRIBE_STRUCT(Object, (), (greet, add))
|
||||
int main()
|
||||
{
|
||||
Object obj;
|
||||
std::cout << call( obj, "greet", {{ "world" }} ) << std::endl;
|
||||
std::cout << call( obj, "add", {{ 1, 2 }} ) << std::endl;
|
||||
std::cout << call( obj, "greet", { "world" } ) << std::endl;
|
||||
std::cout << call( obj, "add", { 1, 2 } ) << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user