Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Clever Code
  4. Template Template Template Parameter

Template Template Template Parameter

Scheduled Pinned Locked Moved Clever Code
javadatabasecomdesignquestion
10 Posts 7 Posters 25 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kevin Drzycimski
    wrote on last edited by
    #1

    Template Template Parameter Following Policy Based Design from Andrei Alexandrescu, there is a certain need for template template parameters and after using them a while, you get quite used to it:

    template <
    class T,
    template <class> class Policy

    class Host {
    };

    But what when you pass a policy host as a policy to a greater host? I didn't even know if it works, so just tried out;

    template <
    class T,
    template <
    template <class>

    class Policy

    class Host {
    };

    For the sake of brevity, i made only one of those. in the real code there are 4 policies and 1 policy-policy with 4 policies I have to change this sooner or later...wrapping the Policy to a inner type or something.

    B E L 4 Replies Last reply
    0
    • K Kevin Drzycimski

      Template Template Parameter Following Policy Based Design from Andrei Alexandrescu, there is a certain need for template template parameters and after using them a while, you get quite used to it:

      template <
      class T,
      template <class> class Policy

      class Host {
      };

      But what when you pass a policy host as a policy to a greater host? I didn't even know if it works, so just tried out;

      template <
      class T,
      template <
      template <class>

      class Policy

      class Host {
      };

      For the sake of brevity, i made only one of those. in the real code there are 4 policies and 1 policy-policy with 4 policies I have to change this sooner or later...wrapping the Policy to a inner type or something.

      B Offline
      B Offline
      Brady Kelly
      wrote on last edited by
      #2

      My eyes! :~

      1 Reply Last reply
      0
      • K Kevin Drzycimski

        Template Template Parameter Following Policy Based Design from Andrei Alexandrescu, there is a certain need for template template parameters and after using them a while, you get quite used to it:

        template <
        class T,
        template <class> class Policy

        class Host {
        };

        But what when you pass a policy host as a policy to a greater host? I didn't even know if it works, so just tried out;

        template <
        class T,
        template <
        template <class>

        class Policy

        class Host {
        };

        For the sake of brevity, i made only one of those. in the real code there are 4 policies and 1 policy-policy with 4 policies I have to change this sooner or later...wrapping the Policy to a inner type or something.

        E Offline
        E Offline
        Emilio Garavaglia
        wrote on last edited by
        #3

        Yep! You're very close to the boundary that separate the use from the abuse!

        2 bugs found. > recompile ... 65534 bugs found. :doh:

        P 1 Reply Last reply
        0
        • K Kevin Drzycimski

          Template Template Parameter Following Policy Based Design from Andrei Alexandrescu, there is a certain need for template template parameters and after using them a while, you get quite used to it:

          template <
          class T,
          template <class> class Policy

          class Host {
          };

          But what when you pass a policy host as a policy to a greater host? I didn't even know if it works, so just tried out;

          template <
          class T,
          template <
          template <class>

          class Policy

          class Host {
          };

          For the sake of brevity, i made only one of those. in the real code there are 4 policies and 1 policy-policy with 4 policies I have to change this sooner or later...wrapping the Policy to a inner type or something.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Our company WEB filter blocks different sites, showing the reason of this. Once I tried to open one of Andrei Alexandrescu C++ articles, and it was blocked with the following reason: Category - Porno Looking at Template Template Template parameters, I think, maybe the filter was right...

          S K 2 Replies Last reply
          0
          • L Lost User

            Our company WEB filter blocks different sites, showing the reason of this. Once I tried to open one of Andrei Alexandrescu C++ articles, and it was blocked with the following reason: Category - Porno Looking at Template Template Template parameters, I think, maybe the filter was right...

            S Offline
            S Offline
            Sauro Viti
            wrote on last edited by
            #5

            Ahahahahahahah! :thumbsup:

            1 Reply Last reply
            0
            • L Lost User

              Our company WEB filter blocks different sites, showing the reason of this. Once I tried to open one of Andrei Alexandrescu C++ articles, and it was blocked with the following reason: Category - Porno Looking at Template Template Template parameters, I think, maybe the filter was right...

              K Offline
              K Offline
              Kevin Drzycimski
              wrote on last edited by
              #6

              Alex Fr wrote:

              Looking at Template Template Template parameters, I think, maybe the filter was right...

              :thumbsup: thats a good one! but dont get it wrong on Alexandrescu <- he is great Template Template Parameter are "ok" what i did here with Template Template Template Parameter (say that 10 times fast) was just a little joke^^

              1 Reply Last reply
              0
              • K Kevin Drzycimski

                Template Template Parameter Following Policy Based Design from Andrei Alexandrescu, there is a certain need for template template parameters and after using them a while, you get quite used to it:

                template <
                class T,
                template <class> class Policy

                class Host {
                };

                But what when you pass a policy host as a policy to a greater host? I didn't even know if it works, so just tried out;

                template <
                class T,
                template <
                template <class>

                class Policy

                class Host {
                };

                For the sake of brevity, i made only one of those. in the real code there are 4 policies and 1 policy-policy with 4 policies I have to change this sooner or later...wrapping the Policy to a inner type or something.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                You know what you're missing? a good 100 or so partial specialisations!

                K 1 Reply Last reply
                0
                • L Lost User

                  You know what you're missing? a good 100 or so partial specialisations!

                  K Offline
                  K Offline
                  Kevin Drzycimski
                  wrote on last edited by
                  #8

                  with many many partial specializations, that would be something for the Coding Horrors :laugh:

                  1 Reply Last reply
                  0
                  • E Emilio Garavaglia

                    Yep! You're very close to the boundary that separate the use from the abuse!

                    2 bugs found. > recompile ... 65534 bugs found. :doh:

                    P Offline
                    P Offline
                    peterchen
                    wrote on last edited by
                    #9

                    Emilio Garavaglia wrote:

                    You're very close to the boundary that separate the use from the abuse!

                    And no call has been made yet on which side he is.

                    Agh! Reality! My Archnemesis![^]
                    | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                    U 1 Reply Last reply
                    0
                    • P peterchen

                      Emilio Garavaglia wrote:

                      You're very close to the boundary that separate the use from the abuse!

                      And no call has been made yet on which side he is.

                      Agh! Reality! My Archnemesis![^]
                      | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                      U Offline
                      U Offline
                      User 7653350
                      wrote on last edited by
                      #10

                      i really dont know how to add this to bling h.p. and im trying every i can think of. can u help?:confused:

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups