mirror of
https://github.com/HowardHinnant/date.git
synced 2026-08-03 20:14:08 +02:00
constexpr more stuff and clean up whitespace
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -23,22 +23,22 @@
|
||||
// class lastweek_weekday
|
||||
// {
|
||||
// iso_week::weekday wd_; // exposition only
|
||||
//
|
||||
//
|
||||
// public:
|
||||
// explicit constexpr lastweek_weekday(const iso_week::weekday& wd) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr iso_week::weekday weekday() const noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr bool ok() const noexcept;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// constexpr bool operator==(const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator!=(const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator< (const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator> (const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator<=(const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator>=(const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
|
||||
//
|
||||
//
|
||||
// std::ostream& operator<<(std::ostream& os, const lastweek_weekday& md);
|
||||
|
||||
#include "iso_week.h"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -42,155 +42,155 @@ main()
|
||||
{
|
||||
using std::is_same;
|
||||
using namespace iso_week;
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1, 1, 1)), int>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1, mon, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, mon, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, mon, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, mon, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, mon, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1, 1_w, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1_w, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1_w, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1_w, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1_w, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1, 1_y, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1_y, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1_y, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1_y, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, 1_y, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1, last, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, last, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, last, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, last, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1, last, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( mon, 1, 1)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1, 1_y)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( mon, mon, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, mon, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, mon, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, mon, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, mon, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( mon, 1_w, 1)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1_w, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1_w, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1_w, 1_y)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1_w, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( mon, 1_y, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1_y, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1_y, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1_y, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, 1_y, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( mon, last, 1)), year_lastweek_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, last, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, last, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, last, 1_y)), year_lastweek_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( mon, last, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_w, 1, 1)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1, 1_y)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_w, mon, 1)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, mon, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, mon, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, mon, 1_y)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, mon, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_w, 1_w, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1_w, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1_w, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1_w, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1_w, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_w, 1_y, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1_y, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1_y, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1_y, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, 1_y, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_w, last, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, last, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, last, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, last, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_w, last, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_y, 1, 1)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1, mon)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_y, mon, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, mon, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, mon, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, mon, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, mon, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_y, 1_w, 1)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1_w, mon)), year_weeknum_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1_w, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1_w, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1_w, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_y, 1_y, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1_y, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1_y, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1_y, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, 1_y, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test( 1_y, last, 1)), year_lastweek_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, last, mon)), year_lastweek_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, last, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, last, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test( 1_y, last, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test(last, 1, 1)), year_lastweek_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1, 1_y)), year_lastweek_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test(last, mon, 1)), year_lastweek_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test(last, mon, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, mon, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, mon, 1_y)), year_lastweek_weekday>{}, "");
|
||||
static_assert(is_same<decltype(test(last, mon, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test(last, 1_w, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1_w, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1_w, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1_w, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1_w, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test(last, 1_y, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1_y, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1_y, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1_y, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, 1_y, last)), void>{}, "");
|
||||
|
||||
|
||||
static_assert(is_same<decltype(test(last, last, 1)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, last, mon)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, last, 1_w)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, last, 1_y)), void>{}, "");
|
||||
static_assert(is_same<decltype(test(last, last, last)), void>{}, "");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -27,19 +27,19 @@
|
||||
// explicit constexpr weekday(unsigned wd) noexcept;
|
||||
// constexpr weekday(date::weekday wd) noexcept;
|
||||
// constexpr weekday(const sys_days& dp) noexcept;
|
||||
//
|
||||
//
|
||||
// weekday& operator++() noexcept;
|
||||
// weekday operator++(int) noexcept;
|
||||
// weekday& operator--() noexcept;
|
||||
// weekday operator--(int) noexcept;
|
||||
//
|
||||
//
|
||||
// weekday& operator+=(const days& d) noexcept;
|
||||
// weekday& operator-=(const days& d) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr explicit operator unsigned() const noexcept;
|
||||
// constexpr operator date::weekday() const noexcept;
|
||||
// constexpr bool ok() const noexcept;
|
||||
//
|
||||
//
|
||||
// // tested with weekday_indexed
|
||||
// constexpr weekday_indexed operator[](unsigned index) const noexcept;
|
||||
// // tested with weekday_last
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -23,34 +23,34 @@
|
||||
// class weeknum
|
||||
// {
|
||||
// unsigned char wn_;
|
||||
//
|
||||
//
|
||||
// public:
|
||||
// explicit constexpr weeknum(unsigned wn) noexcept;
|
||||
//
|
||||
//
|
||||
// weeknum& operator++() noexcept;
|
||||
// weeknum operator++(int) noexcept;
|
||||
// weeknum& operator--() noexcept;
|
||||
// weeknum operator--(int) noexcept;
|
||||
//
|
||||
//
|
||||
// weeknum& operator+=(const weeks& y) noexcept;
|
||||
// weeknum& operator-=(const weeks& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr explicit operator unsigned() const noexcept;
|
||||
// constexpr bool ok() const noexcept;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// constexpr bool operator==(const weeknum& x, const weeknum& y) noexcept;
|
||||
// constexpr bool operator!=(const weeknum& x, const weeknum& y) noexcept;
|
||||
// constexpr bool operator< (const weeknum& x, const weeknum& y) noexcept;
|
||||
// constexpr bool operator> (const weeknum& x, const weeknum& y) noexcept;
|
||||
// constexpr bool operator<=(const weeknum& x, const weeknum& y) noexcept;
|
||||
// constexpr bool operator>=(const weeknum& x, const weeknum& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr weeknum operator+(const weeknum& x, const weeks& y) noexcept;
|
||||
// constexpr weeknum operator+(const weeks& x, const weeknum& y) noexcept;
|
||||
// constexpr weeknum operator-(const weeknum& x, const weeks& y) noexcept;
|
||||
// constexpr weeks operator-(const weeknum& x, const weeknum& y) noexcept;
|
||||
//
|
||||
//
|
||||
// std::ostream& operator<<(std::ostream& os, const weeknum& wn);
|
||||
//
|
||||
// constexpr weeknum operator "" _w(unsigned long long wn) noexcept;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -24,24 +24,24 @@
|
||||
// {
|
||||
// iso_week::weeknum wn_; // exposition only
|
||||
// iso_week::weekday wd_; // exposition only
|
||||
//
|
||||
//
|
||||
// public:
|
||||
// constexpr weeknum_weekday(const iso_week::weeknum& wn,
|
||||
// const iso_week::weekday& wd) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr iso_week::weeknum weeknum() const noexcept;
|
||||
// constexpr iso_week::weekday weekday() const noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr bool ok() const noexcept;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// constexpr bool operator==(const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator!=(const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator< (const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator> (const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator<=(const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator>=(const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
|
||||
//
|
||||
//
|
||||
// std::ostream& operator<<(std::ostream& os, const weeknum_weekday& md);
|
||||
|
||||
#include "iso_week.h"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -24,18 +24,18 @@
|
||||
// {
|
||||
// public:
|
||||
// explicit constexpr year(int y) noexcept;
|
||||
//
|
||||
//
|
||||
// year& operator++() noexcept;
|
||||
// year operator++(int) noexcept;
|
||||
// year& operator--() noexcept;
|
||||
// year operator--(int) noexcept;
|
||||
//
|
||||
//
|
||||
// year& operator+=(const years& y) noexcept;
|
||||
// year& operator-=(const years& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr explicit operator int() const noexcept;
|
||||
// constexpr bool ok() const noexcept;
|
||||
//
|
||||
//
|
||||
// static constexpr year min() noexcept;
|
||||
// static constexpr year max() noexcept;
|
||||
// };
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -23,30 +23,30 @@
|
||||
// class year_lastweek
|
||||
// {
|
||||
// iso_week::year y_;
|
||||
//
|
||||
//
|
||||
// public:
|
||||
// explicit constexpr year_lastweek(const iso_week::year& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr iso_week::year year() const noexcept;
|
||||
// constexpr iso_week::weeknum weeknum() const noexcept;
|
||||
//
|
||||
//
|
||||
// year_lastweek& operator+=(const years& dy) noexcept;
|
||||
// year_lastweek& operator-=(const years& dy) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr bool ok() const noexcept;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// constexpr bool operator==(const year_lastweek& x, const year_lastweek& y) noexcept;
|
||||
// constexpr bool operator!=(const year_lastweek& x, const year_lastweek& y) noexcept;
|
||||
// constexpr bool operator< (const year_lastweek& x, const year_lastweek& y) noexcept;
|
||||
// constexpr bool operator> (const year_lastweek& x, const year_lastweek& y) noexcept;
|
||||
// constexpr bool operator<=(const year_lastweek& x, const year_lastweek& y) noexcept;
|
||||
// constexpr bool operator>=(const year_lastweek& x, const year_lastweek& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr year_lastweek operator+(const year_lastweek& ym, const years& dy) noexcept;
|
||||
// constexpr year_lastweek operator+(const years& dy, const year_lastweek& ym) noexcept;
|
||||
// constexpr year_lastweek operator-(const year_lastweek& ym, const years& dy) noexcept;
|
||||
//
|
||||
//
|
||||
// std::ostream& operator<<(std::ostream& os, const year_lastweek& ym);
|
||||
|
||||
#include "iso_week.h"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -25,29 +25,29 @@
|
||||
// public:
|
||||
// constexpr year_lastweek_weekday(const iso_week::year& y,
|
||||
// const iso_week::weekday& wd) noexcept;
|
||||
//
|
||||
//
|
||||
// year_lastweek_weekday& operator+=(const years& y) noexcept;
|
||||
// year_lastweek_weekday& operator-=(const years& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr iso_week::year year() const noexcept;
|
||||
// constexpr iso_week::weeknum weeknum() const noexcept;
|
||||
// constexpr iso_week::weekday weekday() const noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr operator sys_days() const noexcept;
|
||||
// constexpr bool ok() const noexcept;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// constexpr bool operator==(const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator!=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator< (const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator> (const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator<=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
|
||||
// constexpr bool operator>=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr year_lastweek_weekday operator+(const year_lastweek_weekday& x, const years& y) noexcept;
|
||||
// constexpr year_lastweek_weekday operator+(const years& y, const year_lastweek_weekday& x) noexcept;
|
||||
// constexpr year_lastweek_weekday operator-(const year_lastweek_weekday& x, const years& y) noexcept;
|
||||
//
|
||||
//
|
||||
// std::ostream& operator<<(std::ostream& os, const year_lastweek_weekday& x);
|
||||
|
||||
#include "iso_week.h"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -24,30 +24,30 @@
|
||||
// {
|
||||
// iso_week::year y_;
|
||||
// iso_week::weeknum wn_;
|
||||
//
|
||||
//
|
||||
// public:
|
||||
// constexpr year_weeknum(const iso_week::year& y, const iso_week::weeknum& wn) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr iso_week::year year() const noexcept;
|
||||
// constexpr iso_week::weeknum weeknum() const noexcept;
|
||||
//
|
||||
//
|
||||
// year_weeknum& operator+=(const years& dy) noexcept;
|
||||
// year_weeknum& operator-=(const years& dy) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr bool ok() const noexcept;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// constexpr bool operator==(const year_weeknum& x, const year_weeknum& y) noexcept;
|
||||
// constexpr bool operator!=(const year_weeknum& x, const year_weeknum& y) noexcept;
|
||||
// constexpr bool operator< (const year_weeknum& x, const year_weeknum& y) noexcept;
|
||||
// constexpr bool operator> (const year_weeknum& x, const year_weeknum& y) noexcept;
|
||||
// constexpr bool operator<=(const year_weeknum& x, const year_weeknum& y) noexcept;
|
||||
// constexpr bool operator>=(const year_weeknum& x, const year_weeknum& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr year_weeknum operator+(const year_weeknum& ym, const years& dy) noexcept;
|
||||
// constexpr year_weeknum operator+(const years& dy, const year_weeknum& ym) noexcept;
|
||||
// constexpr year_weeknum operator-(const year_weeknum& ym, const years& dy) noexcept;
|
||||
//
|
||||
//
|
||||
// std::ostream& operator<<(std::ostream& os, const year_weeknum& ym);
|
||||
|
||||
#include "iso_week.h"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -29,29 +29,29 @@
|
||||
// const iso_week::weekday& wd) noexcept;
|
||||
// constexpr year_weeknum_weekday(const year_lastweek_weekday& ylwwd) noexcept;
|
||||
// constexpr year_weeknum_weekday(const sys_days& dp) noexcept;
|
||||
//
|
||||
//
|
||||
// year_weeknum_weekday& operator+=(const years& y) noexcept;
|
||||
// year_weeknum_weekday& operator-=(const years& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr iso_week::year year() const noexcept;
|
||||
// constexpr iso_week::weeknum weeknum() const noexcept;
|
||||
// constexpr iso_week::weekday weekday() const noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr operator sys_days() const noexcept;
|
||||
// constexpr bool ok() const noexcept;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// constexpr bool operator==(const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator!=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator< (const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator> (const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator<=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
|
||||
// constexpr bool operator>=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
|
||||
//
|
||||
//
|
||||
// constexpr year_weeknum_weekday operator+(const year_weeknum_weekday& ywnwd, const years& y) noexcept;
|
||||
// constexpr year_weeknum_weekday operator+(const years& y, const year_weeknum_weekday& ywnwd) noexcept;
|
||||
// constexpr year_weeknum_weekday operator-(const year_weeknum_weekday& ywnwd, const years& y) noexcept;
|
||||
//
|
||||
//
|
||||
// std::ostream& operator<<(std::ostream& os, const year_weeknum_weekday& ywnwd);
|
||||
|
||||
#include "iso_week.h"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2015 Howard Hinnant
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
Reference in New Issue
Block a user