http://d.puremagic.com/issues/show_bug.cgi?id=8486
Summary: Possibly wrong interaction of Variant and const arrays Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: cybe...@gmail.com --- Comment #0 from cybevnm <cybe...@gmail.com> 2012-07-31 12:36:58 PDT --- During initializing Variant, D discards top level const of array, which leads to little unintuitive behaviour. Consider code: import std.stdio; import std.variant; void main() { const int[] arr; Variant v = Variant( arr ); writeln( v.peek!( typeof( arr ) )() ); writeln( v.peek!( const(int)[] )() ); writeln( v.type() ); } ...and output: %dmd main.d && ./main.d null 7FFF358AE298 const(int)[] As you can see peek works successfully not for original array type, but for type without top level const. Is Variant supposed to work in that way ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------