Commit 30c62962 authored by Davis King's avatar Davis King

Made non-const alias tensors convertible to const alias tensors.

parent b19e139d
......@@ -566,6 +566,8 @@ namespace dlib
const tensor& get() const { return inst; }
operator const tensor& () { return inst; }
alias_tensor_const_instance(const alias_tensor_instance& item) : inst(item) {}
private:
alias_tensor_instance inst;
......
......@@ -601,6 +601,9 @@ namespace dlib
public:
// non-const alias tensors are convertible to const ones.
alias_tensor_const_instance(const alias_tensor_instance& item);
// Methods that cast the alias to a tensor.
const tensor& get() const;
operator const tensor& ();
......
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