Commit 88c4d6b7 by Ed Smith-Rowland Committed by Edward Smith-Rowland

Simplify and clean up library literals.

2013-06-07  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Simplify and clean up library literals.
	* include/std/chrono: Simplify namespace and versioning management.
	* include/bits/basic_string.h: Ditto.
	* testsuite/20_util/duration/literals/types.cc: Remove bogus comment.
	* testsuite/20_util/duration/literals/values.cc: Ditto.
	* testsuite/21_strings/basic_string/literals/types.cc: Ditto.
	* testsuite/21_strings/basic_string/literals/values.cc: Ditto.

From-SVN: r199861
parent 83ac9249
2013-06-08 Ed Smith-Rowland <3dw4rd@verizon.net> 2013-06-08 Ed Smith-Rowland <3dw4rd@verizon.net>
Simplify and clean up library literals.
* include/std/chrono: Simplify namespace and versioning management.
* include/bits/basic_string.h: Ditto.
* testsuite/20_util/duration/literals/types.cc: Remove bogus comment.
* testsuite/20_util/duration/literals/values.cc: Ditto.
* testsuite/21_strings/basic_string/literals/types.cc: Ditto.
* testsuite/21_strings/basic_string/literals/values.cc: Ditto.
2013-06-08 Ed Smith-Rowland <3dw4rd@verizon.net>
Implement N3654 - Quoted Strings Library Proposal Implement N3654 - Quoted Strings Library Proposal
* include/std/iomanip: Add quoted(String, Char delim, Char escape) * include/std/iomanip: Add quoted(String, Char delim, Char escape)
manipulators and supporting machinery in c++1y mode. manipulators and supporting machinery in c++1y mode.
......
...@@ -3103,17 +3103,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -3103,17 +3103,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ }; { };
#endif #endif
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#if __cplusplus > 201103L #if __cplusplus > 201103L
namespace std _GLIBCXX_VISIBILITY(default) inline namespace literals {
{ inline namespace string_literals {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
inline namespace literals {
inline namespace string_literals {
inline basic_string<char> inline basic_string<char>
operator"" s(const char* __str, size_t __len) operator"" s(const char* __str, size_t __len)
...@@ -3135,14 +3128,14 @@ inline namespace string_literals { ...@@ -3135,14 +3128,14 @@ inline namespace string_literals {
{ return basic_string<char32_t>{__str, __len}; } { return basic_string<char32_t>{__str, __len}; }
#endif #endif
} // inline namespace string_literals } // inline namespace string_literals
} // inline namespace literals } // inline namespace literals
#endif // __cplusplus > 201103L
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
} // namespace std } // namespace std
#endif // __cplusplus > 201103L
#endif // C++11 #endif // C++11
#endif /* _BASIC_STRING_H */ #endif /* _BASIC_STRING_H */
...@@ -780,23 +780,10 @@ _GLIBCXX_END_NAMESPACE_VERSION ...@@ -780,23 +780,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
} // namespace chrono } // namespace chrono
// @} group chrono
} // namespace
#endif //_GLIBCXX_USE_C99_STDINT_TR1
#endif // C++11
#if __cplusplus > 201103L #if __cplusplus > 201103L
#ifdef _GLIBCXX_USE_C99_STDINT_TR1 inline namespace literals {
inline namespace chrono_literals {
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
inline namespace literals {
inline namespace chrono_literals {
namespace __detail { namespace __detail {
...@@ -909,14 +896,16 @@ inline namespace chrono_literals { ...@@ -909,14 +896,16 @@ inline namespace chrono_literals {
chrono::nanoseconds>::value; chrono::nanoseconds>::value;
} }
} // inline namespace chrono_literals } // inline namespace chrono_literals
} // inline namespace literals } // inline namespace literals
_GLIBCXX_END_NAMESPACE_VERSION #endif // __cplusplus > 201103L
// @} group chrono
} // namespace std } // namespace std
#endif //_GLIBCXX_USE_C99_STDINT_TR1 #endif //_GLIBCXX_USE_C99_STDINT_TR1
#endif // __cplusplus > 201103L #endif // C++11
#endif //_GLIBCXX_CHRONO #endif //_GLIBCXX_CHRONO
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// NOTE: This makes use of the fact that we know how moveable
// is implemented on string (via swap). If the implementation changed
// this test may begin to fail.
#include <chrono> #include <chrono>
#include <type_traits> #include <type_traits>
......
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// NOTE: This makes use of the fact that we know how moveable
// is implemented on string (via swap). If the implementation changed
// this test may begin to fail.
#include <chrono> #include <chrono>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
......
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// NOTE: This makes use of the fact that we know how moveable
// is implemented on string (via swap). If the implementation changed
// this test may begin to fail.
#include <string> #include <string>
#include <type_traits> #include <type_traits>
......
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// NOTE: This makes use of the fact that we know how moveable
// is implemented on string (via swap). If the implementation changed
// this test may begin to fail.
#include <string> #include <string>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment