This commit is contained in:
Terik23 2018-04-02 16:25:58 +05:00
parent 590c6e3890
commit c71de0fc95

View file

@ -1,5 +1,5 @@
// nameof() c++11 https://github.com/Terik23/nameof // nameof() c++11 https://github.com/Terik23/nameof
// Vesion 0.1.3 // Vesion 0.1.4
// //
// Licensed under the MIT License <http://opensource.org/licenses/MIT>. // Licensed under the MIT License <http://opensource.org/licenses/MIT>.
// Copyright (c) 2016 - 2018 Daniil Goncharov <neargye@gmail.com>. // Copyright (c) 2016 - 2018 Daniil Goncharov <neargye@gmail.com>.
@ -28,7 +28,7 @@
namespace nameof { namespace nameof {
template <typename T, size_t N> template <typename T, size_t N>
constexpr const char* Nameof(const char(&name)[N], const size_t length = N) { inline constexpr const char* Nameof(const char(&name)[N], const size_t length = N) {
return length == 0 ? name return length == 0 ? name
: (name[length - 1] == ' ' || name[length - 1] == '.' || : (name[length - 1] == ' ' || name[length - 1] == '.' ||
name[length - 1] == '>' || name[length - 1] == ':' || name[length - 1] == '>' || name[length - 1] == ':' ||