Skip to content

Commit 0713e55

Browse files
committed
Simplified to_string definition
1 parent dc2512d commit 0713e55

File tree

6 files changed

+11
-34
lines changed

6 files changed

+11
-34
lines changed

doc/qvm.adoc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,6 @@ QVM is split into multiple headers to allow different compilation units to `#inc
394394

395395
The tables below list commonly used components and the headers they're found in. Header names containing a number define functions that only work with objects of that dimension; e.g. `vec_operations2.hpp` contains only functions for working with 2D vectors.
396396

397-
The header `boost/qvm/to_string.hpp` must be included before calling any `to_string` overload defined in namespace `boost::qvm`.
398-
399397
The header `boost/qvm/all.hpp` is provided for convenience. It includes all other QVM headers.
400398

401399
In addition, Boost QVM is available in single-header format for maximum portability. See <<Distribution>>.
@@ -2805,8 +2803,6 @@ namespace boost { namespace qvm {
28052803

28062804
Returns: :: A string representation of the value of `a`, in unspecified format.
28072805

2808-
NOTE: Calling any `to_string` overload defined in the `boost::qvm` namespace requires `#include <boost/qvm/to_string.hpp>`.
2809-
28102806
'''
28112807

28122808
[[qref]]
@@ -3391,8 +3387,6 @@ namespace boost { namespace qvm {
33913387

33923388
Returns: :: A string representation of the value of `a`, in unspecified format.
33933389

3394-
NOTE: Calling any `to_string` overload defined in the `boost::qvm` namespace requires `#include <boost/qvm/to_string.hpp>`.
3395-
33963390
'''
33973391

33983392
[[vref]]
@@ -4514,8 +4508,6 @@ namespace boost { namespace qvm {
45144508

45154509
Returns: :: A string representation of the value of `a`, in unspecified format.
45164510

4517-
NOTE: Calling any `to_string` overload defined in the `boost::qvm` namespace requires `#include <boost/qvm/to_string.hpp>`.
4518-
45194511
'''
45204512

45214513
[[mref]]

include/boost/qvm/lite.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
55

66
#include <boost/qvm/error.hpp>
7+
#include <boost/qvm/to_string.hpp>
78
#include <boost/qvm/mat_operations.hpp>
89
#include <boost/qvm/mat_access.hpp>
910
#include <boost/qvm/mat_traits_defaults.hpp>
@@ -25,4 +26,3 @@
2526
#include <boost/qvm/vec_mat_operations.hpp>
2627
#include <boost/qvm/vec_register.hpp>
2728
#include <boost/qvm/map.hpp>
28-
#include <boost/qvm/to_string.hpp>

include/boost/qvm/mat_operations.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <boost/qvm/detail/cofactor_impl.hpp>
1717
#include <boost/qvm/detail/transp_impl.hpp>
1818
#include <boost/qvm/scalar_traits.hpp>
19-
#include <string>
19+
#include <boost/qvm/to_string.hpp>
2020

2121
namespace boost { namespace qvm {
2222

@@ -34,12 +34,6 @@ qvm_detail
3434

3535
////////////////////////////////////////////////
3636

37-
namespace
38-
qvm_to_string_detail
39-
{
40-
template <class T>
41-
std::string to_string( T const & x );
42-
}
4337

4438
namespace
4539
qvm_detail

include/boost/qvm/quat_operations.hpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
#include <boost/qvm/assert.hpp>
1515
#include <boost/qvm/error.hpp>
1616
#include <boost/qvm/throw_exception.hpp>
17-
#include <string>
18-
#include <cmath>
17+
#include <boost/qvm/to_string.hpp>
1918

2019
namespace boost { namespace qvm {
2120

@@ -44,12 +43,6 @@ msvc_parse_bug_workaround
4443
};
4544
}
4645

47-
namespace
48-
qvm_to_string_detail
49-
{
50-
template <class T>
51-
std::string to_string( T const & x );
52-
}
5346

5447
template <class A>
5548
inline

include/boost/qvm/to_string.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
// Distributed under the Boost Software License, Version 1.0. (See accompanying
77
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
88

9-
#if __cplusplus >= 201103L
10-
119
#include <string>
1210

11+
#if __cplusplus >= 201103L
12+
1313
namespace boost { namespace qvm {
1414

15-
namespace qvm_to_string_detail = std;
15+
namespace
16+
qvm_to_string_detail
17+
{
18+
using std::to_string;
19+
}
1620

1721
} }
1822

include/boost/qvm/vec_operations.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <boost/qvm/vec_operations4.hpp>
1414
#include <boost/qvm/assert.hpp>
1515
#include <boost/qvm/scalar_traits.hpp>
16-
#include <string>
16+
#include <boost/qvm/to_string.hpp>
1717

1818
namespace boost { namespace qvm {
1919

@@ -31,12 +31,6 @@ qvm_detail
3131

3232
////////////////////////////////////////////////
3333

34-
namespace
35-
qvm_to_string_detail
36-
{
37-
template <class T>
38-
std::string to_string( T const & x );
39-
}
4034

4135
namespace
4236
qvm_detail

0 commit comments

Comments
 (0)