zookeeper-cpp
ZooKeeper Client for C++
zk::basic_version< TReal > Struct Template Reference

Base type for version types. More...

#include <zk/types.hpp>

+ Inheritance diagram for zk::basic_version< TReal >:

Static Public Member Functions

static constexpr TReal invalid ()
 An invalid version specifier. More...
 
static constexpr TReal any ()
 When specified in an operation, this version specifier will always pass. More...
 

Additional Inherited Members

- Public Types inherited from zk::strong_id< TReal, std::int32_t >
using value_type = std::int32_t
 
- Public Member Functions inherited from zk::strong_id< TReal, std::int32_t >
constexpr strong_id (value_type val) noexcept
 
constexpr value_type get () const noexcept
 
constexpr operator value_type () noexcept
 
TReal & operator++ ()
 
TReal operator++ (int)
 
TReal & operator-- ()
 
TReal operator-- (int)
 
- Public Attributes inherited from zk::strong_id< TReal, std::int32_t >
value_type value
 

Detailed Description

template<typename TReal>
struct zk::basic_version< TReal >

Base type for version types.

These are distinct so we can emit a compilation error on attempts to use the incorrect version type (for example, client::set_acl does a check on acl_version instead of the standard version).

See also
version
acl_version
child_version

Definition at line 111 of file types.hpp.

Member Function Documentation

template<typename TReal>
static constexpr TReal zk::basic_version< TReal >::any ( )
inlinestatic

When specified in an operation, this version specifier will always pass.

It is the equivalent to not performing a version check.

Definition at line 122 of file types.hpp.

template<typename TReal>
static constexpr TReal zk::basic_version< TReal >::invalid ( )
inlinestatic

An invalid version specifier.

This will never be returned by the database and will always be rejected in commit operations. This is a good value to use as a placeholder when you are searching for the proper version.

Definition at line 117 of file types.hpp.


The documentation for this struct was generated from the following file: