mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
commit
90897d62df
5 changed files with 349 additions and 350 deletions
|
@ -6,7 +6,7 @@
|
|||
// osyo-manga : http://d.hatena.ne.jp/osyo-manga/
|
||||
//
|
||||
// Readme:
|
||||
// https://github.com/osyo-manga/cpp-half/blob/master/README
|
||||
// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README
|
||||
//
|
||||
// License:
|
||||
// Boost Software License - Version 1.0
|
||||
|
@ -26,9 +26,9 @@ struct fizzbuzz{
|
|||
constexpr result_type
|
||||
operator ()(int n) const{
|
||||
return n % 15 == 0 ? sprout::to_string("FizzBuzz")
|
||||
: n % 3 == 0 ? sprout::to_string("Fizz")
|
||||
: n % 5 == 0 ? sprout::to_string("Buzz")
|
||||
: sprout::to_string(n);
|
||||
: n % 3 == 0 ? sprout::to_string("Fizz")
|
||||
: n % 5 == 0 ? sprout::to_string("Buzz")
|
||||
: sprout::to_string(n);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// osyo-manga : http://d.hatena.ne.jp/osyo-manga/
|
||||
//
|
||||
// Readme:
|
||||
// https://github.com/osyo-manga/cpp-half/blob/master/README
|
||||
// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README
|
||||
//
|
||||
// License:
|
||||
// Boost Software License - Version 1.0
|
||||
|
|
|
@ -82,6 +82,5 @@ main(){
|
|||
assert(str == "mami");
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// osyo-manga : http://d.hatena.ne.jp/osyo-manga/
|
||||
//
|
||||
// Readme:
|
||||
// https://github.com/osyo-manga/cpp-half/blob/master/README
|
||||
// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README
|
||||
//
|
||||
// License:
|
||||
// Boost Software License - Version 1.0
|
||||
|
@ -34,7 +34,7 @@ main(){
|
|||
//
|
||||
// parse __TIME__
|
||||
//
|
||||
constexpr auto expr = w::int_ >> ':' >> w::int_ >> ':' >> w::int_;
|
||||
constexpr auto parser = w::int_ >> ':' >> w::int_ >> ':' >> w::int_;
|
||||
static constexpr auto result = w::parse(time.begin(), time.end(), parser);
|
||||
static_assert(result.success(), "failed parse");
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// osyo-manga : http://d.hatena.ne.jp/osyo-manga/
|
||||
//
|
||||
// Readme:
|
||||
// https://github.com/osyo-manga/cpp-half/blob/master/README
|
||||
// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README
|
||||
//
|
||||
// License:
|
||||
// Boost Software License - Version 1.0
|
||||
|
|
Loading…
Reference in a new issue