Config: detect ref convert bug in gcc 4.4 and 4.5

This commit is contained in:
Andrzej Krzemienski
2015-10-14 23:11:33 +02:00
parent 29975d6192
commit fb1cf2581e
7 changed files with 97 additions and 3 deletions

View File

@ -1,5 +1,5 @@
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
// Copyright (C) 2014 Andrzej Krzemienski.
// Copyright (C) 2014, 2015 Andrzej Krzemienski.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,5 @@
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
// Copyright (C) 2014 Andrzej Krzemienski.
// Copyright (C) 2014, 2015 Andrzej Krzemienski.
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -82,4 +82,18 @@
#endif // defined(__GNUC__)
#if defined(__GNUC__)
// On some initial rvalue reference implementations GCC does it in a strange way,
// preferring perfect-forwarding constructor to implicit copy constructor.
# if (__GNUC__ == 4 && __GNUC_MINOR__ == 4)
# define BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT
# endif
# if (__GNUC__ == 4 && __GNUC_MINOR__ == 5)
# define BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT
# endif
#endif // defined(__GNUC__)
#endif // header guard