Initial Course
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#include "if_constexpr.hpp"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace cpp17 {
|
||||
|
||||
auto stringify_ints(const std::vector<int>& data) -> std::string {
|
||||
(void)data;
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace cpp17
|
||||
@@ -0,0 +1,21 @@
|
||||
#include "optional.hpp"
|
||||
|
||||
namespace cpp17 {
|
||||
|
||||
auto safe_divide(int lhs, int rhs) -> std::optional<double> {
|
||||
(void)lhs; (void)rhs;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto find_user(const std::vector<std::string>& users, const std::string& name)
|
||||
-> std::optional<std::size_t> {
|
||||
(void)users; (void)name;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto first_positive(const std::vector<int>& data) -> std::optional<int> {
|
||||
(void)data;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
} // namespace cpp17
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "structured_bindings.hpp"
|
||||
|
||||
namespace cpp17 {
|
||||
|
||||
auto minmax_pair(const std::vector<int>& data) -> std::pair<int, int> {
|
||||
(void)data;
|
||||
return {0, 0};
|
||||
}
|
||||
|
||||
auto split_key_value(const std::string& text) -> std::pair<std::string, std::string> {
|
||||
(void)text;
|
||||
return {"", ""};
|
||||
}
|
||||
|
||||
auto first_pair(const std::map<std::string, int>& scores) -> std::tuple<std::string, int, bool> {
|
||||
(void)scores;
|
||||
return {"", 0, false};
|
||||
}
|
||||
|
||||
} // namespace cpp17
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "variant.hpp"
|
||||
|
||||
namespace cpp17 {
|
||||
|
||||
auto variant_to_string(const Value& value) -> std::string {
|
||||
(void)value;
|
||||
return {};
|
||||
}
|
||||
|
||||
auto sum_numeric_variants(const std::vector<Value>& values) -> double {
|
||||
(void)values;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
auto is_string(const Value& value) -> bool {
|
||||
(void)value;
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace cpp17
|
||||
Reference in New Issue
Block a user