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

@ -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