Skip to content

Commit

Permalink
sixtythird commit
Browse files Browse the repository at this point in the history
  • Loading branch information
grizzlysmit committed May 6, 2021
1 parent b9004ab commit 503d870
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions colourfmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ template<typename Char>
private:
using Context_type = basic_format_parse_context<Char>;
public:
constexpr auto parse(Context_type& ctx) -> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(Context_type& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
if(it != end && *it == ':') ++it;
while(it != end && *it != '}') ++it;
return it;
}
template<typename FormatContext>
constexpr auto format(const text_style& ts, FormatContext& ctx) -> decltype(ctx.out()) {
FMT_CONSTEXPR auto format(const text_style& ts, FormatContext& ctx) -> decltype(ctx.out()) {
auto out = ctx.out();
basic_memory_buffer<Char> buf;
if (ts.has_emphasis()) {
Expand Down Expand Up @@ -67,7 +67,7 @@ struct reset_colour {
bool doit = false;
public:
reset_colour() : doit(true) {};
constexpr operator bool(){
FMT_CONSTEXPR operator bool(){
return doit;
}
// */
Expand All @@ -84,14 +84,14 @@ template<typename Char>
private:
using Context_type = basic_format_parse_context<Char>;
public:
constexpr auto parse(Context_type& ctx) -> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(Context_type& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
if(it != end && *it == ':') ++it;
while(it != end && *it != '}') ++it;
return it;
}
template<typename FormatContext>
constexpr auto format(const fmtextras::reset_colour& rc, FormatContext& ctx) -> decltype(ctx.out()) {
FMT_CONSTEXPR auto format(const fmtextras::reset_colour& rc, FormatContext& ctx) -> decltype(ctx.out()) {
auto out = ctx.out();
out = format_to(out, "\x1b[0m");
return out;
Expand Down
4 changes: 2 additions & 2 deletions complexfmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ template<typename T, typename Char>
using base = formatter<T, Char>;
using Context_type = basic_format_parse_context<Char>;
public:
constexpr auto parse(Context_type& ctx) -> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(Context_type& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
bool done = false;
if(it != end && *it == ':') ++it;
Expand Down Expand Up @@ -72,7 +72,7 @@ template<typename T, typename Char>
return base::parse(ctx);
}
template<typename FormatContext>
constexpr auto format(const std::complex<T>& c, FormatContext& ctx) -> decltype(ctx.out()) {
FMT_CONSTEXPR auto format(const std::complex<T>& c, FormatContext& ctx) -> decltype(ctx.out()) {
auto out = ctx.out();
if(style_ == style::lisp){
out = format_to(out, "#C(");
Expand Down

0 comments on commit 503d870

Please sign in to comment.