"Cannot overload functions distinguished by return type alone" when only one definition is present
I'm new to C++ (just went through a tutorial last week) and I'm trying to make a function that returns the version of my program. I'd like it to be constexpr, as I want to learn how to use the features of C++. Here's my header file: // MyApp.h #pragma once namespace MyApp { inline constexpr int MAJOR_VERSION = 0; inline constexpr int MINOR_VERSION = 1; inline constexpr int PATCH_VERSION = 0; inline constexpr std::string_view VERSION_SEPARATOR{ "." }; constexpr std::string_view VERSION() { return MAJOR_VERSION + VERSION_SEPARATOR + MINOR_VERSION + VERSION_SEPARATOR + PATCH_VERSION; } } And for
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.