
20 Apr
2009
20 Apr
'09
6:58 p.m.
Hi, Following snippet compiles fine with 1.34.1 -------------------------- #include "boost/shared_ptr.hpp" class Base { public: virtual ~Base() {} }; class Derived; boost::shared_ptr<Base> foo() { return boost::shared_ptr<Derived>(); } class Derived : public Base {}; -------------------------- It fails though with boost 1.36: a.cpp: In function `boost::shared_ptr<Base> foo()': a.cpp:13: error: conversion from `boost::shared_ptr<Derived>' to non-scalar type `boost::shared_ptr<Base>' requested Looks like it caused by additional argument in template constructor sp_enable_if_convertible. Is it intentional? Can we still support old use case? Gennadiy