Before After Template

0 views
Skip to first unread message

Nickie Koskinen

unread,
Aug 3, 2024, 10:48:18 AM8/3/24
to atorovfpag

This works with every compiler - I'm not surprised MSVC compiles it since it handles templates differently, but GCC and clang allow it too. I thought the standard required the specialization to occur before the first use, which in this case would mean before main and expected them to report an error.

6 If a template, a member template or a member of a class template is explicitly specialized then that specialization shall be declared before the first use of that specialization that would cause an implicit instantiation to take place, in every translation unit in which such a use occurs; no diagnostic is required. [...]

7 The placement of explicit specialization declarations for function templates, class templates, variable templates, member functions of class templates, static data members of class templates, member classes of class templates, member enumerations of class templates, member class templates of class templates, member function templates of class templates, static data member templates of class templates, member functions of member templates of class templates, member functions of member templates of non-template classes, static data member templates of non-template classes, member function templates of member classes of class templates, etc., and the placement of partial specialization declarations of class templates, variable templates, member class templates of non-template classes, static data member templates of non-template classes, member class templates of class templates, etc., can affect whether a program is well-formed according to the relative positioning of the explicit specialization declarations and their points of instantiation in the translation unit as specified above and below. When writing a specialization, be careful about its location; or to make it compile will be such a trial as to kindle its self-immolation.

Instantiating templateGetter causes the implicit instantiation of a declaration of templateImpl. You didn't see an error with your code because many implementations like to defer template instantiations until the end of the translation unit when possible, which is a permitted implementation technique. (I'm not going to quote the standardese here, but you'll find that function template specializations have an extra point of instantiation at the end of the translation unit.)

For a function template specialization, ... if the specialization is implicitly instantiated because it is referenced from within another template specialization and the context from which it is referenced depends on a template parameter, the point of instantiation of the specialization is the point of instantiation of the enclosing specialization. Otherwise, the point of instantiation for such a specialization immediately follows the namespace scope declaration or definition that refers to the specialization.

It would be great to have the option to add tasks to the new project template, which are partially due before the project due date and others after (e.g., -28 days for one task and +5 days for another task).

Negative numbers are already possible, but it would be great if you could use both negative and positive numbers in a project. Instead of a due date or a start date for a project, it would be great to set an any date that all other tasks align with before and after.

I usually coach to create 2 separate templates for these instances and if they are really needed to be in one project combine them after they have populated. Another option is to know how many days after the event date the final date in the project is (ie. the last task in this project is due 15 days after the event) and make sure that information is in the project overview when the template is created so that when others copy the template it is used correctly each time.

Example 1:
We are a record label that releases music. Every release has a project that comes from a template. The project due date and main milestone is the public release date. Prior to that release date, we have tasks like contracting, budgeting, and distribution. After the release date, we have marketing, press, and reviews.

There are tasks that span both the pre and post-release date steps as well, and there are dependencies connecting all of this, so they cannot be two separate projects. Right now what we have to do is leave all of the post-release date tasks without a date, and manually set them after project creation.

In both of these cases, it would be helpful to have dates relative to a milestone, or even more simple, just allow the current PT2.0 templates to have negative reference dates to the project due date. Right now it allows for X amount of days before the due date. Why not allow for X amount of days after the due date as well? By simply allowing the reference date to be a negative number it would solve this.

Ben, we are similar to your example 2, manually adding all due dates after the first event which is quite time-consuming. A primary part of my job is running workshops and we often run pilot versions of these before rolling them out to an organization. Both the pilot workshops and the following roll-out would not make sense to separate into different projects as tasks are dependent on each other and the pre-pilot context is needed when rolling out the workshops.

Review client questionnaires: 60 days before start date
Assign project to team members: 45 days before
Finish Internal design: 20 days before start date
Start Date
Send client proof 1: 14 days after start date
Send client final proof: 30 days after start date

We send regular mail appeals to our donor base, and often set up our template due date as the drop date of our mail campaign (the day the mail house deposits the physical mail at the post office sorting centre, and releases it into the world).

In my work, we have planning that we need to do for each intake of graduates that join the company. The graduates all start on the same date, the project due date. But, we have activities that we need to carry out before and after start date:

I have a similar problem! I want to be able to create a template for a meeting (as a task, not a project) and then have sub-tasks to send slides for legal review x days before the meeting, send notes to stakeholders x days after, etc.

Essentially, to increase readability of a bullet list and clearly distinguish each item, I wish to have some spacing between these items. Something like "Spacing after: 6pt" looks about right in my case.

I simply can't figure out how to combine the two using style templates. To create the screenshot, I applied one style to all bullet points (i.e. spacing 6pt after) and manually overrode that style on the first (18pt before) and last item (18pt after). And this clearly defeats the purpose of using styles.

Unfortunately, you cannot combine the two in any way for two reasons. First, Word does not allow to combine styles of the same type. Just as with classes in OOP, the inheriting style simply takes precedence when it redefines a setting. Secondly, in terms of styles, MS Word does not differentiate between regular paragraphs and lists. A list is really just a collection of paragraphs of the same kind.

Her page goes on to show how to use these. I strongly recommend reading that page. The key is to use the styles to apply the bullets, not the bullet buttons on the Ribbon. This is very much related to her page on automatic heading/outline numbering. The only real difference is using the styles already labeled for bullets. (You could use any existing paragraph style.)

One way to do this is to give the Bullet Points a different Style in Word (recent version) and use the paragraph spacing in the Style to change as you need. This is the best way as (a) the Style will always be available and (b) can be applied to any line or paragraph that you choose.

I'm trying to create a dynamic output in excel using a template where different parts of my workflow update different tabs in the template and produce a single dynamically named file that changes path location based on data in the source data on Sharepoint. I'm wondering if the Render, the Blob tools, or a command run would be best in this situation.

I've tried setting up the Blob with append on a single version of my output, but I'm getting the following error: "There were more than 16 records in the source" and I've noticed that with Blob, I can't use the "" and the tab name to isolate which part of the template file I want to blob. It just returns an error that the file can't be opened.

I've already determined how to create the Dynamic file name and path using a series of formulas to create a column with the final output path/filename. I'm mainly trying to determine how to combine my outputs with a template before creating the final output file for use. Unfortunately the data I have is highly sensitive so I can't provide a copy of my data and workflow.

This doesn't keep the tabs that are not being overriden. It only creates the new tabs. My existing template has additional tabs that point to the data and and create pivots/analytics on the data tabs that are being generated by the workflow.

I use conditional formatting rules in my excel templates to do any highlighting or formatting needed. Only downside is that tabs must be created in the template, so any new tabs will not have formatting.

Question to elaborate on the idea of creating a copy of the template and then writing to that copy, would it be possible to use a field in a file to create the copy? If so, what would be better, a run command or the blob function? Both functions are new for me as I've not used them previously.

So I have one app that currently creates a combined raw data file and creates file path information to be used downstream in a 2nd app workflow to dynamically create the current output files. However, I think I might be able to solve this by creating the file dynamically first when I create the raw output file and then have the 2nd workflow look for that new dynamic file and write to specific tabs/data references.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages