aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor C. Richberger <taywee@gmx.com>2017-08-06 13:02:29 -0600
committerGitHub <noreply@github.com>2017-08-06 13:02:29 -0600
commit8743f24f7a6c334e68205441a8b73cc5a4586d0c (patch)
tree2c48bb0ff222eba6524adf4f77a508bee7c5bdb4
parentversion bump (diff)
parentFix multiply defined symbols at link by adding inline, fixes #21 (diff)
downloadargs.hxx-8743f24f7a6c334e68205441a8b73cc5a4586d0c.tar.xz
Merge pull request #28 from travisdowns/master
Fix multiply defined symbols at link by adding inline, fixes #21
-rw-r--r--args.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/args.hxx b/args.hxx
index 731266d..69f5e4d 100644
--- a/args.hxx
+++ b/args.hxx
@@ -69,7 +69,7 @@ namespace args
* \param string The string to count glyphs from
* \return The UTF-8 glyphs in the string
*/
- std::string::size_type Glyphs(const std::string &string_)
+ inline std::string::size_type Glyphs(const std::string &string_)
{
std::string::size_type length = 0;
for (const char c: string_)
@@ -91,7 +91,7 @@ namespace args
* \param the widtho f the first line, defaults to the width of the body
* \return the vector of lines
*/
- std::vector<std::string> Wrap(const std::string &in, const std::string::size_type width, std::string::size_type firstlinewidth = 0)
+ inline std::vector<std::string> Wrap(const std::string &in, const std::string::size_type width, std::string::size_type firstlinewidth = 0)
{
// Preserve existing line breaks
const auto newlineloc = in.find('\n');
@@ -1409,7 +1409,7 @@ namespace args
}
};
- std::ostream &operator<<(std::ostream &os, const ArgumentParser &parser)
+ inline std::ostream &operator<<(std::ostream &os, const ArgumentParser &parser)
{
parser.Help(os);
return os;