Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/glensand/hope
Browse files Browse the repository at this point in the history
  • Loading branch information
glensand committed Mar 12, 2022
2 parents 06c5026 + f4b5abf commit fc9da8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions lib/hope/typelist/type_value_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

#include "hope/typelist/type_list.h"
#include "hope/tuple/flat_tuple.h"
#include <initializer_list>
#include <array>
#include <cassert>

namespace hope {

Expand Down Expand Up @@ -50,8 +47,8 @@ namespace hope {
m_map.for_each([](auto&& pair){
using pair_t = std::decay_t<decltype(pair)>;
static_assert(is_type_value_v<pair_t>,
"HOPE STATIC ASSRTATION FAILED:"
"Onve of the arguments is not an instance of the hope::type_value structure."
"HOPE STATIC ASSERTION FAILED:"
"One of the arguments is not an instance of the hope::type_value structure."
"hope::type_value_map is intended to work only with hope::type_value."
"Wrap your key and value to it and try to compile again."
);
Expand All @@ -62,7 +59,7 @@ namespace hope {
decltype(auto) get() const {
constexpr static auto idx = index<TKey>();
static_assert(idx < size(type_list<Ts...>{}),
"HOPE STATIC ASSRTATION FAILED:"
"HOPE STATIC ASSERTION FAILED:"
"Given type is not present in the specified type - value map"
);

Expand All @@ -73,7 +70,7 @@ namespace hope {
void set(TValue&& val){
using pair_t = type_value<TKey, std::decay_t<TValue>>;
static_assert(contains<pair_t>(type_list<Ts...>{}),
"HOPE STATIC ASSRTATION FAILED:"
"HOPE STATIC ASSERTION FAILED:"
"Given combination of key type and value type is not present in type value map"
);
auto&& containing_value = m_map.template get<pair_t>();
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(googletest-download NONE)
include(ExternalProject)
ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG master
GIT_TAG main
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
CONFIGURE_COMMAND ""
Expand Down

0 comments on commit fc9da8f

Please sign in to comment.