Updated makefile a bit, removed some incorrect constexpr (thanks to clang actually reporting them unlike gcc
This commit is contained in:
parent
ef181a6065
commit
0a0f9303ea
@ -49,7 +49,7 @@ private:
|
||||
color curr = color::red;
|
||||
|
||||
|
||||
constexpr color_state(void)noexcept{
|
||||
color_state(void)noexcept{
|
||||
switch(rand()%3){
|
||||
case 0:
|
||||
r = color_max_amount;
|
||||
@ -95,7 +95,7 @@ private:
|
||||
}
|
||||
}m_line_color = {}, m_color = m_line_color;
|
||||
public:
|
||||
constexpr color_printer_true(const cmd_args& args)noexcept:
|
||||
color_printer_true(const cmd_args& args)noexcept:
|
||||
color_printer_base<color_printer_true>(args, args.invert ? L"\033[38;5;0m\033[48;2;%s;%s;%sm" : L"\033[38;2;%s;%s;%sm"){}
|
||||
|
||||
protected:
|
||||
|
||||
@ -71,11 +71,11 @@ protected:
|
||||
constexpr printer_base(const wchar_t* tabstr, const cmd_args& args)noexcept;
|
||||
~printer_base(void)noexcept = default;
|
||||
public:
|
||||
constexpr Derived& print(wchar_t s)noexcept(noexcept(std::declval<Derived>()._print(s)));
|
||||
constexpr Derived& print(const wchar_t* s)noexcept(noexcept(std::declval<printer_base<Derived>>().print(std::declval<wchar_t>())));
|
||||
constexpr Derived& print(char s);
|
||||
constexpr Derived& print(const char* s);
|
||||
constexpr Derived& reset(void);
|
||||
Derived& print(wchar_t s)noexcept(noexcept(std::declval<Derived>()._print(s)));
|
||||
Derived& print(const wchar_t* s)noexcept(noexcept(std::declval<printer_base<Derived>>().print(std::declval<wchar_t>())));
|
||||
Derived& print(char s);
|
||||
Derived& print(const char* s);
|
||||
Derived& reset(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -39,7 +39,7 @@ constexpr printer_base<Derived>::printer_base(const wchar_t* tabstr, const cmd_a
|
||||
m_tab_size(wcslen(tabstr)){}
|
||||
|
||||
template<class Derived>
|
||||
constexpr auto printer_base<Derived>::print(wchar_t s)noexcept(noexcept(std::declval<Derived>()._print(s))) -> Derived&{
|
||||
auto printer_base<Derived>::print(wchar_t s)noexcept(noexcept(std::declval<Derived>()._print(s))) -> Derived&{
|
||||
Derived& dv = static_cast<Derived&>(*this);
|
||||
//suppress repeated blank lines
|
||||
if(m_squeeze_blank){
|
||||
@ -88,27 +88,27 @@ constexpr auto printer_base<Derived>::print(wchar_t s)noexcept(noexcept(std::dec
|
||||
}
|
||||
|
||||
template<class Derived>
|
||||
constexpr auto printer_base<Derived>::print(const wchar_t* s)noexcept(noexcept(std::declval<printer_base<Derived>>().print(std::declval<wchar_t>()))) -> Derived&{
|
||||
auto printer_base<Derived>::print(const wchar_t* s)noexcept(noexcept(std::declval<printer_base<Derived>>().print(std::declval<wchar_t>()))) -> Derived&{
|
||||
for(;*s != 0;++s){
|
||||
print(*s);
|
||||
}
|
||||
return static_cast<Derived&>(*this);
|
||||
}
|
||||
template<class Derived>
|
||||
constexpr auto printer_base<Derived>::print(char s) -> Derived&{
|
||||
auto printer_base<Derived>::print(char s) -> Derived&{
|
||||
wchar_t tmp;
|
||||
mbstowcs(&tmp, &s, 1);
|
||||
return print(tmp);
|
||||
}
|
||||
template<class Derived>
|
||||
constexpr auto printer_base<Derived>::print(const char* s) -> Derived&{
|
||||
auto printer_base<Derived>::print(const char* s) -> Derived&{
|
||||
for(;*s != 0;++s){
|
||||
print(*s);
|
||||
}
|
||||
return static_cast<Derived&>(*this);
|
||||
}
|
||||
template<class Derived>
|
||||
constexpr auto printer_base<Derived>::reset(void) -> Derived&{
|
||||
auto printer_base<Derived>::reset(void) -> Derived&{
|
||||
if constexpr(HAS_FUNC(_reset)<Derived,Derived&>::value){
|
||||
return static_cast<Derived&>(*this)._reset();
|
||||
}else{
|
||||
|
||||
6
makefile
6
makefile
@ -11,7 +11,7 @@
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#Copyright 2018 rexy712
|
||||
#Copyright 2018-2019 rexy712
|
||||
|
||||
|
||||
SOURCE_DIRS:=src
|
||||
@ -19,7 +19,7 @@ OBJDIR:=obj
|
||||
DEPDIR:=$(OBJDIR)/dep
|
||||
INCLUDE_DIRS:=include
|
||||
EXT:=cpp
|
||||
MAIN_EXECUTABLE:=tester
|
||||
MAIN_EXECUTABLE:=roflcat
|
||||
|
||||
CXX:=g++
|
||||
CXXFLAGS:=-g -std=c++17 -Wall -pedantic -Wextra -fno-exceptions -fno-rtti
|
||||
@ -38,7 +38,7 @@ ifeq ($(OS),Windows_NT)
|
||||
rmdir=rd /s /q $(1) > NUL 2>&1
|
||||
move=move /y $(subst /,\,$(1)) $(subst /,\,$(2)) > NUL 2>&1
|
||||
MAIN_EXECUTABLE:=$(MAIN_EXECUTABLE).exe
|
||||
LDLIBS:=-lglfw3 -lSOIL -lgl3w -lm -lopengl32 -lglu32 -lgdi32 -lkernel32
|
||||
LDLIBS:=-lncurses
|
||||
else
|
||||
mkdir=mkdir -p $(1)
|
||||
rm=rm -f $(1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user