From 106804a93163d5649264a1252cabf8264f3bcf09 Mon Sep 17 00:00:00 2001 From: tdowns Date: Sun, 6 Aug 2017 12:55:04 -0600 Subject: Fix multiply defined symbols at link by adding inline, fixes #21 --- args.hxx | 6 +++--- 1 file 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 Wrap(const std::string &in, const std::string::size_type width, std::string::size_type firstlinewidth = 0) + inline std::vector 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; -- cgit v1.2.1