This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <allegro5/allegro.h> | |
#include <allegro5/allegro_primitives.h> | |
#include <allegro5/allegro_native_dialog.h> | |
int main() { | |
al_init(); | |
al_install_keyboard(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 44%] Building CXX object test/CMakeFiles/type_safe_test.dir/strong_typedef.cpp.o | |
In file included from /home/capsel/libs/type_safe/test/strong_typedef.cpp:5: | |
/home/capsel/libs/type_safe/include/type_safe/strong_typedef.hpp:343:9: error: no matching function for call to 'get_underlying' | |
TYPE_SAFE_DETAIL_MAKE_OP(==, equality_comparison, bool) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/capsel/libs/type_safe/include/type_safe/strong_typedef.hpp:234:22: note: expanded from macro 'TYPE_SAFE_DETAIL_MAKE_OP' | |
lhs)) Op detail::get_underlying<StrongTypedef>(detail::forward<Other>(rhs))); \ | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/capsel/libs/type_safe/build/test/catch.hpp:1040:80: note: in instantiation of function template specialization | |
'type_safe::strong_typedef_op::operator==<type, const convert_b &, void>' requested here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/math.cpp b/math.cpp | |
index 1805323..e919dea 100644 | |
--- a/math.cpp | |
+++ b/math.cpp | |
@@ -47,7 +47,7 @@ struct Expression { | |
fact.value = value; | |
} | |
template <typename Stack, typename... T> constexpr void action(Stack & stack, T && ... args) { | |
- Fallback fb; | |
+ Fallback fb {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make | |
g++ -std=c++17 -Wno-gnu-string-literal-operator-template -O3 -Iinclude -c math.cpp -o math.o | |
math.cpp: In function ‘int main()’: | |
math.cpp:211:2: error: non-constant condition for static assertion | |
static_assert("2*(3+2)+32"_expr == 42); | |
^~~~~~~~~~~~~ | |
In file included from include/static-decider.hpp:4:0, | |
from math.cpp:1: | |
math.cpp:211:16: in constexpr expansion of ‘operator""_expr<char, '2', '*', '(', '3', '+', '2', ')', '+', '3', '2'>()’ | |
math.cpp:206:2: in constexpr expansion of ‘Static::Decider<Static::Stack<E, Static::Holder<Expression> >, Static::Input<'2', '*', '(', '3', '+', '2', ')', '+', '3', '2'> >().Static::Decider<Static::Stack<E, Static::Holder<Expression> >, Static::Input<'2', '*', '(', '3', '+', '2', ')', '+', '3', '2'> >::run<long int&>(output)’ |