Skip to content

Commit

Permalink
versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Chabot committed Jul 9, 2019
1 parent 8855dee commit efd0809
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/var_future/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
#ifndef AOM_VARIADIC_FUTURE_CONFIG_INCLUDED_H
#define AOM_VARIADIC_FUTURE_CONFIG_INCLUDED_H

#include <memory>
#define AOM_VARFUT_VERSION_MAJOR 0
#define AOM_VARFUT_VERSION_MINOR 3
#define AOM_VARFUT_VERSION_PATCH 1

// **************************** std::expected ***************************//

// Change this if you want to use some other expected type.
Expand Down
1 change: 1 addition & 0 deletions include/var_future/future.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ Basic_future<Alloc, Ts...> flatten(Basic_future<Alloc, std::tuple<Ts...>>& rhs);
template <typename... Ts>
auto segmented(Ts&&... args);

inline std::string varfut_lib_version_string();
} // namespace aom

#include "var_future/impl/async.h"
Expand Down
11 changes: 11 additions & 0 deletions include/var_future/impl/future.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,5 +217,16 @@ auto segmented(Ts&&... args) {
std::make_tuple(std::forward<Ts>(args)...)};
}

/**
* @brief Get the version of the library.
*
* @return std::string
*/
inline std::string varfut_lib_version_string() {
return std::to_string(AOM_VARFUT_VERSION_MAJOR) + "."
+ std::to_string(AOM_VARFUT_VERSION_MINOR) + "."
+ std::to_string(AOM_VARFUT_VERSION_PATCH);
}

} // namespace aom
#endif

0 comments on commit efd0809

Please sign in to comment.