mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Added configuration for selection of STL-like or ETL-verbose chrono literals
This commit is contained in:
parent
a724dd08b8
commit
d04ee8c5e7
@ -271,6 +271,14 @@ SOFTWARE.
|
||||
#define ETL_HAS_VIRTUAL_MESSAGES 1
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Indicate if etl::literals::chrono_literals uses ETL verbose style.
|
||||
#if defined(ETL_USE_VERBOSE_CHRONO_LITERALS) && ETL_USING_CPP11
|
||||
#define ETL_USING_VERBOSE_CHRONO_LITERALS 1
|
||||
#else
|
||||
#define ETL_USING_VERBOSE_CHRONO_LITERALS 0
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Indicate if etl::literals::chrono_literals has days (_days)
|
||||
#if defined(ETL_DISABLE_CHRONO_LITERALS_DAY) && ETL_USING_CPP11
|
||||
@ -279,22 +287,6 @@ SOFTWARE.
|
||||
#define ETL_HAS_CHRONO_LITERALS_DAY 1
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Indicate if etl::literals::chrono_literals has weekdays (_weekday)
|
||||
#if defined(ETL_DISABLE_CHRONO_LITERALS_WEEKDAY) && ETL_USING_CPP11
|
||||
#define ETL_HAS_CHRONO_LITERALS_WEEKDAY 0
|
||||
#else
|
||||
#define ETL_HAS_CHRONO_LITERALS_WEEKDAY 1
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Indicate if etl::literals::chrono_literals has month (_months)
|
||||
#if defined(ETL_DISABLE_CHRONO_LITERALS_MONTH) && ETL_USING_CPP11
|
||||
#define ETL_HAS_CHRONO_LITERALS_MONTH 0
|
||||
#else
|
||||
#define ETL_HAS_CHRONO_LITERALS_MONTH 1
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Indicate if etl::literals::chrono_literals has year (_years)
|
||||
#if defined(ETL_DISABLE_CHRONO_LITERALS_YEAR) && ETL_USING_CPP11
|
||||
@ -590,9 +582,13 @@ namespace etl
|
||||
static ETL_CONSTANT bool has_virtual_messages = (ETL_HAS_VIRTUAL_MESSAGES == 1);
|
||||
static ETL_CONSTANT bool has_packed = (ETL_HAS_PACKED == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_day = (ETL_HAS_CHRONO_LITERALS_DAY == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_weekday = (ETL_HAS_CHRONO_LITERALS_WEEKDAY == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_month = (ETL_HAS_CHRONO_LITERALS_MONTH == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_year = (ETL_HAS_CHRONO_LITERALS_YEAR == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_hours = (ETL_HAS_CHRONO_LITERALS_DURATION == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_minutes = (ETL_HAS_CHRONO_LITERALS_DURATION == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_seconds = (ETL_HAS_CHRONO_LITERALS_DURATION == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_milliseconds = (ETL_HAS_CHRONO_LITERALS_DURATION == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_microseconds = (ETL_HAS_CHRONO_LITERALS_DURATION == 1);
|
||||
static ETL_CONSTANT bool has_chrono_literals_nanoseconds = (ETL_HAS_CHRONO_LITERALS_DURATION == 1);
|
||||
|
||||
// Is...
|
||||
static ETL_CONSTANT bool is_debug_build = (ETL_IS_DEBUG_BUILD == 1);
|
||||
|
||||
@ -331,10 +331,11 @@ namespace etl
|
||||
{
|
||||
namespace chrono_literals
|
||||
{
|
||||
//***********************************************************************
|
||||
/// Literal for days
|
||||
//***********************************************************************
|
||||
inline ETL_CONSTEXPR14 etl::chrono::day operator ""_day(unsigned long long d) noexcept
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::day operator ""_day(unsigned long long d) noexcept
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::day operator ""_d(unsigned long long d) noexcept
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::day(static_cast<unsigned>(d));
|
||||
}
|
||||
|
||||
@ -715,7 +715,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for hours duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::hours operator ""_hours(unsigned long long h) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::hours operator ""_h(unsigned long long h) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::hours(static_cast<etl::chrono::hours::rep>(h));
|
||||
}
|
||||
@ -723,7 +727,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for floating point hours duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, ratio<3600>> operator""_hours(long double h) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, ratio<3600>> operator""_h(long double h) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::duration<double, ratio<3600>>(h);
|
||||
}
|
||||
@ -731,7 +739,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for minutes duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::minutes operator ""_minutes(unsigned long long m) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::minutes operator ""_min(unsigned long long m) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::minutes(static_cast<etl::chrono::minutes::rep>(m));
|
||||
}
|
||||
@ -739,7 +751,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for floating point minutes duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, ratio<60>> operator ""_minutes(long double m) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, ratio<60>> operator ""_min(long double m) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::duration<double, ratio<60>>(m);
|
||||
}
|
||||
@ -747,7 +763,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for seconds duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::seconds operator ""_seconds(unsigned long long s) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::seconds operator ""_s(unsigned long long s) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::seconds(static_cast<etl::chrono::seconds::rep>(s));
|
||||
}
|
||||
@ -755,7 +775,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for floating point seconds duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double> operator ""_seconds(long double s) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double> operator ""_s(long double s) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::duration<double>(s);
|
||||
}
|
||||
@ -763,7 +787,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for milliseconds duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::milliseconds operator ""_milliseconds(unsigned long long s) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::milliseconds operator ""_ms(unsigned long long s) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::milliseconds(static_cast<etl::chrono::milliseconds::rep>(s));
|
||||
}
|
||||
@ -771,7 +799,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for floating point milliseconds duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, milli> operator ""_milliseconds(long double s) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, milli> operator ""_ms(long double s) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::duration<double, milli>(s);
|
||||
}
|
||||
@ -779,7 +811,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for microseconds duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::microseconds operator ""_microseconds(unsigned long long s) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::microseconds operator ""_us(unsigned long long s) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::microseconds(static_cast<etl::chrono::microseconds::rep>(s));
|
||||
}
|
||||
@ -787,7 +823,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for floating point microseconds duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, micro> operator ""_microseconds(long double s) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, micro> operator ""_us(long double s) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::duration<double, micro>(s);
|
||||
}
|
||||
@ -795,7 +835,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for nanoseconds duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::nanoseconds operator ""_nanoseconds(unsigned long long s) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::nanoseconds operator ""_ns(unsigned long long s) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::nanoseconds(static_cast<etl::chrono::nanoseconds::rep>(s));
|
||||
}
|
||||
@ -803,7 +847,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for floating point microseconds duration
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, nano> operator ""_nanoseconds(long double s) ETL_NOEXCEPT
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::duration<double, nano> operator ""_ns(long double s) ETL_NOEXCEPT
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::duration<double, nano>(s);
|
||||
}
|
||||
|
||||
@ -459,22 +459,3 @@ namespace etl
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ETL_HAS_CHRONO_LITERALS_MONTH
|
||||
namespace etl
|
||||
{
|
||||
namespace literals
|
||||
{
|
||||
namespace chrono_literals
|
||||
{
|
||||
//***********************************************************************
|
||||
/// Literal for months
|
||||
//***********************************************************************
|
||||
inline ETL_CONSTEXPR14 etl::chrono::month operator ""_month(unsigned long long m) noexcept
|
||||
{
|
||||
return etl::chrono::month(static_cast<unsigned char>(m));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -519,22 +519,3 @@ namespace etl
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ETL_HAS_CHRONO_LITERALS_WEEKDAY
|
||||
namespace etl
|
||||
{
|
||||
namespace literals
|
||||
{
|
||||
namespace chrono_literals
|
||||
{
|
||||
//***********************************************************************
|
||||
/// Literal for weekdays
|
||||
//***********************************************************************
|
||||
inline ETL_CONSTEXPR14 etl::chrono::weekday operator ""_weekday(unsigned long long wd) noexcept
|
||||
{
|
||||
return etl::chrono::weekday(static_cast<unsigned char>(wd));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -335,7 +335,11 @@ namespace etl
|
||||
//***********************************************************************
|
||||
/// Literal for years
|
||||
//***********************************************************************
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
inline ETL_CONSTEXPR14 etl::chrono::year operator ""_year(unsigned long long y) noexcept
|
||||
#else
|
||||
inline ETL_CONSTEXPR14 etl::chrono::year operator ""_y(unsigned long long y) noexcept
|
||||
#endif
|
||||
{
|
||||
return etl::chrono::year(static_cast<int16_t>(y));
|
||||
}
|
||||
|
||||
@ -126,6 +126,8 @@ SOFTWARE.
|
||||
|
||||
#define ETL_CHRONO_SYSTEM_CLOCK_IS_STEADY false
|
||||
|
||||
#define ETL_USE_VERBOSE_CHRONO_LITERALS
|
||||
|
||||
#if defined(ETL_DEVELOPMENT_OS_WINDOWS)
|
||||
#define ETL_TARGET_OS_WINDOWS
|
||||
#elif defined(ETL_DEVELOPMENT_OS_LINUX)
|
||||
|
||||
@ -255,7 +255,11 @@ namespace
|
||||
{
|
||||
using namespace etl::literals::chrono_literals;
|
||||
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
Chrono::day day = 25_day;
|
||||
#else
|
||||
Chrono::day day = 25_d;
|
||||
#endif
|
||||
|
||||
CHECK_TRUE(day.ok());
|
||||
CHECK_EQUAL(25, unsigned(day));
|
||||
|
||||
@ -1114,5 +1114,29 @@ namespace
|
||||
milliseconds abs_negative_ms = abs(negative_ms); // Absolute value
|
||||
CHECK_EQUAL(1234, abs_negative_ms.count());
|
||||
}
|
||||
|
||||
#if ETL_USING_ETL_CHRONO
|
||||
//*************************************************************************
|
||||
TEST(test_duration_literals)
|
||||
{
|
||||
using namespace etl::literals::chrono_literals;
|
||||
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
CHECK_TRUE(Chrono::hours(1) == 1_hours);
|
||||
CHECK_TRUE(Chrono::minutes(2) == 2_minutes);
|
||||
CHECK_TRUE(Chrono::seconds(3) == 3_seconds);
|
||||
CHECK_TRUE(Chrono::milliseconds(4) == 4_milliseconds);
|
||||
CHECK_TRUE(Chrono::microseconds(5) == 5_microseconds);
|
||||
CHECK_TRUE(Chrono::nanoseconds(6) == 6_nanoseconds);
|
||||
#else
|
||||
CHECK_TRUE(Chrono::hours(1) == 1_h);
|
||||
CHECK_TRUE(Chrono::minutes(2) == 2_min);
|
||||
CHECK_TRUE(Chrono::seconds(3) == 3_s);
|
||||
CHECK_TRUE(Chrono::milliseconds(4) == 4_ms);
|
||||
CHECK_TRUE(Chrono::microseconds(5) == 5_us);
|
||||
CHECK_TRUE(Chrono::nanoseconds(6) == 6_ns);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
@ -291,53 +291,6 @@ namespace
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_USING_ETL_CHRONO
|
||||
//*************************************************************************
|
||||
TEST(test_literal_month)
|
||||
{
|
||||
using namespace etl::literals::chrono_literals;
|
||||
|
||||
Chrono::month month1 = 1_month;
|
||||
Chrono::month month2 = 2_month;
|
||||
Chrono::month month3 = 3_month;
|
||||
Chrono::month month4 = 4_month;
|
||||
Chrono::month month5 = 5_month;
|
||||
Chrono::month month6 = 6_month;
|
||||
Chrono::month month7 = 7_month;
|
||||
Chrono::month month8 = 8_month;
|
||||
Chrono::month month9 = 9_month;
|
||||
Chrono::month month10 = 10_month;
|
||||
Chrono::month month11 = 11_month;
|
||||
Chrono::month month12 = 12_month;
|
||||
|
||||
CHECK_TRUE(month1.ok());
|
||||
CHECK_TRUE(month2.ok());
|
||||
CHECK_TRUE(month3.ok());
|
||||
CHECK_TRUE(month4.ok());
|
||||
CHECK_TRUE(month5.ok());
|
||||
CHECK_TRUE(month6.ok());
|
||||
CHECK_TRUE(month7.ok());
|
||||
CHECK_TRUE(month8.ok());
|
||||
CHECK_TRUE(month9.ok());
|
||||
CHECK_TRUE(month10.ok());
|
||||
CHECK_TRUE(month11.ok());
|
||||
CHECK_TRUE(month12.ok());
|
||||
|
||||
CHECK_EQUAL(1U, unsigned(month1));
|
||||
CHECK_EQUAL(2U, unsigned(month2));
|
||||
CHECK_EQUAL(3U, unsigned(month3));
|
||||
CHECK_EQUAL(4U, unsigned(month4));
|
||||
CHECK_EQUAL(5U, unsigned(month5));
|
||||
CHECK_EQUAL(6U, unsigned(month6));
|
||||
CHECK_EQUAL(7U, unsigned(month7));
|
||||
CHECK_EQUAL(8U, unsigned(month8));
|
||||
CHECK_EQUAL(9U, unsigned(month9));
|
||||
CHECK_EQUAL(10U, unsigned(month10));
|
||||
CHECK_EQUAL(11U, unsigned(month11));
|
||||
CHECK_EQUAL(12U, unsigned(month12));
|
||||
}
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_month_comparison_operators)
|
||||
{
|
||||
|
||||
@ -137,13 +137,13 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_construction_operator_for_year_month)
|
||||
{
|
||||
etl::chrono::year_month ym1 = 2000_year / etl::chrono::April;
|
||||
etl::chrono::year_month ym2 = 2001_year / 5;
|
||||
etl::chrono::year_month ym1 = etl::chrono::year(2000) / etl::chrono::April;
|
||||
etl::chrono::year_month ym2 = etl::chrono::year(2001) / 5;
|
||||
|
||||
CHECK_EQUAL(2000_year, ym1.year());
|
||||
CHECK_EQUAL(etl::chrono::year(2000), ym1.year());
|
||||
CHECK_EQUAL(etl::chrono::April, ym1.month());
|
||||
|
||||
CHECK_EQUAL(2001_year, ym2.year());
|
||||
CHECK_EQUAL(etl::chrono::year(2001), ym2.year());
|
||||
CHECK_EQUAL(etl::chrono::May, ym2.month());
|
||||
}
|
||||
|
||||
|
||||
@ -327,38 +327,6 @@ namespace
|
||||
CHECK_EQUAL(6U, Chrono::Saturday.iso_encoding());
|
||||
}
|
||||
|
||||
#if ETL_USING_ETL_CHRONO
|
||||
//*************************************************************************
|
||||
TEST(test_weekday_literals)
|
||||
{
|
||||
using namespace etl::literals::chrono_literals;
|
||||
|
||||
Chrono::weekday weekday0 = 0_weekday;
|
||||
Chrono::weekday weekday1 = 1_weekday;
|
||||
Chrono::weekday weekday2 = 2_weekday;
|
||||
Chrono::weekday weekday3 = 3_weekday;
|
||||
Chrono::weekday weekday4 = 4_weekday;
|
||||
Chrono::weekday weekday5 = 5_weekday;
|
||||
Chrono::weekday weekday6 = 6_weekday;
|
||||
|
||||
CHECK_TRUE(weekday0.ok());
|
||||
CHECK_TRUE(weekday1.ok());
|
||||
CHECK_TRUE(weekday2.ok());
|
||||
CHECK_TRUE(weekday3.ok());
|
||||
CHECK_TRUE(weekday4.ok());
|
||||
CHECK_TRUE(weekday5.ok());
|
||||
CHECK_TRUE(weekday6.ok());
|
||||
|
||||
CHECK_EQUAL(0U, weekday0.c_encoding());
|
||||
CHECK_EQUAL(1U, weekday1.c_encoding());
|
||||
CHECK_EQUAL(2U, weekday2.c_encoding());
|
||||
CHECK_EQUAL(3U, weekday3.c_encoding());
|
||||
CHECK_EQUAL(4U, weekday4.c_encoding());
|
||||
CHECK_EQUAL(5U, weekday5.c_encoding());
|
||||
CHECK_EQUAL(6U, weekday6.c_encoding());
|
||||
}
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_weekday_comparison_operators)
|
||||
{
|
||||
|
||||
@ -267,7 +267,11 @@ namespace
|
||||
{
|
||||
using namespace etl::literals::chrono_literals;
|
||||
|
||||
#if ETL_USING_VERBOSE_CHRONO_LITERALS
|
||||
etl::chrono::year year = 25_year;
|
||||
#else
|
||||
etl::chrono::year year = 25_y;
|
||||
#endif
|
||||
|
||||
CHECK_TRUE(year.ok());
|
||||
CHECK_EQUAL(25, int(year));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user