[config] BOOST_NO_CXX11_HDR_MEMORY and gcc-4.6.2
Hi, I'm checking for BOOST_NO_CXX11_HDR_MEMORY to include <memory> file with gcc-4.6.2 C++0x and while the file is there (it was a C++98 file),it is not defining in particular pointer_traits and allocator_traits Could the following patch be applied? Best, Vicente svn diff stdlib/libstdcpp3.hpp Index: stdlib/libstdcpp3.hpp =================================================================== --- stdlib/libstdcpp3.hpp (revision 86431) +++ stdlib/libstdcpp3.hpp (working copy) @@ -154,9 +154,11 @@ // Note that although <chrono> existed prior to 4.7, "stead_clock" is spelled "monotonic_clock" // so 4.7.0 is the first truely conforming one. # define BOOST_NO_CXX11_HDR_CHRONO +// C++11 header not yet (fully!) implemented, e.g. pointer_traits and allocator_traits. +# define BOOST_NO_CXX11_HDR_MEMORY # define BOOST_NO_CXX11_ALLOCATOR #endif -// C++0x headers not yet (fully!) implemented +// C++11 headers not yet (fully!) implemented // # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
On 27 October 2013 10:46, Vicente J. Botet Escriba wrote:
Hi,
I'm checking for BOOST_NO_CXX11_HDR_MEMORY to include <memory> file with gcc-4.6.2 C++0x and while the file is there (it was a C++98 file),it is not defining in particular pointer_traits and allocator_traits
Right, they were added for 4.7.0
Could the following patch be applied?
Best, Vicente
svn diff stdlib/libstdcpp3.hpp Index: stdlib/libstdcpp3.hpp =================================================================== --- stdlib/libstdcpp3.hpp (revision 86431) +++ stdlib/libstdcpp3.hpp (working copy) @@ -154,9 +154,11 @@ // Note that although <chrono> existed prior to 4.7, "stead_clock" is spelled "monotonic_clock" // so 4.7.0 is the first truely conforming one.
You might as well also fix the spelling of "steady_clock" and "truly"
I'm checking for BOOST_NO_CXX11_HDR_MEMORY to include <memory> file with gcc-4.6.2 C++0x and while the file is there (it was a C++98 file),it is not defining in particular pointer_traits and allocator_traits
Could the following patch be applied?
Nope: there is no such config macro as BOOST_NO_CXX11_HDR_MEMORY so it is never defined. Try BOOST_NO_CXX11_ALLOCATOR for your use case. HTH, John.
Le 27/10/13 19:02, John Maddock a écrit :
I'm checking for BOOST_NO_CXX11_HDR_MEMORY to include <memory> file with gcc-4.6.2 C++0x and while the file is there (it was a C++98 file),it is not defining in particular pointer_traits and allocator_traits
Could the following patch be applied?
Nope: there is no such config macro as BOOST_NO_CXX11_HDR_MEMORY so it is never defined. Hrr, you are right. To be uniform, is there an interest in adding it?
Try BOOST_NO_CXX11_ALLOCATOR for your use case.
Yes, I will use it. Thanks, Vicente
Le 28/10/13 12:58, Vicente J. Botet Escriba a écrit :
Le 27/10/13 19:02, John Maddock a écrit :
I'm checking for BOOST_NO_CXX11_HDR_MEMORY to include <memory> file with gcc-4.6.2 C++0x and while the file is there (it was a C++98 file),it is not defining in particular pointer_traits and allocator_traits
Could the following patch be applied?
Nope: there is no such config macro as BOOST_NO_CXX11_HDR_MEMORY so it is never defined. Hrr, you are right. To be uniform, is there an interest in adding it?
Try BOOST_NO_CXX11_ALLOCATOR for your use case.
default_delete is missing also. Is there an interest in BOOST_NO_CXX11_DEFAULT_DELETE? Vicente
On 28 October 2013 12:02, Vicente J. Botet Escriba wrote:
Le 28/10/13 12:58, Vicente J. Botet Escriba a écrit :
Le 27/10/13 19:02, John Maddock a écrit :
I'm checking for BOOST_NO_CXX11_HDR_MEMORY to include <memory> file with gcc-4.6.2 C++0x and while the file is there (it was a C++98 file),it is not defining in particular pointer_traits and allocator_traits
Could the following patch be applied?
Nope: there is no such config macro as BOOST_NO_CXX11_HDR_MEMORY so it is never defined.
Hrr, you are right. To be uniform, is there an interest in adding it?
Try BOOST_NO_CXX11_ALLOCATOR for your use case.
default_delete is missing also. Is there an interest in BOOST_NO_CXX11_DEFAULT_DELETE?
Maybe I've misunderstood, but std::default_delete is not missing from GCC 4.6.2's <memory> header.
Le 28/10/13 17:09, Jonathan Wakely a écrit :
On 28 October 2013 12:02, Vicente J. Botet Escriba wrote:
Le 28/10/13 12:58, Vicente J. Botet Escriba a écrit :
Le 27/10/13 19:02, John Maddock a écrit :
I'm checking for BOOST_NO_CXX11_HDR_MEMORY to include <memory> file with gcc-4.6.2 C++0x and while the file is there (it was a C++98 file),it is not defining in particular pointer_traits and allocator_traits
Could the following patch be applied?
Nope: there is no such config macro as BOOST_NO_CXX11_HDR_MEMORY so it is never defined. Hrr, you are right. To be uniform, is there an interest in adding it?
Try BOOST_NO_CXX11_ALLOCATOR for your use case.
default_delete is missing also. Is there an interest in BOOST_NO_CXX11_DEFAULT_DELETE? Maybe I've misunderstood, but std::default_delete is not missing from GCC 4.6.2's <memory> header.
IIRC, the issue appears when compiling on C++98/03 mode. I would need to check again. Vicente
On 28 October 2013 17:07, Vicente J. Botet Escriba wrote:
Le 28/10/13 17:09, Jonathan Wakely a écrit :
On 28 October 2013 12:02, Vicente J. Botet Escriba wrote:
default_delete is missing also. Is there an interest in BOOST_NO_CXX11_DEFAULT_DELETE?
Maybe I've misunderstood, but std::default_delete is not missing from GCC 4.6.2's <memory> header.
IIRC, the issue appears when compiling on C++98/03 mode. I would need to check again.
That's because std::default_delete isn't in C++98/03 :-)
Le 28/10/13 18:11, Jonathan Wakely a écrit :
On 28 October 2013 17:07, Vicente J. Botet Escriba wrote:
Le 28/10/13 17:09, Jonathan Wakely a écrit :
On 28 October 2013 12:02, Vicente J. Botet Escriba wrote:
default_delete is missing also. Is there an interest in BOOST_NO_CXX11_DEFAULT_DELETE? Maybe I've misunderstood, but std::default_delete is not missing from GCC 4.6.2's <memory> header.
IIRC, the issue appears when compiling on C++98/03 mode. I would need to check again. That's because std::default_delete isn't in C++98/03 :-)
Evident. The problem I have is don't know a Boost.Config macro to know if the user compiles with C++11, so I need to rely on other feature macros. Vicente
On Mon, Oct 28, 2013 at 6:10 PM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote: The problem I have is don't know a Boost.Config macro to know if the user
compiles with C++11, so I need to rely on other feature macros.
Would __GXX_EXPERIMENTAL_CXX0X__ work? --Beman
Le 29/10/13 01:52, Beman Dawes a écrit :
On Mon, Oct 28, 2013 at 6:10 PM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
The problem I have is don't know a Boost.Config macro to know if the user
compiles with C++11, so I need to rely on other feature macros.
Would __GXX_EXPERIMENTAL_CXX0X__ work?
This is not portable, it is GNU specific, isn't it? Vicente
On 29 October 2013 00:56, Vicente J. Botet Escriba wrote:
Le 29/10/13 01:52, Beman Dawes a écrit :
On Mon, Oct 28, 2013 at 6:10 PM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
The problem I have is don't know a Boost.Config macro to know if the user
compiles with C++11, so I need to rely on other feature macros.
Would __GXX_EXPERIMENTAL_CXX0X__ work?
This is not portable, it is GNU specific, isn't it?
Yes, but you could combine it with checking the value of __cplusplus: #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
participants (6)
-
Beman Dawes
-
John Maddock
-
Jonathan Wakely
-
Peter Dimov
-
Stephan T. Lavavej
-
Vicente J. Botet Escriba