From 907bbbb759da7e6d3ab1e2f59c4da9a41941ab87 Mon Sep 17 00:00:00 2001 From: Tanzinul Islam Date: Sun, 27 Aug 2017 14:54:47 +0100 Subject: [PATCH] Fix 'detail' namespace closing for Borland In `type_with_alignment.hpp`, the `boost::detail` namespace is opened in line 28 just before starting the main `#ifndef __BORLANDC__`-block at line 30. The `detail` namespace is closed within the `#ifndef`-block at line 79. Highlight that namespace closing-brace with a comment for visibility. Furthermore, the main `#ifndef __BORLANDC__`-block has a `#else`-case beginning at line 209, which effectively begins the `boost::detail` namespace at that point. This continuation of the namespace was missing a closing brace, causing a compilation failure with C++Builder (due to not finding `::boost::tt_align_ns::a16` in line 230, but merely finding `::boost::detail::tt_align_ns::a16`). Add that closing brace in line 217 with a visibility comment, just before opening the `tt_align_ns` namespace (which is expected by existing code to be directly inside the `boost` namespace, and not inside `boost::detail`). --- include/boost/type_traits/type_with_alignment.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index ddf1d98..d71fac3 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -76,7 +76,7 @@ template struct short_alignment{ typedef typ template struct char_alignment{ typedef char type; }; template struct char_alignment{ typedef typename short_alignment::value >= Target>::type type; }; -} +} // namespace detail template struct type_with_alignment @@ -214,6 +214,8 @@ template<> struct is_pod< ::boost::tt_align_ns::a128> : public true_type{}; // 2) Because of Borlands #pragma option we can create types with alignments that are // greater that the largest aligned builtin type. +} // namespace detail + namespace tt_align_ns{ #pragma option push -a16 struct a2{ short s; };