[PATCH] Qualify use of std::declval to avoid ADL

Jonathan Wakely jwakely@redhat.com
Thu Oct 13 16:41:00 GMT 2016


	* include/experimental/propagate_const (element_type): Qualify
	declval.

Tested x86_64-linux, committted to trunk.

-------------- next part --------------
commit 1df5cda6740d67ac7074fbbf03178d25b45549bb
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Oct 13 17:39:18 2016 +0100

    Qualify use of std::declval to avoid ADL
    
    	* include/experimental/propagate_const (element_type): Qualify
    	declval.

diff --git a/libstdc++-v3/include/experimental/propagate_const b/libstdc++-v3/include/experimental/propagate_const
index 15ffe4a..e1fb4e4 100644
--- a/libstdc++-v3/include/experimental/propagate_const
+++ b/libstdc++-v3/include/experimental/propagate_const
@@ -63,7 +63,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     class propagate_const
     {
     public:
-      typedef remove_reference_t<decltype(*declval<_Tp&>())> element_type;
+      typedef remove_reference_t<decltype(*std::declval<_Tp&>())> element_type;
 
     private:
       template <typename _Up>


More information about the Libstdc++ mailing list