Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2014-02-10 17:30:12 +0000
committerPhil Nash2014-02-10 17:30:12 +0000
commitc98a97cf90eaf95fedd540f29a0ba8015c925eae (patch)
tree18ddf067c3a237223c84082578a60884994afa4d /include
parent4554155e3dea5e21cb1bc5b9d89f571060e5d33e (diff)
downloadcatch3-c98a97cf90eaf95fedd540f29a0ba8015c925eae.tar.gz
Tweaked Cliche macros/ names
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_clara.h4
-rw-r--r--include/internal/clara.h24
2 files changed, 16 insertions, 12 deletions
diff --git a/include/internal/catch_clara.h b/include/internal/catch_clara.h
index 636be471..0f9dfa62 100644
--- a/include/internal/catch_clara.h
+++ b/include/internal/catch_clara.h
@@ -9,8 +9,8 @@
#ifndef TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
#define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
-#define CLICHE_CLARA_EMBEDDED_NAMESPACE Catch
+#define CLICHE_CLARA_OUTER_NAMESPACE Catch
#include "clara.h"
-#undef CLICHE_CLARA_EMBEDDED_NAMESPACE
+#undef CLICHE_CLARA_OUTER_NAMESPACE
#endif // TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
diff --git a/include/internal/clara.h b/include/internal/clara.h
index 494b959a..7ae8c334 100644
--- a/include/internal/clara.h
+++ b/include/internal/clara.h
@@ -5,20 +5,24 @@
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
-#ifndef CLICHE_CLARA_EMBEDDED_NAMESPACE
-#ifdef TWOBLUECUBES_CLARA_H_INCLUDED
-#define TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
-#else
-#define TWOBLUECUBES_CLARA_H_INCLUDED
-#endif
-#endif
+// Only use header guard if we are not using an outer namespace
+#ifndef CLICHE_CLARA_OUTER_NAMESPACE
+# ifdef TWOBLUECUBES_CLARA_H_INCLUDED
+# ifndef TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
+# define TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
+# endif
+# else
+# define TWOBLUECUBES_CLARA_H_INCLUDED
+# endif
+#endif
#ifndef TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
#include "catch_text.h" // This will get moved out too
-#ifdef CLICHE_CLARA_EMBEDDED_NAMESPACE
-namespace CLICHE_CLARA_EMBEDDED_NAMESPACE {
+// Use optional outer namespace
+#ifdef CLICHE_CLARA_OUTER_NAMESPACE
+namespace CLICHE_CLARA_OUTER_NAMESPACE {
#endif
namespace Clara {
@@ -593,7 +597,7 @@ namespace Clara {
} // end namespace Clara
-#ifdef CLICHE_CLARA_EMBEDDED_NAMESPACE
+#ifdef CLICHE_CLARA_OUTER_NAMESPACE
} // end embedded namespace
#endif