A Sine Template Function For Boost.MultiArray in C++
It looks very simple and clean. I would change the name of with_std_sin though. There are some guidelines for naming concepts that suggest that it should be named sinable. That looks a bit weird, but everything I can think of to describe &quot;something that std::sin supports&quot; looks weird in some way, so it is as good as any name.
However, consider that you might want to apply many other functions to the contents of a boost::multi_array as well, not just std::sin. In that case, a recursive_transform() that handles multi_arrays is the way to go, so you could &quot;just&quot; write:
auto test_result = recursive_transform(A, [](auto &amp;x){return std::sin(x);});

Or at least use that to define sin(), cos() and so on in therms of recursive_transform() without having to duplicate code.