<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi John,<div class=""><br class=""></div><div class="">You have a small issue in your implementation of JPBPolicy.  If you haven't, you need to define the default constructor and in the default constructor use ``Policy::Policy(const std::string&)`` to initialize the base class.  You can see the example in other policies:</div><div class=""><br class=""></div><div class=""><div class="">    LruPolicy::LruPolicy()</div><div class="">       : Policy(POLICY_NAME)</div><div class="">     {</div><div class="">     }</div></div><div class=""><br class=""></div><div class="">The reason is that each policy has to have a name, which is enforced by the deleted default constructor of the base class.</div><div class=""><br class=""></div><div class="">--</div><div class="">Alex</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 16, 2016, at 1:44 PM, John Baugh <<a href="mailto:jpbaugh@umich.edu" class="">jpbaugh@umich.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Greetings all,<div class=""><b class=""><br class=""></b></div><div class=""><b class="">See the error(s) I'm getting below from my Google Drive:</b></div><div class=""><a href="https://drive.google.com/open?id=1Ni2wc7mSecJR-1KseA_1k4oDKoXuJJrGNtwXl6sHnrA" class="">https://drive.google.com/open?id=1Ni2wc7mSecJR-1KseA_1k4oDKoXuJJrGNtwXl6sHnrA</a><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Here's the code:</b></div><div class=""><a href="https://drive.google.com/open?id=0By9ufeKqmJYYOThERVMtOVo2STA" class="">https://drive.google.com/open?id=0By9ufeKqmJYYOThERVMtOVo2STA</a><br class=""></div><div class=""><b class=""><br class=""></b></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">John</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Nov 14, 2016 at 3:02 AM, Alex Afanasyev <span dir="ltr" class=""><<a href="mailto:aa@cs.ucla.edu" target="_blank" class="">aa@cs.ucla.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi John,<div class=""><br class=""></div><div class="">Can you post the exact error you're getting (if it is too long, you can use <a href="http://pastebin.com/" target="_blank" class="">pastebin.com</a>).  If you also can share the snippet that reproduces the problem, it would be much faster to debug the issue and suggest the solution.</div><div class=""><br class=""></div><div class="">--</div><div class="">Alex</div><div class=""><div class="h5"><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 14, 2016, at 3:53 PM, John Baugh <<a href="mailto:jpbaugh@umich.edu" target="_blank" class="">jpbaugh@umich.edu</a>> wrote:</div><br class="m_-8770596149899013633Apple-interchange-newline"><div class=""><div dir="ltr" class="">I am trying code like so:<div class=""><br class=""></div><div class="">unique_ptr<nfd::cs::Policy> policy(new JPBPolicy());</div><div class=""><br class=""></div><div class="">myContentStore.setPolicy(<wbr class="">policy);</div><div class=""><br class=""></div><div class="">I'm getting tons of errors.  It doesn't like any of the conversions I'm trying to perform...  It may be a misunderstanding of some of the techniques used with managed/smart pointers in terms of polymorphic references, but something's not working.</div><div class=""><br class=""></div><div class="">I want to create a subclass of Policy in order to override functions such as doAfterInsert(iterator i);</div><div class=""><br class=""></div><div class="">In my derived class (subclass), I did provide a body for all the pure virtual methods from the documentation of Policy.</div><div class=""><br class=""></div><div class="">But I think the problem is the conversion.  Is there some way to do this with say, static_cast ?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">John</div></div></div></blockquote></div></div></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>