Skip to content

Instantly share code, notes, and snippets.

@JohanMabille
Created January 7, 2020 10:06
Show Gist options
  • Save JohanMabille/607f6226fa1f1ec62689a2405f947ec9 to your computer and use it in GitHub Desktop.
Save JohanMabille/607f6226fa1f1ec62689a2405f947ec9 to your computer and use it in GitHub Desktop.
template <class T, layout_type L = XTENSOR_DEFAULT_LAYOUT,
class A = std::allocator<T>>
class xarray
{
public:
template <std::size_t I>
xarray(nested_initializer_list_t<value_type, I> t);
};
// The following fails to build, the compiler cannot
// find a constructor that accepts initializer_list of
// of initializer_list of int
xarray<int> v = {{1, 2, 3}, {4, 5, 6}};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment