Re: namespace

David Bellot via ublas <[email protected]> Fri, 31 May 2019 14:35:11 +1000
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <CAOE6ZJHY3t+QXPw0MTDVp2WbGXyuZJjU6Jwgy_uidy4p-1fKFQ@mail.gmail.com>
--===============7173586345070000528==
Content-Type: multipart/related; boundary="000000000000d48dbb058a278bbc"

--000000000000d48dbb058a278bbc
Content-Type: multipart/alternative; boundary="000000000000d48db9058a278bbb"

--000000000000d48db9058a278bbb
Content-Type: text/plain; charset="UTF-8"

I never tried with complicated structures, but as far as I know, we can
simply do something like:

namespace boost::ublas
{
   bla bla bla...
}

namespace boost::numeric::ublas
{
     using namespace boost::ublas;
}

I just wonder why none of gcc and clang complain about that. I'm obviously
missing something because the recursion should be infinite,shouldn't it?
https://en.cppreference.com/w/cpp/language/namespace#Using-directives


On Fri, May 31, 2019 at 10:30 AM Stefan Seefeld via ublas <
[email protected]> wrote:

>
> On 2019-05-30 8:07 p.m., David Bellot via ublas wrote:
>
> By the way, can I open a flame war on this list? :-D
>
> I doubt it. If you want a flame war, go to the boost list ! ;-)
>
> What's about getting ublas out of the namespace numeric. The sub-namespace
> numeric has never been used as expected in the early days:
> - in most of the code I saw so far, people are doing a using namespace
> boost::numeric.
> - you can't seriously type boost::numeric::ublas::fct(x,y) like you type
> std::fct(x,y). I mean, std is 3 characters only.
> - can we find a way to inject a new boost::ublas into boost::numeric to
> keep backward compatibility
>
> As ublas is going through massive changes and improvements (thanks Cem,
> Stefan, Paul, Thomas, <put your name here>,...), it's about time to think
> about these little details too which would give ublas a new face and
> simplify users' life.
>
> +1
>
> [image: Stefan]
> --
>
>       ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> ublas mailing list
> [email protected]
> https://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: [email protected]
>

--000000000000d48db9058a278bbb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,he=
lvetica,sans-serif;font-size:small">I never tried with complicated structur=
es, but as far as I know, we can simply do something like:</div><div class=
=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif;font-siz=
e:small"><br></div><div class=3D"gmail_default" style=3D"font-size:small"><=
font face=3D"courier new, monospace">namespace boost::ublas</font></div><di=
v class=3D"gmail_default" style=3D"font-size:small"><font face=3D"courier n=
ew, monospace">{</font></div><div class=3D"gmail_default" style=3D"font-siz=
e:small"><font face=3D"courier new, monospace">=C2=A0 =C2=A0bla bla bla...<=
/font></div><div class=3D"gmail_default" style=3D"font-size:small"><font fa=
ce=3D"courier new, monospace">}</font></div><div class=3D"gmail_default" st=
yle=3D"font-size:small"><font face=3D"courier new, monospace"><br></font></=
div><div class=3D"gmail_default" style=3D"font-size:small"><font face=3D"co=
urier new, monospace">namespace boost::numeric::ublas</font></div><div clas=
s=3D"gmail_default" style=3D"font-size:small"><font face=3D"courier new, mo=
nospace">{<br>=C2=A0 =C2=A0 =C2=A0using namespace boost::ublas;</font></div=
><div class=3D"gmail_default" style=3D"font-size:small"><font face=3D"couri=
er new, monospace">}</font></div><div class=3D"gmail_default" style=3D"font=
-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class=3D=
"gmail_default" style=3D"font-family:arial,helvetica,sans-serif;font-size:s=
mall">I just wonder why none of gcc and clang complain about that. I&#39;m =
obviously missing something because the recursion should be infinite,should=
n&#39;t it?=C2=A0<a href=3D"https://en.cppreference.com/w/cpp/language/name=
space#Using-directives" style=3D"font-family:Arial,Helvetica,sans-serif">ht=
tps://en.cppreference.com/w/cpp/language/namespace#Using-directives</a></di=
v><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-se=
rif;font-size:small"><br></div></div><br><div class=3D"gmail_quote"><div di=
r=3D"ltr" class=3D"gmail_attr">On Fri, May 31, 2019 at 10:30 AM Stefan Seef=
eld via ublas &lt;<a href=3D"mailto:[email protected]">[email protected]=
t.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:=
1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF">
    <p><br>
    </p>
    <div class=3D"gmail-m_1648582027727227074moz-cite-prefix">On 2019-05-30=
 8:07 p.m., David Bellot
      via ublas wrote:<br>
    </div>
    <blockquote type=3D"cite">
     =20
      <div dir=3D"ltr">
        <div class=3D"gmail_default" style=3D"font-family:arial,helvetica,s=
ans-serif;font-size:small">By
          the way, can I open a flame war on this list? :-D</div>
      </div>
    </blockquote>
    <p>I doubt it. If you want a flame war, go to the boost list ! ;-)<br>
    </p>
    <blockquote type=3D"cite">
      <div dir=3D"ltr">
        <div class=3D"gmail_default" style=3D"font-family:arial,helvetica,s=
ans-serif;font-size:small">What&#39;s
          about getting ublas out of the namespace numeric. The
          sub-namespace numeric has never been used as expected in the
          early days:</div>
        <div class=3D"gmail_default" style=3D"font-family:arial,helvetica,s=
ans-serif;font-size:small">-
          in most of the code I saw so far, people are doing a using
          namespace boost::numeric.<br>
        </div>
        <div class=3D"gmail_default" style=3D"font-family:arial,helvetica,s=
ans-serif;font-size:small">-
          you can&#39;t seriously type boost::numeric::ublas::fct(x,y) like
          you type std::fct(x,y). I mean, std is 3 characters only.<br>
        </div>
        <div class=3D"gmail_default" style=3D"font-family:arial,helvetica,s=
ans-serif;font-size:small">-
          can we find a way to inject a new boost::ublas into
          boost::numeric to keep backward compatibility</div>
        <div class=3D"gmail_default" style=3D"font-family:arial,helvetica,s=
ans-serif;font-size:small"><br>
        </div>
        <div class=3D"gmail_default" style=3D"font-family:arial,helvetica,s=
ans-serif;font-size:small">As
          ublas is going through massive changes and improvements
          (thanks Cem, Stefan, Paul, Thomas, &lt;put your name
          here&gt;,...), it&#39;s about time to think about these little
          details too which would give ublas a new face and simplify
          users&#39; life.</div>
      </div>
    </blockquote>
    <p>+1</p>
    <div class=3D"gmail-m_1648582027727227074moz-signature">
      <div class=3D"gmail-m_1648582027727227074moz-signature">
        <div class=3D"gmail-m_1648582027727227074moz-signature">
          <pre><img src=3D"cid:16b0c259eccf78352851" alt=3D"Stefan" width=
=3D"123" height=3D"77">
--=20

      ...ich hab&#39; noch einen Koffer in Berlin...
</pre>
        </div>
      </div>
    </div>
  </div>

_______________________________________________<br>
ublas mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
t.org</a><br>
<a href=3D"https://lists.boost.org/mailman/listinfo.cgi/ublas" rel=3D"noref=
errer" target=3D"_blank">https://lists.boost.org/mailman/listinfo.cgi/ublas=
</a><br>
Sent to: <a href=3D"mailto:[email protected]" target=3D"_blank">david.=
[email protected]</a><br>
</blockquote></div>

--000000000000d48db9058a278bbb--
--000000000000d48dbb058a278bbc
Content-Type: image/png; name=".signature.png"
Content-Disposition: inline; filename=".signature.png"
Content-Transfer-Encoding: base64
Content-ID: <16b0c259eccf78352851>
X-Attachment-Id: 16b0c259eccf78352851

iVBORw0KGgoAAAANSUhEUgAAAHsAAABNCAYAAACG5BvPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAAVhwAAFYcBshnuugAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAo/SURB
VHic7Z17sFVVHcc/h3vkInBNIVEYCgshwAAh6fbSJsZkHAsrKh8V3eihU4bR9CYfkWNWM2FaWZg9
fEVNZVZ40SlF0RLDwhzIkRAknsIkCnpRvOz++O7V2ue93/uce/ZnZs8995691vrt9Vt7rd/6rd9a
F3LSoAB8FtgFjMpYlpwEORq4BXCA7UjxmVDMquA24QSgB5jt/n4zUnrOAGMy8B+kXAc4BIzPVKKc
RBgObEZK3uP+/GmmEuUkxneRglcBfcBB8rd6QDIRddl7gJ8hpX89S4FykuNXSMHL0Bu9FRiWqUQ5
iXAycBjYCdyPlP7uTCXKSYzfYMdqB7g9U2lyEmMy0A/sR+P1XuC4TCXKSYxbsfNpB/hgtuLkJMUE
4CWsA+W32YqTkyRXYxW9E3h5tuL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1P6sHNC5GF8vn7Dhw07sWN9+Zs3ktIx/RBaIPEbUnU2
2j+2nNqG0QxKn/0l0pv/eodQBwVfLgbOQI6kxE51MAetGidLkHBdr6t0ScByTWTL/TW+n0mlxb4J
Vcrrqe5SfRvaqPALFG1SD+OeNdfaYOJHYiqle9KrXXuRL2A1mjFdi3q8+ciBE6phHk/pFCTIuV7e
rvCTAdJ593fVO8V3LOqGvSczmOs51DjXoqFkF7I9bkTTqkZ4j/dwgG8HkD8OOlD07BL0wj2AZgfV
nE21rt3AH9C/lBrnt+AeTwb9qBv0gwm3ddCUwi8LPen8GEWTkNv0bjQdM71JP3rglSiUKIiR6bUL
0hqv/dKFuvNudHbcBcC3kHPmMSpDs41t8yfgzY0yL1Dqq36Wxt0g2FUiB3hjgIcxXiqHcCcZFIl+
Uv91lFZWKx0dPQz1CldT6eN3gD/SoOEfQ+l0aDON17q9b+jxPgXtRF2wSRdHgGIYzL40B/h3RjLE
QREFaBoHkbkOICdOTaZhDScHjSNdde7/DrYn8OsqNScEGis7Kzei2T3qkPxxHWnQiVzXxr27Hh+H
CL6P0nngfdRWyJ0Ed6hcjHUoZHkY+3bsM346QzniZio63cn3CVI9lCr8ESqPrBqEdVxcEkCYq5AF
PTNAmrjpoNSXncVGhKZiPqUV8hTwDs/3xinxPMHWnDvJPkR3DPa5+kj+HLWW4DykTO/AvxJ5s1ag
KcDCzKQLj3d7cS2nTltyEpUOfAcZOK266W0u4ZxIbcFgZMZvQOE1C0j2EJuk+QRW2RdmLEtOwnwN
q+y3ZCxLorTyGxkX3plFS5+s0Ihc2TYMazsKXx6w5Mq2yv5XplKkQLsru4jtxrdmKUgatLuyX4mN
eEkqJr1paHdln+j5nHSocua0u7JP8nzO3+wBjvfA2fzNHuAYZT9IG1jj7cxgtFfrjKwFSYv/Ad3T
Miz8AALwAAAAAElFTkSuQmCC
--000000000000d48dbb058a278bbc--

--===============7173586345070000528==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline