From 0150c2f2475b147708619d2ed5ddcbc071f19584 Mon Sep 17 00:00:00 2001 From: Neargye Date: Tue, 1 May 2018 18:19:34 +0500 Subject: [PATCH] update readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eb327ae..3122cc0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ master |[![Build Status](https://travis-ci.org/Neargye/nameof.svg?branch=master) C++ alternative to [nameof](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/nameof) operator in [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)). -Used to obtain the simple name of a variable, type, member, function, macros and etc. +Used to obtain the simple name of a variable, type, member, function, macros. 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. A nameof macros expression has this form: @@ -33,7 +33,7 @@ std::cout << NAMEOF(person.address.zip_code) << std::endl; // prints "zip_code" * Compile-time * Compilation check -## [Example](example/example.cpp) & Key Use Cases +## [Examples](example/example.cpp) * Name of a variable, member or function and etc @@ -113,7 +113,7 @@ void f() { * The argument expression identifies a code definition, but it is never evaluated. -* If you need to get the fully-qualified name, you could use the NAMEOF_FULL(). +* If you need fully-qualified name, use NAMEOF_FULL(). ```cpp NAMEOF_FULL(somevar.somefield) -> "somevar.somefield" @@ -123,7 +123,7 @@ NAMEOF_FULL(std::string) -> "std::string" ## Integration -You need to add the single required file [nameof.hpp](include/nameof.hpp), and the necessary switches to enable C++11. +You should add required file [nameof.hpp](include/nameof.hpp) and switch to C++11. ## Compiler compatibility