DXR will be turned off on Tuesday, December 29th. It will redirect to Searchfox.
See the announcement on Discourse.

DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (cdf352f02ac4)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
// Iterator returning by value.
template <typename T>
struct Iterator {
  void operator++();
  T operator*();
  bool operator!=(const Iterator& other);
};

// The template argument is an iterator type, and a view is an object you can
// run a for loop on.
template <typename T>
struct View {
  T begin();
  T end();
};

// With this class, the implicit conversion is a call to the (implicit)
// constructor of the class.
template <typename T>
class ImplicitWrapper {
 public:
  // Implicit!
  ImplicitWrapper(const T& t);
};

template <typename T>
class OperatorWrapper {
 public:
  OperatorWrapper() = delete;
};

struct SimpleClass {
  int foo;
  operator OperatorWrapper<SimpleClass>();
};

typedef View<Iterator<SimpleClass>> SimpleView;

void ImplicitSimpleClassIterator() {
  for (const ImplicitWrapper<SimpleClass>& foo : SimpleView()) {}
  for (const ImplicitWrapper<SimpleClass> foo : SimpleView()) {}
  for (ImplicitWrapper<SimpleClass> foo : SimpleView()) {}
}