Commit Graph

9 Commits

Author SHA1 Message Date
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Tomasz Grabiec
6c3d57696f enum_set: Introduce enum_set::of<>() 2015-04-15 20:33:49 +02:00
Tomasz Grabiec
a720f24c3c enum_set: Introduce frozen<>::unfreeze() 2015-04-15 20:33:48 +02:00
Tomasz Grabiec
57e74d2096 enum_set: Introduce set_if()
This:

  set_if<item>(cond);

is a more efficient version of:

  if (cond) {
     set<item>();
  }

The implementation can leverage internal representation to avoid
branching and thus make the operation cheaper.
2015-04-15 20:33:48 +02:00
Tomasz Grabiec
53eb4ab35d enum_set: Add mask getter 2015-03-11 14:56:09 +01:00
Tomasz Grabiec
13850d912e enum_set: Add more operations 2015-03-11 14:56:09 +01:00
Tomasz Grabiec
29f02b5c65 enum_set: Add more operations 2015-02-16 12:15:11 +01:00
Tomasz Grabiec
16a4b2f3e0 Introduce enum_set
Allows to take full advantage of compile-time information.

Examples:

  enum class x { A, B, C };
  using my_enum = super_enum<x, x::A, x::B, x::C>;
  using my_enumset = enum_set<my_enum>;

  static_assert(my_enumset::frozen<x::A, x::B>::contains<x::A>(),
  		"it should...");

  assert(my_enumset::frozen<x::A, x::B>::contains(x::A));
2015-02-12 19:40:56 +01:00