Commit 0dd8ee4f authored by Paul's avatar Paul
Browse files

Formatting

parent bb93c9d5
...@@ -27,21 +27,24 @@ struct literal : raw_data<literal> ...@@ -27,21 +27,24 @@ struct literal : raw_data<literal>
} }
template <class T> template <class T>
literal(shape s, const std::vector<T>& x) : buffer(std::make_unique<char[]>(s.bytes())), m_shape(s) literal(shape s, const std::vector<T>& x)
: buffer(std::make_unique<char[]>(s.bytes())), m_shape(s)
{ {
static_assert(std::is_trivial<T>{}, "Literals can only be trivial types"); static_assert(std::is_trivial<T>{}, "Literals can only be trivial types");
fill(x.begin(), x.end()); fill(x.begin(), x.end());
} }
template <class T> template <class T>
literal(shape s, const std::initializer_list<T>& x) : buffer(std::make_unique<char[]>(s.bytes())), m_shape(s) literal(shape s, const std::initializer_list<T>& x)
: buffer(std::make_unique<char[]>(s.bytes())), m_shape(s)
{ {
static_assert(std::is_trivial<T>{}, "Literals can only be trivial types"); static_assert(std::is_trivial<T>{}, "Literals can only be trivial types");
fill(x.begin(), x.end()); fill(x.begin(), x.end());
} }
template <class Iterator> template <class Iterator>
literal(shape s, Iterator start, Iterator end) : buffer(std::make_unique<char[]>(s.bytes())), m_shape(s) literal(shape s, Iterator start, Iterator end)
: buffer(std::make_unique<char[]>(s.bytes())), m_shape(s)
{ {
fill(start, end); fill(start, end);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment