id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7934,tuples::element returns wrong typesss for bolatile tuples,ptomulik@…,Joel de Guzman,"Hi, according to c++11, volatile tuples should return volatile elements. I think, boost tuple should behave similarly, however it doesn't. Below is an example with two tests, one test for boost tuple and one for standard tuple. The boost tuple test fails. {{{ // file a.cpp #define BOOST_TEST_MODULE example #include #include #include #include BOOST_AUTO_TEST_CASE( boost_tuple ) { using boost::is_same; using boost::tuple; using boost::tuples::element; typedef element<0, volatile tuple > VElement; typedef element<0, const volatile tuple > CVElement; BOOST_CHECK((is_same::value)); BOOST_CHECK((is_same::value)); } BOOST_AUTO_TEST_CASE( std_tuple ) { using boost::is_same; using std::tuple; using std::tuple_element; typedef tuple_element<0, volatile tuple > VElement; typedef tuple_element<0, const volatile tuple > CVElement; BOOST_CHECK((is_same::value)); BOOST_CHECK((is_same::value)); } }}} {{{ ptomulik@barakus$ g++ -ansi -std=c++11 -Werror -Wall -Wextra -pedantic a.cpp ptomulik@barakus$ ./a.out Running 2 test cases... a.cpp(15): error in ""boost_tuple"": check (is_same::value) failed a.cpp(16): error in ""boost_tuple"": check (is_same::value) failed *** 2 failures detected in test suite ""example"" }}} my gcc version {{{ ptomulik@barakus:$ g++ --version g++ (Debian 4.7.2-5) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. }}} ",Bugs,new,To Be Determined,tuple,Boost 1.52.0,Problem,,,