 public:
   static const int ndim = 0;
 
+  __device__ CIndexer() : size_(1) { }
+
+  template <typename Int>
+  __device__ explicit CIndexer(Int size) : size_(size) { }
+
+  // These constructors are just to match the non-0-dim constructors
+  template <typename Int>
+  __device__ explicit CIndexer(const Int* shape) : size_(1) { }
+
+  template <typename Int1, typename Int2>
+  __device__ CIndexer(const Int1* shape, const Int2* strides)
+      : size_(1) { }
+
+#if __cplusplus >= 201103
+  __device__ CIndexer(const std::initializer_list<int> shape)
+      : size_(1)
+  {
+    assert(shape.size() == 0);
+  }
+
+  __device__ CIndexer(const std::initializer_list<int> shape,
+                      const std::initializer_list<int> index)
+      : size_(1)
+  {
+    assert(shape.size() == 0);
+    assert(index.size() == 0);
+  }
+#endif
+
   __device__ ptrdiff_t size() const {
     return size_;
   }

  __device__ const ptrdiff_t* strides() const {
    return strides_;
  }

  template <typename Int>
  __device__ T& operator[](const Int (&idx)[ndim]) {

public:
  static const int ndim = 0;

  __device__ explicit CArray(T* data) : data_(data), size_(1) { }

  template <typename Int>
  __device__ CArray(T* data, Int size) : data_(data), size_(size) { }

  // These constructors are just to match the non-0-dim constructors
  template <typename Int1, typename Int2>
  __device__ CArray(T* data, const Int1* shape, const Int2* strides)
      : data_(data), size_(1) { }

#if __cplusplus >= 201103
  __device__ CArray(T* data,
                    const std::initializer_list<int> shape,
                    const std::initializer_list<int> strides)
      : data_(data), size_(1)
  {
    assert(shape.size() == 0);
    assert(strides.size() == 0);
  }
#endif

  __device__ ptrdiff_t size() const {
    return size_;
  }
