<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[&#x27;const_cast&#x27; : cannot convert from &#x27;const boost::filesystem::path&#x27; to &#x27;boost::filesystem::path&#x27;]]></title><description><![CDATA[<p>Ich dachte dafür wär const_cast da?<br />
Die Zeile ist</p>
<pre><code class="language-cpp">*sourceDirectory = const_cast&lt;bf::path&gt;(bf::initial_path());
</code></pre>
<p>wobei sourceDirectory ein bf::path* und bf ein alias für boost::filesystem ist</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/206946/const_cast-cannot-convert-from-const-boost-filesystem-path-to-boost-filesystem-path</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 16:45:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/206946.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Mar 2008 20:55:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &#x27;const_cast&#x27; : cannot convert from &#x27;const boost::filesystem::path&#x27; to &#x27;boost::filesystem::path&#x27; on Sat, 01 Mar 2008 20:55:14 GMT]]></title><description><![CDATA[<p>Ich dachte dafür wär const_cast da?<br />
Die Zeile ist</p>
<pre><code class="language-cpp">*sourceDirectory = const_cast&lt;bf::path&gt;(bf::initial_path());
</code></pre>
<p>wobei sourceDirectory ein bf::path* und bf ein alias für boost::filesystem ist</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1466334</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1466334</guid><dc:creator><![CDATA[JustAnotherNoob]]></dc:creator><pubDate>Sat, 01 Mar 2008 20:55:14 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;const_cast&#x27; : cannot convert from &#x27;const boost::filesystem::path&#x27; to &#x27;boost::filesystem::path&#x27; on Sat, 01 Mar 2008 21:13:48 GMT]]></title><description><![CDATA[<p>const_cast ist um das const von einem Zeiger oder Referenz wegzubekommen. Aber bringt dir überhaupt nichts, wenn du sowieso eine Kopie erstellst.<br />
Zudem sind const_casts meistens ein Hinweis auf einen Designfehler.</p>
<p>Also eben, wieso schreibst du nicht einfach:</p>
<pre><code class="language-cpp">*sourceDirectory = bf::initial_path();
</code></pre>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1466344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1466344</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Sat, 01 Mar 2008 21:13:48 GMT</pubDate></item></channel></rss>