This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/36870] __has_nothrow_constructor violates the ODR



------- Comment #5 from sebor at roguewave dot com  2008-07-18 21:47 -------
(In reply to comment #4)

The ODR is important from an ABI standpoint -- imagine a function template
that uses SFINAE and std::has_nothrow_default_constructor<T>::type. Simply
rearranging code or even compiling multiple sources in the same step could
change which overload will be selected, potentially causing an ABI breakage.
The compiler must give the same answer for the same type regardless of the
context. That might mean not considering the body of the function if it
can't be done 100% consistently (e.g., for out-of-line functions).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36870


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]