From 1aa2d1ad667da48058c5a83fdece4ef199331800 Mon Sep 17 00:00:00 2001 From: terik23 Date: Fri, 22 Mar 2019 09:46:37 +0500 Subject: [PATCH] fix typo --- README.md | 4 ++-- include/nameof.hpp | 6 +++--- test/test.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 53d6e3b..81feebb 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ master |[![Build Status](https://travis-ci.org/Neargye/nameof.svg?branch=master) ## What is Nameof? -A header only C++17 library provides nameof macros and functions to obtain the simple name of variable, type, function, macros and enum. +A header only C++17 library provides nameof macros and functions to obtain the simple name of variable, type, function, macro and enum. Before, you had to use string literals to refer to definitions, which is brittle when renaming code elements because tools do not know to check these string literals. @@ -80,7 +80,7 @@ constexpr auto cx_name = NAMEOF_TYPE(Color::RED); static_assert("Color" == cx_name); ``` -* Name of macros +* Name of macro ```cpp NAMEOF(__LINE__) -> "__LINE__" diff --git a/include/nameof.hpp b/include/nameof.hpp index b435676..9e7012c 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -260,13 +260,13 @@ constexpr std::string_view nameof_type(T) noexcept { } // namespace nameof -// Used to obtain the simple (unqualified) string name of a variable, member, function, enum, macros. +// Used to obtain the simple (unqualified) string name of a variable, member, function, enum, macro. #define NAMEOF(...) ::nameof::detail::nameof_impl(#__VA_ARGS__, false) -// Used to obtain the full string name of a variable, member, function, enum, macros. +// Used to obtain the full string name of a variable, member, function, enum, macro. #define NAMEOF_FULL(...) ::nameof::detail::nameof_impl(#__VA_ARGS__, true) -// Used to obtain the raw string name of a variable, member, function, enum, macros. +// Used to obtain the raw string name of a variable, member, function, enum, macro. #define NAMEOF_RAW(...) ::nameof::detail::nameof_raw_impl(#__VA_ARGS__) // Used to obtain the simple (unqualified) string name of a enum variable. diff --git a/test/test.cpp b/test/test.cpp index a277439..0dab160 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -196,7 +196,7 @@ TEST_CASE("NAMEOF_RAW") { REQUIRE(NAMEOF_RAW(Color::BLUE) == "Color::BLUE"); } - SECTION("macros") { + SECTION("macro") { REQUIRE(NAMEOF_RAW(__cplusplus) == "__cplusplus"); REQUIRE(NAMEOF_RAW(__LINE__) == "__LINE__"); REQUIRE(NAMEOF_RAW(__FILE__) == "__FILE__");