From 4c5b75e56e577f426ba8423318c8050e58f4a451 Mon Sep 17 00:00:00 2001 From: terik23 Date: Tue, 30 Jul 2019 23:44:48 +0500 Subject: [PATCH] formating test_package.cpp --- test_package/test_package.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test_package/test_package.cpp b/test_package/test_package.cpp index 0dfd7af..3e5f101 100644 --- a/test_package/test_package.cpp +++ b/test_package/test_package.cpp @@ -5,23 +5,23 @@ #include struct SomeStruct {}; -enum class Color { RED = -12, GREEN = 7, BLUE = 15 }; SomeStruct structvar; + int main() { // Compile-time. constexpr auto name = NAMEOF(structvar); static_assert("structvar" == name); // Nameof. - using std::literals::string_view_literals::operator""sv; - std::string_view res1 = NAMEOF(structvar); std::string_view res2 = NAMEOF(::structvar); - + std::cout << res1 << '\n' << res2 << '\n'; - - bool success = res1 == "structvar"sv - && res2 == "structvar"sv; + + using std::literals::string_view_literals::operator""sv; + + bool success = (res1 == "structvar"sv) && (res2 == "structvar"sv); + return success ? EXIT_SUCCESS : EXIT_FAILURE; }