Using enum instead of struct for tag dispatching in C++ : <p>Let's take implementation of the <code>std::unique_lock</code> from the Standard Library:</p>

<pre><code>struct defer_lock_t { explicit defer_lock_t() = default; };
struct try_to_lock_t { explicit try_to_lock_t() = default; };
struct adopt_lock_t { explicit adopt_lock_t() = default; };

inline constexpr defer_lock_t  defer_lock {};
inline constexpr try_to_lock_t try_to_lock {};
inline constexpr adopt_lock_t  adopt_lock {};

unique_lock (mutex_type&amp; m, defer_lock_t t) noexcept;
unique_lock (mutex_type&amp; m, try_to_lock_t t);
unique_lock (mutex_type&amp; m, adopt_lock_t t);
</code></pre>

<p>Is there a reason why one wouldn't/couldn't/shouldn't use enums instead of structs to implement tag dispatching? Such as:</p>

<pre><code>enum defer_lock_t { defer_lock };
enum try_to_lock_t { try_to_lock };
enum adopt_lock_t { adopt_lock };

unique_lock (mutex_type&amp; m, defer_lock_t t) noexcept;
unique_lock (mutex_type&amp; m, try_to_lock_t t);
unique_lock (mutex_type&amp; m, adopt_lock_t t);
</code></pre>

<p>The latter is more concise.</p>

<p>The only advantage of using structs that I can think of is inheritance (eg, iterator tags). But in all other cases, why not use enum?</p>
