mirror of
https://github.com/boostorg/optional.git
synced 2025-07-24 09:37:27 +02:00
Additional portability fixes (for VC6.0,VC7.0 and Intel C++ 7.0)
[SVN r17082]
This commit is contained in:
@ -17,9 +17,20 @@
|
||||
//
|
||||
// THIS TEST SHOULD FAIL TO COMPILE
|
||||
//
|
||||
#if BOOST_WORKAROUND( BOOST_INTEL_CXX_VERSION, <= 700) // Intel C++ 7.0
|
||||
// Interl C++ 7.0 incorrectly accepts the initialization "boost::optional<int> opt = 3"
|
||||
// even though the ctor is explicit (c.f. 12.3.1.2), so the test uses another form of
|
||||
// copy-initialization: argument-passing (8.5.12)
|
||||
void helper ( boost::optional<int> ) ;
|
||||
void test_explicit_constructor()
|
||||
{
|
||||
helper(3) ; // ERROR: Ctor is explicit.
|
||||
}
|
||||
#else
|
||||
void test_explicit_constructor()
|
||||
{
|
||||
boost::optional<int> opt = 3 ; // ERROR: Ctor is explicit.
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user